/** * 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 #include #include namespace Aws { namespace IoT { namespace Model { /** */ class CreateJobTemplateRequest : public IoTRequest { public: AWS_IOT_API CreateJobTemplateRequest(); // 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 "CreateJobTemplate"; } AWS_IOT_API Aws::String SerializePayload() const override; /** *

A unique identifier for the job template. We recommend using a UUID. * Alpha-numeric characters, "-", and "_" are valid for use here.

*/ inline const Aws::String& GetJobTemplateId() const{ return m_jobTemplateId; } /** *

A unique identifier for the job template. We recommend using a UUID. * Alpha-numeric characters, "-", and "_" are valid for use here.

*/ inline bool JobTemplateIdHasBeenSet() const { return m_jobTemplateIdHasBeenSet; } /** *

A unique identifier for the job template. We recommend using a UUID. * Alpha-numeric characters, "-", and "_" are valid for use here.

*/ inline void SetJobTemplateId(const Aws::String& value) { m_jobTemplateIdHasBeenSet = true; m_jobTemplateId = value; } /** *

A unique identifier for the job template. We recommend using a UUID. * Alpha-numeric characters, "-", and "_" are valid for use here.

*/ inline void SetJobTemplateId(Aws::String&& value) { m_jobTemplateIdHasBeenSet = true; m_jobTemplateId = std::move(value); } /** *

A unique identifier for the job template. We recommend using a UUID. * Alpha-numeric characters, "-", and "_" are valid for use here.

*/ inline void SetJobTemplateId(const char* value) { m_jobTemplateIdHasBeenSet = true; m_jobTemplateId.assign(value); } /** *

A unique identifier for the job template. We recommend using a UUID. * Alpha-numeric characters, "-", and "_" are valid for use here.

*/ inline CreateJobTemplateRequest& WithJobTemplateId(const Aws::String& value) { SetJobTemplateId(value); return *this;} /** *

A unique identifier for the job template. We recommend using a UUID. * Alpha-numeric characters, "-", and "_" are valid for use here.

*/ inline CreateJobTemplateRequest& WithJobTemplateId(Aws::String&& value) { SetJobTemplateId(std::move(value)); return *this;} /** *

A unique identifier for the job template. We recommend using a UUID. * Alpha-numeric characters, "-", and "_" are valid for use here.

*/ inline CreateJobTemplateRequest& WithJobTemplateId(const char* value) { SetJobTemplateId(value); return *this;} /** *

The ARN of the job to use as the basis for the job template.

*/ inline const Aws::String& GetJobArn() const{ return m_jobArn; } /** *

The ARN of the job to use as the basis for the job template.

*/ inline bool JobArnHasBeenSet() const { return m_jobArnHasBeenSet; } /** *

The ARN of the job to use as the basis for the job template.

*/ inline void SetJobArn(const Aws::String& value) { m_jobArnHasBeenSet = true; m_jobArn = value; } /** *

The ARN of the job to use as the basis for the job template.

*/ inline void SetJobArn(Aws::String&& value) { m_jobArnHasBeenSet = true; m_jobArn = std::move(value); } /** *

The ARN of the job to use as the basis for the job template.

*/ inline void SetJobArn(const char* value) { m_jobArnHasBeenSet = true; m_jobArn.assign(value); } /** *

The ARN of the job to use as the basis for the job template.

*/ inline CreateJobTemplateRequest& WithJobArn(const Aws::String& value) { SetJobArn(value); return *this;} /** *

The ARN of the job to use as the basis for the job template.

*/ inline CreateJobTemplateRequest& WithJobArn(Aws::String&& value) { SetJobArn(std::move(value)); return *this;} /** *

The ARN of the job to use as the basis for the job template.

*/ inline CreateJobTemplateRequest& WithJobArn(const char* value) { SetJobArn(value); return *this;} /** *

An S3 link to the job document to use in the template. Required if you don't * specify a value for document.

If the job document * resides in an S3 bucket, you must use a placeholder link when specifying the * document.

The placeholder link is of the following form:

* ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} *

where bucket is your bucket name and key is the object in * the bucket to which you are linking.

*/ inline const Aws::String& GetDocumentSource() const{ return m_documentSource; } /** *

An S3 link to the job document to use in the template. Required if you don't * specify a value for document.

If the job document * resides in an S3 bucket, you must use a placeholder link when specifying the * document.

The placeholder link is of the following form:

* ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} *

where bucket is your bucket name and key is the object in * the bucket to which you are linking.

*/ inline bool DocumentSourceHasBeenSet() const { return m_documentSourceHasBeenSet; } /** *

An S3 link to the job document to use in the template. Required if you don't * specify a value for document.

If the job document * resides in an S3 bucket, you must use a placeholder link when specifying the * document.

The placeholder link is of the following form:

* ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} *

where bucket is your bucket name and key is the object in * the bucket to which you are linking.

*/ inline void SetDocumentSource(const Aws::String& value) { m_documentSourceHasBeenSet = true; m_documentSource = value; } /** *

An S3 link to the job document to use in the template. Required if you don't * specify a value for document.

If the job document * resides in an S3 bucket, you must use a placeholder link when specifying the * document.

The placeholder link is of the following form:

* ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} *

where bucket is your bucket name and key is the object in * the bucket to which you are linking.

*/ inline void SetDocumentSource(Aws::String&& value) { m_documentSourceHasBeenSet = true; m_documentSource = std::move(value); } /** *

An S3 link to the job document to use in the template. Required if you don't * specify a value for document.

If the job document * resides in an S3 bucket, you must use a placeholder link when specifying the * document.

The placeholder link is of the following form:

* ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} *

where bucket is your bucket name and key is the object in * the bucket to which you are linking.

*/ inline void SetDocumentSource(const char* value) { m_documentSourceHasBeenSet = true; m_documentSource.assign(value); } /** *

An S3 link to the job document to use in the template. Required if you don't * specify a value for document.

If the job document * resides in an S3 bucket, you must use a placeholder link when specifying the * document.

The placeholder link is of the following form:

* ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} *

where bucket is your bucket name and key is the object in * the bucket to which you are linking.

*/ inline CreateJobTemplateRequest& WithDocumentSource(const Aws::String& value) { SetDocumentSource(value); return *this;} /** *

An S3 link to the job document to use in the template. Required if you don't * specify a value for document.

If the job document * resides in an S3 bucket, you must use a placeholder link when specifying the * document.

The placeholder link is of the following form:

* ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} *

where bucket is your bucket name and key is the object in * the bucket to which you are linking.

*/ inline CreateJobTemplateRequest& WithDocumentSource(Aws::String&& value) { SetDocumentSource(std::move(value)); return *this;} /** *

An S3 link to the job document to use in the template. Required if you don't * specify a value for document.

If the job document * resides in an S3 bucket, you must use a placeholder link when specifying the * document.

The placeholder link is of the following form:

* ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} *

where bucket is your bucket name and key is the object in * the bucket to which you are linking.

*/ inline CreateJobTemplateRequest& WithDocumentSource(const char* value) { SetDocumentSource(value); return *this;} /** *

The job document. Required if you don't specify a value for * documentSource.

*/ inline const Aws::String& GetDocument() const{ return m_document; } /** *

The job document. Required if you don't specify a value for * documentSource.

*/ inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; } /** *

The job document. Required if you don't specify a value for * documentSource.

*/ inline void SetDocument(const Aws::String& value) { m_documentHasBeenSet = true; m_document = value; } /** *

The job document. Required if you don't specify a value for * documentSource.

*/ inline void SetDocument(Aws::String&& value) { m_documentHasBeenSet = true; m_document = std::move(value); } /** *

The job document. Required if you don't specify a value for * documentSource.

*/ inline void SetDocument(const char* value) { m_documentHasBeenSet = true; m_document.assign(value); } /** *

The job document. Required if you don't specify a value for * documentSource.

*/ inline CreateJobTemplateRequest& WithDocument(const Aws::String& value) { SetDocument(value); return *this;} /** *

The job document. Required if you don't specify a value for * documentSource.

*/ inline CreateJobTemplateRequest& WithDocument(Aws::String&& value) { SetDocument(std::move(value)); return *this;} /** *

The job document. Required if you don't specify a value for * documentSource.

*/ inline CreateJobTemplateRequest& WithDocument(const char* value) { SetDocument(value); return *this;} /** *

A description of the job document.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the job document.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description of the job document.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description of the job document.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description of the job document.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description of the job document.

*/ inline CreateJobTemplateRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the job document.

*/ inline CreateJobTemplateRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the job document.

*/ inline CreateJobTemplateRequest& WithDescription(const char* value) { SetDescription(value); return *this;} inline const PresignedUrlConfig& GetPresignedUrlConfig() const{ return m_presignedUrlConfig; } inline bool PresignedUrlConfigHasBeenSet() const { return m_presignedUrlConfigHasBeenSet; } inline void SetPresignedUrlConfig(const PresignedUrlConfig& value) { m_presignedUrlConfigHasBeenSet = true; m_presignedUrlConfig = value; } inline void SetPresignedUrlConfig(PresignedUrlConfig&& value) { m_presignedUrlConfigHasBeenSet = true; m_presignedUrlConfig = std::move(value); } inline CreateJobTemplateRequest& WithPresignedUrlConfig(const PresignedUrlConfig& value) { SetPresignedUrlConfig(value); return *this;} inline CreateJobTemplateRequest& WithPresignedUrlConfig(PresignedUrlConfig&& value) { SetPresignedUrlConfig(std::move(value)); return *this;} inline const JobExecutionsRolloutConfig& GetJobExecutionsRolloutConfig() const{ return m_jobExecutionsRolloutConfig; } inline bool JobExecutionsRolloutConfigHasBeenSet() const { return m_jobExecutionsRolloutConfigHasBeenSet; } inline void SetJobExecutionsRolloutConfig(const JobExecutionsRolloutConfig& value) { m_jobExecutionsRolloutConfigHasBeenSet = true; m_jobExecutionsRolloutConfig = value; } inline void SetJobExecutionsRolloutConfig(JobExecutionsRolloutConfig&& value) { m_jobExecutionsRolloutConfigHasBeenSet = true; m_jobExecutionsRolloutConfig = std::move(value); } inline CreateJobTemplateRequest& WithJobExecutionsRolloutConfig(const JobExecutionsRolloutConfig& value) { SetJobExecutionsRolloutConfig(value); return *this;} inline CreateJobTemplateRequest& WithJobExecutionsRolloutConfig(JobExecutionsRolloutConfig&& value) { SetJobExecutionsRolloutConfig(std::move(value)); return *this;} inline const AbortConfig& GetAbortConfig() const{ return m_abortConfig; } inline bool AbortConfigHasBeenSet() const { return m_abortConfigHasBeenSet; } inline void SetAbortConfig(const AbortConfig& value) { m_abortConfigHasBeenSet = true; m_abortConfig = value; } inline void SetAbortConfig(AbortConfig&& value) { m_abortConfigHasBeenSet = true; m_abortConfig = std::move(value); } inline CreateJobTemplateRequest& WithAbortConfig(const AbortConfig& value) { SetAbortConfig(value); return *this;} inline CreateJobTemplateRequest& WithAbortConfig(AbortConfig&& value) { SetAbortConfig(std::move(value)); return *this;} inline const TimeoutConfig& GetTimeoutConfig() const{ return m_timeoutConfig; } inline bool TimeoutConfigHasBeenSet() const { return m_timeoutConfigHasBeenSet; } inline void SetTimeoutConfig(const TimeoutConfig& value) { m_timeoutConfigHasBeenSet = true; m_timeoutConfig = value; } inline void SetTimeoutConfig(TimeoutConfig&& value) { m_timeoutConfigHasBeenSet = true; m_timeoutConfig = std::move(value); } inline CreateJobTemplateRequest& WithTimeoutConfig(const TimeoutConfig& value) { SetTimeoutConfig(value); return *this;} inline CreateJobTemplateRequest& WithTimeoutConfig(TimeoutConfig&& value) { SetTimeoutConfig(std::move(value)); return *this;} /** *

Metadata that can be used to manage the job template.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

Metadata that can be used to manage the job template.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

Metadata that can be used to manage the job template.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

Metadata that can be used to manage the job template.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

Metadata that can be used to manage the job template.

*/ inline CreateJobTemplateRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Metadata that can be used to manage the job template.

*/ inline CreateJobTemplateRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Metadata that can be used to manage the job template.

*/ inline CreateJobTemplateRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

Metadata that can be used to manage the job template.

*/ inline CreateJobTemplateRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

Allows you to create the criteria to retry a job.

*/ inline const JobExecutionsRetryConfig& GetJobExecutionsRetryConfig() const{ return m_jobExecutionsRetryConfig; } /** *

Allows you to create the criteria to retry a job.

*/ inline bool JobExecutionsRetryConfigHasBeenSet() const { return m_jobExecutionsRetryConfigHasBeenSet; } /** *

Allows you to create the criteria to retry a job.

*/ inline void SetJobExecutionsRetryConfig(const JobExecutionsRetryConfig& value) { m_jobExecutionsRetryConfigHasBeenSet = true; m_jobExecutionsRetryConfig = value; } /** *

Allows you to create the criteria to retry a job.

*/ inline void SetJobExecutionsRetryConfig(JobExecutionsRetryConfig&& value) { m_jobExecutionsRetryConfigHasBeenSet = true; m_jobExecutionsRetryConfig = std::move(value); } /** *

Allows you to create the criteria to retry a job.

*/ inline CreateJobTemplateRequest& WithJobExecutionsRetryConfig(const JobExecutionsRetryConfig& value) { SetJobExecutionsRetryConfig(value); return *this;} /** *

Allows you to create the criteria to retry a job.

*/ inline CreateJobTemplateRequest& WithJobExecutionsRetryConfig(JobExecutionsRetryConfig&& value) { SetJobExecutionsRetryConfig(std::move(value)); return *this;} /** *

Allows you to configure an optional maintenance window for the rollout of a * job document to all devices in the target group for a job.

*/ inline const Aws::Vector& GetMaintenanceWindows() const{ return m_maintenanceWindows; } /** *

Allows you to configure an optional maintenance window for the rollout of a * job document to all devices in the target group for a job.

*/ inline bool MaintenanceWindowsHasBeenSet() const { return m_maintenanceWindowsHasBeenSet; } /** *

Allows you to configure an optional maintenance window for the rollout of a * job document to all devices in the target group for a job.

*/ inline void SetMaintenanceWindows(const Aws::Vector& value) { m_maintenanceWindowsHasBeenSet = true; m_maintenanceWindows = value; } /** *

Allows you to configure an optional maintenance window for the rollout of a * job document to all devices in the target group for a job.

*/ inline void SetMaintenanceWindows(Aws::Vector&& value) { m_maintenanceWindowsHasBeenSet = true; m_maintenanceWindows = std::move(value); } /** *

Allows you to configure an optional maintenance window for the rollout of a * job document to all devices in the target group for a job.

*/ inline CreateJobTemplateRequest& WithMaintenanceWindows(const Aws::Vector& value) { SetMaintenanceWindows(value); return *this;} /** *

Allows you to configure an optional maintenance window for the rollout of a * job document to all devices in the target group for a job.

*/ inline CreateJobTemplateRequest& WithMaintenanceWindows(Aws::Vector&& value) { SetMaintenanceWindows(std::move(value)); return *this;} /** *

Allows you to configure an optional maintenance window for the rollout of a * job document to all devices in the target group for a job.

*/ inline CreateJobTemplateRequest& AddMaintenanceWindows(const MaintenanceWindow& value) { m_maintenanceWindowsHasBeenSet = true; m_maintenanceWindows.push_back(value); return *this; } /** *

Allows you to configure an optional maintenance window for the rollout of a * job document to all devices in the target group for a job.

*/ inline CreateJobTemplateRequest& AddMaintenanceWindows(MaintenanceWindow&& value) { m_maintenanceWindowsHasBeenSet = true; m_maintenanceWindows.push_back(std::move(value)); return *this; } /** *

The package version Amazon Resource Names (ARNs) that are installed on the * device when the job successfully completes.

Note:The following * Length Constraints relates to a single string. Up to five strings are * allowed.

*/ inline const Aws::Vector& GetDestinationPackageVersions() const{ return m_destinationPackageVersions; } /** *

The package version Amazon Resource Names (ARNs) that are installed on the * device when the job successfully completes.

Note:The following * Length Constraints relates to a single string. Up to five strings are * allowed.

*/ inline bool DestinationPackageVersionsHasBeenSet() const { return m_destinationPackageVersionsHasBeenSet; } /** *

The package version Amazon Resource Names (ARNs) that are installed on the * device when the job successfully completes.

Note:The following * Length Constraints relates to a single string. Up to five strings are * allowed.

*/ inline void SetDestinationPackageVersions(const Aws::Vector& value) { m_destinationPackageVersionsHasBeenSet = true; m_destinationPackageVersions = value; } /** *

The package version Amazon Resource Names (ARNs) that are installed on the * device when the job successfully completes.

Note:The following * Length Constraints relates to a single string. Up to five strings are * allowed.

*/ inline void SetDestinationPackageVersions(Aws::Vector&& value) { m_destinationPackageVersionsHasBeenSet = true; m_destinationPackageVersions = std::move(value); } /** *

The package version Amazon Resource Names (ARNs) that are installed on the * device when the job successfully completes.

Note:The following * Length Constraints relates to a single string. Up to five strings are * allowed.

*/ inline CreateJobTemplateRequest& WithDestinationPackageVersions(const Aws::Vector& value) { SetDestinationPackageVersions(value); return *this;} /** *

The package version Amazon Resource Names (ARNs) that are installed on the * device when the job successfully completes.

Note:The following * Length Constraints relates to a single string. Up to five strings are * allowed.

*/ inline CreateJobTemplateRequest& WithDestinationPackageVersions(Aws::Vector&& value) { SetDestinationPackageVersions(std::move(value)); return *this;} /** *

The package version Amazon Resource Names (ARNs) that are installed on the * device when the job successfully completes.

Note:The following * Length Constraints relates to a single string. Up to five strings are * allowed.

*/ inline CreateJobTemplateRequest& AddDestinationPackageVersions(const Aws::String& value) { m_destinationPackageVersionsHasBeenSet = true; m_destinationPackageVersions.push_back(value); return *this; } /** *

The package version Amazon Resource Names (ARNs) that are installed on the * device when the job successfully completes.

Note:The following * Length Constraints relates to a single string. Up to five strings are * allowed.

*/ inline CreateJobTemplateRequest& AddDestinationPackageVersions(Aws::String&& value) { m_destinationPackageVersionsHasBeenSet = true; m_destinationPackageVersions.push_back(std::move(value)); return *this; } /** *

The package version Amazon Resource Names (ARNs) that are installed on the * device when the job successfully completes.

Note:The following * Length Constraints relates to a single string. Up to five strings are * allowed.

*/ inline CreateJobTemplateRequest& AddDestinationPackageVersions(const char* value) { m_destinationPackageVersionsHasBeenSet = true; m_destinationPackageVersions.push_back(value); return *this; } private: Aws::String m_jobTemplateId; bool m_jobTemplateIdHasBeenSet = false; Aws::String m_jobArn; bool m_jobArnHasBeenSet = false; Aws::String m_documentSource; bool m_documentSourceHasBeenSet = false; Aws::String m_document; bool m_documentHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; PresignedUrlConfig m_presignedUrlConfig; bool m_presignedUrlConfigHasBeenSet = false; JobExecutionsRolloutConfig m_jobExecutionsRolloutConfig; bool m_jobExecutionsRolloutConfigHasBeenSet = false; AbortConfig m_abortConfig; bool m_abortConfigHasBeenSet = false; TimeoutConfig m_timeoutConfig; bool m_timeoutConfigHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; JobExecutionsRetryConfig m_jobExecutionsRetryConfig; bool m_jobExecutionsRetryConfigHasBeenSet = false; Aws::Vector m_maintenanceWindows; bool m_maintenanceWindowsHasBeenSet = false; Aws::Vector m_destinationPackageVersions; bool m_destinationPackageVersionsHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws