@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCode() == null) ? 0 : getCode().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getCategories() == null) ? 0 : getCategories().hashCode()); return hashCode; }
/** * <p> * A list of categories that describe the type of support issue a case describes. Categories consist of a category * name and a category code. Category names and codes are passed to AWS Support when you call <a>CreateCase</a>. * </p> * * @param categories * A list of categories that describe the type of support issue a case describes. Categories consist of a * category name and a category code. Category names and codes are passed to AWS Support when you call * <a>CreateCase</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withCategories(java.util.Collection<Category> categories) { setCategories(categories); return this; }
/** * <p> * The code for an AWS service returned by the <a>DescribeServices</a> response. The <code>name</code> element * contains the corresponding friendly name. * </p> * * @param code * The code for an AWS service returned by the <a>DescribeServices</a> response. The <code>name</code> * element contains the corresponding friendly name. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withCode(String code) { setCode(code); return this; }
public Service unmarshall(JsonUnmarshallerContext context) throws Exception { Service service = new Service(); if (context.testExpression("code", targetDepth)) { context.nextToken(); service.setCode(context.getUnmarshaller(String.class).unmarshall(context)); service.setName(context.getUnmarshaller(String.class).unmarshall(context)); service.setCategories(new ListUnmarshaller<Category>(CategoryJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * The friendly name for an AWS service. The <code>code</code> element contains the corresponding code. * </p> * * @param name * The friendly name for an AWS service. The <code>code</code> element contains the corresponding code. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withName(String name) { setName(name); return this; }
public Service unmarshall(JsonUnmarshallerContext context) throws Exception { Service service = new Service(); if (context.testExpression("code", targetDepth)) { context.nextToken(); service.setCode(context.getUnmarshaller(String.class).unmarshall(context)); service.setName(context.getUnmarshaller(String.class).unmarshall(context)); service.setCategories(new ListUnmarshaller<Category>(CategoryJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * The friendly name for an AWS service. The <code>code</code> element contains the corresponding code. * </p> * * @param name * The friendly name for an AWS service. The <code>code</code> element contains the corresponding code. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withName(String name) { setName(name); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Service == false) return false; Service other = (Service) obj; if (other.getCode() == null ^ this.getCode() == null) return false; if (other.getCode() != null && other.getCode().equals(this.getCode()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getCategories() == null ^ this.getCategories() == null) return false; if (other.getCategories() != null && other.getCategories().equals(this.getCategories()) == false) return false; return true; }
/** * <p> * A list of categories that describe the type of support issue a case describes. Categories consist of a category * name and a category code. Category names and codes are passed to AWS Support when you call <a>CreateCase</a>. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setCategories(java.util.Collection)} or {@link #withCategories(java.util.Collection)} if you want to * override the existing values. * </p> * * @param categories * A list of categories that describe the type of support issue a case describes. Categories consist of a * category name and a category code. Category names and codes are passed to AWS Support when you call * <a>CreateCase</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withCategories(Category... categories) { if (this.categories == null) { setCategories(new com.amazonaws.internal.SdkInternalList<Category>(categories.length)); } for (Category ele : categories) { this.categories.add(ele); } return this; }
/** * <p> * The code for an AWS service returned by the <a>DescribeServices</a> response. The <code>name</code> element * contains the corresponding friendly name. * </p> * * @param code * The code for an AWS service returned by the <a>DescribeServices</a> response. The <code>name</code> * element contains the corresponding friendly name. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withCode(String code) { setCode(code); 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 (getCode() != null) sb.append("Code: ").append(getCode()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getCategories() != null) sb.append("Categories: ").append(getCategories()); sb.append("}"); return sb.toString(); }
/** * <p> * A list of categories that describe the type of support issue a case describes. Categories consist of a category * name and a category code. Category names and codes are passed to AWS Support when you call <a>CreateCase</a>. * </p> * * @param categories * A list of categories that describe the type of support issue a case describes. Categories consist of a * category name and a category code. Category names and codes are passed to AWS Support when you call * <a>CreateCase</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withCategories(java.util.Collection<Category> categories) { setCategories(categories); return this; }
/** * Marshall the given parameter object. */ public void marshall(Service service, ProtocolMarshaller protocolMarshaller) { if (service == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(service.getCode(), CODE_BINDING); protocolMarshaller.marshall(service.getName(), NAME_BINDING); protocolMarshaller.marshall(service.getCategories(), CATEGORIES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * <p> * A list of categories that describe the type of support issue a case describes. Categories consist of a category * name and a category code. Category names and codes are passed to AWS Support when you call <a>CreateCase</a>. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setCategories(java.util.Collection)} or {@link #withCategories(java.util.Collection)} if you want to * override the existing values. * </p> * * @param categories * A list of categories that describe the type of support issue a case describes. Categories consist of a * category name and a category code. Category names and codes are passed to AWS Support when you call * <a>CreateCase</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withCategories(Category... categories) { if (this.categories == null) { setCategories(new com.amazonaws.internal.SdkInternalList<Category>(categories.length)); } for (Category ele : categories) { this.categories.add(ele); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCode() == null) ? 0 : getCode().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getCategories() == null) ? 0 : getCategories().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Service == false) return false; Service other = (Service) obj; if (other.getCode() == null ^ this.getCode() == null) return false; if (other.getCode() != null && other.getCode().equals(this.getCode()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getCategories() == null ^ this.getCategories() == null) return false; if (other.getCategories() != null && other.getCategories().equals(this.getCategories()) == 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 (getCode() != null) sb.append("Code: ").append(getCode()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getCategories() != null) sb.append("Categories: ").append(getCategories()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(Service service, ProtocolMarshaller protocolMarshaller) { if (service == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(service.getCode(), CODE_BINDING); protocolMarshaller.marshall(service.getName(), NAME_BINDING); protocolMarshaller.marshall(service.getCategories(), CATEGORIES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }