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

* The index name. *

*

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

* The index status. *

*

* Constraints:
* Allowed Values: ACTIVE, BUILDING, REBUILDING */ private String indexStatus; /** *

* Contains a value that specifies the type of indexing performed. Valid * values are: *

* */ private String schema; /** *

* The index name. *

*

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

* The index name. *

*/ public String getIndexName() { return indexName; } /** *

* The index name. *

*

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

* The index name. *

*/ public void setIndexName(String indexName) { this.indexName = indexName; } /** *

* The index name. *

*

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

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

* The index name. *

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

* The index status. *

*

* Constraints:
* Allowed Values: ACTIVE, BUILDING, REBUILDING * * @return

* The index status. *

* @see IndexStatus */ public String getIndexStatus() { return indexStatus; } /** *

* The index status. *

*

* Constraints:
* Allowed Values: ACTIVE, BUILDING, REBUILDING * * @param indexStatus

* The index status. *

* @see IndexStatus */ public void setIndexStatus(String indexStatus) { this.indexStatus = indexStatus; } /** *

* The index status. *

*

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

* Constraints:
* Allowed Values: ACTIVE, BUILDING, REBUILDING * * @param indexStatus

* The index status. *

* @return A reference to this updated object so that method calls can be * chained together. * @see IndexStatus */ public DescribeIndexResult withIndexStatus(String indexStatus) { this.indexStatus = indexStatus; return this; } /** *

* The index status. *

*

* Constraints:
* Allowed Values: ACTIVE, BUILDING, REBUILDING * * @param indexStatus

* The index status. *

* @see IndexStatus */ public void setIndexStatus(IndexStatus indexStatus) { this.indexStatus = indexStatus.toString(); } /** *

* The index status. *

*

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

* Constraints:
* Allowed Values: ACTIVE, BUILDING, REBUILDING * * @param indexStatus

* The index status. *

* @return A reference to this updated object so that method calls can be * chained together. * @see IndexStatus */ public DescribeIndexResult withIndexStatus(IndexStatus indexStatus) { this.indexStatus = indexStatus.toString(); return this; } /** *

* Contains a value that specifies the type of indexing performed. Valid * values are: *

* * * @return

* Contains a value that specifies the type of indexing performed. * Valid values are: *

* */ public String getSchema() { return schema; } /** *

* Contains a value that specifies the type of indexing performed. Valid * values are: *

* * * @param schema

* Contains a value that specifies the type of indexing * performed. Valid values are: *

* */ public void setSchema(String schema) { this.schema = schema; } /** *

* Contains a value that specifies the type of indexing performed. Valid * values are: *

* *

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

* Contains a value that specifies the type of indexing * performed. Valid values are: *

* * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeIndexResult withSchema(String schema) { this.schema = schema; 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 (getIndexName() != null) sb.append("indexName: " + getIndexName() + ","); if (getIndexStatus() != null) sb.append("indexStatus: " + getIndexStatus() + ","); if (getSchema() != null) sb.append("schema: " + getSchema()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode()); hashCode = prime * hashCode + ((getIndexStatus() == null) ? 0 : getIndexStatus().hashCode()); hashCode = prime * hashCode + ((getSchema() == null) ? 0 : getSchema().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeIndexResult == false) return false; DescribeIndexResult other = (DescribeIndexResult) obj; if (other.getIndexName() == null ^ this.getIndexName() == null) return false; if (other.getIndexName() != null && other.getIndexName().equals(this.getIndexName()) == false) return false; if (other.getIndexStatus() == null ^ this.getIndexStatus() == null) return false; if (other.getIndexStatus() != null && other.getIndexStatus().equals(this.getIndexStatus()) == false) return false; if (other.getSchema() == null ^ this.getSchema() == null) return false; if (other.getSchema() != null && other.getSchema().equals(this.getSchema()) == false) return false; return true; } }