/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.iot.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateJobTemplateRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and "_" are * valid for use here. *
*/ private String jobTemplateId; /** ** The ARN of the job to use as the basis for the job template. *
*/ private String jobArn; /** *
* 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. *
*
* The job document. Required if you don't specify a value for documentSource
.
*
* A description of the job document. *
*/ private String description; private PresignedUrlConfig presignedUrlConfig; private JobExecutionsRolloutConfig jobExecutionsRolloutConfig; private AbortConfig abortConfig; private TimeoutConfig timeoutConfig; /** ** Metadata that can be used to manage the job template. *
*/ private java.util.List* Allows you to create the criteria to retry a job. *
*/ private JobExecutionsRetryConfig jobExecutionsRetryConfig; /** ** 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. *
*/ private java.util.List* 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. *
*/ private java.util.List* A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and "_" are * valid for use here. *
* * @param jobTemplateId * A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and * "_" are valid for use here. */ public void setJobTemplateId(String jobTemplateId) { this.jobTemplateId = jobTemplateId; } /** ** A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and "_" are * valid for use here. *
* * @return A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and * "_" are valid for use here. */ public String getJobTemplateId() { return this.jobTemplateId; } /** ** A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and "_" are * valid for use here. *
* * @param jobTemplateId * A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and * "_" are valid for use here. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withJobTemplateId(String jobTemplateId) { setJobTemplateId(jobTemplateId); return this; } /** ** The ARN of the job to use as the basis for the job template. *
* * @param jobArn * The ARN of the job to use as the basis for the job template. */ public void setJobArn(String jobArn) { this.jobArn = jobArn; } /** ** The ARN of the job to use as the basis for the job template. *
* * @return The ARN of the job to use as the basis for the job template. */ public String getJobArn() { return this.jobArn; } /** ** The ARN of the job to use as the basis for the job template. *
* * @param jobArn * The ARN of the job to use as the basis for the job template. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withJobArn(String jobArn) { setJobArn(jobArn); 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. *
*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. *
*/ public void setDocumentSource(String documentSource) { this.documentSource = 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. *
*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. *
*/ public String getDocumentSource() { return this.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. *
*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. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withDocumentSource(String documentSource) { setDocumentSource(documentSource); return this; } /** *
* The job document. Required if you don't specify a value for documentSource
.
*
documentSource
.
*/
public void setDocument(String document) {
this.document = document;
}
/**
*
* The job document. Required if you don't specify a value for documentSource
.
*
documentSource
.
*/
public String getDocument() {
return this.document;
}
/**
*
* The job document. Required if you don't specify a value for documentSource
.
*
documentSource
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateJobTemplateRequest withDocument(String document) {
setDocument(document);
return this;
}
/**
* * A description of the job document. *
* * @param description * A description of the job document. */ public void setDescription(String description) { this.description = description; } /** ** A description of the job document. *
* * @return A description of the job document. */ public String getDescription() { return this.description; } /** ** A description of the job document. *
* * @param description * A description of the job document. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withDescription(String description) { setDescription(description); return this; } /** * @param presignedUrlConfig */ public void setPresignedUrlConfig(PresignedUrlConfig presignedUrlConfig) { this.presignedUrlConfig = presignedUrlConfig; } /** * @return */ public PresignedUrlConfig getPresignedUrlConfig() { return this.presignedUrlConfig; } /** * @param presignedUrlConfig * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withPresignedUrlConfig(PresignedUrlConfig presignedUrlConfig) { setPresignedUrlConfig(presignedUrlConfig); return this; } /** * @param jobExecutionsRolloutConfig */ public void setJobExecutionsRolloutConfig(JobExecutionsRolloutConfig jobExecutionsRolloutConfig) { this.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig; } /** * @return */ public JobExecutionsRolloutConfig getJobExecutionsRolloutConfig() { return this.jobExecutionsRolloutConfig; } /** * @param jobExecutionsRolloutConfig * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withJobExecutionsRolloutConfig(JobExecutionsRolloutConfig jobExecutionsRolloutConfig) { setJobExecutionsRolloutConfig(jobExecutionsRolloutConfig); return this; } /** * @param abortConfig */ public void setAbortConfig(AbortConfig abortConfig) { this.abortConfig = abortConfig; } /** * @return */ public AbortConfig getAbortConfig() { return this.abortConfig; } /** * @param abortConfig * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withAbortConfig(AbortConfig abortConfig) { setAbortConfig(abortConfig); return this; } /** * @param timeoutConfig */ public void setTimeoutConfig(TimeoutConfig timeoutConfig) { this.timeoutConfig = timeoutConfig; } /** * @return */ public TimeoutConfig getTimeoutConfig() { return this.timeoutConfig; } /** * @param timeoutConfig * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withTimeoutConfig(TimeoutConfig timeoutConfig) { setTimeoutConfig(timeoutConfig); return this; } /** ** Metadata that can be used to manage the job template. *
* * @return Metadata that can be used to manage the job template. */ public java.util.List* Metadata that can be used to manage the job template. *
* * @param tags * Metadata that can be used to manage the job template. */ public void setTags(java.util.Collection* Metadata that can be used to manage the job template. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * Metadata that can be used to manage the job template. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* Metadata that can be used to manage the job template. *
* * @param tags * Metadata that can be used to manage the job template. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withTags(java.util.Collection* Allows you to create the criteria to retry a job. *
* * @param jobExecutionsRetryConfig * Allows you to create the criteria to retry a job. */ public void setJobExecutionsRetryConfig(JobExecutionsRetryConfig jobExecutionsRetryConfig) { this.jobExecutionsRetryConfig = jobExecutionsRetryConfig; } /** ** Allows you to create the criteria to retry a job. *
* * @return Allows you to create the criteria to retry a job. */ public JobExecutionsRetryConfig getJobExecutionsRetryConfig() { return this.jobExecutionsRetryConfig; } /** ** Allows you to create the criteria to retry a job. *
* * @param jobExecutionsRetryConfig * Allows you to create the criteria to retry a job. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withJobExecutionsRetryConfig(JobExecutionsRetryConfig jobExecutionsRetryConfig) { setJobExecutionsRetryConfig(jobExecutionsRetryConfig); 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. *
* * @return 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. */ public java.util.List* 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. *
* * @param 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. */ public void setMaintenanceWindows(java.util.Collection* 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. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMaintenanceWindows(java.util.Collection)} or {@link #withMaintenanceWindows(java.util.Collection)} if * you want to override the existing values. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withMaintenanceWindows(MaintenanceWindow... maintenanceWindows) { if (this.maintenanceWindows == null) { setMaintenanceWindows(new java.util.ArrayList* 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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobTemplateRequest withMaintenanceWindows(java.util.Collection* 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. *
* * @return 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.
*/
public java.util.List
* 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.
*
* Note:The following Length Constraints relates to a single string. Up to five strings are allowed.
*/
public void setDestinationPackageVersions(java.util.Collection
* 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.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDestinationPackageVersions(java.util.Collection)} or
* {@link #withDestinationPackageVersions(java.util.Collection)} if you want to override the existing values.
*
* Note:The following Length Constraints relates to a single string. Up to five strings are allowed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateJobTemplateRequest withDestinationPackageVersions(String... destinationPackageVersions) {
if (this.destinationPackageVersions == null) {
setDestinationPackageVersions(new java.util.ArrayList
* 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.
*
* Note:The following Length Constraints relates to a single string. Up to five strings are allowed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateJobTemplateRequest withDestinationPackageVersions(java.util.Collection