1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/workspaces/WorkSpaces_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/workspaces/model/ConnectionAliasState.h>
10 #include <aws/core/utils/memory/stl/AWSVector.h>
11 #include <aws/workspaces/model/ConnectionAliasAssociation.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace WorkSpaces
25 {
26 namespace Model
27 {
28 
29   /**
30    * <p>Describes a connection alias. Connection aliases are used for cross-Region
31    * redirection. For more information, see <a
32    * href="https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html">
33    * Cross-Region Redirection for Amazon WorkSpaces</a>.</p><p><h3>See Also:</h3>
34    * <a
35    * href="http://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ConnectionAlias">AWS
36    * API Reference</a></p>
37    */
38   class AWS_WORKSPACES_API ConnectionAlias
39   {
40   public:
41     ConnectionAlias();
42     ConnectionAlias(Aws::Utils::Json::JsonView jsonValue);
43     ConnectionAlias& operator=(Aws::Utils::Json::JsonView jsonValue);
44     Aws::Utils::Json::JsonValue Jsonize() const;
45 
46 
47     /**
48      * <p>The connection string specified for the connection alias. The connection
49      * string must be in the form of a fully qualified domain name (FQDN), such as
50      * <code>www.example.com</code>.</p>
51      */
GetConnectionString()52     inline const Aws::String& GetConnectionString() const{ return m_connectionString; }
53 
54     /**
55      * <p>The connection string specified for the connection alias. The connection
56      * string must be in the form of a fully qualified domain name (FQDN), such as
57      * <code>www.example.com</code>.</p>
58      */
ConnectionStringHasBeenSet()59     inline bool ConnectionStringHasBeenSet() const { return m_connectionStringHasBeenSet; }
60 
61     /**
62      * <p>The connection string specified for the connection alias. The connection
63      * string must be in the form of a fully qualified domain name (FQDN), such as
64      * <code>www.example.com</code>.</p>
65      */
SetConnectionString(const Aws::String & value)66     inline void SetConnectionString(const Aws::String& value) { m_connectionStringHasBeenSet = true; m_connectionString = value; }
67 
68     /**
69      * <p>The connection string specified for the connection alias. The connection
70      * string must be in the form of a fully qualified domain name (FQDN), such as
71      * <code>www.example.com</code>.</p>
72      */
SetConnectionString(Aws::String && value)73     inline void SetConnectionString(Aws::String&& value) { m_connectionStringHasBeenSet = true; m_connectionString = std::move(value); }
74 
75     /**
76      * <p>The connection string specified for the connection alias. The connection
77      * string must be in the form of a fully qualified domain name (FQDN), such as
78      * <code>www.example.com</code>.</p>
79      */
SetConnectionString(const char * value)80     inline void SetConnectionString(const char* value) { m_connectionStringHasBeenSet = true; m_connectionString.assign(value); }
81 
82     /**
83      * <p>The connection string specified for the connection alias. The connection
84      * string must be in the form of a fully qualified domain name (FQDN), such as
85      * <code>www.example.com</code>.</p>
86      */
WithConnectionString(const Aws::String & value)87     inline ConnectionAlias& WithConnectionString(const Aws::String& value) { SetConnectionString(value); return *this;}
88 
89     /**
90      * <p>The connection string specified for the connection alias. The connection
91      * string must be in the form of a fully qualified domain name (FQDN), such as
92      * <code>www.example.com</code>.</p>
93      */
WithConnectionString(Aws::String && value)94     inline ConnectionAlias& WithConnectionString(Aws::String&& value) { SetConnectionString(std::move(value)); return *this;}
95 
96     /**
97      * <p>The connection string specified for the connection alias. The connection
98      * string must be in the form of a fully qualified domain name (FQDN), such as
99      * <code>www.example.com</code>.</p>
100      */
WithConnectionString(const char * value)101     inline ConnectionAlias& WithConnectionString(const char* value) { SetConnectionString(value); return *this;}
102 
103 
104     /**
105      * <p>The identifier of the connection alias.</p>
106      */
GetAliasId()107     inline const Aws::String& GetAliasId() const{ return m_aliasId; }
108 
109     /**
110      * <p>The identifier of the connection alias.</p>
111      */
AliasIdHasBeenSet()112     inline bool AliasIdHasBeenSet() const { return m_aliasIdHasBeenSet; }
113 
114     /**
115      * <p>The identifier of the connection alias.</p>
116      */
SetAliasId(const Aws::String & value)117     inline void SetAliasId(const Aws::String& value) { m_aliasIdHasBeenSet = true; m_aliasId = value; }
118 
119     /**
120      * <p>The identifier of the connection alias.</p>
121      */
SetAliasId(Aws::String && value)122     inline void SetAliasId(Aws::String&& value) { m_aliasIdHasBeenSet = true; m_aliasId = std::move(value); }
123 
124     /**
125      * <p>The identifier of the connection alias.</p>
126      */
SetAliasId(const char * value)127     inline void SetAliasId(const char* value) { m_aliasIdHasBeenSet = true; m_aliasId.assign(value); }
128 
129     /**
130      * <p>The identifier of the connection alias.</p>
131      */
WithAliasId(const Aws::String & value)132     inline ConnectionAlias& WithAliasId(const Aws::String& value) { SetAliasId(value); return *this;}
133 
134     /**
135      * <p>The identifier of the connection alias.</p>
136      */
WithAliasId(Aws::String && value)137     inline ConnectionAlias& WithAliasId(Aws::String&& value) { SetAliasId(std::move(value)); return *this;}
138 
139     /**
140      * <p>The identifier of the connection alias.</p>
141      */
WithAliasId(const char * value)142     inline ConnectionAlias& WithAliasId(const char* value) { SetAliasId(value); return *this;}
143 
144 
145     /**
146      * <p>The current state of the connection alias.</p>
147      */
GetState()148     inline const ConnectionAliasState& GetState() const{ return m_state; }
149 
150     /**
151      * <p>The current state of the connection alias.</p>
152      */
StateHasBeenSet()153     inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
154 
155     /**
156      * <p>The current state of the connection alias.</p>
157      */
SetState(const ConnectionAliasState & value)158     inline void SetState(const ConnectionAliasState& value) { m_stateHasBeenSet = true; m_state = value; }
159 
160     /**
161      * <p>The current state of the connection alias.</p>
162      */
SetState(ConnectionAliasState && value)163     inline void SetState(ConnectionAliasState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
164 
165     /**
166      * <p>The current state of the connection alias.</p>
167      */
WithState(const ConnectionAliasState & value)168     inline ConnectionAlias& WithState(const ConnectionAliasState& value) { SetState(value); return *this;}
169 
170     /**
171      * <p>The current state of the connection alias.</p>
172      */
WithState(ConnectionAliasState && value)173     inline ConnectionAlias& WithState(ConnectionAliasState&& value) { SetState(std::move(value)); return *this;}
174 
175 
176     /**
177      * <p>The identifier of the Amazon Web Services account that owns the connection
178      * alias.</p>
179      */
GetOwnerAccountId()180     inline const Aws::String& GetOwnerAccountId() const{ return m_ownerAccountId; }
181 
182     /**
183      * <p>The identifier of the Amazon Web Services account that owns the connection
184      * alias.</p>
185      */
OwnerAccountIdHasBeenSet()186     inline bool OwnerAccountIdHasBeenSet() const { return m_ownerAccountIdHasBeenSet; }
187 
188     /**
189      * <p>The identifier of the Amazon Web Services account that owns the connection
190      * alias.</p>
191      */
SetOwnerAccountId(const Aws::String & value)192     inline void SetOwnerAccountId(const Aws::String& value) { m_ownerAccountIdHasBeenSet = true; m_ownerAccountId = value; }
193 
194     /**
195      * <p>The identifier of the Amazon Web Services account that owns the connection
196      * alias.</p>
197      */
SetOwnerAccountId(Aws::String && value)198     inline void SetOwnerAccountId(Aws::String&& value) { m_ownerAccountIdHasBeenSet = true; m_ownerAccountId = std::move(value); }
199 
200     /**
201      * <p>The identifier of the Amazon Web Services account that owns the connection
202      * alias.</p>
203      */
SetOwnerAccountId(const char * value)204     inline void SetOwnerAccountId(const char* value) { m_ownerAccountIdHasBeenSet = true; m_ownerAccountId.assign(value); }
205 
206     /**
207      * <p>The identifier of the Amazon Web Services account that owns the connection
208      * alias.</p>
209      */
WithOwnerAccountId(const Aws::String & value)210     inline ConnectionAlias& WithOwnerAccountId(const Aws::String& value) { SetOwnerAccountId(value); return *this;}
211 
212     /**
213      * <p>The identifier of the Amazon Web Services account that owns the connection
214      * alias.</p>
215      */
WithOwnerAccountId(Aws::String && value)216     inline ConnectionAlias& WithOwnerAccountId(Aws::String&& value) { SetOwnerAccountId(std::move(value)); return *this;}
217 
218     /**
219      * <p>The identifier of the Amazon Web Services account that owns the connection
220      * alias.</p>
221      */
WithOwnerAccountId(const char * value)222     inline ConnectionAlias& WithOwnerAccountId(const char* value) { SetOwnerAccountId(value); return *this;}
223 
224 
225     /**
226      * <p>The association status of the connection alias.</p>
227      */
GetAssociations()228     inline const Aws::Vector<ConnectionAliasAssociation>& GetAssociations() const{ return m_associations; }
229 
230     /**
231      * <p>The association status of the connection alias.</p>
232      */
AssociationsHasBeenSet()233     inline bool AssociationsHasBeenSet() const { return m_associationsHasBeenSet; }
234 
235     /**
236      * <p>The association status of the connection alias.</p>
237      */
SetAssociations(const Aws::Vector<ConnectionAliasAssociation> & value)238     inline void SetAssociations(const Aws::Vector<ConnectionAliasAssociation>& value) { m_associationsHasBeenSet = true; m_associations = value; }
239 
240     /**
241      * <p>The association status of the connection alias.</p>
242      */
SetAssociations(Aws::Vector<ConnectionAliasAssociation> && value)243     inline void SetAssociations(Aws::Vector<ConnectionAliasAssociation>&& value) { m_associationsHasBeenSet = true; m_associations = std::move(value); }
244 
245     /**
246      * <p>The association status of the connection alias.</p>
247      */
WithAssociations(const Aws::Vector<ConnectionAliasAssociation> & value)248     inline ConnectionAlias& WithAssociations(const Aws::Vector<ConnectionAliasAssociation>& value) { SetAssociations(value); return *this;}
249 
250     /**
251      * <p>The association status of the connection alias.</p>
252      */
WithAssociations(Aws::Vector<ConnectionAliasAssociation> && value)253     inline ConnectionAlias& WithAssociations(Aws::Vector<ConnectionAliasAssociation>&& value) { SetAssociations(std::move(value)); return *this;}
254 
255     /**
256      * <p>The association status of the connection alias.</p>
257      */
AddAssociations(const ConnectionAliasAssociation & value)258     inline ConnectionAlias& AddAssociations(const ConnectionAliasAssociation& value) { m_associationsHasBeenSet = true; m_associations.push_back(value); return *this; }
259 
260     /**
261      * <p>The association status of the connection alias.</p>
262      */
AddAssociations(ConnectionAliasAssociation && value)263     inline ConnectionAlias& AddAssociations(ConnectionAliasAssociation&& value) { m_associationsHasBeenSet = true; m_associations.push_back(std::move(value)); return *this; }
264 
265   private:
266 
267     Aws::String m_connectionString;
268     bool m_connectionStringHasBeenSet;
269 
270     Aws::String m_aliasId;
271     bool m_aliasIdHasBeenSet;
272 
273     ConnectionAliasState m_state;
274     bool m_stateHasBeenSet;
275 
276     Aws::String m_ownerAccountId;
277     bool m_ownerAccountIdHasBeenSet;
278 
279     Aws::Vector<ConnectionAliasAssociation> m_associations;
280     bool m_associationsHasBeenSet;
281   };
282 
283 } // namespace Model
284 } // namespace WorkSpaces
285 } // namespace Aws
286