/** * <p> * The name of the celebrity. * </p> * * @param name * The name of the celebrity. * @return Returns a reference to this object so that method calls can be chained together. */ public GetCelebrityInfoResult withName(String name) { setName(name); return this; }
/** * <p> * An array of URLs pointing to additional celebrity information. * </p> * * @param urls * An array of URLs pointing to additional celebrity information. * @return Returns a reference to this object so that method calls can be chained together. */ public GetCelebrityInfoResult withUrls(java.util.Collection<String> urls) { setUrls(urls); return this; }
public GetCelebrityInfoResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetCelebrityInfoResult getCelebrityInfoResult = new GetCelebrityInfoResult(); if (context.testExpression("Urls", targetDepth)) { context.nextToken(); getCelebrityInfoResult.setUrls(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); getCelebrityInfoResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
/** * <p> * An array of URLs pointing to additional celebrity information. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param urls <p> * An array of URLs pointing to additional celebrity information. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public GetCelebrityInfoResult withUrls(String... urls) { if (getUrls() == null) { this.urls = new java.util.ArrayList<String>(urls.length); } for (String value : urls) { this.urls.add(value); } return this; }
public GetCelebrityInfoResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetCelebrityInfoResult getCelebrityInfoResult = new GetCelebrityInfoResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Urls")) { getCelebrityInfoResult.setUrls(new ListUnmarshaller<String>(StringJsonUnmarshaller .getInstance() ) .unmarshall(context)); } else if (name.equals("Name")) { getCelebrityInfoResult.setName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return getCelebrityInfoResult; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetCelebrityInfoResult == false) return false; GetCelebrityInfoResult other = (GetCelebrityInfoResult) obj; if (other.getUrls() == null ^ this.getUrls() == null) return false; if (other.getUrls() != null && other.getUrls().equals(this.getUrls()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; return true; }
/** * <p> * An array of URLs pointing to additional celebrity information. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setUrls(java.util.Collection)} or {@link #withUrls(java.util.Collection)} if you want to override the * existing values. * </p> * * @param urls * An array of URLs pointing to additional celebrity information. * @return Returns a reference to this object so that method calls can be chained together. */ public GetCelebrityInfoResult withUrls(String... urls) { if (this.urls == null) { setUrls(new java.util.ArrayList<String>(urls.length)); } for (String ele : urls) { this.urls.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 (getUrls() != null) sb.append("Urls: ").append(getUrls()).append(","); if (getName() != null) sb.append("Name: ").append(getName()); sb.append("}"); return sb.toString(); }
/** * <p> * An array of URLs pointing to additional celebrity information. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param urls <p> * An array of URLs pointing to additional celebrity information. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public GetCelebrityInfoResult withUrls(java.util.Collection<String> urls) { setUrls(urls); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetCelebrityInfoResult == false) return false; GetCelebrityInfoResult other = (GetCelebrityInfoResult) obj; if (other.getUrls() == null ^ this.getUrls() == null) return false; if (other.getUrls() != null && other.getUrls().equals(this.getUrls()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == 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 (getUrls() != null) sb.append("Urls: " + getUrls() + ","); if (getName() != null) sb.append("Name: " + getName()); sb.append("}"); return sb.toString(); }