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.dbquery.internal.config;
15 import java.util.StringJoiner;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
20 * Contains fields mapping InfluxDB2 bridge configuration parameters.
22 * @author Joan Pujol - Initial contribution
25 public class InfluxDB2BridgeConfiguration {
29 private String bucket;
30 private String organization;
32 public InfluxDB2BridgeConfiguration(String url, String user, String token, String organization, String bucket) {
36 this.organization = organization;
40 public InfluxDB2BridgeConfiguration() {
41 // Used only when configuration is created by reflection using ConfigMapper
42 url = user = token = organization = bucket = "";
45 public String getUrl() {
49 public String getUser() {
53 public String getToken() {
57 public String getOrganization() {
61 public String getBucket() {
66 public String toString() {
67 return new StringJoiner(", ", InfluxDB2BridgeConfiguration.class.getSimpleName() + "[", "]")
68 .add("url='" + url + "'").add("user='" + user + "'").add("token='" + "*".repeat(token.length()) + "'")
69 .add("organization='" + organization + "'").add("bucket='" + bucket + "'").toString();