/* * Copyright 2018-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.connect.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SearchVocabulariesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The identifier of the Amazon Connect instance. You can find the instance ID in * the Amazon Resource Name (ARN) of the instance. *

*/ private String instanceId; /** *

* The maximum number of results to return per page. *

*/ private Integer maxResults; /** *

* The token for the next set of results. Use the value returned in the previous response in the next request to * retrieve the next set of results. *

*/ private String nextToken; /** *

* The current state of the custom vocabulary. *

*/ private String state; /** *

* The starting pattern of the name of the vocabulary. *

*/ private String nameStartsWith; /** *

* The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see * What is Amazon Transcribe? *

*/ private String languageCode; /** *

* The identifier of the Amazon Connect instance. You can find the instance ID in * the Amazon Resource Name (ARN) of the instance. *

* * @param instanceId * The identifier of the Amazon Connect instance. You can find the instance * ID in the Amazon Resource Name (ARN) of the instance. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** *

* The identifier of the Amazon Connect instance. You can find the instance ID in * the Amazon Resource Name (ARN) of the instance. *

* * @return The identifier of the Amazon Connect instance. You can find the instance * ID in the Amazon Resource Name (ARN) of the instance. */ public String getInstanceId() { return this.instanceId; } /** *

* The identifier of the Amazon Connect instance. You can find the instance ID in * the Amazon Resource Name (ARN) of the instance. *

* * @param instanceId * The identifier of the Amazon Connect instance. You can find the instance * ID in the Amazon Resource Name (ARN) of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchVocabulariesRequest withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** *

* The maximum number of results to return per page. *

* * @param maxResults * The maximum number of results to return per page. */ public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } /** *

* The maximum number of results to return per page. *

* * @return The maximum number of results to return per page. */ public Integer getMaxResults() { return this.maxResults; } /** *

* The maximum number of results to return per page. *

* * @param maxResults * The maximum number of results to return per page. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchVocabulariesRequest withMaxResults(Integer maxResults) { setMaxResults(maxResults); return this; } /** *

* The token for the next set of results. Use the value returned in the previous response in the next request to * retrieve the next set of results. *

* * @param nextToken * The token for the next set of results. Use the value returned in the previous response in the next request * to retrieve the next set of results. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The token for the next set of results. Use the value returned in the previous response in the next request to * retrieve the next set of results. *

* * @return The token for the next set of results. Use the value returned in the previous response in the next * request to retrieve the next set of results. */ public String getNextToken() { return this.nextToken; } /** *

* The token for the next set of results. Use the value returned in the previous response in the next request to * retrieve the next set of results. *

* * @param nextToken * The token for the next set of results. Use the value returned in the previous response in the next request * to retrieve the next set of results. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchVocabulariesRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** *

* The current state of the custom vocabulary. *

* * @param state * The current state of the custom vocabulary. * @see VocabularyState */ public void setState(String state) { this.state = state; } /** *

* The current state of the custom vocabulary. *

* * @return The current state of the custom vocabulary. * @see VocabularyState */ public String getState() { return this.state; } /** *

* The current state of the custom vocabulary. *

* * @param state * The current state of the custom vocabulary. * @return Returns a reference to this object so that method calls can be chained together. * @see VocabularyState */ public SearchVocabulariesRequest withState(String state) { setState(state); return this; } /** *

* The current state of the custom vocabulary. *

* * @param state * The current state of the custom vocabulary. * @return Returns a reference to this object so that method calls can be chained together. * @see VocabularyState */ public SearchVocabulariesRequest withState(VocabularyState state) { this.state = state.toString(); return this; } /** *

* The starting pattern of the name of the vocabulary. *

* * @param nameStartsWith * The starting pattern of the name of the vocabulary. */ public void setNameStartsWith(String nameStartsWith) { this.nameStartsWith = nameStartsWith; } /** *

* The starting pattern of the name of the vocabulary. *

* * @return The starting pattern of the name of the vocabulary. */ public String getNameStartsWith() { return this.nameStartsWith; } /** *

* The starting pattern of the name of the vocabulary. *

* * @param nameStartsWith * The starting pattern of the name of the vocabulary. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchVocabulariesRequest withNameStartsWith(String nameStartsWith) { setNameStartsWith(nameStartsWith); return this; } /** *

* The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see * What is Amazon Transcribe? *

* * @param languageCode * The language code of the vocabulary entries. For a list of languages and their corresponding language * codes, see What is * Amazon Transcribe? * @see VocabularyLanguageCode */ public void setLanguageCode(String languageCode) { this.languageCode = languageCode; } /** *

* The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see * What is Amazon Transcribe? *

* * @return The language code of the vocabulary entries. For a list of languages and their corresponding language * codes, see What is * Amazon Transcribe? * @see VocabularyLanguageCode */ public String getLanguageCode() { return this.languageCode; } /** *

* The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see * What is Amazon Transcribe? *

* * @param languageCode * The language code of the vocabulary entries. For a list of languages and their corresponding language * codes, see What is * Amazon Transcribe? * @return Returns a reference to this object so that method calls can be chained together. * @see VocabularyLanguageCode */ public SearchVocabulariesRequest withLanguageCode(String languageCode) { setLanguageCode(languageCode); return this; } /** *

* The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see * What is Amazon Transcribe? *

* * @param languageCode * The language code of the vocabulary entries. For a list of languages and their corresponding language * codes, see What is * Amazon Transcribe? * @return Returns a reference to this object so that method calls can be chained together. * @see VocabularyLanguageCode */ public SearchVocabulariesRequest withLanguageCode(VocabularyLanguageCode languageCode) { this.languageCode = languageCode.toString(); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()).append(","); if (getMaxResults() != null) sb.append("MaxResults: ").append(getMaxResults()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getNameStartsWith() != null) sb.append("NameStartsWith: ").append(getNameStartsWith()).append(","); if (getLanguageCode() != null) sb.append("LanguageCode: ").append(getLanguageCode()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SearchVocabulariesRequest == false) return false; SearchVocabulariesRequest other = (SearchVocabulariesRequest) obj; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getMaxResults() == null ^ this.getMaxResults() == null) return false; if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getNameStartsWith() == null ^ this.getNameStartsWith() == null) return false; if (other.getNameStartsWith() != null && other.getNameStartsWith().equals(this.getNameStartsWith()) == false) return false; if (other.getLanguageCode() == null ^ this.getLanguageCode() == null) return false; if (other.getLanguageCode() != null && other.getLanguageCode().equals(this.getLanguageCode()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getNameStartsWith() == null) ? 0 : getNameStartsWith().hashCode()); hashCode = prime * hashCode + ((getLanguageCode() == null) ? 0 : getLanguageCode().hashCode()); return hashCode; } @Override public SearchVocabulariesRequest clone() { return (SearchVocabulariesRequest) super.clone(); } }