/** * 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 (getLaunchTemplate() != null) sb.append("LaunchTemplate: ").append(getLaunchTemplate()).append(","); if (getInstancesDistribution() != null) sb.append("InstancesDistribution: ").append(getInstancesDistribution()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof MixedInstancesPolicy == false) return false; MixedInstancesPolicy other = (MixedInstancesPolicy) obj; if (other.getLaunchTemplate() == null ^ this.getLaunchTemplate() == null) return false; if (other.getLaunchTemplate() != null && other.getLaunchTemplate().equals(this.getLaunchTemplate()) == false) return false; if (other.getInstancesDistribution() == null ^ this.getInstancesDistribution() == null) return false; if (other.getInstancesDistribution() != null && other.getInstancesDistribution().equals(this.getInstancesDistribution()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLaunchTemplate() == null) ? 0 : getLaunchTemplate().hashCode()); hashCode = prime * hashCode + ((getInstancesDistribution() == null) ? 0 : getInstancesDistribution().hashCode()); return hashCode; }
/** * 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 (getLaunchTemplate() != null) sb.append("LaunchTemplate: " + getLaunchTemplate() + ","); if (getInstancesDistribution() != null) sb.append("InstancesDistribution: " + getInstancesDistribution()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLaunchTemplate() == null) ? 0 : getLaunchTemplate().hashCode()); hashCode = prime * hashCode + ((getInstancesDistribution() == null) ? 0 : getInstancesDistribution().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof MixedInstancesPolicy == false) return false; MixedInstancesPolicy other = (MixedInstancesPolicy) obj; if (other.getLaunchTemplate() == null ^ this.getLaunchTemplate() == null) return false; if (other.getLaunchTemplate() != null && other.getLaunchTemplate().equals(this.getLaunchTemplate()) == false) return false; if (other.getInstancesDistribution() == null ^ this.getInstancesDistribution() == null) return false; if (other.getInstancesDistribution() != null && other.getInstancesDistribution().equals(this.getInstancesDistribution()) == false) return false; return true; } }
public void marshall(MixedInstancesPolicy _mixedInstancesPolicy, Request<?> request, String _prefix) { String prefix; if (_mixedInstancesPolicy.getLaunchTemplate() != null) { prefix = _prefix + "LaunchTemplate"; LaunchTemplate launchTemplate = _mixedInstancesPolicy.getLaunchTemplate(); LaunchTemplateStaxMarshaller.getInstance().marshall(launchTemplate, request, prefix + "."); } if (_mixedInstancesPolicy.getInstancesDistribution() != null) { prefix = _prefix + "InstancesDistribution"; InstancesDistribution instancesDistribution = _mixedInstancesPolicy .getInstancesDistribution(); InstancesDistributionStaxMarshaller.getInstance().marshall(instancesDistribution, request, prefix + "."); } }
InstancesDistribution instancesDistribution = mixedInstancesPolicy.getInstancesDistribution(); if (instancesDistribution != null) {
InstancesDistribution instancesDistribution = mixedInstancesPolicy.getInstancesDistribution(); if (instancesDistribution != null) {