@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getStateEquals() == null) ? 0 : getStateEquals().hashCode()); hashCode = prime * hashCode + ((getNameContains() == null) ? 0 : getNameContains().hashCode()); return hashCode; }
/** * <p> * The maximum number of vocabularies to return in the response. If there are fewer results in the list, this * response contains only the actual results. * </p> * * @param maxResults * The maximum number of vocabularies to return in the response. If there are fewer results in the list, this * response contains only the actual results. * @return Returns a reference to this object so that method calls can be chained together. */ public ListVocabulariesRequest withMaxResults(Integer maxResults) { setMaxResults(maxResults); return this; }
/** * <p> * When specified, the vocabularies returned in the list are limited to vocabularies whose name contains the * specified string. The search is case-insensitive, <code>ListVocabularies</code> will return both "vocabularyname" * and "VocabularyName" in the response list. * </p> * * @param nameContains * When specified, the vocabularies returned in the list are limited to vocabularies whose name contains the * specified string. The search is case-insensitive, <code>ListVocabularies</code> will return both * "vocabularyname" and "VocabularyName" in the response list. * @return Returns a reference to this object so that method calls can be chained together. */ public ListVocabulariesRequest withNameContains(String nameContains) { setNameContains(nameContains); return this; }
/** * <p> * If the result of the previous request to <code>ListVocabularies</code> was truncated, include the * <code>NextToken</code> to fetch the next set of jobs. * </p> * * @param nextToken * If the result of the previous request to <code>ListVocabularies</code> was truncated, include the * <code>NextToken</code> to fetch the next set of jobs. * @return Returns a reference to this object so that method calls can be chained together. */ public ListVocabulariesRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; }
/** * <p> * When specified, only returns vocabularies with the <code>VocabularyState</code> field equal to the specified * state. * </p> * * @param stateEquals * When specified, only returns vocabularies with the <code>VocabularyState</code> field equal to the * specified state. * @return Returns a reference to this object so that method calls can be chained together. * @see VocabularyState */ public ListVocabulariesRequest withStateEquals(String stateEquals) { setStateEquals(stateEquals); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListVocabulariesRequest == false) return false; ListVocabulariesRequest other = (ListVocabulariesRequest) obj; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == 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.getStateEquals() == null ^ this.getStateEquals() == null) return false; if (other.getStateEquals() != null && other.getStateEquals().equals(this.getStateEquals()) == false) return false; if (other.getNameContains() == null ^ this.getNameContains() == null) return false; if (other.getNameContains() != null && other.getNameContains().equals(this.getNameContains()) == false) return false; return true; }
/** * 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 (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getMaxResults() != null) sb.append("MaxResults: ").append(getMaxResults()).append(","); if (getStateEquals() != null) sb.append("StateEquals: ").append(getStateEquals()).append(","); if (getNameContains() != null) sb.append("NameContains: ").append(getNameContains()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(ListVocabulariesRequest listVocabulariesRequest, ProtocolMarshaller protocolMarshaller) { if (listVocabulariesRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(listVocabulariesRequest.getNextToken(), NEXTTOKEN_BINDING); protocolMarshaller.marshall(listVocabulariesRequest.getMaxResults(), MAXRESULTS_BINDING); protocolMarshaller.marshall(listVocabulariesRequest.getStateEquals(), STATEEQUALS_BINDING); protocolMarshaller.marshall(listVocabulariesRequest.getNameContains(), NAMECONTAINS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getStateEquals() == null) ? 0 : getStateEquals().hashCode()); hashCode = prime * hashCode + ((getNameContains() == null) ? 0 : getNameContains().hashCode()); return hashCode; }
ListVocabulariesRequest other = (ListVocabulariesRequest) obj; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == 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.getStateEquals() == null ^ this.getStateEquals() == null) return false; if (other.getStateEquals() != null && other.getStateEquals().equals(this.getStateEquals()) == false) return false; if (other.getNameContains() == null ^ this.getNameContains() == null) return false; if (other.getNameContains() != null && other.getNameContains().equals(this.getNameContains()) == false) return false; return true;
/** * 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 (getNextToken() != null) sb.append("NextToken: " + getNextToken() + ","); if (getMaxResults() != null) sb.append("MaxResults: " + getMaxResults() + ","); if (getStateEquals() != null) sb.append("StateEquals: " + getStateEquals() + ","); if (getNameContains() != null) sb.append("NameContains: " + getNameContains()); sb.append("}"); return sb.toString(); }
jsonWriter.beginObject(); if (listVocabulariesRequest.getNextToken() != null) { String nextToken = listVocabulariesRequest.getNextToken(); jsonWriter.name("NextToken"); jsonWriter.value(nextToken); if (listVocabulariesRequest.getMaxResults() != null) { Integer maxResults = listVocabulariesRequest.getMaxResults(); jsonWriter.name("MaxResults"); jsonWriter.value(maxResults); if (listVocabulariesRequest.getStateEquals() != null) { String stateEquals = listVocabulariesRequest.getStateEquals(); jsonWriter.name("StateEquals"); jsonWriter.value(stateEquals); if (listVocabulariesRequest.getNameContains() != null) { String nameContains = listVocabulariesRequest.getNameContains(); jsonWriter.name("NameContains"); jsonWriter.value(nameContains);