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/cognito-sync/CognitoSync_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/cognito-sync/model/StreamingStatus.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace CognitoSync
23 {
24 namespace Model
25 {
26 
27   /**
28    * Configuration options for configure Cognito streams.<p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/CognitoStreams">AWS
30    * API Reference</a></p>
31    */
32   class AWS_COGNITOSYNC_API CognitoStreams
33   {
34   public:
35     CognitoStreams();
36     CognitoStreams(Aws::Utils::Json::JsonView jsonValue);
37     CognitoStreams& operator=(Aws::Utils::Json::JsonView jsonValue);
38     Aws::Utils::Json::JsonValue Jsonize() const;
39 
40 
41     /**
42      * The name of the Cognito stream to receive updates. This stream must be in the
43      * developers account and in the same region as the identity pool.
44      */
GetStreamName()45     inline const Aws::String& GetStreamName() const{ return m_streamName; }
46 
47     /**
48      * The name of the Cognito stream to receive updates. This stream must be in the
49      * developers account and in the same region as the identity pool.
50      */
StreamNameHasBeenSet()51     inline bool StreamNameHasBeenSet() const { return m_streamNameHasBeenSet; }
52 
53     /**
54      * The name of the Cognito stream to receive updates. This stream must be in the
55      * developers account and in the same region as the identity pool.
56      */
SetStreamName(const Aws::String & value)57     inline void SetStreamName(const Aws::String& value) { m_streamNameHasBeenSet = true; m_streamName = value; }
58 
59     /**
60      * The name of the Cognito stream to receive updates. This stream must be in the
61      * developers account and in the same region as the identity pool.
62      */
SetStreamName(Aws::String && value)63     inline void SetStreamName(Aws::String&& value) { m_streamNameHasBeenSet = true; m_streamName = std::move(value); }
64 
65     /**
66      * The name of the Cognito stream to receive updates. This stream must be in the
67      * developers account and in the same region as the identity pool.
68      */
SetStreamName(const char * value)69     inline void SetStreamName(const char* value) { m_streamNameHasBeenSet = true; m_streamName.assign(value); }
70 
71     /**
72      * The name of the Cognito stream to receive updates. This stream must be in the
73      * developers account and in the same region as the identity pool.
74      */
WithStreamName(const Aws::String & value)75     inline CognitoStreams& WithStreamName(const Aws::String& value) { SetStreamName(value); return *this;}
76 
77     /**
78      * The name of the Cognito stream to receive updates. This stream must be in the
79      * developers account and in the same region as the identity pool.
80      */
WithStreamName(Aws::String && value)81     inline CognitoStreams& WithStreamName(Aws::String&& value) { SetStreamName(std::move(value)); return *this;}
82 
83     /**
84      * The name of the Cognito stream to receive updates. This stream must be in the
85      * developers account and in the same region as the identity pool.
86      */
WithStreamName(const char * value)87     inline CognitoStreams& WithStreamName(const char* value) { SetStreamName(value); return *this;}
88 
89 
90     /**
91      * The ARN of the role Amazon Cognito can assume in order to publish to the stream.
92      * This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord
93      * on your Cognito stream.
94      */
GetRoleArn()95     inline const Aws::String& GetRoleArn() const{ return m_roleArn; }
96 
97     /**
98      * The ARN of the role Amazon Cognito can assume in order to publish to the stream.
99      * This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord
100      * on your Cognito stream.
101      */
RoleArnHasBeenSet()102     inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
103 
104     /**
105      * The ARN of the role Amazon Cognito can assume in order to publish to the stream.
106      * This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord
107      * on your Cognito stream.
108      */
SetRoleArn(const Aws::String & value)109     inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
110 
111     /**
112      * The ARN of the role Amazon Cognito can assume in order to publish to the stream.
113      * This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord
114      * on your Cognito stream.
115      */
SetRoleArn(Aws::String && value)116     inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); }
117 
118     /**
119      * The ARN of the role Amazon Cognito can assume in order to publish to the stream.
120      * This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord
121      * on your Cognito stream.
122      */
SetRoleArn(const char * value)123     inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); }
124 
125     /**
126      * The ARN of the role Amazon Cognito can assume in order to publish to the stream.
127      * This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord
128      * on your Cognito stream.
129      */
WithRoleArn(const Aws::String & value)130     inline CognitoStreams& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;}
131 
132     /**
133      * The ARN of the role Amazon Cognito can assume in order to publish to the stream.
134      * This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord
135      * on your Cognito stream.
136      */
WithRoleArn(Aws::String && value)137     inline CognitoStreams& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;}
138 
139     /**
140      * The ARN of the role Amazon Cognito can assume in order to publish to the stream.
141      * This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord
142      * on your Cognito stream.
143      */
WithRoleArn(const char * value)144     inline CognitoStreams& WithRoleArn(const char* value) { SetRoleArn(value); return *this;}
145 
146 
147     /**
148      * Status of the Cognito streams. Valid values are: <p>ENABLED - Streaming of
149      * updates to identity pool is enabled.</p> <p>DISABLED - Streaming of updates to
150      * identity pool is disabled. Bulk publish will also fail if StreamingStatus is
151      * DISABLED.</p>
152      */
GetStreamingStatus()153     inline const StreamingStatus& GetStreamingStatus() const{ return m_streamingStatus; }
154 
155     /**
156      * Status of the Cognito streams. Valid values are: <p>ENABLED - Streaming of
157      * updates to identity pool is enabled.</p> <p>DISABLED - Streaming of updates to
158      * identity pool is disabled. Bulk publish will also fail if StreamingStatus is
159      * DISABLED.</p>
160      */
StreamingStatusHasBeenSet()161     inline bool StreamingStatusHasBeenSet() const { return m_streamingStatusHasBeenSet; }
162 
163     /**
164      * Status of the Cognito streams. Valid values are: <p>ENABLED - Streaming of
165      * updates to identity pool is enabled.</p> <p>DISABLED - Streaming of updates to
166      * identity pool is disabled. Bulk publish will also fail if StreamingStatus is
167      * DISABLED.</p>
168      */
SetStreamingStatus(const StreamingStatus & value)169     inline void SetStreamingStatus(const StreamingStatus& value) { m_streamingStatusHasBeenSet = true; m_streamingStatus = value; }
170 
171     /**
172      * Status of the Cognito streams. Valid values are: <p>ENABLED - Streaming of
173      * updates to identity pool is enabled.</p> <p>DISABLED - Streaming of updates to
174      * identity pool is disabled. Bulk publish will also fail if StreamingStatus is
175      * DISABLED.</p>
176      */
SetStreamingStatus(StreamingStatus && value)177     inline void SetStreamingStatus(StreamingStatus&& value) { m_streamingStatusHasBeenSet = true; m_streamingStatus = std::move(value); }
178 
179     /**
180      * Status of the Cognito streams. Valid values are: <p>ENABLED - Streaming of
181      * updates to identity pool is enabled.</p> <p>DISABLED - Streaming of updates to
182      * identity pool is disabled. Bulk publish will also fail if StreamingStatus is
183      * DISABLED.</p>
184      */
WithStreamingStatus(const StreamingStatus & value)185     inline CognitoStreams& WithStreamingStatus(const StreamingStatus& value) { SetStreamingStatus(value); return *this;}
186 
187     /**
188      * Status of the Cognito streams. Valid values are: <p>ENABLED - Streaming of
189      * updates to identity pool is enabled.</p> <p>DISABLED - Streaming of updates to
190      * identity pool is disabled. Bulk publish will also fail if StreamingStatus is
191      * DISABLED.</p>
192      */
WithStreamingStatus(StreamingStatus && value)193     inline CognitoStreams& WithStreamingStatus(StreamingStatus&& value) { SetStreamingStatus(std::move(value)); return *this;}
194 
195   private:
196 
197     Aws::String m_streamName;
198     bool m_streamNameHasBeenSet;
199 
200     Aws::String m_roleArn;
201     bool m_roleArnHasBeenSet;
202 
203     StreamingStatus m_streamingStatus;
204     bool m_streamingStatusHasBeenSet;
205   };
206 
207 } // namespace Model
208 } // namespace CognitoSync
209 } // namespace Aws
210