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/medialive/MediaLive_EXPORTS.h>
8 #include <aws/medialive/model/HlsAkamaiHttpTransferMode.h>
9 #include <aws/core/utils/memory/stl/AWSString.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 MediaLive
23 {
24 namespace Model
25 {
26 
27   /**
28    * Hls Akamai Settings<p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/HlsAkamaiSettings">AWS
30    * API Reference</a></p>
31    */
32   class AWS_MEDIALIVE_API HlsAkamaiSettings
33   {
34   public:
35     HlsAkamaiSettings();
36     HlsAkamaiSettings(Aws::Utils::Json::JsonView jsonValue);
37     HlsAkamaiSettings& operator=(Aws::Utils::Json::JsonView jsonValue);
38     Aws::Utils::Json::JsonValue Jsonize() const;
39 
40 
41     /**
42      * Number of seconds to wait before retrying connection to the CDN if the
43      * connection is lost.
44      */
GetConnectionRetryInterval()45     inline int GetConnectionRetryInterval() const{ return m_connectionRetryInterval; }
46 
47     /**
48      * Number of seconds to wait before retrying connection to the CDN if the
49      * connection is lost.
50      */
ConnectionRetryIntervalHasBeenSet()51     inline bool ConnectionRetryIntervalHasBeenSet() const { return m_connectionRetryIntervalHasBeenSet; }
52 
53     /**
54      * Number of seconds to wait before retrying connection to the CDN if the
55      * connection is lost.
56      */
SetConnectionRetryInterval(int value)57     inline void SetConnectionRetryInterval(int value) { m_connectionRetryIntervalHasBeenSet = true; m_connectionRetryInterval = value; }
58 
59     /**
60      * Number of seconds to wait before retrying connection to the CDN if the
61      * connection is lost.
62      */
WithConnectionRetryInterval(int value)63     inline HlsAkamaiSettings& WithConnectionRetryInterval(int value) { SetConnectionRetryInterval(value); return *this;}
64 
65 
66     /**
67      * Size in seconds of file cache for streaming outputs.
68      */
GetFilecacheDuration()69     inline int GetFilecacheDuration() const{ return m_filecacheDuration; }
70 
71     /**
72      * Size in seconds of file cache for streaming outputs.
73      */
FilecacheDurationHasBeenSet()74     inline bool FilecacheDurationHasBeenSet() const { return m_filecacheDurationHasBeenSet; }
75 
76     /**
77      * Size in seconds of file cache for streaming outputs.
78      */
SetFilecacheDuration(int value)79     inline void SetFilecacheDuration(int value) { m_filecacheDurationHasBeenSet = true; m_filecacheDuration = value; }
80 
81     /**
82      * Size in seconds of file cache for streaming outputs.
83      */
WithFilecacheDuration(int value)84     inline HlsAkamaiSettings& WithFilecacheDuration(int value) { SetFilecacheDuration(value); return *this;}
85 
86 
87     /**
88      * Specify whether or not to use chunked transfer encoding to Akamai. User should
89      * contact Akamai to enable this feature.
90      */
GetHttpTransferMode()91     inline const HlsAkamaiHttpTransferMode& GetHttpTransferMode() const{ return m_httpTransferMode; }
92 
93     /**
94      * Specify whether or not to use chunked transfer encoding to Akamai. User should
95      * contact Akamai to enable this feature.
96      */
HttpTransferModeHasBeenSet()97     inline bool HttpTransferModeHasBeenSet() const { return m_httpTransferModeHasBeenSet; }
98 
99     /**
100      * Specify whether or not to use chunked transfer encoding to Akamai. User should
101      * contact Akamai to enable this feature.
102      */
SetHttpTransferMode(const HlsAkamaiHttpTransferMode & value)103     inline void SetHttpTransferMode(const HlsAkamaiHttpTransferMode& value) { m_httpTransferModeHasBeenSet = true; m_httpTransferMode = value; }
104 
105     /**
106      * Specify whether or not to use chunked transfer encoding to Akamai. User should
107      * contact Akamai to enable this feature.
108      */
SetHttpTransferMode(HlsAkamaiHttpTransferMode && value)109     inline void SetHttpTransferMode(HlsAkamaiHttpTransferMode&& value) { m_httpTransferModeHasBeenSet = true; m_httpTransferMode = std::move(value); }
110 
111     /**
112      * Specify whether or not to use chunked transfer encoding to Akamai. User should
113      * contact Akamai to enable this feature.
114      */
WithHttpTransferMode(const HlsAkamaiHttpTransferMode & value)115     inline HlsAkamaiSettings& WithHttpTransferMode(const HlsAkamaiHttpTransferMode& value) { SetHttpTransferMode(value); return *this;}
116 
117     /**
118      * Specify whether or not to use chunked transfer encoding to Akamai. User should
119      * contact Akamai to enable this feature.
120      */
WithHttpTransferMode(HlsAkamaiHttpTransferMode && value)121     inline HlsAkamaiSettings& WithHttpTransferMode(HlsAkamaiHttpTransferMode&& value) { SetHttpTransferMode(std::move(value)); return *this;}
122 
123 
124     /**
125      * Number of retry attempts that will be made before the Live Event is put into an
126      * error state.
127      */
GetNumRetries()128     inline int GetNumRetries() const{ return m_numRetries; }
129 
130     /**
131      * Number of retry attempts that will be made before the Live Event is put into an
132      * error state.
133      */
NumRetriesHasBeenSet()134     inline bool NumRetriesHasBeenSet() const { return m_numRetriesHasBeenSet; }
135 
136     /**
137      * Number of retry attempts that will be made before the Live Event is put into an
138      * error state.
139      */
SetNumRetries(int value)140     inline void SetNumRetries(int value) { m_numRetriesHasBeenSet = true; m_numRetries = value; }
141 
142     /**
143      * Number of retry attempts that will be made before the Live Event is put into an
144      * error state.
145      */
WithNumRetries(int value)146     inline HlsAkamaiSettings& WithNumRetries(int value) { SetNumRetries(value); return *this;}
147 
148 
149     /**
150      * If a streaming output fails, number of seconds to wait until a restart is
151      * initiated. A value of 0 means never restart.
152      */
GetRestartDelay()153     inline int GetRestartDelay() const{ return m_restartDelay; }
154 
155     /**
156      * If a streaming output fails, number of seconds to wait until a restart is
157      * initiated. A value of 0 means never restart.
158      */
RestartDelayHasBeenSet()159     inline bool RestartDelayHasBeenSet() const { return m_restartDelayHasBeenSet; }
160 
161     /**
162      * If a streaming output fails, number of seconds to wait until a restart is
163      * initiated. A value of 0 means never restart.
164      */
SetRestartDelay(int value)165     inline void SetRestartDelay(int value) { m_restartDelayHasBeenSet = true; m_restartDelay = value; }
166 
167     /**
168      * If a streaming output fails, number of seconds to wait until a restart is
169      * initiated. A value of 0 means never restart.
170      */
WithRestartDelay(int value)171     inline HlsAkamaiSettings& WithRestartDelay(int value) { SetRestartDelay(value); return *this;}
172 
173 
174     /**
175      * Salt for authenticated Akamai.
176      */
GetSalt()177     inline const Aws::String& GetSalt() const{ return m_salt; }
178 
179     /**
180      * Salt for authenticated Akamai.
181      */
SaltHasBeenSet()182     inline bool SaltHasBeenSet() const { return m_saltHasBeenSet; }
183 
184     /**
185      * Salt for authenticated Akamai.
186      */
SetSalt(const Aws::String & value)187     inline void SetSalt(const Aws::String& value) { m_saltHasBeenSet = true; m_salt = value; }
188 
189     /**
190      * Salt for authenticated Akamai.
191      */
SetSalt(Aws::String && value)192     inline void SetSalt(Aws::String&& value) { m_saltHasBeenSet = true; m_salt = std::move(value); }
193 
194     /**
195      * Salt for authenticated Akamai.
196      */
SetSalt(const char * value)197     inline void SetSalt(const char* value) { m_saltHasBeenSet = true; m_salt.assign(value); }
198 
199     /**
200      * Salt for authenticated Akamai.
201      */
WithSalt(const Aws::String & value)202     inline HlsAkamaiSettings& WithSalt(const Aws::String& value) { SetSalt(value); return *this;}
203 
204     /**
205      * Salt for authenticated Akamai.
206      */
WithSalt(Aws::String && value)207     inline HlsAkamaiSettings& WithSalt(Aws::String&& value) { SetSalt(std::move(value)); return *this;}
208 
209     /**
210      * Salt for authenticated Akamai.
211      */
WithSalt(const char * value)212     inline HlsAkamaiSettings& WithSalt(const char* value) { SetSalt(value); return *this;}
213 
214 
215     /**
216      * Token parameter for authenticated akamai. If not specified, _gda_ is used.
217      */
GetToken()218     inline const Aws::String& GetToken() const{ return m_token; }
219 
220     /**
221      * Token parameter for authenticated akamai. If not specified, _gda_ is used.
222      */
TokenHasBeenSet()223     inline bool TokenHasBeenSet() const { return m_tokenHasBeenSet; }
224 
225     /**
226      * Token parameter for authenticated akamai. If not specified, _gda_ is used.
227      */
SetToken(const Aws::String & value)228     inline void SetToken(const Aws::String& value) { m_tokenHasBeenSet = true; m_token = value; }
229 
230     /**
231      * Token parameter for authenticated akamai. If not specified, _gda_ is used.
232      */
SetToken(Aws::String && value)233     inline void SetToken(Aws::String&& value) { m_tokenHasBeenSet = true; m_token = std::move(value); }
234 
235     /**
236      * Token parameter for authenticated akamai. If not specified, _gda_ is used.
237      */
SetToken(const char * value)238     inline void SetToken(const char* value) { m_tokenHasBeenSet = true; m_token.assign(value); }
239 
240     /**
241      * Token parameter for authenticated akamai. If not specified, _gda_ is used.
242      */
WithToken(const Aws::String & value)243     inline HlsAkamaiSettings& WithToken(const Aws::String& value) { SetToken(value); return *this;}
244 
245     /**
246      * Token parameter for authenticated akamai. If not specified, _gda_ is used.
247      */
WithToken(Aws::String && value)248     inline HlsAkamaiSettings& WithToken(Aws::String&& value) { SetToken(std::move(value)); return *this;}
249 
250     /**
251      * Token parameter for authenticated akamai. If not specified, _gda_ is used.
252      */
WithToken(const char * value)253     inline HlsAkamaiSettings& WithToken(const char* value) { SetToken(value); return *this;}
254 
255   private:
256 
257     int m_connectionRetryInterval;
258     bool m_connectionRetryIntervalHasBeenSet;
259 
260     int m_filecacheDuration;
261     bool m_filecacheDurationHasBeenSet;
262 
263     HlsAkamaiHttpTransferMode m_httpTransferMode;
264     bool m_httpTransferModeHasBeenSet;
265 
266     int m_numRetries;
267     bool m_numRetriesHasBeenSet;
268 
269     int m_restartDelay;
270     bool m_restartDelayHasBeenSet;
271 
272     Aws::String m_salt;
273     bool m_saltHasBeenSet;
274 
275     Aws::String m_token;
276     bool m_tokenHasBeenSet;
277   };
278 
279 } // namespace Model
280 } // namespace MediaLive
281 } // namespace Aws
282