/* * 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; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribeProvisioningTemplateResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The ARN of the provisioning template. *

*/ private String templateArn; /** *

* The name of the provisioning template. *

*/ private String templateName; /** *

* The description of the provisioning template. *

*/ private String description; /** *

* The date when the provisioning template was created. *

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

* The date when the provisioning template was last modified. *

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

* The default fleet template version ID. *

*/ private Integer defaultVersionId; /** *

* The JSON formatted contents of the provisioning template. *

*/ private String templateBody; /** *

* True if the provisioning template is enabled, otherwise false. *

*/ private Boolean enabled; /** *

* The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a * device. *

*/ private String provisioningRoleArn; /** *

* Gets information about a pre-provisioned hook. *

*/ private ProvisioningHook preProvisioningHook; /** *

* The type you define in a provisioning template. You can create a template with only one type. You can't change * the template type after its creation. The default value is FLEET_PROVISIONING. For more information * about provisioning template, see: Provisioning template. *

*/ private String type; /** *

* The ARN of the provisioning template. *

* * @param templateArn * The ARN of the provisioning template. */ public void setTemplateArn(String templateArn) { this.templateArn = templateArn; } /** *

* The ARN of the provisioning template. *

* * @return The ARN of the provisioning template. */ public String getTemplateArn() { return this.templateArn; } /** *

* The ARN of the provisioning template. *

* * @param templateArn * The ARN of the provisioning template. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeProvisioningTemplateResult withTemplateArn(String templateArn) { setTemplateArn(templateArn); return this; } /** *

* The name of the provisioning template. *

* * @param templateName * The name of the provisioning template. */ public void setTemplateName(String templateName) { this.templateName = templateName; } /** *

* The name of the provisioning template. *

* * @return The name of the provisioning template. */ public String getTemplateName() { return this.templateName; } /** *

* The name of the provisioning template. *

* * @param templateName * The name of the provisioning template. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeProvisioningTemplateResult withTemplateName(String templateName) { setTemplateName(templateName); return this; } /** *

* The description of the provisioning template. *

* * @param description * The description of the provisioning template. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the provisioning template. *

* * @return The description of the provisioning template. */ public String getDescription() { return this.description; } /** *

* The description of the provisioning template. *

* * @param description * The description of the provisioning template. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeProvisioningTemplateResult withDescription(String description) { setDescription(description); return this; } /** *

* The date when the provisioning template was created. *

* * @param creationDate * The date when the provisioning template was created. */ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** *

* The date when the provisioning template was created. *

* * @return The date when the provisioning template was created. */ public java.util.Date getCreationDate() { return this.creationDate; } /** *

* The date when the provisioning template was created. *

* * @param creationDate * The date when the provisioning template was created. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeProvisioningTemplateResult withCreationDate(java.util.Date creationDate) { setCreationDate(creationDate); return this; } /** *

* The date when the provisioning template was last modified. *

* * @param lastModifiedDate * The date when the provisioning template was last modified. */ public void setLastModifiedDate(java.util.Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** *

* The date when the provisioning template was last modified. *

* * @return The date when the provisioning template was last modified. */ public java.util.Date getLastModifiedDate() { return this.lastModifiedDate; } /** *

* The date when the provisioning template was last modified. *

* * @param lastModifiedDate * The date when the provisioning template was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeProvisioningTemplateResult withLastModifiedDate(java.util.Date lastModifiedDate) { setLastModifiedDate(lastModifiedDate); return this; } /** *

* The default fleet template version ID. *

* * @param defaultVersionId * The default fleet template version ID. */ public void setDefaultVersionId(Integer defaultVersionId) { this.defaultVersionId = defaultVersionId; } /** *

* The default fleet template version ID. *

* * @return The default fleet template version ID. */ public Integer getDefaultVersionId() { return this.defaultVersionId; } /** *

* The default fleet template version ID. *

* * @param defaultVersionId * The default fleet template version ID. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeProvisioningTemplateResult withDefaultVersionId(Integer defaultVersionId) { setDefaultVersionId(defaultVersionId); return this; } /** *

* The JSON formatted contents of the provisioning template. *

* * @param templateBody * The JSON formatted contents of the provisioning template. */ public void setTemplateBody(String templateBody) { this.templateBody = templateBody; } /** *

* The JSON formatted contents of the provisioning template. *

* * @return The JSON formatted contents of the provisioning template. */ public String getTemplateBody() { return this.templateBody; } /** *

* The JSON formatted contents of the provisioning template. *

* * @param templateBody * The JSON formatted contents of the provisioning template. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeProvisioningTemplateResult withTemplateBody(String templateBody) { setTemplateBody(templateBody); return this; } /** *

* True if the provisioning template is enabled, otherwise false. *

* * @param enabled * True if the provisioning template is enabled, otherwise false. */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } /** *

* True if the provisioning template is enabled, otherwise false. *

* * @return True if the provisioning template is enabled, otherwise false. */ public Boolean getEnabled() { return this.enabled; } /** *

* True if the provisioning template is enabled, otherwise false. *

* * @param enabled * True if the provisioning template is enabled, otherwise false. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeProvisioningTemplateResult withEnabled(Boolean enabled) { setEnabled(enabled); return this; } /** *

* True if the provisioning template is enabled, otherwise false. *

* * @return True if the provisioning template is enabled, otherwise false. */ public Boolean isEnabled() { return this.enabled; } /** *

* The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a * device. *

* * @param provisioningRoleArn * The ARN of the role associated with the provisioning template. This IoT role grants permission to * provision a device. */ public void setProvisioningRoleArn(String provisioningRoleArn) { this.provisioningRoleArn = provisioningRoleArn; } /** *

* The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a * device. *

* * @return The ARN of the role associated with the provisioning template. This IoT role grants permission to * provision a device. */ public String getProvisioningRoleArn() { return this.provisioningRoleArn; } /** *

* The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a * device. *

* * @param provisioningRoleArn * The ARN of the role associated with the provisioning template. This IoT role grants permission to * provision a device. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeProvisioningTemplateResult withProvisioningRoleArn(String provisioningRoleArn) { setProvisioningRoleArn(provisioningRoleArn); return this; } /** *

* Gets information about a pre-provisioned hook. *

* * @param preProvisioningHook * Gets information about a pre-provisioned hook. */ public void setPreProvisioningHook(ProvisioningHook preProvisioningHook) { this.preProvisioningHook = preProvisioningHook; } /** *

* Gets information about a pre-provisioned hook. *

* * @return Gets information about a pre-provisioned hook. */ public ProvisioningHook getPreProvisioningHook() { return this.preProvisioningHook; } /** *

* Gets information about a pre-provisioned hook. *

* * @param preProvisioningHook * Gets information about a pre-provisioned hook. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeProvisioningTemplateResult withPreProvisioningHook(ProvisioningHook preProvisioningHook) { setPreProvisioningHook(preProvisioningHook); return this; } /** *

* The type you define in a provisioning template. You can create a template with only one type. You can't change * the template type after its creation. The default value is FLEET_PROVISIONING. For more information * about provisioning template, see: Provisioning template. *

* * @param type * The type you define in a provisioning template. You can create a template with only one type. You can't * change the template type after its creation. The default value is FLEET_PROVISIONING. For * more information about provisioning template, see: Provisioning * template. * @see TemplateType */ public void setType(String type) { this.type = type; } /** *

* The type you define in a provisioning template. You can create a template with only one type. You can't change * the template type after its creation. The default value is FLEET_PROVISIONING. For more information * about provisioning template, see: Provisioning template. *

* * @return The type you define in a provisioning template. You can create a template with only one type. You can't * change the template type after its creation. The default value is FLEET_PROVISIONING. For * more information about provisioning template, see: Provisioning * template. * @see TemplateType */ public String getType() { return this.type; } /** *

* The type you define in a provisioning template. You can create a template with only one type. You can't change * the template type after its creation. The default value is FLEET_PROVISIONING. For more information * about provisioning template, see: Provisioning template. *

* * @param type * The type you define in a provisioning template. You can create a template with only one type. You can't * change the template type after its creation. The default value is FLEET_PROVISIONING. For * more information about provisioning template, see: Provisioning * template. * @return Returns a reference to this object so that method calls can be chained together. * @see TemplateType */ public DescribeProvisioningTemplateResult withType(String type) { setType(type); return this; } /** *

* The type you define in a provisioning template. You can create a template with only one type. You can't change * the template type after its creation. The default value is FLEET_PROVISIONING. For more information * about provisioning template, see: Provisioning template. *

* * @param type * The type you define in a provisioning template. You can create a template with only one type. You can't * change the template type after its creation. The default value is FLEET_PROVISIONING. For * more information about provisioning template, see: Provisioning * template. * @return Returns a reference to this object so that method calls can be chained together. * @see TemplateType */ public DescribeProvisioningTemplateResult withType(TemplateType type) { this.type = type.toString(); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTemplateArn() != null) sb.append("TemplateArn: ").append(getTemplateArn()).append(","); if (getTemplateName() != null) sb.append("TemplateName: ").append(getTemplateName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()).append(","); if (getLastModifiedDate() != null) sb.append("LastModifiedDate: ").append(getLastModifiedDate()).append(","); if (getDefaultVersionId() != null) sb.append("DefaultVersionId: ").append(getDefaultVersionId()).append(","); if (getTemplateBody() != null) sb.append("TemplateBody: ").append(getTemplateBody()).append(","); if (getEnabled() != null) sb.append("Enabled: ").append(getEnabled()).append(","); if (getProvisioningRoleArn() != null) sb.append("ProvisioningRoleArn: ").append(getProvisioningRoleArn()).append(","); if (getPreProvisioningHook() != null) sb.append("PreProvisioningHook: ").append(getPreProvisioningHook()).append(","); if (getType() != null) sb.append("Type: ").append(getType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeProvisioningTemplateResult == false) return false; DescribeProvisioningTemplateResult other = (DescribeProvisioningTemplateResult) obj; if (other.getTemplateArn() == null ^ this.getTemplateArn() == null) return false; if (other.getTemplateArn() != null && other.getTemplateArn().equals(this.getTemplateArn()) == false) return false; if (other.getTemplateName() == null ^ this.getTemplateName() == null) return false; if (other.getTemplateName() != null && other.getTemplateName().equals(this.getTemplateName()) == 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.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false) return false; if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null) return false; if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == false) return false; if (other.getDefaultVersionId() == null ^ this.getDefaultVersionId() == null) return false; if (other.getDefaultVersionId() != null && other.getDefaultVersionId().equals(this.getDefaultVersionId()) == false) return false; if (other.getTemplateBody() == null ^ this.getTemplateBody() == null) return false; if (other.getTemplateBody() != null && other.getTemplateBody().equals(this.getTemplateBody()) == false) return false; if (other.getEnabled() == null ^ this.getEnabled() == null) return false; if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false) return false; if (other.getProvisioningRoleArn() == null ^ this.getProvisioningRoleArn() == null) return false; if (other.getProvisioningRoleArn() != null && other.getProvisioningRoleArn().equals(this.getProvisioningRoleArn()) == false) return false; if (other.getPreProvisioningHook() == null ^ this.getPreProvisioningHook() == null) return false; if (other.getPreProvisioningHook() != null && other.getPreProvisioningHook().equals(this.getPreProvisioningHook()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTemplateArn() == null) ? 0 : getTemplateArn().hashCode()); hashCode = prime * hashCode + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode()); hashCode = prime * hashCode + ((getDefaultVersionId() == null) ? 0 : getDefaultVersionId().hashCode()); hashCode = prime * hashCode + ((getTemplateBody() == null) ? 0 : getTemplateBody().hashCode()); hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getProvisioningRoleArn() == null) ? 0 : getProvisioningRoleArn().hashCode()); hashCode = prime * hashCode + ((getPreProvisioningHook() == null) ? 0 : getPreProvisioningHook().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); return hashCode; } @Override public DescribeProvisioningTemplateResult clone() { try { return (DescribeProvisioningTemplateResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }