]> git.basschouten.com Git - openhab-addons.git/blob
4802c900da0c09e81cf28cab67adb9bd1033c8d4
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.linky.internal.dto;
14
15 import java.util.ArrayList;
16 import java.util.List;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
20
21 /**
22  * The {@link AuthData} holds authentication information
23  *
24  * @author GaĆ«l L'hopital - Initial contribution
25  */
26 @NonNullByDefault
27 public class AuthData {
28     public class AuthDataCallBack {
29         public class NameValuePair {
30             public @Nullable String name;
31             public @Nullable Object value;
32
33             public @Nullable String valueAsString() {
34                 if (value instanceof String) {
35                     return (String) value;
36                 }
37                 return null;
38             }
39         }
40
41         public @Nullable String type;
42
43         public List<NameValuePair> output = new ArrayList<>();
44         public List<NameValuePair> input = new ArrayList<>();
45     }
46
47     public @Nullable String authId;
48     public @Nullable String template;
49     public @Nullable String stage;
50     public @Nullable String header;
51     public List<AuthDataCallBack> callbacks = new ArrayList<>();
52 }