@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCollectionIds() == null) ? 0 : getCollectionIds().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getFaceModelVersions() == null) ? 0 : getFaceModelVersions().hashCode()); return hashCode; }
/** * <p> * An array of collection IDs. * </p> * * @param collectionIds * An array of collection IDs. * @return Returns a reference to this object so that method calls can be chained together. */ public ListCollectionsResult withCollectionIds(java.util.Collection<String> collectionIds) { setCollectionIds(collectionIds); return this; }
/** * <p> * Version numbers of the face detection models associated with the collections in the array * <code>CollectionIds</code>. For example, the value of <code>FaceModelVersions[2]</code> is the version number for * the face detection model used by the collection in <code>CollectionId[2]</code>. * </p> * * @param faceModelVersions * Version numbers of the face detection models associated with the collections in the array * <code>CollectionIds</code>. For example, the value of <code>FaceModelVersions[2]</code> is the version * number for the face detection model used by the collection in <code>CollectionId[2]</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public ListCollectionsResult withFaceModelVersions(java.util.Collection<String> faceModelVersions) { setFaceModelVersions(faceModelVersions); return this; }
public ListCollectionsResult unmarshall(JsonUnmarshallerContext context) throws Exception { ListCollectionsResult listCollectionsResult = new ListCollectionsResult(); if (context.testExpression("CollectionIds", targetDepth)) { context.nextToken(); listCollectionsResult.setCollectionIds(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); listCollectionsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context)); listCollectionsResult.setFaceModelVersions(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
/** * <p> * If the result is truncated, the response provides a <code>NextToken</code> that you can use in the subsequent * request to fetch the next set of collection IDs. * </p> * * @param nextToken * If the result is truncated, the response provides a <code>NextToken</code> that you can use in the * subsequent request to fetch the next set of collection IDs. * @return Returns a reference to this object so that method calls can be chained together. */ public ListCollectionsResult withNextToken(String nextToken) { setNextToken(nextToken); return this; }
/** * <p> * An array of collection IDs. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param collectionIds <p> * An array of collection IDs. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public ListCollectionsResult withCollectionIds(String... collectionIds) { if (getCollectionIds() == null) { this.collectionIds = new java.util.ArrayList<String>(collectionIds.length); } for (String value : collectionIds) { this.collectionIds.add(value); } return this; }
if (getFaceModelVersions() == null) { this.faceModelVersions = new java.util.ArrayList<String>(faceModelVersions.length);
public ListCollectionsResult unmarshall(JsonUnmarshallerContext context) throws Exception { ListCollectionsResult listCollectionsResult = new ListCollectionsResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("CollectionIds")) { listCollectionsResult.setCollectionIds(new ListUnmarshaller<String>( StringJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("NextToken")) { listCollectionsResult.setNextToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("FaceModelVersions")) { listCollectionsResult.setFaceModelVersions(new ListUnmarshaller<String>( StringJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return listCollectionsResult; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListCollectionsResult == false) return false; ListCollectionsResult other = (ListCollectionsResult) obj; if (other.getCollectionIds() == null ^ this.getCollectionIds() == null) return false; if (other.getCollectionIds() != null && other.getCollectionIds().equals(this.getCollectionIds()) == 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.getFaceModelVersions() == null ^ this.getFaceModelVersions() == null) return false; if (other.getFaceModelVersions() != null && other.getFaceModelVersions().equals(this.getFaceModelVersions()) == false) return false; return true; }
/** * <p> * An array of collection IDs. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setCollectionIds(java.util.Collection)} or {@link #withCollectionIds(java.util.Collection)} if you want * to override the existing values. * </p> * * @param collectionIds * An array of collection IDs. * @return Returns a reference to this object so that method calls can be chained together. */ public ListCollectionsResult withCollectionIds(String... collectionIds) { if (this.collectionIds == null) { setCollectionIds(new java.util.ArrayList<String>(collectionIds.length)); } for (String ele : collectionIds) { this.collectionIds.add(ele); } return this; }
/** * <p> * Version numbers of the face detection models associated with the collections in the array * <code>CollectionIds</code>. For example, the value of <code>FaceModelVersions[2]</code> is the version number for * the face detection model used by the collection in <code>CollectionId[2]</code>. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setFaceModelVersions(java.util.Collection)} or {@link #withFaceModelVersions(java.util.Collection)} if * you want to override the existing values. * </p> * * @param faceModelVersions * Version numbers of the face detection models associated with the collections in the array * <code>CollectionIds</code>. For example, the value of <code>FaceModelVersions[2]</code> is the version * number for the face detection model used by the collection in <code>CollectionId[2]</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public ListCollectionsResult withFaceModelVersions(String... faceModelVersions) { if (this.faceModelVersions == null) { setFaceModelVersions(new java.util.ArrayList<String>(faceModelVersions.length)); } for (String ele : faceModelVersions) { this.faceModelVersions.add(ele); } 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 (getCollectionIds() != null) sb.append("CollectionIds: ").append(getCollectionIds()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getFaceModelVersions() != null) sb.append("FaceModelVersions: ").append(getFaceModelVersions()); sb.append("}"); return sb.toString(); }
/** * <p> * An array of collection IDs. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param collectionIds <p> * An array of collection IDs. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public ListCollectionsResult withCollectionIds(java.util.Collection<String> collectionIds) { setCollectionIds(collectionIds); return this; }
/** * <p> * Version numbers of the face detection models associated with the * collections in the array <code>CollectionIds</code>. For example, the * value of <code>FaceModelVersions[2]</code> is the version number for the * face detection model used by the collection in * <code>CollectionId[2]</code>. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param faceModelVersions <p> * Version numbers of the face detection models associated with * the collections in the array <code>CollectionIds</code>. For * example, the value of <code>FaceModelVersions[2]</code> is the * version number for the face detection model used by the * collection in <code>CollectionId[2]</code>. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public ListCollectionsResult withFaceModelVersions( java.util.Collection<String> faceModelVersions) { setFaceModelVersions(faceModelVersions); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCollectionIds() == null) ? 0 : getCollectionIds().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getFaceModelVersions() == null) ? 0 : getFaceModelVersions().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListCollectionsResult == false) return false; ListCollectionsResult other = (ListCollectionsResult) obj; if (other.getCollectionIds() == null ^ this.getCollectionIds() == null) return false; if (other.getCollectionIds() != null && other.getCollectionIds().equals(this.getCollectionIds()) == 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.getFaceModelVersions() == null ^ this.getFaceModelVersions() == null) return false; if (other.getFaceModelVersions() != null && other.getFaceModelVersions().equals(this.getFaceModelVersions()) == 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 (getCollectionIds() != null) sb.append("CollectionIds: " + getCollectionIds() + ","); if (getNextToken() != null) sb.append("NextToken: " + getNextToken() + ","); if (getFaceModelVersions() != null) sb.append("FaceModelVersions: " + getFaceModelVersions()); sb.append("}"); return sb.toString(); }