AWS SDK for C++  0.12.9
AWS SDK for C++
Service.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ecs/ECS_EXPORTS.h>
24 
25 namespace Aws
26 {
27 namespace Utils
28 {
29 namespace Json
30 {
31  class JsonValue;
32 } // namespace Json
33 } // namespace Utils
34 namespace ECS
35 {
36 namespace Model
37 {
38 
43  {
44  public:
45  Service();
46  Service(const Aws::Utils::Json::JsonValue& jsonValue);
47  Service& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
48  Aws::Utils::Json::JsonValue Jsonize() const;
49 
58  inline const Aws::String& GetServiceArn() const{ return m_serviceArn; }
59 
68  inline void SetServiceArn(const Aws::String& value) { m_serviceArnHasBeenSet = true; m_serviceArn = value; }
69 
78  inline void SetServiceArn(Aws::String&& value) { m_serviceArnHasBeenSet = true; m_serviceArn = value; }
79 
88  inline void SetServiceArn(const char* value) { m_serviceArnHasBeenSet = true; m_serviceArn.assign(value); }
89 
98  inline Service& WithServiceArn(const Aws::String& value) { SetServiceArn(value); return *this;}
99 
108  inline Service& WithServiceArn(Aws::String&& value) { SetServiceArn(value); return *this;}
109 
118  inline Service& WithServiceArn(const char* value) { SetServiceArn(value); return *this;}
119 
126  inline const Aws::String& GetServiceName() const{ return m_serviceName; }
127 
134  inline void SetServiceName(const Aws::String& value) { m_serviceNameHasBeenSet = true; m_serviceName = value; }
135 
142  inline void SetServiceName(Aws::String&& value) { m_serviceNameHasBeenSet = true; m_serviceName = value; }
143 
150  inline void SetServiceName(const char* value) { m_serviceNameHasBeenSet = true; m_serviceName.assign(value); }
151 
158  inline Service& WithServiceName(const Aws::String& value) { SetServiceName(value); return *this;}
159 
166  inline Service& WithServiceName(Aws::String&& value) { SetServiceName(value); return *this;}
167 
174  inline Service& WithServiceName(const char* value) { SetServiceName(value); return *this;}
175 
179  inline const Aws::String& GetClusterArn() const{ return m_clusterArn; }
180 
184  inline void SetClusterArn(const Aws::String& value) { m_clusterArnHasBeenSet = true; m_clusterArn = value; }
185 
189  inline void SetClusterArn(Aws::String&& value) { m_clusterArnHasBeenSet = true; m_clusterArn = value; }
190 
194  inline void SetClusterArn(const char* value) { m_clusterArnHasBeenSet = true; m_clusterArn.assign(value); }
195 
199  inline Service& WithClusterArn(const Aws::String& value) { SetClusterArn(value); return *this;}
200 
204  inline Service& WithClusterArn(Aws::String&& value) { SetClusterArn(value); return *this;}
205 
209  inline Service& WithClusterArn(const char* value) { SetClusterArn(value); return *this;}
210 
216  inline const Aws::Vector<LoadBalancer>& GetLoadBalancers() const{ return m_loadBalancers; }
217 
223  inline void SetLoadBalancers(const Aws::Vector<LoadBalancer>& value) { m_loadBalancersHasBeenSet = true; m_loadBalancers = value; }
224 
230  inline void SetLoadBalancers(Aws::Vector<LoadBalancer>&& value) { m_loadBalancersHasBeenSet = true; m_loadBalancers = value; }
231 
237  inline Service& WithLoadBalancers(const Aws::Vector<LoadBalancer>& value) { SetLoadBalancers(value); return *this;}
238 
244  inline Service& WithLoadBalancers(Aws::Vector<LoadBalancer>&& value) { SetLoadBalancers(value); return *this;}
245 
251  inline Service& AddLoadBalancers(const LoadBalancer& value) { m_loadBalancersHasBeenSet = true; m_loadBalancers.push_back(value); return *this; }
252 
258  inline Service& AddLoadBalancers(LoadBalancer&& value) { m_loadBalancersHasBeenSet = true; m_loadBalancers.push_back(value); return *this; }
259 
264  inline const Aws::String& GetStatus() const{ return m_status; }
265 
270  inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; }
271 
276  inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = value; }
277 
282  inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); }
283 
288  inline Service& WithStatus(const Aws::String& value) { SetStatus(value); return *this;}
289 
294  inline Service& WithStatus(Aws::String&& value) { SetStatus(value); return *this;}
295 
300  inline Service& WithStatus(const char* value) { SetStatus(value); return *this;}
301 
307  inline long GetDesiredCount() const{ return m_desiredCount; }
308 
314  inline void SetDesiredCount(long value) { m_desiredCountHasBeenSet = true; m_desiredCount = value; }
315 
321  inline Service& WithDesiredCount(long value) { SetDesiredCount(value); return *this;}
322 
327  inline long GetRunningCount() const{ return m_runningCount; }
328 
333  inline void SetRunningCount(long value) { m_runningCountHasBeenSet = true; m_runningCount = value; }
334 
339  inline Service& WithRunningCount(long value) { SetRunningCount(value); return *this;}
340 
345  inline long GetPendingCount() const{ return m_pendingCount; }
346 
351  inline void SetPendingCount(long value) { m_pendingCountHasBeenSet = true; m_pendingCount = value; }
352 
357  inline Service& WithPendingCount(long value) { SetPendingCount(value); return *this;}
358 
364  inline const Aws::String& GetTaskDefinition() const{ return m_taskDefinition; }
365 
371  inline void SetTaskDefinition(const Aws::String& value) { m_taskDefinitionHasBeenSet = true; m_taskDefinition = value; }
372 
378  inline void SetTaskDefinition(Aws::String&& value) { m_taskDefinitionHasBeenSet = true; m_taskDefinition = value; }
379 
385  inline void SetTaskDefinition(const char* value) { m_taskDefinitionHasBeenSet = true; m_taskDefinition.assign(value); }
386 
392  inline Service& WithTaskDefinition(const Aws::String& value) { SetTaskDefinition(value); return *this;}
393 
399  inline Service& WithTaskDefinition(Aws::String&& value) { SetTaskDefinition(value); return *this;}
400 
406  inline Service& WithTaskDefinition(const char* value) { SetTaskDefinition(value); return *this;}
407 
412  inline const DeploymentConfiguration& GetDeploymentConfiguration() const{ return m_deploymentConfiguration; }
413 
418  inline void SetDeploymentConfiguration(const DeploymentConfiguration& value) { m_deploymentConfigurationHasBeenSet = true; m_deploymentConfiguration = value; }
419 
424  inline void SetDeploymentConfiguration(DeploymentConfiguration&& value) { m_deploymentConfigurationHasBeenSet = true; m_deploymentConfiguration = value; }
425 
430  inline Service& WithDeploymentConfiguration(const DeploymentConfiguration& value) { SetDeploymentConfiguration(value); return *this;}
431 
436  inline Service& WithDeploymentConfiguration(DeploymentConfiguration&& value) { SetDeploymentConfiguration(value); return *this;}
437 
441  inline const Aws::Vector<Deployment>& GetDeployments() const{ return m_deployments; }
442 
446  inline void SetDeployments(const Aws::Vector<Deployment>& value) { m_deploymentsHasBeenSet = true; m_deployments = value; }
447 
451  inline void SetDeployments(Aws::Vector<Deployment>&& value) { m_deploymentsHasBeenSet = true; m_deployments = value; }
452 
456  inline Service& WithDeployments(const Aws::Vector<Deployment>& value) { SetDeployments(value); return *this;}
457 
461  inline Service& WithDeployments(Aws::Vector<Deployment>&& value) { SetDeployments(value); return *this;}
462 
466  inline Service& AddDeployments(const Deployment& value) { m_deploymentsHasBeenSet = true; m_deployments.push_back(value); return *this; }
467 
471  inline Service& AddDeployments(Deployment&& value) { m_deploymentsHasBeenSet = true; m_deployments.push_back(value); return *this; }
472 
478  inline const Aws::String& GetRoleArn() const{ return m_roleArn; }
479 
485  inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
486 
492  inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
493 
499  inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); }
500 
506  inline Service& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;}
507 
513  inline Service& WithRoleArn(Aws::String&& value) { SetRoleArn(value); return *this;}
514 
520  inline Service& WithRoleArn(const char* value) { SetRoleArn(value); return *this;}
521 
526  inline const Aws::Vector<ServiceEvent>& GetEvents() const{ return m_events; }
527 
532  inline void SetEvents(const Aws::Vector<ServiceEvent>& value) { m_eventsHasBeenSet = true; m_events = value; }
533 
538  inline void SetEvents(Aws::Vector<ServiceEvent>&& value) { m_eventsHasBeenSet = true; m_events = value; }
539 
544  inline Service& WithEvents(const Aws::Vector<ServiceEvent>& value) { SetEvents(value); return *this;}
545 
550  inline Service& WithEvents(Aws::Vector<ServiceEvent>&& value) { SetEvents(value); return *this;}
551 
556  inline Service& AddEvents(const ServiceEvent& value) { m_eventsHasBeenSet = true; m_events.push_back(value); return *this; }
557 
562  inline Service& AddEvents(ServiceEvent&& value) { m_eventsHasBeenSet = true; m_events.push_back(value); return *this; }
563 
567  inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; }
568 
572  inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; }
573 
577  inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = value; }
578 
582  inline Service& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;}
583 
587  inline Service& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(value); return *this;}
588 
589  private:
590  Aws::String m_serviceArn;
591  bool m_serviceArnHasBeenSet;
592  Aws::String m_serviceName;
593  bool m_serviceNameHasBeenSet;
594  Aws::String m_clusterArn;
595  bool m_clusterArnHasBeenSet;
596  Aws::Vector<LoadBalancer> m_loadBalancers;
597  bool m_loadBalancersHasBeenSet;
598  Aws::String m_status;
599  bool m_statusHasBeenSet;
600  long m_desiredCount;
601  bool m_desiredCountHasBeenSet;
602  long m_runningCount;
603  bool m_runningCountHasBeenSet;
604  long m_pendingCount;
605  bool m_pendingCountHasBeenSet;
606  Aws::String m_taskDefinition;
607  bool m_taskDefinitionHasBeenSet;
608  DeploymentConfiguration m_deploymentConfiguration;
609  bool m_deploymentConfigurationHasBeenSet;
610  Aws::Vector<Deployment> m_deployments;
611  bool m_deploymentsHasBeenSet;
612  Aws::String m_roleArn;
613  bool m_roleArnHasBeenSet;
614  Aws::Vector<ServiceEvent> m_events;
615  bool m_eventsHasBeenSet;
616  Aws::Utils::DateTime m_createdAt;
617  bool m_createdAtHasBeenSet;
618  };
619 
620 } // namespace Model
621 } // namespace ECS
622 } // namespace Aws
const Aws::String & GetServiceArn() const
Definition: Service.h:58
void SetLoadBalancers(Aws::Vector< LoadBalancer > &&value)
Definition: Service.h:230
Service & WithRoleArn(Aws::String &&value)
Definition: Service.h:513
Service & WithDeploymentConfiguration(const DeploymentConfiguration &value)
Definition: Service.h:430
void SetDeployments(const Aws::Vector< Deployment > &value)
Definition: Service.h:446
Service & WithTaskDefinition(const char *value)
Definition: Service.h:406
Service & WithDeployments(Aws::Vector< Deployment > &&value)
Definition: Service.h:461
Service & WithPendingCount(long value)
Definition: Service.h:357
#define AWS_ECS_API
Definition: ECS_EXPORTS.h:34
long GetRunningCount() const
Definition: Service.h:327
const Aws::String & GetClusterArn() const
Definition: Service.h:179
void SetRoleArn(Aws::String &&value)
Definition: Service.h:492
Service & AddEvents(ServiceEvent &&value)
Definition: Service.h:562
void SetEvents(const Aws::Vector< ServiceEvent > &value)
Definition: Service.h:532
Service & WithStatus(const Aws::String &value)
Definition: Service.h:288
void SetDesiredCount(long value)
Definition: Service.h:314
const Aws::String & GetStatus() const
Definition: Service.h:264
void SetPendingCount(long value)
Definition: Service.h:351
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
Service & AddEvents(const ServiceEvent &value)
Definition: Service.h:556
Service & AddLoadBalancers(const LoadBalancer &value)
Definition: Service.h:251
Service & AddLoadBalancers(LoadBalancer &&value)
Definition: Service.h:258
void SetDeployments(Aws::Vector< Deployment > &&value)
Definition: Service.h:451
Service & WithStatus(Aws::String &&value)
Definition: Service.h:294
void SetTaskDefinition(const char *value)
Definition: Service.h:385
const Aws::Vector< ServiceEvent > & GetEvents() const
Definition: Service.h:526
void SetServiceArn(const char *value)
Definition: Service.h:88
Service & WithClusterArn(Aws::String &&value)
Definition: Service.h:204
void SetServiceArn(Aws::String &&value)
Definition: Service.h:78
Service & WithRoleArn(const Aws::String &value)
Definition: Service.h:506
void SetEvents(Aws::Vector< ServiceEvent > &&value)
Definition: Service.h:538
Service & WithTaskDefinition(Aws::String &&value)
Definition: Service.h:399
Service & WithClusterArn(const Aws::String &value)
Definition: Service.h:199
void SetCreatedAt(const Aws::Utils::DateTime &value)
Definition: Service.h:572
Service & WithServiceName(const char *value)
Definition: Service.h:174
void SetLoadBalancers(const Aws::Vector< LoadBalancer > &value)
Definition: Service.h:223
const Aws::String & GetServiceName() const
Definition: Service.h:126
void SetServiceName(const char *value)
Definition: Service.h:150
Service & WithServiceArn(const char *value)
Definition: Service.h:118
Service & WithCreatedAt(Aws::Utils::DateTime &&value)
Definition: Service.h:587
void SetTaskDefinition(Aws::String &&value)
Definition: Service.h:378
const Aws::Utils::DateTime & GetCreatedAt() const
Definition: Service.h:567
long GetDesiredCount() const
Definition: Service.h:307
void SetServiceName(Aws::String &&value)
Definition: Service.h:142
Service & WithLoadBalancers(Aws::Vector< LoadBalancer > &&value)
Definition: Service.h:244
const Aws::String & GetTaskDefinition() const
Definition: Service.h:364
Service & WithLoadBalancers(const Aws::Vector< LoadBalancer > &value)
Definition: Service.h:237
Service & WithTaskDefinition(const Aws::String &value)
Definition: Service.h:392
Service & AddDeployments(Deployment &&value)
Definition: Service.h:471
Service & WithServiceArn(const Aws::String &value)
Definition: Service.h:98
const DeploymentConfiguration & GetDeploymentConfiguration() const
Definition: Service.h:412
Service & WithServiceName(const Aws::String &value)
Definition: Service.h:158
Service & WithDeployments(const Aws::Vector< Deployment > &value)
Definition: Service.h:456
void SetClusterArn(Aws::String &&value)
Definition: Service.h:189
Service & WithServiceArn(Aws::String &&value)
Definition: Service.h:108
long GetPendingCount() const
Definition: Service.h:345
void SetStatus(const char *value)
Definition: Service.h:282
void SetStatus(Aws::String &&value)
Definition: Service.h:276
Service & WithCreatedAt(const Aws::Utils::DateTime &value)
Definition: Service.h:582
Service & WithServiceName(Aws::String &&value)
Definition: Service.h:166
Service & AddDeployments(const Deployment &value)
Definition: Service.h:466
void SetRunningCount(long value)
Definition: Service.h:333
void SetCreatedAt(Aws::Utils::DateTime &&value)
Definition: Service.h:577
Service & WithRoleArn(const char *value)
Definition: Service.h:520
const Aws::Vector< LoadBalancer > & GetLoadBalancers() const
Definition: Service.h:216
Service & WithClusterArn(const char *value)
Definition: Service.h:209
void SetTaskDefinition(const Aws::String &value)
Definition: Service.h:371
Service & WithEvents(const Aws::Vector< ServiceEvent > &value)
Definition: Service.h:544
void SetDeploymentConfiguration(const DeploymentConfiguration &value)
Definition: Service.h:418
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Service & WithRunningCount(long value)
Definition: Service.h:339
void SetServiceArn(const Aws::String &value)
Definition: Service.h:68
Service & WithEvents(Aws::Vector< ServiceEvent > &&value)
Definition: Service.h:550
Service & WithStatus(const char *value)
Definition: Service.h:300
void SetDeploymentConfiguration(DeploymentConfiguration &&value)
Definition: Service.h:424
void SetRoleArn(const char *value)
Definition: Service.h:499
void SetRoleArn(const Aws::String &value)
Definition: Service.h:485
Service & WithDeploymentConfiguration(DeploymentConfiguration &&value)
Definition: Service.h:436
void SetStatus(const Aws::String &value)
Definition: Service.h:270
void SetServiceName(const Aws::String &value)
Definition: Service.h:134
const Aws::String & GetRoleArn() const
Definition: Service.h:478
JSON (JavaScript Object Notation).
void SetClusterArn(const Aws::String &value)
Definition: Service.h:184
Service & WithDesiredCount(long value)
Definition: Service.h:321
const Aws::Vector< Deployment > & GetDeployments() const
Definition: Service.h:441
void SetClusterArn(const char *value)
Definition: Service.h:194