AWS SDK for C++

AWS SDK for C++ Version 1.11.778

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
75 inline int GetMaxvCpus() const { return m_maxvCpus; }
76 inline bool MaxvCpusHasBeenSet() const { return m_maxvCpusHasBeenSet; }
77 inline void SetMaxvCpus(int value) {
78 m_maxvCpusHasBeenSet = true;
79 m_maxvCpus = value;
80 }
82 SetMaxvCpus(value);
83 return *this;
84 }
86
88
103 inline int GetDesiredvCpus() const { return m_desiredvCpus; }
104 inline bool DesiredvCpusHasBeenSet() const { return m_desiredvCpusHasBeenSet; }
105 inline void SetDesiredvCpus(int value) {
106 m_desiredvCpusHasBeenSet = true;
107 m_desiredvCpus = value;
108 }
110 SetDesiredvCpus(value);
111 return *this;
112 }
114
116
140 inline const Aws::Vector<Aws::String>& GetSubnets() const { return m_subnets; }
141 inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; }
142 template <typename SubnetsT = Aws::Vector<Aws::String>>
143 void SetSubnets(SubnetsT&& value) {
144 m_subnetsHasBeenSet = true;
145 m_subnets = std::forward<SubnetsT>(value);
146 }
147 template <typename SubnetsT = Aws::Vector<Aws::String>>
149 SetSubnets(std::forward<SubnetsT>(value));
150 return *this;
151 }
152 template <typename SubnetsT = Aws::String>
154 m_subnetsHasBeenSet = true;
155 m_subnets.emplace_back(std::forward<SubnetsT>(value));
156 return *this;
157 }
159
161
174 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
175 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
176 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
177 void SetSecurityGroupIds(SecurityGroupIdsT&& value) {
178 m_securityGroupIdsHasBeenSet = true;
179 m_securityGroupIds = std::forward<SecurityGroupIdsT>(value);
180 }
181 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
182 ComputeResourceUpdate& WithSecurityGroupIds(SecurityGroupIdsT&& value) {
183 SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value));
184 return *this;
185 }
186 template <typename SecurityGroupIdsT = Aws::String>
187 ComputeResourceUpdate& AddSecurityGroupIds(SecurityGroupIdsT&& value) {
188 m_securityGroupIdsHasBeenSet = true;
189 m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value));
190 return *this;
191 }
193
195
230 inline CRUpdateAllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
231 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
233 m_allocationStrategyHasBeenSet = true;
234 m_allocationStrategy = value;
235 }
238 return *this;
239 }
241
243
289 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
290 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
291 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
292 void SetInstanceTypes(InstanceTypesT&& value) {
293 m_instanceTypesHasBeenSet = true;
294 m_instanceTypes = std::forward<InstanceTypesT>(value);
295 }
296 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
297 ComputeResourceUpdate& WithInstanceTypes(InstanceTypesT&& value) {
298 SetInstanceTypes(std::forward<InstanceTypesT>(value));
299 return *this;
300 }
301 template <typename InstanceTypesT = Aws::String>
302 ComputeResourceUpdate& AddInstanceTypes(InstanceTypesT&& value) {
303 m_instanceTypesHasBeenSet = true;
304 m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value));
305 return *this;
306 }
308
310
321 inline const Aws::String& GetEc2KeyPair() const { return m_ec2KeyPair; }
322 inline bool Ec2KeyPairHasBeenSet() const { return m_ec2KeyPairHasBeenSet; }
323 template <typename Ec2KeyPairT = Aws::String>
324 void SetEc2KeyPair(Ec2KeyPairT&& value) {
325 m_ec2KeyPairHasBeenSet = true;
326 m_ec2KeyPair = std::forward<Ec2KeyPairT>(value);
327 }
328 template <typename Ec2KeyPairT = Aws::String>
329 ComputeResourceUpdate& WithEc2KeyPair(Ec2KeyPairT&& value) {
330 SetEc2KeyPair(std::forward<Ec2KeyPairT>(value));
331 return *this;
332 }
334
336
352 inline const Aws::String& GetInstanceRole() const { return m_instanceRole; }
353 inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; }
354 template <typename InstanceRoleT = Aws::String>
355 void SetInstanceRole(InstanceRoleT&& value) {
356 m_instanceRoleHasBeenSet = true;
357 m_instanceRole = std::forward<InstanceRoleT>(value);
358 }
359 template <typename InstanceRoleT = Aws::String>
360 ComputeResourceUpdate& WithInstanceRole(InstanceRoleT&& value) {
361 SetInstanceRole(std::forward<InstanceRoleT>(value));
362 return *this;
363 }
365
367
382 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
383 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
384 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
385 void SetTags(TagsT&& value) {
386 m_tagsHasBeenSet = true;
387 m_tags = std::forward<TagsT>(value);
388 }
389 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
391 SetTags(std::forward<TagsT>(value));
392 return *this;
393 }
394 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
395 ComputeResourceUpdate& AddTags(TagsKeyT&& key, TagsValueT&& value) {
396 m_tagsHasBeenSet = true;
397 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
398 return *this;
399 }
401
403
419 inline const Aws::String& GetPlacementGroup() const { return m_placementGroup; }
420 inline bool PlacementGroupHasBeenSet() const { return m_placementGroupHasBeenSet; }
421 template <typename PlacementGroupT = Aws::String>
422 void SetPlacementGroup(PlacementGroupT&& value) {
423 m_placementGroupHasBeenSet = true;
424 m_placementGroup = std::forward<PlacementGroupT>(value);
425 }
426 template <typename PlacementGroupT = Aws::String>
427 ComputeResourceUpdate& WithPlacementGroup(PlacementGroupT&& value) {
428 SetPlacementGroup(std::forward<PlacementGroupT>(value));
429 return *this;
430 }
432
434
448 inline int GetBidPercentage() const { return m_bidPercentage; }
449 inline bool BidPercentageHasBeenSet() const { return m_bidPercentageHasBeenSet; }
450 inline void SetBidPercentage(int value) {
451 m_bidPercentageHasBeenSet = true;
452 m_bidPercentage = value;
453 }
455 SetBidPercentage(value);
456 return *this;
457 }
459
461
480 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
481 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
482 template <typename LaunchTemplateT = LaunchTemplateSpecification>
483 void SetLaunchTemplate(LaunchTemplateT&& value) {
484 m_launchTemplateHasBeenSet = true;
485 m_launchTemplate = std::forward<LaunchTemplateT>(value);
486 }
487 template <typename LaunchTemplateT = LaunchTemplateSpecification>
488 ComputeResourceUpdate& WithLaunchTemplate(LaunchTemplateT&& value) {
489 SetLaunchTemplate(std::forward<LaunchTemplateT>(value));
490 return *this;
491 }
493
495
509 inline const Aws::Vector<Ec2Configuration>& GetEc2Configuration() const { return m_ec2Configuration; }
510 inline bool Ec2ConfigurationHasBeenSet() const { return m_ec2ConfigurationHasBeenSet; }
511 template <typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
512 void SetEc2Configuration(Ec2ConfigurationT&& value) {
513 m_ec2ConfigurationHasBeenSet = true;
514 m_ec2Configuration = std::forward<Ec2ConfigurationT>(value);
515 }
516 template <typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
517 ComputeResourceUpdate& WithEc2Configuration(Ec2ConfigurationT&& value) {
518 SetEc2Configuration(std::forward<Ec2ConfigurationT>(value));
519 return *this;
520 }
521 template <typename Ec2ConfigurationT = Ec2Configuration>
522 ComputeResourceUpdate& AddEc2Configuration(Ec2ConfigurationT&& value) {
523 m_ec2ConfigurationHasBeenSet = true;
524 m_ec2Configuration.emplace_back(std::forward<Ec2ConfigurationT>(value));
525 return *this;
526 }
528
530
546 inline bool GetUpdateToLatestImageVersion() const { return m_updateToLatestImageVersion; }
547 inline bool UpdateToLatestImageVersionHasBeenSet() const { return m_updateToLatestImageVersionHasBeenSet; }
548 inline void SetUpdateToLatestImageVersion(bool value) {
549 m_updateToLatestImageVersionHasBeenSet = true;
550 m_updateToLatestImageVersion = value;
551 }
554 return *this;
555 }
557
559
573 inline CRType GetType() const { return m_type; }
574 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
575 inline void SetType(CRType value) {
576 m_typeHasBeenSet = true;
577 m_type = value;
578 }
580 SetType(value);
581 return *this;
582 }
584
586
606 inline const Aws::String& GetImageId() const { return m_imageId; }
607 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
608 template <typename ImageIdT = Aws::String>
609 void SetImageId(ImageIdT&& value) {
610 m_imageIdHasBeenSet = true;
611 m_imageId = std::forward<ImageIdT>(value);
612 }
613 template <typename ImageIdT = Aws::String>
615 SetImageId(std::forward<ImageIdT>(value));
616 return *this;
617 }
619
621
626 inline const ComputeScalingPolicy& GetScalingPolicy() const { return m_scalingPolicy; }
627 inline bool ScalingPolicyHasBeenSet() const { return m_scalingPolicyHasBeenSet; }
628 template <typename ScalingPolicyT = ComputeScalingPolicy>
629 void SetScalingPolicy(ScalingPolicyT&& value) {
630 m_scalingPolicyHasBeenSet = true;
631 m_scalingPolicy = std::forward<ScalingPolicyT>(value);
632 }
633 template <typename ScalingPolicyT = ComputeScalingPolicy>
634 ComputeResourceUpdate& WithScalingPolicy(ScalingPolicyT&& value) {
635 SetScalingPolicy(std::forward<ScalingPolicyT>(value));
636 return *this;
637 }
639 private:
640 int m_minvCpus{0};
641
642 int m_maxvCpus{0};
643
644 int m_desiredvCpus{0};
645
646 Aws::Vector<Aws::String> m_subnets;
647
648 Aws::Vector<Aws::String> m_securityGroupIds;
649
651
652 Aws::Vector<Aws::String> m_instanceTypes;
653
654 Aws::String m_ec2KeyPair;
655
656 Aws::String m_instanceRole;
657
659
660 Aws::String m_placementGroup;
661
662 int m_bidPercentage{0};
663
664 LaunchTemplateSpecification m_launchTemplate;
665
666 Aws::Vector<Ec2Configuration> m_ec2Configuration;
667
668 bool m_updateToLatestImageVersion{false};
669
670 CRType m_type{CRType::NOT_SET};
671
672 Aws::String m_imageId;
673
674 ComputeScalingPolicy m_scalingPolicy;
675 bool m_minvCpusHasBeenSet = false;
676 bool m_maxvCpusHasBeenSet = false;
677 bool m_desiredvCpusHasBeenSet = false;
678 bool m_subnetsHasBeenSet = false;
679 bool m_securityGroupIdsHasBeenSet = false;
680 bool m_allocationStrategyHasBeenSet = false;
681 bool m_instanceTypesHasBeenSet = false;
682 bool m_ec2KeyPairHasBeenSet = false;
683 bool m_instanceRoleHasBeenSet = false;
684 bool m_tagsHasBeenSet = false;
685 bool m_placementGroupHasBeenSet = false;
686 bool m_bidPercentageHasBeenSet = false;
687 bool m_launchTemplateHasBeenSet = false;
688 bool m_ec2ConfigurationHasBeenSet = false;
689 bool m_updateToLatestImageVersionHasBeenSet = false;
690 bool m_typeHasBeenSet = false;
691 bool m_imageIdHasBeenSet = false;
692 bool m_scalingPolicyHasBeenSet = false;
693};
694
695} // namespace Model
696} // namespace Batch
697} // 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