AWS SDK for C++

AWS SDK for C++ Version 1.11.849

Loading...
Searching...
No Matches
ComputeResourceUpdate.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/CRType.h>
9#include <aws/batch/model/CRUpdateAllocationStrategy.h>
10#include <aws/batch/model/ComputeScalingPolicy.h>
11#include <aws/batch/model/Ec2Configuration.h>
12#include <aws/batch/model/LaunchTemplateSpecification.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15#include <aws/core/utils/memory/stl/AWSVector.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace Batch {
27namespace Model {
28
39 public:
40 AWS_BATCH_API ComputeResourceUpdate() = default;
43 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
44
46
52 inline int GetMinvCpus() const { return m_minvCpus; }
53 inline bool MinvCpusHasBeenSet() const { return m_minvCpusHasBeenSet; }
54 inline void SetMinvCpus(int value) {
55 m_minvCpusHasBeenSet = true;
56 m_minvCpus = value;
57 }
59 SetMinvCpus(value);
60 return *this;
61 }
63
65
72 inline int GetMaxvCpus() const { return m_maxvCpus; }
73 inline bool MaxvCpusHasBeenSet() const { return m_maxvCpusHasBeenSet; }
74 inline void SetMaxvCpus(int value) {
75 m_maxvCpusHasBeenSet = true;
76 m_maxvCpus = value;
77 }
79 SetMaxvCpus(value);
80 return *this;
81 }
83
85
100 inline int GetDesiredvCpus() const { return m_desiredvCpus; }
101 inline bool DesiredvCpusHasBeenSet() const { return m_desiredvCpusHasBeenSet; }
102 inline void SetDesiredvCpus(int value) {
103 m_desiredvCpusHasBeenSet = true;
104 m_desiredvCpus = value;
105 }
107 SetDesiredvCpus(value);
108 return *this;
109 }
111
113
137 inline const Aws::Vector<Aws::String>& GetSubnets() const { return m_subnets; }
138 inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; }
139 template <typename SubnetsT = Aws::Vector<Aws::String>>
140 void SetSubnets(SubnetsT&& value) {
141 m_subnetsHasBeenSet = true;
142 m_subnets = std::forward<SubnetsT>(value);
143 }
144 template <typename SubnetsT = Aws::Vector<Aws::String>>
146 SetSubnets(std::forward<SubnetsT>(value));
147 return *this;
148 }
149 template <typename SubnetsT = Aws::String>
151 m_subnetsHasBeenSet = true;
152 m_subnets.emplace_back(std::forward<SubnetsT>(value));
153 return *this;
154 }
156
158
171 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
172 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
173 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
174 void SetSecurityGroupIds(SecurityGroupIdsT&& value) {
175 m_securityGroupIdsHasBeenSet = true;
176 m_securityGroupIds = std::forward<SecurityGroupIdsT>(value);
177 }
178 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
179 ComputeResourceUpdate& WithSecurityGroupIds(SecurityGroupIdsT&& value) {
180 SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value));
181 return *this;
182 }
183 template <typename SecurityGroupIdsT = Aws::String>
184 ComputeResourceUpdate& AddSecurityGroupIds(SecurityGroupIdsT&& value) {
185 m_securityGroupIdsHasBeenSet = true;
186 m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value));
187 return *this;
188 }
190
192
259 inline CRUpdateAllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
260 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
262 m_allocationStrategyHasBeenSet = true;
263 m_allocationStrategy = value;
264 }
267 return *this;
268 }
270
272
318 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
319 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
320 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
321 void SetInstanceTypes(InstanceTypesT&& value) {
322 m_instanceTypesHasBeenSet = true;
323 m_instanceTypes = std::forward<InstanceTypesT>(value);
324 }
325 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
326 ComputeResourceUpdate& WithInstanceTypes(InstanceTypesT&& value) {
327 SetInstanceTypes(std::forward<InstanceTypesT>(value));
328 return *this;
329 }
330 template <typename InstanceTypesT = Aws::String>
331 ComputeResourceUpdate& AddInstanceTypes(InstanceTypesT&& value) {
332 m_instanceTypesHasBeenSet = true;
333 m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value));
334 return *this;
335 }
337
339
350 inline const Aws::String& GetEc2KeyPair() const { return m_ec2KeyPair; }
351 inline bool Ec2KeyPairHasBeenSet() const { return m_ec2KeyPairHasBeenSet; }
352 template <typename Ec2KeyPairT = Aws::String>
353 void SetEc2KeyPair(Ec2KeyPairT&& value) {
354 m_ec2KeyPairHasBeenSet = true;
355 m_ec2KeyPair = std::forward<Ec2KeyPairT>(value);
356 }
357 template <typename Ec2KeyPairT = Aws::String>
358 ComputeResourceUpdate& WithEc2KeyPair(Ec2KeyPairT&& value) {
359 SetEc2KeyPair(std::forward<Ec2KeyPairT>(value));
360 return *this;
361 }
363
365
381 inline const Aws::String& GetInstanceRole() const { return m_instanceRole; }
382 inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; }
383 template <typename InstanceRoleT = Aws::String>
384 void SetInstanceRole(InstanceRoleT&& value) {
385 m_instanceRoleHasBeenSet = true;
386 m_instanceRole = std::forward<InstanceRoleT>(value);
387 }
388 template <typename InstanceRoleT = Aws::String>
389 ComputeResourceUpdate& WithInstanceRole(InstanceRoleT&& value) {
390 SetInstanceRole(std::forward<InstanceRoleT>(value));
391 return *this;
392 }
394
396
411 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
412 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
413 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
414 void SetTags(TagsT&& value) {
415 m_tagsHasBeenSet = true;
416 m_tags = std::forward<TagsT>(value);
417 }
418 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
420 SetTags(std::forward<TagsT>(value));
421 return *this;
422 }
423 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
424 ComputeResourceUpdate& AddTags(TagsKeyT&& key, TagsValueT&& value) {
425 m_tagsHasBeenSet = true;
426 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
427 return *this;
428 }
430
432
448 inline const Aws::String& GetPlacementGroup() const { return m_placementGroup; }
449 inline bool PlacementGroupHasBeenSet() const { return m_placementGroupHasBeenSet; }
450 template <typename PlacementGroupT = Aws::String>
451 void SetPlacementGroup(PlacementGroupT&& value) {
452 m_placementGroupHasBeenSet = true;
453 m_placementGroup = std::forward<PlacementGroupT>(value);
454 }
455 template <typename PlacementGroupT = Aws::String>
456 ComputeResourceUpdate& WithPlacementGroup(PlacementGroupT&& value) {
457 SetPlacementGroup(std::forward<PlacementGroupT>(value));
458 return *this;
459 }
461
463
477 inline int GetBidPercentage() const { return m_bidPercentage; }
478 inline bool BidPercentageHasBeenSet() const { return m_bidPercentageHasBeenSet; }
479 inline void SetBidPercentage(int value) {
480 m_bidPercentageHasBeenSet = true;
481 m_bidPercentage = value;
482 }
484 SetBidPercentage(value);
485 return *this;
486 }
488
490
509 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
510 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
511 template <typename LaunchTemplateT = LaunchTemplateSpecification>
512 void SetLaunchTemplate(LaunchTemplateT&& value) {
513 m_launchTemplateHasBeenSet = true;
514 m_launchTemplate = std::forward<LaunchTemplateT>(value);
515 }
516 template <typename LaunchTemplateT = LaunchTemplateSpecification>
517 ComputeResourceUpdate& WithLaunchTemplate(LaunchTemplateT&& value) {
518 SetLaunchTemplate(std::forward<LaunchTemplateT>(value));
519 return *this;
520 }
522
524
538 inline const Aws::Vector<Ec2Configuration>& GetEc2Configuration() const { return m_ec2Configuration; }
539 inline bool Ec2ConfigurationHasBeenSet() const { return m_ec2ConfigurationHasBeenSet; }
540 template <typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
541 void SetEc2Configuration(Ec2ConfigurationT&& value) {
542 m_ec2ConfigurationHasBeenSet = true;
543 m_ec2Configuration = std::forward<Ec2ConfigurationT>(value);
544 }
545 template <typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
546 ComputeResourceUpdate& WithEc2Configuration(Ec2ConfigurationT&& value) {
547 SetEc2Configuration(std::forward<Ec2ConfigurationT>(value));
548 return *this;
549 }
550 template <typename Ec2ConfigurationT = Ec2Configuration>
551 ComputeResourceUpdate& AddEc2Configuration(Ec2ConfigurationT&& value) {
552 m_ec2ConfigurationHasBeenSet = true;
553 m_ec2Configuration.emplace_back(std::forward<Ec2ConfigurationT>(value));
554 return *this;
555 }
557
559
575 inline bool GetUpdateToLatestImageVersion() const { return m_updateToLatestImageVersion; }
576 inline bool UpdateToLatestImageVersionHasBeenSet() const { return m_updateToLatestImageVersionHasBeenSet; }
577 inline void SetUpdateToLatestImageVersion(bool value) {
578 m_updateToLatestImageVersionHasBeenSet = true;
579 m_updateToLatestImageVersion = value;
580 }
583 return *this;
584 }
586
588
602 inline CRType GetType() const { return m_type; }
603 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
604 inline void SetType(CRType value) {
605 m_typeHasBeenSet = true;
606 m_type = value;
607 }
609 SetType(value);
610 return *this;
611 }
613
615
635 inline const Aws::String& GetImageId() const { return m_imageId; }
636 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
637 template <typename ImageIdT = Aws::String>
638 void SetImageId(ImageIdT&& value) {
639 m_imageIdHasBeenSet = true;
640 m_imageId = std::forward<ImageIdT>(value);
641 }
642 template <typename ImageIdT = Aws::String>
644 SetImageId(std::forward<ImageIdT>(value));
645 return *this;
646 }
648
650
655 inline const ComputeScalingPolicy& GetScalingPolicy() const { return m_scalingPolicy; }
656 inline bool ScalingPolicyHasBeenSet() const { return m_scalingPolicyHasBeenSet; }
657 template <typename ScalingPolicyT = ComputeScalingPolicy>
658 void SetScalingPolicy(ScalingPolicyT&& value) {
659 m_scalingPolicyHasBeenSet = true;
660 m_scalingPolicy = std::forward<ScalingPolicyT>(value);
661 }
662 template <typename ScalingPolicyT = ComputeScalingPolicy>
663 ComputeResourceUpdate& WithScalingPolicy(ScalingPolicyT&& value) {
664 SetScalingPolicy(std::forward<ScalingPolicyT>(value));
665 return *this;
666 }
668 private:
669 int m_minvCpus{0};
670
671 int m_maxvCpus{0};
672
673 int m_desiredvCpus{0};
674
675 Aws::Vector<Aws::String> m_subnets;
676
677 Aws::Vector<Aws::String> m_securityGroupIds;
678
680
681 Aws::Vector<Aws::String> m_instanceTypes;
682
683 Aws::String m_ec2KeyPair;
684
685 Aws::String m_instanceRole;
686
688
689 Aws::String m_placementGroup;
690
691 int m_bidPercentage{0};
692
693 LaunchTemplateSpecification m_launchTemplate;
694
695 Aws::Vector<Ec2Configuration> m_ec2Configuration;
696
697 bool m_updateToLatestImageVersion{false};
698
699 CRType m_type{CRType::NOT_SET};
700
701 Aws::String m_imageId;
702
703 ComputeScalingPolicy m_scalingPolicy;
704 bool m_minvCpusHasBeenSet = false;
705 bool m_maxvCpusHasBeenSet = false;
706 bool m_desiredvCpusHasBeenSet = false;
707 bool m_subnetsHasBeenSet = false;
708 bool m_securityGroupIdsHasBeenSet = false;
709 bool m_allocationStrategyHasBeenSet = false;
710 bool m_instanceTypesHasBeenSet = false;
711 bool m_ec2KeyPairHasBeenSet = false;
712 bool m_instanceRoleHasBeenSet = false;
713 bool m_tagsHasBeenSet = false;
714 bool m_placementGroupHasBeenSet = false;
715 bool m_bidPercentageHasBeenSet = false;
716 bool m_launchTemplateHasBeenSet = false;
717 bool m_ec2ConfigurationHasBeenSet = false;
718 bool m_updateToLatestImageVersionHasBeenSet = false;
719 bool m_typeHasBeenSet = false;
720 bool m_imageIdHasBeenSet = false;
721 bool m_scalingPolicyHasBeenSet = false;
722};
723
724} // namespace Model
725} // namespace Batch
726} // namespace Aws
ComputeResourceUpdate & AddSecurityGroupIds(SecurityGroupIdsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
ComputeResourceUpdate & WithImageId(ImageIdT &&value)
void SetEc2Configuration(Ec2ConfigurationT &&value)
void SetAllocationStrategy(CRUpdateAllocationStrategy value)
void SetPlacementGroup(PlacementGroupT &&value)
ComputeResourceUpdate & WithType(CRType value)
void SetLaunchTemplate(LaunchTemplateT &&value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_BATCH_API ComputeResourceUpdate(Aws::Utils::Json::JsonView jsonValue)
ComputeResourceUpdate & WithInstanceRole(InstanceRoleT &&value)
ComputeResourceUpdate & WithInstanceTypes(InstanceTypesT &&value)
ComputeResourceUpdate & AddEc2Configuration(Ec2ConfigurationT &&value)
void SetSecurityGroupIds(SecurityGroupIdsT &&value)
ComputeResourceUpdate & AddInstanceTypes(InstanceTypesT &&value)
const ComputeScalingPolicy & GetScalingPolicy() const
ComputeResourceUpdate & WithUpdateToLatestImageVersion(bool value)
const LaunchTemplateSpecification & GetLaunchTemplate() const
ComputeResourceUpdate & WithTags(TagsT &&value)
ComputeResourceUpdate & WithDesiredvCpus(int value)
ComputeResourceUpdate & WithEc2Configuration(Ec2ConfigurationT &&value)
const Aws::Vector< Aws::String > & GetInstanceTypes() const
ComputeResourceUpdate & WithScalingPolicy(ScalingPolicyT &&value)
CRUpdateAllocationStrategy GetAllocationStrategy() const
ComputeResourceUpdate & WithEc2KeyPair(Ec2KeyPairT &&value)
ComputeResourceUpdate & WithSubnets(SubnetsT &&value)
const Aws::Vector< Ec2Configuration > & GetEc2Configuration() const
ComputeResourceUpdate & WithLaunchTemplate(LaunchTemplateT &&value)
ComputeResourceUpdate & AddSubnets(SubnetsT &&value)
ComputeResourceUpdate & WithPlacementGroup(PlacementGroupT &&value)
const Aws::Vector< Aws::String > & GetSubnets() const
AWS_BATCH_API ComputeResourceUpdate()=default
AWS_BATCH_API ComputeResourceUpdate & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetSecurityGroupIds() const
ComputeResourceUpdate & WithSecurityGroupIds(SecurityGroupIdsT &&value)
ComputeResourceUpdate & WithAllocationStrategy(CRUpdateAllocationStrategy value)
ComputeResourceUpdate & WithBidPercentage(int value)
ComputeResourceUpdate & AddTags(TagsKeyT &&key, TagsValueT &&value)
ComputeResourceUpdate & WithMinvCpus(int value)
ComputeResourceUpdate & WithMaxvCpus(int value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue