/* * 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 UpdateDimensionResult implements Serializable { /** *
* A unique identifier for the dimension. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
*/
private String name;
/**
*
* The Amazon Resource Name (ARN)of the created 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* The date and time, in milliseconds since epoch, when the dimension was * initially created. *
*/ private java.util.Date creationDate; /** ** The date and time, in milliseconds since epoch, when the dimension was * most recently updated. *
*/ private java.util.Date lastModifiedDate; /** ** A unique identifier for the dimension. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
*
* @return
* A unique identifier for the dimension. *
*/ public String getName() { return name; } /** ** A unique identifier for the dimension. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
*
* @param name
* A unique identifier for the dimension. *
*/ public void setName(String name) { this.name = name; } /** ** A 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
* A unique identifier for the dimension. *
* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateDimensionResult withName(String name) { this.name = name; return this; } /** ** The Amazon Resource Name (ARN)of the created dimension. *
* * @return* The Amazon Resource Name (ARN)of the created dimension. *
*/ public String getArn() { return arn; } /** ** The Amazon Resource Name (ARN)of the created dimension. *
* * @param arn* The Amazon Resource Name (ARN)of the created dimension. *
*/ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN)of the created dimension. *
** Returns a reference to this object so that method calls can be chained * together. * * @param arn
* The Amazon Resource Name (ARN)of the created dimension. *
* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateDimensionResult 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 UpdateDimensionResult 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 UpdateDimensionResult 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* 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* 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 UpdateDimensionResult withStringValues(String... stringValues) { if (getStringValues() == null) { this.stringValues = new java.util.ArrayList* 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 UpdateDimensionResult withStringValues(java.util.Collection* The date and time, in milliseconds since epoch, when the dimension was * initially created. *
* * @return* The date and time, in milliseconds since epoch, when the * dimension was initially created. *
*/ public java.util.Date getCreationDate() { return creationDate; } /** ** The date and time, in milliseconds since epoch, when the dimension was * initially created. *
* * @param creationDate* The date and time, in milliseconds since epoch, when the * dimension was initially created. *
*/ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** ** The date and time, in milliseconds since epoch, when the dimension was * initially created. *
** Returns a reference to this object so that method calls can be chained * together. * * @param creationDate
* The date and time, in milliseconds since epoch, when the * dimension was initially created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateDimensionResult withCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; return this; } /** ** The date and time, in milliseconds since epoch, when the dimension was * most recently updated. *
* * @return* The date and time, in milliseconds since epoch, when the * dimension was most recently updated. *
*/ public java.util.Date getLastModifiedDate() { return lastModifiedDate; } /** ** The date and time, in milliseconds since epoch, when the dimension was * most recently updated. *
* * @param lastModifiedDate* The date and time, in milliseconds since epoch, when the * dimension was most recently updated. *
*/ public void setLastModifiedDate(java.util.Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** ** The date and time, in milliseconds since epoch, when the dimension was * most recently updated. *
** Returns a reference to this object so that method calls can be chained * together. * * @param lastModifiedDate
* The date and time, in milliseconds since epoch, when the * dimension was most recently updated. *
* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateDimensionResult 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 UpdateDimensionResult == false) return false; UpdateDimensionResult other = (UpdateDimensionResult) 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; } }