@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getFeature() == null) ? 0 : getFeature().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); return hashCode; }
/** * @param arn * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withArn(String arn) { setArn(arn); return this; }
/** * @param attributes * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
public Resource unmarshall(JsonUnmarshallerContext context) throws Exception { Resource resource = new Resource(); if (context.testExpression("type", targetDepth)) { context.nextToken(); resource.setType(context.getUnmarshaller(String.class).unmarshall(context)); resource.setName(context.getUnmarshaller(String.class).unmarshall(context)); resource.setArn(context.getUnmarshaller(String.class).unmarshall(context)); resource.setFeature(context.getUnmarshaller(String.class).unmarshall(context)); resource.setAttributes(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context.getUnmarshaller(String.class)) .unmarshall(context));
/** * @param feature * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withFeature(String feature) { setFeature(feature); return this; }
/** * @param name * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withName(String name) { setName(name); return this; }
public Resource unmarshall(JsonUnmarshallerContext context) throws Exception { Resource resource = new Resource(); if (context.testExpression("type", targetDepth)) { context.nextToken(); resource.setType(context.getUnmarshaller(String.class).unmarshall(context)); resource.setName(context.getUnmarshaller(String.class).unmarshall(context)); resource.setArn(context.getUnmarshaller(String.class).unmarshall(context)); resource.setFeature(context.getUnmarshaller(String.class).unmarshall(context)); resource.setAttributes(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context.getUnmarshaller(String.class)) .unmarshall(context));
/** * @param feature * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withFeature(String feature) { setFeature(feature); return this; }
/** * @param name * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withName(String name) { setName(name); return this; }
return false; Resource other = (Resource) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == 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.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getFeature() == null ^ this.getFeature() == null) return false; if (other.getFeature() != null && other.getFeature().equals(this.getFeature()) == false) return false; if (other.getAttributes() == null ^ this.getAttributes() == null) return false; if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == false) return false; return true;
/** * @param attributes * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
/** * @param arn * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withArn(String arn) { setArn(arn); 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 (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getFeature() != null) sb.append("Feature: ").append(getFeature()).append(","); if (getAttributes() != null) sb.append("Attributes: ").append(getAttributes()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(Resource resource, ProtocolMarshaller protocolMarshaller) { if (resource == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(resource.getType(), TYPE_BINDING); protocolMarshaller.marshall(resource.getName(), NAME_BINDING); protocolMarshaller.marshall(resource.getArn(), ARN_BINDING); protocolMarshaller.marshall(resource.getFeature(), FEATURE_BINDING); protocolMarshaller.marshall(resource.getAttributes(), ATTRIBUTES_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 + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getFeature() == null) ? 0 : getFeature().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); return hashCode; }
return false; Resource other = (Resource) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == 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.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getFeature() == null ^ this.getFeature() == null) return false; if (other.getFeature() != null && other.getFeature().equals(this.getFeature()) == false) return false; if (other.getAttributes() == null ^ this.getAttributes() == null) return false; if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == 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 (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getFeature() != null) sb.append("Feature: ").append(getFeature()).append(","); if (getAttributes() != null) sb.append("Attributes: ").append(getAttributes()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(Resource resource, ProtocolMarshaller protocolMarshaller) { if (resource == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(resource.getType(), TYPE_BINDING); protocolMarshaller.marshall(resource.getName(), NAME_BINDING); protocolMarshaller.marshall(resource.getArn(), ARN_BINDING); protocolMarshaller.marshall(resource.getFeature(), FEATURE_BINDING); protocolMarshaller.marshall(resource.getAttributes(), ATTRIBUTES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }