/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.simplesystemsmanagement.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Status information about the aggregated associations. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InstanceAggregatedAssociationOverview implements Serializable, Cloneable, StructuredPojo { /** *

* Detailed status information about the aggregated associations. *

*/ private String detailedStatus; /** *

* The number of associations for the managed node(s). *

*/ private java.util.Map instanceAssociationStatusAggregatedCount; /** *

* Detailed status information about the aggregated associations. *

* * @param detailedStatus * Detailed status information about the aggregated associations. */ public void setDetailedStatus(String detailedStatus) { this.detailedStatus = detailedStatus; } /** *

* Detailed status information about the aggregated associations. *

* * @return Detailed status information about the aggregated associations. */ public String getDetailedStatus() { return this.detailedStatus; } /** *

* Detailed status information about the aggregated associations. *

* * @param detailedStatus * Detailed status information about the aggregated associations. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceAggregatedAssociationOverview withDetailedStatus(String detailedStatus) { setDetailedStatus(detailedStatus); return this; } /** *

* The number of associations for the managed node(s). *

* * @return The number of associations for the managed node(s). */ public java.util.Map getInstanceAssociationStatusAggregatedCount() { return instanceAssociationStatusAggregatedCount; } /** *

* The number of associations for the managed node(s). *

* * @param instanceAssociationStatusAggregatedCount * The number of associations for the managed node(s). */ public void setInstanceAssociationStatusAggregatedCount(java.util.Map instanceAssociationStatusAggregatedCount) { this.instanceAssociationStatusAggregatedCount = instanceAssociationStatusAggregatedCount; } /** *

* The number of associations for the managed node(s). *

* * @param instanceAssociationStatusAggregatedCount * The number of associations for the managed node(s). * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceAggregatedAssociationOverview withInstanceAssociationStatusAggregatedCount( java.util.Map instanceAssociationStatusAggregatedCount) { setInstanceAssociationStatusAggregatedCount(instanceAssociationStatusAggregatedCount); return this; } /** * Add a single InstanceAssociationStatusAggregatedCount entry * * @see InstanceAggregatedAssociationOverview#withInstanceAssociationStatusAggregatedCount * @returns a reference to this object so that method calls can be chained together. */ public InstanceAggregatedAssociationOverview addInstanceAssociationStatusAggregatedCountEntry(String key, Integer value) { if (null == this.instanceAssociationStatusAggregatedCount) { this.instanceAssociationStatusAggregatedCount = new java.util.HashMap(); } if (this.instanceAssociationStatusAggregatedCount.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.instanceAssociationStatusAggregatedCount.put(key, value); return this; } /** * Removes all the entries added into InstanceAssociationStatusAggregatedCount. * * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceAggregatedAssociationOverview clearInstanceAssociationStatusAggregatedCountEntries() { this.instanceAssociationStatusAggregatedCount = null; 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 (getDetailedStatus() != null) sb.append("DetailedStatus: ").append(getDetailedStatus()).append(","); if (getInstanceAssociationStatusAggregatedCount() != null) sb.append("InstanceAssociationStatusAggregatedCount: ").append(getInstanceAssociationStatusAggregatedCount()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InstanceAggregatedAssociationOverview == false) return false; InstanceAggregatedAssociationOverview other = (InstanceAggregatedAssociationOverview) obj; if (other.getDetailedStatus() == null ^ this.getDetailedStatus() == null) return false; if (other.getDetailedStatus() != null && other.getDetailedStatus().equals(this.getDetailedStatus()) == false) return false; if (other.getInstanceAssociationStatusAggregatedCount() == null ^ this.getInstanceAssociationStatusAggregatedCount() == null) return false; if (other.getInstanceAssociationStatusAggregatedCount() != null && other.getInstanceAssociationStatusAggregatedCount().equals(this.getInstanceAssociationStatusAggregatedCount()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDetailedStatus() == null) ? 0 : getDetailedStatus().hashCode()); hashCode = prime * hashCode + ((getInstanceAssociationStatusAggregatedCount() == null) ? 0 : getInstanceAssociationStatusAggregatedCount().hashCode()); return hashCode; } @Override public InstanceAggregatedAssociationOverview clone() { try { return (InstanceAggregatedAssociationOverview) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.simplesystemsmanagement.model.transform.InstanceAggregatedAssociationOverviewMarshaller.getInstance().marshall(this, protocolMarshaller); } }