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

* A summary of information about a provisioning template. *

*/ public class ProvisioningTemplateSummary implements Serializable { /** *

* The ARN of the provisioning template. *

*/ private String templateArn; /** *

* The name of the provisioning template. *

*

* Constraints:
* Length: 1 - 36
* Pattern: ^[0-9A-Za-z_-]+$
*/ private String templateName; /** *

* The description of the provisioning template. *

*

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

* The date when the provisioning template summary was created. *

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

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

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

* True if the fleet provision template is enabled, otherwise false. *

*/ private Boolean enabled; /** *

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

*

* Constraints:
* Allowed Values: FLEET_PROVISIONING, JITP */ private String type; /** *

* The ARN of the provisioning template. *

* * @return

* The ARN of the provisioning template. *

*/ public String getTemplateArn() { return templateArn; } /** *

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

*

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

* The ARN of the provisioning template. *

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

* The name of the provisioning template. *

*

* Constraints:
* Length: 1 - 36
* Pattern: ^[0-9A-Za-z_-]+$
* * @return

* The name of the provisioning template. *

*/ public String getTemplateName() { return templateName; } /** *

* The name of the provisioning template. *

*

* Constraints:
* Length: 1 - 36
* Pattern: ^[0-9A-Za-z_-]+$
* * @param templateName

* The name of the provisioning template. *

*/ public void setTemplateName(String templateName) { this.templateName = templateName; } /** *

* The name of the provisioning template. *

*

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

* Constraints:
* Length: 1 - 36
* Pattern: ^[0-9A-Za-z_-]+$
* * @param templateName

* The name of the provisioning template. *

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

* The description of the provisioning template. *

*

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

* The description of the provisioning template. *

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

* The description of the provisioning template. *

*

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

* The description of the provisioning template. *

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

* The description of the provisioning template. *

*

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

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

* The description of the provisioning template. *

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

* The date when the provisioning template summary was created. *

* * @return

* The date when the provisioning template summary was created. *

*/ public java.util.Date getCreationDate() { return creationDate; } /** *

* The date when the provisioning template summary was created. *

* * @param creationDate

* The date when the provisioning template summary was created. *

*/ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** *

* The date when the provisioning template summary was created. *

*

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

* The date when the provisioning template summary was created. *

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

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

* * @return

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

*/ public java.util.Date getLastModifiedDate() { return lastModifiedDate; } /** *

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

* * @param lastModifiedDate

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

*/ public void setLastModifiedDate(java.util.Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** *

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

*

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

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

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

* True if the fleet provision template is enabled, otherwise false. *

* * @return

* True if the fleet provision template is enabled, otherwise false. *

*/ public Boolean isEnabled() { return enabled; } /** *

* True if the fleet provision template is enabled, otherwise false. *

* * @return

* True if the fleet provision template is enabled, otherwise false. *

*/ public Boolean getEnabled() { return enabled; } /** *

* True if the fleet provision template is enabled, otherwise false. *

* * @param enabled

* True if the fleet provision template is enabled, otherwise * false. *

*/ public void setEnabled(Boolean enabled) { this.enabled = enabled; } /** *

* True if the fleet provision template is enabled, otherwise false. *

*

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

* True if the fleet provision template is enabled, otherwise * false. *

* @return A reference to this updated object so that method calls can be * chained together. */ public ProvisioningTemplateSummary withEnabled(Boolean enabled) { this.enabled = enabled; 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. *

*

* Constraints:
* Allowed Values: FLEET_PROVISIONING, JITP * * @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 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. *

*

* Constraints:
* Allowed Values: FLEET_PROVISIONING, JITP * * @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. *

*

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

* Constraints:
* Allowed Values: FLEET_PROVISIONING, JITP * * @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 A reference to this updated object so that method calls can be * chained together. * @see TemplateType */ public ProvisioningTemplateSummary withType(String type) { this.type = 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. *

*

* Constraints:
* Allowed Values: FLEET_PROVISIONING, JITP * * @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(TemplateType type) { this.type = type.toString(); } /** *

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

*

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

* Constraints:
* Allowed Values: FLEET_PROVISIONING, JITP * * @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 A reference to this updated object so that method calls can be * chained together. * @see TemplateType */ public ProvisioningTemplateSummary withType(TemplateType type) { this.type = type.toString(); 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 (getTemplateArn() != null) sb.append("templateArn: " + getTemplateArn() + ","); if (getTemplateName() != null) sb.append("templateName: " + getTemplateName() + ","); if (getDescription() != null) sb.append("description: " + getDescription() + ","); if (getCreationDate() != null) sb.append("creationDate: " + getCreationDate() + ","); if (getLastModifiedDate() != null) sb.append("lastModifiedDate: " + getLastModifiedDate() + ","); if (getEnabled() != null) sb.append("enabled: " + getEnabled() + ","); if (getType() != null) sb.append("type: " + getType()); sb.append("}"); return sb.toString(); } @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 + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProvisioningTemplateSummary == false) return false; ProvisioningTemplateSummary other = (ProvisioningTemplateSummary) 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.getEnabled() == null ^ this.getEnabled() == null) return false; if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == 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; } }