/* * 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 DescribeDimensionResult implements Serializable { /** *

* The unique identifier for the dimension. *

*

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

* The Amazon Resource Name (ARN) for the dimension. *

*/ private String arn; /** *

* The type of the dimension. *

*

* Constraints:
* Allowed Values: TOPIC_FILTER */ private String type; /** *

* The value or list of values used to scope the dimension. For example, for * topic filters, this is the pattern used to match the MQTT topic name. *

*/ private java.util.List stringValues; /** *

* The date the dimension was created. *

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

* The date the dimension was last modified. *

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

* The unique identifier for the dimension. *

*

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

* The unique identifier for the dimension. *

*/ public String getName() { return name; } /** *

* The unique identifier for the dimension. *

*

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

* The unique identifier for the dimension. *

*/ public void setName(String name) { this.name = name; } /** *

* The unique identifier for the dimension. *

*

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

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

* The unique identifier for the dimension. *

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

* The Amazon Resource Name (ARN) for the dimension. *

* * @return

* The Amazon Resource Name (ARN) for the dimension. *

*/ public String getArn() { return arn; } /** *

* The Amazon Resource Name (ARN) for the dimension. *

* * @param arn

* The Amazon Resource Name (ARN) for the dimension. *

*/ public void setArn(String arn) { this.arn = arn; } /** *

* The Amazon Resource Name (ARN) for the dimension. *

*

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

* The Amazon Resource Name (ARN) for the dimension. *

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

* The type of the dimension. *

*

* Constraints:
* Allowed Values: TOPIC_FILTER * * @return

* The type of the dimension. *

* @see DimensionType */ public String getType() { return type; } /** *

* The type of the dimension. *

*

* Constraints:
* Allowed Values: TOPIC_FILTER * * @param type

* The type of the dimension. *

* @see DimensionType */ public void setType(String type) { this.type = type; } /** *

* The type of the dimension. *

*

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

* Constraints:
* Allowed Values: TOPIC_FILTER * * @param type

* The type of the dimension. *

* @return A reference to this updated object so that method calls can be * chained together. * @see DimensionType */ public DescribeDimensionResult withType(String type) { this.type = type; return this; } /** *

* The type of the dimension. *

*

* Constraints:
* Allowed Values: TOPIC_FILTER * * @param type

* The type of the dimension. *

* @see DimensionType */ public void setType(DimensionType type) { this.type = type.toString(); } /** *

* The type of the dimension. *

*

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

* Constraints:
* Allowed Values: TOPIC_FILTER * * @param type

* The type of the dimension. *

* @return A reference to this updated object so that method calls can be * chained together. * @see DimensionType */ public DescribeDimensionResult withType(DimensionType type) { this.type = type.toString(); return this; } /** *

* The value or list of values used to scope the dimension. For example, for * topic filters, this is the pattern used to match the MQTT topic name. *

* * @return

* The value or list of values used to scope the dimension. For * example, for topic filters, this is the pattern used to match the * MQTT topic name. *

*/ public java.util.List getStringValues() { return stringValues; } /** *

* The value or list of values used to scope the dimension. For example, for * topic filters, this is the pattern used to match the MQTT topic name. *

* * @param stringValues

* The value or list of values used to scope the dimension. For * example, for topic filters, this is the pattern used to match * the MQTT topic name. *

*/ public void setStringValues(java.util.Collection stringValues) { if (stringValues == null) { this.stringValues = null; return; } this.stringValues = new java.util.ArrayList(stringValues); } /** *

* The value or list of values used to scope the dimension. For example, for * topic filters, this is the pattern used to match the MQTT topic name. *

*

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

* The value or list of values used to scope the dimension. For * example, for topic filters, this is the pattern used to match * the MQTT topic name. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeDimensionResult withStringValues(String... stringValues) { if (getStringValues() == null) { this.stringValues = new java.util.ArrayList(stringValues.length); } for (String value : stringValues) { this.stringValues.add(value); } return this; } /** *

* The value or list of values used to scope the dimension. For example, for * topic filters, this is the pattern used to match the MQTT topic name. *

*

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

* The value or list of values used to scope the dimension. For * example, for topic filters, this is the pattern used to match * the MQTT topic name. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeDimensionResult withStringValues(java.util.Collection stringValues) { setStringValues(stringValues); return this; } /** *

* The date the dimension was created. *

* * @return

* The date the dimension was created. *

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

* The date the dimension was created. *

* * @param creationDate

* The date the dimension was created. *

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

* The date the dimension was created. *

*

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

* The date the dimension was created. *

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

* The date the dimension was last modified. *

* * @return

* The date the dimension was last modified. *

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

* The date the dimension was last modified. *

* * @param lastModifiedDate

* The date the dimension was last modified. *

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

* The date the dimension was last modified. *

*

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

* The date the dimension was last modified. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeDimensionResult 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 (getName() != null) sb.append("name: " + getName() + ","); if (getArn() != null) sb.append("arn: " + getArn() + ","); if (getType() != null) sb.append("type: " + getType() + ","); if (getStringValues() != null) sb.append("stringValues: " + getStringValues() + ","); 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 + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getStringValues() == null) ? 0 : getStringValues().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 DescribeDimensionResult == false) return false; DescribeDimensionResult other = (DescribeDimensionResult) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getStringValues() == null ^ this.getStringValues() == null) return false; if (other.getStringValues() != null && other.getStringValues().equals(this.getStringValues()) == 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; } }