7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/CRType.h>
9#include <aws/batch/model/CRAllocationStrategy.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/batch/model/LaunchTemplateSpecification.h>
14#include <aws/batch/model/Ec2Configuration.h>
62 inline void SetType(
CRType value) { m_typeHasBeenSet =
true; m_type = value; }
125 inline void SetMinvCpus(
int value) { m_minvCpusHasBeenSet =
true; m_minvCpus = value; }
142 inline void SetMaxvCpus(
int value) { m_maxvCpusHasBeenSet =
true; m_maxvCpus = value; }
155 inline void SetDesiredvCpus(
int value) { m_desiredvCpusHasBeenSet =
true; m_desiredvCpus = value; }
208 template<
typename InstanceTypesT = Aws::Vector<Aws::String>>
209 void SetInstanceTypes(InstanceTypesT&& value) { m_instanceTypesHasBeenSet =
true; m_instanceTypes = std::forward<InstanceTypesT>(value); }
210 template<
typename InstanceTypesT = Aws::Vector<Aws::String>>
212 template<
typename InstanceTypesT = Aws::String>
213 ComputeResource&
AddInstanceTypes(InstanceTypesT&& value) { m_instanceTypesHasBeenSet =
true; m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value));
return *
this; }
237 template<
typename SubnetsT = Aws::Vector<Aws::String>>
238 void SetSubnets(SubnetsT&& value) { m_subnetsHasBeenSet =
true; m_subnets = std::forward<SubnetsT>(value); }
239 template<
typename SubnetsT = Aws::Vector<Aws::String>>
241 template<
typename SubnetsT = Aws::String>
242 ComputeResource&
AddSubnets(SubnetsT&& value) { m_subnetsHasBeenSet =
true; m_subnets.emplace_back(std::forward<SubnetsT>(value));
return *
this; }
258 template<
typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
259 void SetSecurityGroupIds(SecurityGroupIdsT&& value) { m_securityGroupIdsHasBeenSet =
true; m_securityGroupIds = std::forward<SecurityGroupIdsT>(value); }
260 template<
typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
262 template<
typename SecurityGroupIdsT = Aws::String>
263 ComputeResource&
AddSecurityGroupIds(SecurityGroupIdsT&& value) { m_securityGroupIdsHasBeenSet =
true; m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value));
return *
this; }
275 template<
typename Ec2KeyPairT = Aws::String>
276 void SetEc2KeyPair(Ec2KeyPairT&& value) { m_ec2KeyPairHasBeenSet =
true; m_ec2KeyPair = std::forward<Ec2KeyPairT>(value); }
277 template<
typename Ec2KeyPairT = Aws::String>
296 template<
typename InstanceRoleT = Aws::String>
297 void SetInstanceRole(InstanceRoleT&& value) { m_instanceRoleHasBeenSet =
true; m_instanceRole = std::forward<InstanceRoleT>(value); }
298 template<
typename InstanceRoleT = Aws::String>
319 template<
typename TagsT = Aws::Map<Aws::String, Aws::String>>
320 void SetTags(TagsT&& value) { m_tagsHasBeenSet =
true; m_tags = std::forward<TagsT>(value); }
321 template<
typename TagsT = Aws::Map<Aws::String, Aws::String>>
323 template<
typename TagsKeyT = Aws::String,
typename TagsValueT = Aws::String>
325 m_tagsHasBeenSet =
true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
return *
this;
344 template<
typename PlacementGroupT = Aws::String>
345 void SetPlacementGroup(PlacementGroupT&& value) { m_placementGroupHasBeenSet =
true; m_placementGroup = std::forward<PlacementGroupT>(value); }
346 template<
typename PlacementGroupT = Aws::String>
364 inline void SetBidPercentage(
int value) { m_bidPercentageHasBeenSet =
true; m_bidPercentage = value; }
388 template<
typename SpotIamFleetRoleT = Aws::String>
389 void SetSpotIamFleetRole(SpotIamFleetRoleT&& value) { m_spotIamFleetRoleHasBeenSet =
true; m_spotIamFleetRole = std::forward<SpotIamFleetRoleT>(value); }
390 template<
typename SpotIamFleetRoleT = Aws::String>
409 template<
typename LaunchTemplateT = LaunchTemplateSpecification>
410 void SetLaunchTemplate(LaunchTemplateT&& value) { m_launchTemplateHasBeenSet =
true; m_launchTemplate = std::forward<LaunchTemplateT>(value); }
411 template<
typename LaunchTemplateT = LaunchTemplateSpecification>
426 template<
typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
427 void SetEc2Configuration(Ec2ConfigurationT&& value) { m_ec2ConfigurationHasBeenSet =
true; m_ec2Configuration = std::forward<Ec2ConfigurationT>(value); }
428 template<
typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
430 template<
typename Ec2ConfigurationT = Ec2Configuration>
431 ComputeResource&
AddEc2Configuration(Ec2ConfigurationT&& value) { m_ec2ConfigurationHasBeenSet =
true; m_ec2Configuration.emplace_back(std::forward<Ec2ConfigurationT>(value));
return *
this; }
436 bool m_typeHasBeenSet =
false;
439 bool m_allocationStrategyHasBeenSet =
false;
442 bool m_minvCpusHasBeenSet =
false;
445 bool m_maxvCpusHasBeenSet =
false;
447 int m_desiredvCpus{0};
448 bool m_desiredvCpusHasBeenSet =
false;
451 bool m_instanceTypesHasBeenSet =
false;
454 bool m_subnetsHasBeenSet =
false;
457 bool m_securityGroupIdsHasBeenSet =
false;
460 bool m_ec2KeyPairHasBeenSet =
false;
463 bool m_instanceRoleHasBeenSet =
false;
466 bool m_tagsHasBeenSet =
false;
469 bool m_placementGroupHasBeenSet =
false;
471 int m_bidPercentage{0};
472 bool m_bidPercentageHasBeenSet =
false;
475 bool m_spotIamFleetRoleHasBeenSet =
false;
477 LaunchTemplateSpecification m_launchTemplate;
478 bool m_launchTemplateHasBeenSet =
false;
481 bool m_ec2ConfigurationHasBeenSet =
false;
ComputeResource & AddSubnets(SubnetsT &&value)
bool LaunchTemplateHasBeenSet() const
void SetInstanceTypes(InstanceTypesT &&value)
bool SubnetsHasBeenSet() const
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
ComputeResource & WithMaxvCpus(int value)
void SetPlacementGroup(PlacementGroupT &&value)
bool InstanceRoleHasBeenSet() const
ComputeResource & AddEc2Configuration(Ec2ConfigurationT &&value)
ComputeResource & WithSecurityGroupIds(SecurityGroupIdsT &&value)
void SetSubnets(SubnetsT &&value)
ComputeResource & WithSpotIamFleetRole(SpotIamFleetRoleT &&value)
bool SecurityGroupIdsHasBeenSet() const
void SetMinvCpus(int value)
AWS_BATCH_API ComputeResource(Aws::Utils::Json::JsonView jsonValue)
void SetType(CRType value)
void SetTags(TagsT &&value)
ComputeResource & AddTags(TagsKeyT &&key, TagsValueT &&value)
bool TypeHasBeenSet() const
CRAllocationStrategy GetAllocationStrategy() const
const Aws::String & GetInstanceRole() const
void SetSpotIamFleetRole(SpotIamFleetRoleT &&value)
void SetMaxvCpus(int value)
void SetInstanceRole(InstanceRoleT &&value)
bool Ec2KeyPairHasBeenSet() const
bool BidPercentageHasBeenSet() const
void SetEc2Configuration(Ec2ConfigurationT &&value)
const LaunchTemplateSpecification & GetLaunchTemplate() const
ComputeResource & AddSecurityGroupIds(SecurityGroupIdsT &&value)
ComputeResource & WithMinvCpus(int value)
ComputeResource & WithInstanceRole(InstanceRoleT &&value)
void SetSecurityGroupIds(SecurityGroupIdsT &&value)
ComputeResource & WithBidPercentage(int value)
void SetAllocationStrategy(CRAllocationStrategy value)
ComputeResource & AddInstanceTypes(InstanceTypesT &&value)
ComputeResource & WithDesiredvCpus(int value)
void SetDesiredvCpus(int value)
bool TagsHasBeenSet() const
bool DesiredvCpusHasBeenSet() const
void SetEc2KeyPair(Ec2KeyPairT &&value)
ComputeResource & WithEc2KeyPair(Ec2KeyPairT &&value)
ComputeResource & WithType(CRType value)
ComputeResource & WithAllocationStrategy(CRAllocationStrategy value)
AWS_BATCH_API ComputeResource()=default
bool MaxvCpusHasBeenSet() const
void SetLaunchTemplate(LaunchTemplateT &&value)
const Aws::String & GetEc2KeyPair() const
bool PlacementGroupHasBeenSet() const
void SetBidPercentage(int value)
bool SpotIamFleetRoleHasBeenSet() const
const Aws::Vector< Aws::String > & GetSecurityGroupIds() const
ComputeResource & WithTags(TagsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
bool AllocationStrategyHasBeenSet() const
AWS_BATCH_API ComputeResource & operator=(Aws::Utils::Json::JsonView jsonValue)
int GetBidPercentage() const
const Aws::Vector< Ec2Configuration > & GetEc2Configuration() const
bool MinvCpusHasBeenSet() const
ComputeResource & WithPlacementGroup(PlacementGroupT &&value)
const Aws::String & GetSpotIamFleetRole() const
ComputeResource & WithSubnets(SubnetsT &&value)
const Aws::Vector< Aws::String > & GetSubnets() const
const Aws::Vector< Aws::String > & GetInstanceTypes() const
const Aws::String & GetPlacementGroup() const
ComputeResource & WithInstanceTypes(InstanceTypesT &&value)
int GetDesiredvCpus() const
ComputeResource & WithEc2Configuration(Ec2ConfigurationT &&value)
ComputeResource & WithLaunchTemplate(LaunchTemplateT &&value)
bool InstanceTypesHasBeenSet() const
bool Ec2ConfigurationHasBeenSet() const
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