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/events/CloudWatchEvents_EXPORTS.h>
8 #include <aws/events/CloudWatchEventsRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/events/model/ConnectionAuthorizationType.h>
11 #include <aws/events/model/CreateConnectionAuthRequestParameters.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace CloudWatchEvents
17 {
18 namespace Model
19 {
20 
21   /**
22    */
23   class AWS_CLOUDWATCHEVENTS_API CreateConnectionRequest : public CloudWatchEventsRequest
24   {
25   public:
26     CreateConnectionRequest();
27 
28     // Service request name is the Operation name which will send this request out,
29     // each operation should has unique request name, so that we can get operation's name from this request.
30     // Note: this is not true for response, multiple operations may have the same response name,
31     // so we can not get operation's name from response.
GetServiceRequestName()32     inline virtual const char* GetServiceRequestName() const override { return "CreateConnection"; }
33 
34     Aws::String SerializePayload() const override;
35 
36     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
37 
38 
39     /**
40      * <p>The name for the connection to create.</p>
41      */
GetName()42     inline const Aws::String& GetName() const{ return m_name; }
43 
44     /**
45      * <p>The name for the connection to create.</p>
46      */
NameHasBeenSet()47     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 
49     /**
50      * <p>The name for the connection to create.</p>
51      */
SetName(const Aws::String & value)52     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
53 
54     /**
55      * <p>The name for the connection to create.</p>
56      */
SetName(Aws::String && value)57     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
58 
59     /**
60      * <p>The name for the connection to create.</p>
61      */
SetName(const char * value)62     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
63 
64     /**
65      * <p>The name for the connection to create.</p>
66      */
WithName(const Aws::String & value)67     inline CreateConnectionRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
68 
69     /**
70      * <p>The name for the connection to create.</p>
71      */
WithName(Aws::String && value)72     inline CreateConnectionRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
73 
74     /**
75      * <p>The name for the connection to create.</p>
76      */
WithName(const char * value)77     inline CreateConnectionRequest& WithName(const char* value) { SetName(value); return *this;}
78 
79 
80     /**
81      * <p>A description for the connection to create.</p>
82      */
GetDescription()83     inline const Aws::String& GetDescription() const{ return m_description; }
84 
85     /**
86      * <p>A description for the connection to create.</p>
87      */
DescriptionHasBeenSet()88     inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
89 
90     /**
91      * <p>A description for the connection to create.</p>
92      */
SetDescription(const Aws::String & value)93     inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
94 
95     /**
96      * <p>A description for the connection to create.</p>
97      */
SetDescription(Aws::String && value)98     inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
99 
100     /**
101      * <p>A description for the connection to create.</p>
102      */
SetDescription(const char * value)103     inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
104 
105     /**
106      * <p>A description for the connection to create.</p>
107      */
WithDescription(const Aws::String & value)108     inline CreateConnectionRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
109 
110     /**
111      * <p>A description for the connection to create.</p>
112      */
WithDescription(Aws::String && value)113     inline CreateConnectionRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
114 
115     /**
116      * <p>A description for the connection to create.</p>
117      */
WithDescription(const char * value)118     inline CreateConnectionRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
119 
120 
121     /**
122      * <p>The type of authorization to use for the connection.</p>
123      */
GetAuthorizationType()124     inline const ConnectionAuthorizationType& GetAuthorizationType() const{ return m_authorizationType; }
125 
126     /**
127      * <p>The type of authorization to use for the connection.</p>
128      */
AuthorizationTypeHasBeenSet()129     inline bool AuthorizationTypeHasBeenSet() const { return m_authorizationTypeHasBeenSet; }
130 
131     /**
132      * <p>The type of authorization to use for the connection.</p>
133      */
SetAuthorizationType(const ConnectionAuthorizationType & value)134     inline void SetAuthorizationType(const ConnectionAuthorizationType& value) { m_authorizationTypeHasBeenSet = true; m_authorizationType = value; }
135 
136     /**
137      * <p>The type of authorization to use for the connection.</p>
138      */
SetAuthorizationType(ConnectionAuthorizationType && value)139     inline void SetAuthorizationType(ConnectionAuthorizationType&& value) { m_authorizationTypeHasBeenSet = true; m_authorizationType = std::move(value); }
140 
141     /**
142      * <p>The type of authorization to use for the connection.</p>
143      */
WithAuthorizationType(const ConnectionAuthorizationType & value)144     inline CreateConnectionRequest& WithAuthorizationType(const ConnectionAuthorizationType& value) { SetAuthorizationType(value); return *this;}
145 
146     /**
147      * <p>The type of authorization to use for the connection.</p>
148      */
WithAuthorizationType(ConnectionAuthorizationType && value)149     inline CreateConnectionRequest& WithAuthorizationType(ConnectionAuthorizationType&& value) { SetAuthorizationType(std::move(value)); return *this;}
150 
151 
152     /**
153      * <p>A <code>CreateConnectionAuthRequestParameters</code> object that contains the
154      * authorization parameters to use to authorize with the endpoint. </p>
155      */
GetAuthParameters()156     inline const CreateConnectionAuthRequestParameters& GetAuthParameters() const{ return m_authParameters; }
157 
158     /**
159      * <p>A <code>CreateConnectionAuthRequestParameters</code> object that contains the
160      * authorization parameters to use to authorize with the endpoint. </p>
161      */
AuthParametersHasBeenSet()162     inline bool AuthParametersHasBeenSet() const { return m_authParametersHasBeenSet; }
163 
164     /**
165      * <p>A <code>CreateConnectionAuthRequestParameters</code> object that contains the
166      * authorization parameters to use to authorize with the endpoint. </p>
167      */
SetAuthParameters(const CreateConnectionAuthRequestParameters & value)168     inline void SetAuthParameters(const CreateConnectionAuthRequestParameters& value) { m_authParametersHasBeenSet = true; m_authParameters = value; }
169 
170     /**
171      * <p>A <code>CreateConnectionAuthRequestParameters</code> object that contains the
172      * authorization parameters to use to authorize with the endpoint. </p>
173      */
SetAuthParameters(CreateConnectionAuthRequestParameters && value)174     inline void SetAuthParameters(CreateConnectionAuthRequestParameters&& value) { m_authParametersHasBeenSet = true; m_authParameters = std::move(value); }
175 
176     /**
177      * <p>A <code>CreateConnectionAuthRequestParameters</code> object that contains the
178      * authorization parameters to use to authorize with the endpoint. </p>
179      */
WithAuthParameters(const CreateConnectionAuthRequestParameters & value)180     inline CreateConnectionRequest& WithAuthParameters(const CreateConnectionAuthRequestParameters& value) { SetAuthParameters(value); return *this;}
181 
182     /**
183      * <p>A <code>CreateConnectionAuthRequestParameters</code> object that contains the
184      * authorization parameters to use to authorize with the endpoint. </p>
185      */
WithAuthParameters(CreateConnectionAuthRequestParameters && value)186     inline CreateConnectionRequest& WithAuthParameters(CreateConnectionAuthRequestParameters&& value) { SetAuthParameters(std::move(value)); return *this;}
187 
188   private:
189 
190     Aws::String m_name;
191     bool m_nameHasBeenSet;
192 
193     Aws::String m_description;
194     bool m_descriptionHasBeenSet;
195 
196     ConnectionAuthorizationType m_authorizationType;
197     bool m_authorizationTypeHasBeenSet;
198 
199     CreateConnectionAuthRequestParameters m_authParameters;
200     bool m_authParametersHasBeenSet;
201   };
202 
203 } // namespace Model
204 } // namespace CloudWatchEvents
205 } // namespace Aws
206