2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.sleepiq.internal.api;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
20 * This class represents configuration parameters for using {@link SleepIQ}.
22 * @author Gregory Moyer - Initial contribution
25 public class Configuration {
26 private String username = "";
27 private String password = "";
29 private URI baseUri = URI.create("https://api.sleepiq.sleepnumber.com");
32 * Get the username on the account.
34 * @return the username
36 public String getUsername() {
41 * Set the username on the account. This should be the username used to
42 * register with SleepIQ.
47 public void setUsername(String username) {
48 this.username = username;
52 * Set the username on the account. This should be the username used to
53 * register with SleepIQ.
57 * @return this configuration instance
59 public Configuration withUsername(String username) {
60 setUsername(username);
65 * Get the password on the account.
67 * @return the password
69 public String getPassword() {
74 * Set the password on the account. This should be the password used to
75 * register with SleepIQ.
80 public void setPassword(String password) {
81 this.password = password;
85 * Set the password on the account. This should be the password used to
86 * register with SleepIQ.
90 * @return this configuration instance
92 public Configuration withPassword(String password) {
93 setPassword(password);
98 * Get the base URI of the SleepIQ cloud service.
100 * @return the base URI
102 public URI getBaseUri() {
107 * Set the base URI of the SleepIQ cloud service. It is unlikely that this
108 * will need to be changed from its default value.
113 public void setBaseUri(URI baseUri) {
114 this.baseUri = baseUri;
118 * Set the base URI of the SleepIQ cloud service. It is unlikely that this
119 * will need to be changed from its default value.
123 * @return this configuration instance
125 public Configuration withBaseUri(URI baseUri) {