/* * 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 DescribeManagedJobTemplateResult implements Serializable { /** *
* The unique name of a managed template, such as AWS-Reboot
.
*
* Constraints:
* Length: 1 - 64
*/
private String templateName;
/**
*
* The unique Amazon Resource Name (ARN) of the managed template. *
*
* Constraints:
* Length: 1 - 1600
* Pattern: ^arn:[!-~]+$
*/
private String templateArn;
/**
*
* The unique description of a managed template. *
*
* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
*/
private String description;
/**
*
* The version for a managed template. *
*
* Constraints:
* Pattern: ^[1-9]+.[0-9]+
*/
private String templateVersion;
/**
*
* A list of environments that are supported with the managed job template. *
*/ private java.util.List* A map of key-value pairs that you can use as guidance to specify the * inputs for creating a job from a managed template. *
*
* documentParameters
can only be used when creating jobs from
* Amazon Web Services managed templates. This parameter can't be used with
* custom job templates or to create jobs from them.
*
* The document schema for a managed job template. *
*
* Constraints:
* Length: - 32768
*/
private String document;
/**
*
* The unique name of a managed template, such as AWS-Reboot
.
*
* Constraints:
* Length: 1 - 64
*
* @return
* The unique name of a managed template, such as
* AWS-Reboot
.
*
* The unique name of a managed template, such as AWS-Reboot
.
*
* Constraints:
* Length: 1 - 64
*
* @param templateName
* The unique name of a managed template, such as
* AWS-Reboot
.
*
* The unique name of a managed template, such as AWS-Reboot
.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 64
*
* @param templateName
* The unique name of a managed template, such as
* AWS-Reboot
.
*
* The unique Amazon Resource Name (ARN) of the managed template. *
*
* Constraints:
* Length: 1 - 1600
* Pattern: ^arn:[!-~]+$
*
* @return
* The unique Amazon Resource Name (ARN) of the managed template. *
*/ public String getTemplateArn() { return templateArn; } /** ** The unique Amazon Resource Name (ARN) of the managed template. *
*
* Constraints:
* Length: 1 - 1600
* Pattern: ^arn:[!-~]+$
*
* @param templateArn
* The unique Amazon Resource Name (ARN) of the managed template. *
*/ public void setTemplateArn(String templateArn) { this.templateArn = templateArn; } /** ** The unique Amazon Resource Name (ARN) of the managed template. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 1600
* Pattern: ^arn:[!-~]+$
*
* @param templateArn
* The unique Amazon Resource Name (ARN) of the managed template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeManagedJobTemplateResult withTemplateArn(String templateArn) { this.templateArn = templateArn; return this; } /** ** The unique description of a managed template. *
*
* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
*
* @return
* The unique description of a managed template. *
*/ public String getDescription() { return description; } /** ** The unique description of a managed template. *
*
* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
*
* @param description
* The unique description of a managed template. *
*/ public void setDescription(String description) { this.description = description; } /** ** The unique description of a managed template. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
*
* @param description
* The unique description of a managed template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeManagedJobTemplateResult withDescription(String description) { this.description = description; return this; } /** ** The version for a managed template. *
*
* Constraints:
* Pattern: ^[1-9]+.[0-9]+
*
* @return
* The version for a managed template. *
*/ public String getTemplateVersion() { return templateVersion; } /** ** The version for a managed template. *
*
* Constraints:
* Pattern: ^[1-9]+.[0-9]+
*
* @param templateVersion
* The version for a managed template. *
*/ public void setTemplateVersion(String templateVersion) { this.templateVersion = templateVersion; } /** ** The version for a managed template. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Pattern: ^[1-9]+.[0-9]+
*
* @param templateVersion
* The version for a managed template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeManagedJobTemplateResult withTemplateVersion(String templateVersion) { this.templateVersion = templateVersion; return this; } /** ** A list of environments that are supported with the managed job template. *
* * @return* A list of environments that are supported with the managed job * template. *
*/ public java.util.List* A list of environments that are supported with the managed job template. *
* * @param environments* A list of environments that are supported with the managed job * template. *
*/ public void setEnvironments(java.util.Collection* A list of environments that are supported with the managed job template. *
** Returns a reference to this object so that method calls can be chained * together. * * @param environments
* A list of environments that are supported with the managed job * template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeManagedJobTemplateResult withEnvironments(String... environments) { if (getEnvironments() == null) { this.environments = new java.util.ArrayList* A list of environments that are supported with the managed job template. *
** Returns a reference to this object so that method calls can be chained * together. * * @param environments
* A list of environments that are supported with the managed job * template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeManagedJobTemplateResult withEnvironments( java.util.Collection* A map of key-value pairs that you can use as guidance to specify the * inputs for creating a job from a managed template. *
*
* documentParameters
can only be used when creating jobs from
* Amazon Web Services managed templates. This parameter can't be used with
* custom job templates or to create jobs from them.
*
* A map of key-value pairs that you can use as guidance to specify * the inputs for creating a job from a managed template. *
*
* documentParameters
can only be used when creating
* jobs from Amazon Web Services managed templates. This parameter
* can't be used with custom job templates or to create jobs from
* them.
*
* A map of key-value pairs that you can use as guidance to specify the * inputs for creating a job from a managed template. *
*
* documentParameters
can only be used when creating jobs from
* Amazon Web Services managed templates. This parameter can't be used with
* custom job templates or to create jobs from them.
*
* A map of key-value pairs that you can use as guidance to * specify the inputs for creating a job from a managed template. *
*
* documentParameters
can only be used when creating
* jobs from Amazon Web Services managed templates. This
* parameter can't be used with custom job templates or to create
* jobs from them.
*
* A map of key-value pairs that you can use as guidance to specify the * inputs for creating a job from a managed template. *
*
* documentParameters
can only be used when creating jobs from
* Amazon Web Services managed templates. This parameter can't be used with
* custom job templates or to create jobs from them.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param documentParameters
* A map of key-value pairs that you can use as guidance to * specify the inputs for creating a job from a managed template. *
*
* documentParameters
can only be used when creating
* jobs from Amazon Web Services managed templates. This
* parameter can't be used with custom job templates or to create
* jobs from them.
*
* A map of key-value pairs that you can use as guidance to specify the * inputs for creating a job from a managed template. *
*
* documentParameters
can only be used when creating jobs from
* Amazon Web Services managed templates. This parameter can't be used with
* custom job templates or to create jobs from them.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param documentParameters
* A map of key-value pairs that you can use as guidance to * specify the inputs for creating a job from a managed template. *
*
* documentParameters
can only be used when creating
* jobs from Amazon Web Services managed templates. This
* parameter can't be used with custom job templates or to create
* jobs from them.
*
* The document schema for a managed job template. *
*
* Constraints:
* Length: - 32768
*
* @return
* The document schema for a managed job template. *
*/ public String getDocument() { return document; } /** ** The document schema for a managed job template. *
*
* Constraints:
* Length: - 32768
*
* @param document
* The document schema for a managed job template. *
*/ public void setDocument(String document) { this.document = document; } /** ** The document schema for a managed job template. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 32768
*
* @param document
* The document schema for a managed job template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeManagedJobTemplateResult withDocument(String document) { this.document = document; 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 (getTemplateName() != null) sb.append("templateName: " + getTemplateName() + ","); if (getTemplateArn() != null) sb.append("templateArn: " + getTemplateArn() + ","); if (getDescription() != null) sb.append("description: " + getDescription() + ","); if (getTemplateVersion() != null) sb.append("templateVersion: " + getTemplateVersion() + ","); if (getEnvironments() != null) sb.append("environments: " + getEnvironments() + ","); if (getDocumentParameters() != null) sb.append("documentParameters: " + getDocumentParameters() + ","); if (getDocument() != null) sb.append("document: " + getDocument()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode()); hashCode = prime * hashCode + ((getTemplateArn() == null) ? 0 : getTemplateArn().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getTemplateVersion() == null) ? 0 : getTemplateVersion().hashCode()); hashCode = prime * hashCode + ((getEnvironments() == null) ? 0 : getEnvironments().hashCode()); hashCode = prime * hashCode + ((getDocumentParameters() == null) ? 0 : getDocumentParameters().hashCode()); hashCode = prime * hashCode + ((getDocument() == null) ? 0 : getDocument().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeManagedJobTemplateResult == false) return false; DescribeManagedJobTemplateResult other = (DescribeManagedJobTemplateResult) obj; if (other.getTemplateName() == null ^ this.getTemplateName() == null) return false; if (other.getTemplateName() != null && other.getTemplateName().equals(this.getTemplateName()) == false) return false; if (other.getTemplateArn() == null ^ this.getTemplateArn() == null) return false; if (other.getTemplateArn() != null && other.getTemplateArn().equals(this.getTemplateArn()) == 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.getTemplateVersion() == null ^ this.getTemplateVersion() == null) return false; if (other.getTemplateVersion() != null && other.getTemplateVersion().equals(this.getTemplateVersion()) == false) return false; if (other.getEnvironments() == null ^ this.getEnvironments() == null) return false; if (other.getEnvironments() != null && other.getEnvironments().equals(this.getEnvironments()) == false) return false; if (other.getDocumentParameters() == null ^ this.getDocumentParameters() == null) return false; if (other.getDocumentParameters() != null && other.getDocumentParameters().equals(this.getDocumentParameters()) == false) return false; if (other.getDocument() == null ^ this.getDocument() == null) return false; if (other.getDocument() != null && other.getDocument().equals(this.getDocument()) == false) return false; return true; } }