/* * 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 GetPackageResult implements Serializable { /** *
* The name of the package. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9-_.]+
*/
private String packageName;
/**
*
* The ARN for the package. *
*/ private String packageArn; /** ** The package description. *
*
* Constraints:
* Length: 0 - 1024
* Pattern: [^\p{C}]+
*/
private String description;
/**
*
* The name of the default package version. *
*
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9-_.]+
*/
private String defaultVersionName;
/**
*
* The date the package was created. *
*/ private java.util.Date creationDate; /** ** The date when the package was last updated. *
*/ private java.util.Date lastModifiedDate; /** ** The name of the package. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9-_.]+
*
* @return
* The name of the package. *
*/ public String getPackageName() { return packageName; } /** ** The name of the package. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9-_.]+
*
* @param packageName
* The name of the package. *
*/ public void setPackageName(String packageName) { this.packageName = packageName; } /** ** The name of the package. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9-_.]+
*
* @param packageName
* The name of the package. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetPackageResult withPackageName(String packageName) { this.packageName = packageName; return this; } /** ** The ARN for the package. *
* * @return* The ARN for the package. *
*/ public String getPackageArn() { return packageArn; } /** ** The ARN for the package. *
* * @param packageArn* The ARN for the package. *
*/ public void setPackageArn(String packageArn) { this.packageArn = packageArn; } /** ** The ARN for the package. *
** Returns a reference to this object so that method calls can be chained * together. * * @param packageArn
* The ARN for the package. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetPackageResult withPackageArn(String packageArn) { this.packageArn = packageArn; return this; } /** ** The package description. *
*
* Constraints:
* Length: 0 - 1024
* Pattern: [^\p{C}]+
*
* @return
* The package description. *
*/ public String getDescription() { return description; } /** ** The package description. *
*
* Constraints:
* Length: 0 - 1024
* Pattern: [^\p{C}]+
*
* @param description
* The package description. *
*/ public void setDescription(String description) { this.description = description; } /** ** The package description. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 0 - 1024
* Pattern: [^\p{C}]+
*
* @param description
* The package description. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetPackageResult withDescription(String description) { this.description = description; return this; } /** ** The name of the default package version. *
*
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9-_.]+
*
* @return
* The name of the default package version. *
*/ public String getDefaultVersionName() { return defaultVersionName; } /** ** The name of the default package version. *
*
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9-_.]+
*
* @param defaultVersionName
* The name of the default package version. *
*/ public void setDefaultVersionName(String defaultVersionName) { this.defaultVersionName = defaultVersionName; } /** ** The name of the default package version. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9-_.]+
*
* @param defaultVersionName
* The name of the default package version. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetPackageResult withDefaultVersionName(String defaultVersionName) { this.defaultVersionName = defaultVersionName; return this; } /** ** The date the package was created. *
* * @return* The date the package was created. *
*/ public java.util.Date getCreationDate() { return creationDate; } /** ** The date the package was created. *
* * @param creationDate* The date the package was created. *
*/ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** ** The date the package was created. *
** Returns a reference to this object so that method calls can be chained * together. * * @param creationDate
* The date the package was created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetPackageResult withCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; return this; } /** ** The date when the package was last updated. *
* * @return* The date when the package was last updated. *
*/ public java.util.Date getLastModifiedDate() { return lastModifiedDate; } /** ** The date when the package was last updated. *
* * @param lastModifiedDate* The date when the package was last updated. *
*/ public void setLastModifiedDate(java.util.Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** ** The date when the package was last updated. *
** Returns a reference to this object so that method calls can be chained * together. * * @param lastModifiedDate
* The date when the package was last updated. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetPackageResult withLastModifiedDate(java.util.Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; 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 (getPackageName() != null) sb.append("packageName: " + getPackageName() + ","); if (getPackageArn() != null) sb.append("packageArn: " + getPackageArn() + ","); if (getDescription() != null) sb.append("description: " + getDescription() + ","); if (getDefaultVersionName() != null) sb.append("defaultVersionName: " + getDefaultVersionName() + ","); if (getCreationDate() != null) sb.append("creationDate: " + getCreationDate() + ","); if (getLastModifiedDate() != null) sb.append("lastModifiedDate: " + getLastModifiedDate()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPackageName() == null) ? 0 : getPackageName().hashCode()); hashCode = prime * hashCode + ((getPackageArn() == null) ? 0 : getPackageArn().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getDefaultVersionName() == null) ? 0 : getDefaultVersionName().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetPackageResult == false) return false; GetPackageResult other = (GetPackageResult) obj; if (other.getPackageName() == null ^ this.getPackageName() == null) return false; if (other.getPackageName() != null && other.getPackageName().equals(this.getPackageName()) == false) return false; if (other.getPackageArn() == null ^ this.getPackageArn() == null) return false; if (other.getPackageArn() != null && other.getPackageArn().equals(this.getPackageArn()) == 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.getDefaultVersionName() == null ^ this.getDefaultVersionName() == null) return false; if (other.getDefaultVersionName() != null && other.getDefaultVersionName().equals(this.getDefaultVersionName()) == 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; return true; } }