/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Batch { namespace Model { /** */ class AWS_BATCH_API RegisterJobDefinitionRequest : public BatchRequest { public: RegisterJobDefinitionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "RegisterJobDefinition"; } Aws::String SerializePayload() const override; /** *

The name of the job definition to register. Up to 128 letters (uppercase and * lowercase), numbers, hyphens, and underscores are allowed.

*/ inline const Aws::String& GetJobDefinitionName() const{ return m_jobDefinitionName; } /** *

The name of the job definition to register. Up to 128 letters (uppercase and * lowercase), numbers, hyphens, and underscores are allowed.

*/ inline bool JobDefinitionNameHasBeenSet() const { return m_jobDefinitionNameHasBeenSet; } /** *

The name of the job definition to register. Up to 128 letters (uppercase and * lowercase), numbers, hyphens, and underscores are allowed.

*/ inline void SetJobDefinitionName(const Aws::String& value) { m_jobDefinitionNameHasBeenSet = true; m_jobDefinitionName = value; } /** *

The name of the job definition to register. Up to 128 letters (uppercase and * lowercase), numbers, hyphens, and underscores are allowed.

*/ inline void SetJobDefinitionName(Aws::String&& value) { m_jobDefinitionNameHasBeenSet = true; m_jobDefinitionName = std::move(value); } /** *

The name of the job definition to register. Up to 128 letters (uppercase and * lowercase), numbers, hyphens, and underscores are allowed.

*/ inline void SetJobDefinitionName(const char* value) { m_jobDefinitionNameHasBeenSet = true; m_jobDefinitionName.assign(value); } /** *

The name of the job definition to register. Up to 128 letters (uppercase and * lowercase), numbers, hyphens, and underscores are allowed.

*/ inline RegisterJobDefinitionRequest& WithJobDefinitionName(const Aws::String& value) { SetJobDefinitionName(value); return *this;} /** *

The name of the job definition to register. Up to 128 letters (uppercase and * lowercase), numbers, hyphens, and underscores are allowed.

*/ inline RegisterJobDefinitionRequest& WithJobDefinitionName(Aws::String&& value) { SetJobDefinitionName(std::move(value)); return *this;} /** *

The name of the job definition to register. Up to 128 letters (uppercase and * lowercase), numbers, hyphens, and underscores are allowed.

*/ inline RegisterJobDefinitionRequest& WithJobDefinitionName(const char* value) { SetJobDefinitionName(value); return *this;} /** *

The type of job definition.

*/ inline const JobDefinitionType& GetType() const{ return m_type; } /** *

The type of job definition.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of job definition.

*/ inline void SetType(const JobDefinitionType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of job definition.

*/ inline void SetType(JobDefinitionType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of job definition.

*/ inline RegisterJobDefinitionRequest& WithType(const JobDefinitionType& value) { SetType(value); return *this;} /** *

The type of job definition.

*/ inline RegisterJobDefinitionRequest& WithType(JobDefinitionType&& value) { SetType(std::move(value)); return *this;} /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline const Aws::Map& GetParameters() const{ return m_parameters; } /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline void SetParameters(const Aws::Map& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline void SetParameters(Aws::Map&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline RegisterJobDefinitionRequest& WithParameters(const Aws::Map& value) { SetParameters(value); return *this;} /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline RegisterJobDefinitionRequest& WithParameters(Aws::Map&& value) { SetParameters(std::move(value)); return *this;} /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline RegisterJobDefinitionRequest& AddParameters(const Aws::String& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline RegisterJobDefinitionRequest& AddParameters(Aws::String&& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline RegisterJobDefinitionRequest& AddParameters(const Aws::String& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline RegisterJobDefinitionRequest& AddParameters(Aws::String&& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), std::move(value)); return *this; } /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline RegisterJobDefinitionRequest& AddParameters(const char* key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline RegisterJobDefinitionRequest& AddParameters(Aws::String&& key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

Default parameter substitution placeholders to set in the job definition. * Parameters are specified as a key-value pair mapping. Parameters in a * SubmitJob request override any corresponding parameter defaults * from the job definition.

*/ inline RegisterJobDefinitionRequest& AddParameters(const char* key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } /** *

An object with various properties specific to single-node container-based * jobs. If the job definition's type parameter is * container, then you must specify either * containerProperties or nodeProperties.

*/ inline const ContainerProperties& GetContainerProperties() const{ return m_containerProperties; } /** *

An object with various properties specific to single-node container-based * jobs. If the job definition's type parameter is * container, then you must specify either * containerProperties or nodeProperties.

*/ inline bool ContainerPropertiesHasBeenSet() const { return m_containerPropertiesHasBeenSet; } /** *

An object with various properties specific to single-node container-based * jobs. If the job definition's type parameter is * container, then you must specify either * containerProperties or nodeProperties.

*/ inline void SetContainerProperties(const ContainerProperties& value) { m_containerPropertiesHasBeenSet = true; m_containerProperties = value; } /** *

An object with various properties specific to single-node container-based * jobs. If the job definition's type parameter is * container, then you must specify either * containerProperties or nodeProperties.

*/ inline void SetContainerProperties(ContainerProperties&& value) { m_containerPropertiesHasBeenSet = true; m_containerProperties = std::move(value); } /** *

An object with various properties specific to single-node container-based * jobs. If the job definition's type parameter is * container, then you must specify either * containerProperties or nodeProperties.

*/ inline RegisterJobDefinitionRequest& WithContainerProperties(const ContainerProperties& value) { SetContainerProperties(value); return *this;} /** *

An object with various properties specific to single-node container-based * jobs. If the job definition's type parameter is * container, then you must specify either * containerProperties or nodeProperties.

*/ inline RegisterJobDefinitionRequest& WithContainerProperties(ContainerProperties&& value) { SetContainerProperties(std::move(value)); return *this;} /** *

An object with various properties specific to multi-node parallel jobs. If * you specify node properties for a job, it becomes a multi-node parallel job. For * more information, see Multi-node * Parallel Jobs in the AWS Batch User Guide. If the job definition's * type parameter is container, then you must specify * either containerProperties or nodeProperties.

*/ inline const NodeProperties& GetNodeProperties() const{ return m_nodeProperties; } /** *

An object with various properties specific to multi-node parallel jobs. If * you specify node properties for a job, it becomes a multi-node parallel job. For * more information, see Multi-node * Parallel Jobs in the AWS Batch User Guide. If the job definition's * type parameter is container, then you must specify * either containerProperties or nodeProperties.

*/ inline bool NodePropertiesHasBeenSet() const { return m_nodePropertiesHasBeenSet; } /** *

An object with various properties specific to multi-node parallel jobs. If * you specify node properties for a job, it becomes a multi-node parallel job. For * more information, see Multi-node * Parallel Jobs in the AWS Batch User Guide. If the job definition's * type parameter is container, then you must specify * either containerProperties or nodeProperties.

*/ inline void SetNodeProperties(const NodeProperties& value) { m_nodePropertiesHasBeenSet = true; m_nodeProperties = value; } /** *

An object with various properties specific to multi-node parallel jobs. If * you specify node properties for a job, it becomes a multi-node parallel job. For * more information, see Multi-node * Parallel Jobs in the AWS Batch User Guide. If the job definition's * type parameter is container, then you must specify * either containerProperties or nodeProperties.

*/ inline void SetNodeProperties(NodeProperties&& value) { m_nodePropertiesHasBeenSet = true; m_nodeProperties = std::move(value); } /** *

An object with various properties specific to multi-node parallel jobs. If * you specify node properties for a job, it becomes a multi-node parallel job. For * more information, see Multi-node * Parallel Jobs in the AWS Batch User Guide. If the job definition's * type parameter is container, then you must specify * either containerProperties or nodeProperties.

*/ inline RegisterJobDefinitionRequest& WithNodeProperties(const NodeProperties& value) { SetNodeProperties(value); return *this;} /** *

An object with various properties specific to multi-node parallel jobs. If * you specify node properties for a job, it becomes a multi-node parallel job. For * more information, see Multi-node * Parallel Jobs in the AWS Batch User Guide. If the job definition's * type parameter is container, then you must specify * either containerProperties or nodeProperties.

*/ inline RegisterJobDefinitionRequest& WithNodeProperties(NodeProperties&& value) { SetNodeProperties(std::move(value)); return *this;} /** *

The retry strategy to use for failed jobs that are submitted with this job * definition. Any retry strategy that is specified during a SubmitJob * operation overrides the retry strategy defined here. If a job is terminated due * to a timeout, it is not retried.

*/ inline const RetryStrategy& GetRetryStrategy() const{ return m_retryStrategy; } /** *

The retry strategy to use for failed jobs that are submitted with this job * definition. Any retry strategy that is specified during a SubmitJob * operation overrides the retry strategy defined here. If a job is terminated due * to a timeout, it is not retried.

*/ inline bool RetryStrategyHasBeenSet() const { return m_retryStrategyHasBeenSet; } /** *

The retry strategy to use for failed jobs that are submitted with this job * definition. Any retry strategy that is specified during a SubmitJob * operation overrides the retry strategy defined here. If a job is terminated due * to a timeout, it is not retried.

*/ inline void SetRetryStrategy(const RetryStrategy& value) { m_retryStrategyHasBeenSet = true; m_retryStrategy = value; } /** *

The retry strategy to use for failed jobs that are submitted with this job * definition. Any retry strategy that is specified during a SubmitJob * operation overrides the retry strategy defined here. If a job is terminated due * to a timeout, it is not retried.

*/ inline void SetRetryStrategy(RetryStrategy&& value) { m_retryStrategyHasBeenSet = true; m_retryStrategy = std::move(value); } /** *

The retry strategy to use for failed jobs that are submitted with this job * definition. Any retry strategy that is specified during a SubmitJob * operation overrides the retry strategy defined here. If a job is terminated due * to a timeout, it is not retried.

*/ inline RegisterJobDefinitionRequest& WithRetryStrategy(const RetryStrategy& value) { SetRetryStrategy(value); return *this;} /** *

The retry strategy to use for failed jobs that are submitted with this job * definition. Any retry strategy that is specified during a SubmitJob * operation overrides the retry strategy defined here. If a job is terminated due * to a timeout, it is not retried.

*/ inline RegisterJobDefinitionRequest& WithRetryStrategy(RetryStrategy&& value) { SetRetryStrategy(std::move(value)); return *this;} /** *

The timeout configuration for jobs that are submitted with this job * definition, after which AWS Batch terminates your jobs if they have not * finished. If a job is terminated due to a timeout, it is not retried. The * minimum value for the timeout is 60 seconds. Any timeout configuration that is * specified during a SubmitJob operation overrides the timeout * configuration defined here. For more information, see Job * Timeouts in the Amazon Elastic Container Service Developer Guide.

*/ inline const JobTimeout& GetTimeout() const{ return m_timeout; } /** *

The timeout configuration for jobs that are submitted with this job * definition, after which AWS Batch terminates your jobs if they have not * finished. If a job is terminated due to a timeout, it is not retried. The * minimum value for the timeout is 60 seconds. Any timeout configuration that is * specified during a SubmitJob operation overrides the timeout * configuration defined here. For more information, see Job * Timeouts in the Amazon Elastic Container Service Developer Guide.

*/ inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; } /** *

The timeout configuration for jobs that are submitted with this job * definition, after which AWS Batch terminates your jobs if they have not * finished. If a job is terminated due to a timeout, it is not retried. The * minimum value for the timeout is 60 seconds. Any timeout configuration that is * specified during a SubmitJob operation overrides the timeout * configuration defined here. For more information, see Job * Timeouts in the Amazon Elastic Container Service Developer Guide.

*/ inline void SetTimeout(const JobTimeout& value) { m_timeoutHasBeenSet = true; m_timeout = value; } /** *

The timeout configuration for jobs that are submitted with this job * definition, after which AWS Batch terminates your jobs if they have not * finished. If a job is terminated due to a timeout, it is not retried. The * minimum value for the timeout is 60 seconds. Any timeout configuration that is * specified during a SubmitJob operation overrides the timeout * configuration defined here. For more information, see Job * Timeouts in the Amazon Elastic Container Service Developer Guide.

*/ inline void SetTimeout(JobTimeout&& value) { m_timeoutHasBeenSet = true; m_timeout = std::move(value); } /** *

The timeout configuration for jobs that are submitted with this job * definition, after which AWS Batch terminates your jobs if they have not * finished. If a job is terminated due to a timeout, it is not retried. The * minimum value for the timeout is 60 seconds. Any timeout configuration that is * specified during a SubmitJob operation overrides the timeout * configuration defined here. For more information, see Job * Timeouts in the Amazon Elastic Container Service Developer Guide.

*/ inline RegisterJobDefinitionRequest& WithTimeout(const JobTimeout& value) { SetTimeout(value); return *this;} /** *

The timeout configuration for jobs that are submitted with this job * definition, after which AWS Batch terminates your jobs if they have not * finished. If a job is terminated due to a timeout, it is not retried. The * minimum value for the timeout is 60 seconds. Any timeout configuration that is * specified during a SubmitJob operation overrides the timeout * configuration defined here. For more information, see Job * Timeouts in the Amazon Elastic Container Service Developer Guide.

*/ inline RegisterJobDefinitionRequest& WithTimeout(JobTimeout&& value) { SetTimeout(std::move(value)); return *this;} private: Aws::String m_jobDefinitionName; bool m_jobDefinitionNameHasBeenSet; JobDefinitionType m_type; bool m_typeHasBeenSet; Aws::Map m_parameters; bool m_parametersHasBeenSet; ContainerProperties m_containerProperties; bool m_containerPropertiesHasBeenSet; NodeProperties m_nodeProperties; bool m_nodePropertiesHasBeenSet; RetryStrategy m_retryStrategy; bool m_retryStrategyHasBeenSet; JobTimeout m_timeout; bool m_timeoutHasBeenSet; }; } // namespace Model } // namespace Batch } // namespace Aws