/* * Copyright 2010-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; public class DescribeJobTemplateResult implements Serializable { /** *

* The ARN of the job template. *

*

* Constraints:
* Length: 1 - 1600
* Pattern: ^arn:[!-~]+$
*/ private String jobTemplateArn; /** *

* The unique identifier of the job template. *

*

* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/ private String jobTemplateId; /** *

* A description of the job template. *

*

* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
*/ private String description; /** *

* An S3 link to the job document. *

*

* Constraints:
* Length: 1 - 1350
*/ private String documentSource; /** *

* The job document. *

*

* Constraints:
* Length: - 32768
*/ private String document; /** *

* The time, in seconds since the epoch, when the job template was created. *

*/ private java.util.Date createdAt; /** *

* Configuration for pre-signed S3 URLs. *

*/ private PresignedUrlConfig presignedUrlConfig; /** *

* Allows you to create a staged rollout of a job. *

*/ private JobExecutionsRolloutConfig jobExecutionsRolloutConfig; /** *

* The criteria that determine when and how a job abort takes place. *

*/ private AbortConfig abortConfig; /** *

* Specifies the amount of time each device has to finish its execution of * the job. A timer is started when the job execution status is set to * IN_PROGRESS. If the job execution status is not set to * another terminal state before the timer expires, it will be automatically * set to TIMED_OUT. *

*/ private TimeoutConfig timeoutConfig; /** *

* The configuration that determines how many retries are allowed for each * failure type for 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 maintenanceWindows; /** *

* 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 destinationPackageVersions; /** *

* The ARN of the job template. *

*

* Constraints:
* Length: 1 - 1600
* Pattern: ^arn:[!-~]+$
* * @return

* The ARN of the job template. *

*/ public String getJobTemplateArn() { return jobTemplateArn; } /** *

* The ARN of the job template. *

*

* Constraints:
* Length: 1 - 1600
* Pattern: ^arn:[!-~]+$
* * @param jobTemplateArn

* The ARN of the job template. *

*/ public void setJobTemplateArn(String jobTemplateArn) { this.jobTemplateArn = jobTemplateArn; } /** *

* The ARN of the job template. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 1600
* Pattern: ^arn:[!-~]+$
* * @param jobTemplateArn

* The ARN of the job template. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withJobTemplateArn(String jobTemplateArn) { this.jobTemplateArn = jobTemplateArn; return this; } /** *

* The unique identifier of the job template. *

*

* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @return

* The unique identifier of the job template. *

*/ public String getJobTemplateId() { return jobTemplateId; } /** *

* The unique identifier of the job template. *

*

* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param jobTemplateId

* The unique identifier of the job template. *

*/ public void setJobTemplateId(String jobTemplateId) { this.jobTemplateId = jobTemplateId; } /** *

* The unique identifier of the job template. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param jobTemplateId

* The unique identifier of the job template. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withJobTemplateId(String jobTemplateId) { this.jobTemplateId = jobTemplateId; return this; } /** *

* A description of the job template. *

*

* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
* * @return

* A description of the job template. *

*/ public String getDescription() { return description; } /** *

* A description of the job template. *

*

* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
* * @param description

* A description of the job template. *

*/ public void setDescription(String description) { this.description = description; } /** *

* A description of the job template. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
* * @param description

* A description of the job template. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withDescription(String description) { this.description = description; return this; } /** *

* An S3 link to the job document. *

*

* Constraints:
* Length: 1 - 1350
* * @return

* An S3 link to the job document. *

*/ public String getDocumentSource() { return documentSource; } /** *

* An S3 link to the job document. *

*

* Constraints:
* Length: 1 - 1350
* * @param documentSource

* An S3 link to the job document. *

*/ public void setDocumentSource(String documentSource) { this.documentSource = documentSource; } /** *

* An S3 link to the job document. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 1350
* * @param documentSource

* An S3 link to the job document. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withDocumentSource(String documentSource) { this.documentSource = documentSource; return this; } /** *

* The job document. *

*

* Constraints:
* Length: - 32768
* * @return

* The job document. *

*/ public String getDocument() { return document; } /** *

* The job document. *

*

* Constraints:
* Length: - 32768
* * @param document

* The job document. *

*/ public void setDocument(String document) { this.document = document; } /** *

* The job document. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: - 32768
* * @param document

* The job document. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withDocument(String document) { this.document = document; return this; } /** *

* The time, in seconds since the epoch, when the job template was created. *

* * @return

* The time, in seconds since the epoch, when the job template was * created. *

*/ public java.util.Date getCreatedAt() { return createdAt; } /** *

* The time, in seconds since the epoch, when the job template was created. *

* * @param createdAt

* The time, in seconds since the epoch, when the job template * was created. *

*/ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* The time, in seconds since the epoch, when the job template was created. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param createdAt

* The time, in seconds since the epoch, when the job template * was created. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; return this; } /** *

* Configuration for pre-signed S3 URLs. *

* * @return

* Configuration for pre-signed S3 URLs. *

*/ public PresignedUrlConfig getPresignedUrlConfig() { return presignedUrlConfig; } /** *

* Configuration for pre-signed S3 URLs. *

* * @param presignedUrlConfig

* Configuration for pre-signed S3 URLs. *

*/ public void setPresignedUrlConfig(PresignedUrlConfig presignedUrlConfig) { this.presignedUrlConfig = presignedUrlConfig; } /** *

* Configuration for pre-signed S3 URLs. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param presignedUrlConfig

* Configuration for pre-signed S3 URLs. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withPresignedUrlConfig(PresignedUrlConfig presignedUrlConfig) { this.presignedUrlConfig = presignedUrlConfig; return this; } /** *

* Allows you to create a staged rollout of a job. *

* * @return

* Allows you to create a staged rollout of a job. *

*/ public JobExecutionsRolloutConfig getJobExecutionsRolloutConfig() { return jobExecutionsRolloutConfig; } /** *

* Allows you to create a staged rollout of a job. *

* * @param jobExecutionsRolloutConfig

* Allows you to create a staged rollout of a job. *

*/ public void setJobExecutionsRolloutConfig(JobExecutionsRolloutConfig jobExecutionsRolloutConfig) { this.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig; } /** *

* Allows you to create a staged rollout of a job. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param jobExecutionsRolloutConfig

* Allows you to create a staged rollout of a job. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withJobExecutionsRolloutConfig( JobExecutionsRolloutConfig jobExecutionsRolloutConfig) { this.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig; return this; } /** *

* The criteria that determine when and how a job abort takes place. *

* * @return

* The criteria that determine when and how a job abort takes place. *

*/ public AbortConfig getAbortConfig() { return abortConfig; } /** *

* The criteria that determine when and how a job abort takes place. *

* * @param abortConfig

* The criteria that determine when and how a job abort takes * place. *

*/ public void setAbortConfig(AbortConfig abortConfig) { this.abortConfig = abortConfig; } /** *

* The criteria that determine when and how a job abort takes place. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param abortConfig

* The criteria that determine when and how a job abort takes * place. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withAbortConfig(AbortConfig abortConfig) { this.abortConfig = abortConfig; return this; } /** *

* Specifies the amount of time each device has to finish its execution of * the job. A timer is started when the job execution status is set to * IN_PROGRESS. If the job execution status is not set to * another terminal state before the timer expires, it will be automatically * set to TIMED_OUT. *

* * @return

* Specifies the amount of time each device has to finish its * execution of the job. A timer is started when the job execution * status is set to IN_PROGRESS. If the job execution * status is not set to another terminal state before the timer * expires, it will be automatically set to TIMED_OUT. *

*/ public TimeoutConfig getTimeoutConfig() { return timeoutConfig; } /** *

* Specifies the amount of time each device has to finish its execution of * the job. A timer is started when the job execution status is set to * IN_PROGRESS. If the job execution status is not set to * another terminal state before the timer expires, it will be automatically * set to TIMED_OUT. *

* * @param timeoutConfig

* Specifies the amount of time each device has to finish its * execution of the job. A timer is started when the job * execution status is set to IN_PROGRESS. If the * job execution status is not set to another terminal state * before the timer expires, it will be automatically set to * TIMED_OUT. *

*/ public void setTimeoutConfig(TimeoutConfig timeoutConfig) { this.timeoutConfig = timeoutConfig; } /** *

* Specifies the amount of time each device has to finish its execution of * the job. A timer is started when the job execution status is set to * IN_PROGRESS. If the job execution status is not set to * another terminal state before the timer expires, it will be automatically * set to TIMED_OUT. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param timeoutConfig

* Specifies the amount of time each device has to finish its * execution of the job. A timer is started when the job * execution status is set to IN_PROGRESS. If the * job execution status is not set to another terminal state * before the timer expires, it will be automatically set to * TIMED_OUT. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withTimeoutConfig(TimeoutConfig timeoutConfig) { this.timeoutConfig = timeoutConfig; return this; } /** *

* The configuration that determines how many retries are allowed for each * failure type for a job. *

* * @return

* The configuration that determines how many retries are allowed * for each failure type for a job. *

*/ public JobExecutionsRetryConfig getJobExecutionsRetryConfig() { return jobExecutionsRetryConfig; } /** *

* The configuration that determines how many retries are allowed for each * failure type for a job. *

* * @param jobExecutionsRetryConfig

* The configuration that determines how many retries are allowed * for each failure type for a job. *

*/ public void setJobExecutionsRetryConfig(JobExecutionsRetryConfig jobExecutionsRetryConfig) { this.jobExecutionsRetryConfig = jobExecutionsRetryConfig; } /** *

* The configuration that determines how many retries are allowed for each * failure type for a job. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param jobExecutionsRetryConfig

* The configuration that determines how many retries are allowed * for each failure type for a job. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withJobExecutionsRetryConfig( JobExecutionsRetryConfig jobExecutionsRetryConfig) { this.jobExecutionsRetryConfig = 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 getMaintenanceWindows() { return 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. *

* * @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 maintenanceWindows) { if (maintenanceWindows == null) { this.maintenanceWindows = null; return; } this.maintenanceWindows = new java.util.ArrayList(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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @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 A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withMaintenanceWindows(MaintenanceWindow... maintenanceWindows) { if (getMaintenanceWindows() == null) { this.maintenanceWindows = new java.util.ArrayList( maintenanceWindows.length); } for (MaintenanceWindow value : maintenanceWindows) { this.maintenanceWindows.add(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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @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 A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withMaintenanceWindows( java.util.Collection maintenanceWindows) { setMaintenanceWindows(maintenanceWindows); 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. *

* * @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 getDestinationPackageVersions() { return 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. *

* * @param 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. *

*/ public void setDestinationPackageVersions( java.util.Collection destinationPackageVersions) { if (destinationPackageVersions == null) { this.destinationPackageVersions = null; return; } this.destinationPackageVersions = new java.util.ArrayList( 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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withDestinationPackageVersions( String... destinationPackageVersions) { if (getDestinationPackageVersions() == null) { this.destinationPackageVersions = new java.util.ArrayList( destinationPackageVersions.length); } for (String value : destinationPackageVersions) { this.destinationPackageVersions.add(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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeJobTemplateResult withDestinationPackageVersions( java.util.Collection destinationPackageVersions) { setDestinationPackageVersions(destinationPackageVersions); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getJobTemplateArn() != null) sb.append("jobTemplateArn: " + getJobTemplateArn() + ","); if (getJobTemplateId() != null) sb.append("jobTemplateId: " + getJobTemplateId() + ","); if (getDescription() != null) sb.append("description: " + getDescription() + ","); if (getDocumentSource() != null) sb.append("documentSource: " + getDocumentSource() + ","); if (getDocument() != null) sb.append("document: " + getDocument() + ","); if (getCreatedAt() != null) sb.append("createdAt: " + getCreatedAt() + ","); if (getPresignedUrlConfig() != null) sb.append("presignedUrlConfig: " + getPresignedUrlConfig() + ","); if (getJobExecutionsRolloutConfig() != null) sb.append("jobExecutionsRolloutConfig: " + getJobExecutionsRolloutConfig() + ","); if (getAbortConfig() != null) sb.append("abortConfig: " + getAbortConfig() + ","); if (getTimeoutConfig() != null) sb.append("timeoutConfig: " + getTimeoutConfig() + ","); if (getJobExecutionsRetryConfig() != null) sb.append("jobExecutionsRetryConfig: " + getJobExecutionsRetryConfig() + ","); if (getMaintenanceWindows() != null) sb.append("maintenanceWindows: " + getMaintenanceWindows() + ","); if (getDestinationPackageVersions() != null) sb.append("destinationPackageVersions: " + getDestinationPackageVersions()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobTemplateArn() == null) ? 0 : getJobTemplateArn().hashCode()); hashCode = prime * hashCode + ((getJobTemplateId() == null) ? 0 : getJobTemplateId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getDocumentSource() == null) ? 0 : getDocumentSource().hashCode()); hashCode = prime * hashCode + ((getDocument() == null) ? 0 : getDocument().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getPresignedUrlConfig() == null) ? 0 : getPresignedUrlConfig().hashCode()); hashCode = prime * hashCode + ((getJobExecutionsRolloutConfig() == null) ? 0 : getJobExecutionsRolloutConfig() .hashCode()); hashCode = prime * hashCode + ((getAbortConfig() == null) ? 0 : getAbortConfig().hashCode()); hashCode = prime * hashCode + ((getTimeoutConfig() == null) ? 0 : getTimeoutConfig().hashCode()); hashCode = prime * hashCode + ((getJobExecutionsRetryConfig() == null) ? 0 : getJobExecutionsRetryConfig() .hashCode()); hashCode = prime * hashCode + ((getMaintenanceWindows() == null) ? 0 : getMaintenanceWindows().hashCode()); hashCode = prime * hashCode + ((getDestinationPackageVersions() == null) ? 0 : getDestinationPackageVersions() .hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeJobTemplateResult == false) return false; DescribeJobTemplateResult other = (DescribeJobTemplateResult) obj; if (other.getJobTemplateArn() == null ^ this.getJobTemplateArn() == null) return false; if (other.getJobTemplateArn() != null && other.getJobTemplateArn().equals(this.getJobTemplateArn()) == false) return false; if (other.getJobTemplateId() == null ^ this.getJobTemplateId() == null) return false; if (other.getJobTemplateId() != null && other.getJobTemplateId().equals(this.getJobTemplateId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getDocumentSource() == null ^ this.getDocumentSource() == null) return false; if (other.getDocumentSource() != null && other.getDocumentSource().equals(this.getDocumentSource()) == false) return false; if (other.getDocument() == null ^ this.getDocument() == null) return false; if (other.getDocument() != null && other.getDocument().equals(this.getDocument()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getPresignedUrlConfig() == null ^ this.getPresignedUrlConfig() == null) return false; if (other.getPresignedUrlConfig() != null && other.getPresignedUrlConfig().equals(this.getPresignedUrlConfig()) == false) return false; if (other.getJobExecutionsRolloutConfig() == null ^ this.getJobExecutionsRolloutConfig() == null) return false; if (other.getJobExecutionsRolloutConfig() != null && other.getJobExecutionsRolloutConfig().equals( this.getJobExecutionsRolloutConfig()) == false) return false; if (other.getAbortConfig() == null ^ this.getAbortConfig() == null) return false; if (other.getAbortConfig() != null && other.getAbortConfig().equals(this.getAbortConfig()) == false) return false; if (other.getTimeoutConfig() == null ^ this.getTimeoutConfig() == null) return false; if (other.getTimeoutConfig() != null && other.getTimeoutConfig().equals(this.getTimeoutConfig()) == false) return false; if (other.getJobExecutionsRetryConfig() == null ^ this.getJobExecutionsRetryConfig() == null) return false; if (other.getJobExecutionsRetryConfig() != null && other.getJobExecutionsRetryConfig().equals(this.getJobExecutionsRetryConfig()) == false) return false; if (other.getMaintenanceWindows() == null ^ this.getMaintenanceWindows() == null) return false; if (other.getMaintenanceWindows() != null && other.getMaintenanceWindows().equals(this.getMaintenanceWindows()) == false) return false; if (other.getDestinationPackageVersions() == null ^ this.getDestinationPackageVersions() == null) return false; if (other.getDestinationPackageVersions() != null && other.getDestinationPackageVersions().equals( this.getDestinationPackageVersions()) == false) return false; return true; } }