/** * 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 (getAmbiguousRoleResolution() != null) sb.append("AmbiguousRoleResolution: ").append(getAmbiguousRoleResolution()).append(","); if (getRulesConfiguration() != null) sb.append("RulesConfiguration: ").append(getRulesConfiguration()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getAmbiguousRoleResolution() == null) ? 0 : getAmbiguousRoleResolution().hashCode()); hashCode = prime * hashCode + ((getRulesConfiguration() == null) ? 0 : getRulesConfiguration().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RoleMapping == false) return false; RoleMapping other = (RoleMapping) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getAmbiguousRoleResolution() == null ^ this.getAmbiguousRoleResolution() == null) return false; if (other.getAmbiguousRoleResolution() != null && other.getAmbiguousRoleResolution().equals(this.getAmbiguousRoleResolution()) == false) return false; if (other.getRulesConfiguration() == null ^ this.getRulesConfiguration() == null) return false; if (other.getRulesConfiguration() != null && other.getRulesConfiguration().equals(this.getRulesConfiguration()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(RoleMapping roleMapping, ProtocolMarshaller protocolMarshaller) { if (roleMapping == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(roleMapping.getType(), TYPE_BINDING); protocolMarshaller.marshall(roleMapping.getAmbiguousRoleResolution(), AMBIGUOUSROLERESOLUTION_BINDING); protocolMarshaller.marshall(roleMapping.getRulesConfiguration(), RULESCONFIGURATION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * 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 (getType() != null) sb.append("Type: " + getType() + ","); if (getAmbiguousRoleResolution() != null) sb.append("AmbiguousRoleResolution: " + getAmbiguousRoleResolution() + ","); if (getRulesConfiguration() != null) sb.append("RulesConfiguration: " + getRulesConfiguration()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getAmbiguousRoleResolution() == null) ? 0 : getAmbiguousRoleResolution() .hashCode()); hashCode = prime * hashCode + ((getRulesConfiguration() == null) ? 0 : getRulesConfiguration().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RoleMapping == false) return false; RoleMapping other = (RoleMapping) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getAmbiguousRoleResolution() == null ^ this.getAmbiguousRoleResolution() == null) return false; if (other.getAmbiguousRoleResolution() != null && other.getAmbiguousRoleResolution().equals(this.getAmbiguousRoleResolution()) == false) return false; if (other.getRulesConfiguration() == null ^ this.getRulesConfiguration() == null) return false; if (other.getRulesConfiguration() != null && other.getRulesConfiguration().equals(this.getRulesConfiguration()) == false) return false; return true; } }
public void marshall(RoleMapping roleMapping, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (roleMapping.getType() != null) { String type = roleMapping.getType(); jsonWriter.name("Type"); jsonWriter.value(type); } if (roleMapping.getAmbiguousRoleResolution() != null) { String ambiguousRoleResolution = roleMapping.getAmbiguousRoleResolution(); jsonWriter.name("AmbiguousRoleResolution"); jsonWriter.value(ambiguousRoleResolution); } if (roleMapping.getRulesConfiguration() != null) { RulesConfigurationType rulesConfiguration = roleMapping.getRulesConfiguration(); jsonWriter.name("RulesConfiguration"); RulesConfigurationTypeJsonMarshaller.getInstance().marshall(rulesConfiguration, jsonWriter); } jsonWriter.endObject(); }