@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); hashCode = prime * hashCode + ((getArgs() == null) ? 0 : getArgs().hashCode()); hashCode = prime * hashCode + ((getAdditionalInfo() == null) ? 0 : getAdditionalInfo().hashCode()); return hashCode; }
/** * 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()).append(","); if (getArgs() != null) sb.append("Args: ").append(getArgs()).append(","); if (getAdditionalInfo() != null) sb.append("AdditionalInfo: ").append(getAdditionalInfo()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Application == false) return false; Application other = (Application) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; if (other.getArgs() == null ^ this.getArgs() == null) return false; if (other.getArgs() != null && other.getArgs().equals(this.getArgs()) == false) return false; if (other.getAdditionalInfo() == null ^ this.getAdditionalInfo() == null) return false; if (other.getAdditionalInfo() != null && other.getAdditionalInfo().equals(this.getAdditionalInfo()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(Application application, ProtocolMarshaller protocolMarshaller) { if (application == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(application.getName(), NAME_BINDING); protocolMarshaller.marshall(application.getVersion(), VERSION_BINDING); protocolMarshaller.marshall(application.getArgs(), ARGS_BINDING); protocolMarshaller.marshall(application.getAdditionalInfo(), ADDITIONALINFO_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 + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); hashCode = prime * hashCode + ((getArgs() == null) ? 0 : getArgs().hashCode()); hashCode = prime * hashCode + ((getAdditionalInfo() == null) ? 0 : getAdditionalInfo().hashCode()); return hashCode; }
/** * 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()).append(","); if (getArgs() != null) sb.append("Args: ").append(getArgs()).append(","); if (getAdditionalInfo() != null) sb.append("AdditionalInfo: ").append(getAdditionalInfo()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Application == false) return false; Application other = (Application) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; if (other.getArgs() == null ^ this.getArgs() == null) return false; if (other.getArgs() != null && other.getArgs().equals(this.getArgs()) == false) return false; if (other.getAdditionalInfo() == null ^ this.getAdditionalInfo() == null) return false; if (other.getAdditionalInfo() != null && other.getAdditionalInfo().equals(this.getAdditionalInfo()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(Application application, ProtocolMarshaller protocolMarshaller) { if (application == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(application.getName(), NAME_BINDING); protocolMarshaller.marshall(application.getVersion(), VERSION_BINDING); protocolMarshaller.marshall(application.getArgs(), ARGS_BINDING); protocolMarshaller.marshall(application.getAdditionalInfo(), ADDITIONALINFO_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
Map<String, String> additionalInfo = application.getAdditionalInfo(); assertEquals(1, additionalInfo.size()); assertEquals("applicationAdditionalInfoValue2", additionalInfo.get("applicationAdditionalInfoName2"));