@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCurrent() == null) ? 0 : getCurrent().hashCode()); hashCode = prime * hashCode + ((getHistory() == null) ? 0 : getHistory().hashCode()); hashCode = prime * hashCode + ((getPending() == null) ? 0 : getPending().hashCode()); return hashCode; }
/** * The current configuration of the broker. * * @param current * The current configuration of the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public Configurations withCurrent(ConfigurationId current) { setCurrent(current); return this; }
/** * The history of configurations applied to the broker. * * @param history * The history of configurations applied to the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public Configurations withHistory(java.util.Collection<ConfigurationId> history) { setHistory(history); return this; }
public Configurations unmarshall(JsonUnmarshallerContext context) throws Exception { Configurations configurations = new Configurations(); if (context.testExpression("current", targetDepth)) { context.nextToken(); configurations.setCurrent(ConfigurationIdJsonUnmarshaller.getInstance().unmarshall(context)); configurations.setHistory(new ListUnmarshaller<ConfigurationId>(ConfigurationIdJsonUnmarshaller.getInstance()).unmarshall(context)); configurations.setPending(ConfigurationIdJsonUnmarshaller.getInstance().unmarshall(context));
/** * The pending configuration of the broker. * * @param pending * The pending configuration of the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public Configurations withPending(ConfigurationId pending) { setPending(pending); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoMinorVersionUpgrade() == null) ? 0 : getAutoMinorVersionUpgrade().hashCode()); hashCode = prime * hashCode + ((getBrokerArn() == null) ? 0 : getBrokerArn().hashCode()); hashCode = prime * hashCode + ((getBrokerId() == null) ? 0 : getBrokerId().hashCode()); hashCode = prime * hashCode + ((getBrokerInstances() == null) ? 0 : getBrokerInstances().hashCode()); hashCode = prime * hashCode + ((getBrokerName() == null) ? 0 : getBrokerName().hashCode()); hashCode = prime * hashCode + ((getBrokerState() == null) ? 0 : getBrokerState().hashCode()); hashCode = prime * hashCode + ((getConfigurations() == null) ? 0 : getConfigurations().hashCode()); hashCode = prime * hashCode + ((getCreated() == null) ? 0 : getCreated().hashCode()); hashCode = prime * hashCode + ((getDeploymentMode() == null) ? 0 : getDeploymentMode().hashCode()); hashCode = prime * hashCode + ((getEngineType() == null) ? 0 : getEngineType().hashCode()); hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode()); hashCode = prime * hashCode + ((getHostInstanceType() == null) ? 0 : getHostInstanceType().hashCode()); hashCode = prime * hashCode + ((getLogs() == null) ? 0 : getLogs().hashCode()); hashCode = prime * hashCode + ((getMaintenanceWindowStartTime() == null) ? 0 : getMaintenanceWindowStartTime().hashCode()); hashCode = prime * hashCode + ((getPendingEngineVersion() == null) ? 0 : getPendingEngineVersion().hashCode()); hashCode = prime * hashCode + ((getPubliclyAccessible() == null) ? 0 : getPubliclyAccessible().hashCode()); hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getUsers() == null) ? 0 : getUsers().hashCode()); return hashCode; }
if (other.getConfigurations() == null ^ this.getConfigurations() == null) return false; if (other.getConfigurations() != null && other.getConfigurations().equals(this.getConfigurations()) == false) return false; if (other.getCreated() == null ^ this.getCreated() == null)
public Configurations unmarshall(JsonUnmarshallerContext context) throws Exception { Configurations configurations = new Configurations(); if (context.testExpression("current", targetDepth)) { context.nextToken(); configurations.setCurrent(ConfigurationIdJsonUnmarshaller.getInstance().unmarshall(context)); configurations.setHistory(new ListUnmarshaller<ConfigurationId>(ConfigurationIdJsonUnmarshaller.getInstance()).unmarshall(context)); configurations.setPending(ConfigurationIdJsonUnmarshaller.getInstance().unmarshall(context));
/** * The pending configuration of the broker. * * @param pending * The pending configuration of the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public Configurations withPending(ConfigurationId pending) { setPending(pending); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoMinorVersionUpgrade() == null) ? 0 : getAutoMinorVersionUpgrade().hashCode()); hashCode = prime * hashCode + ((getBrokerArn() == null) ? 0 : getBrokerArn().hashCode()); hashCode = prime * hashCode + ((getBrokerId() == null) ? 0 : getBrokerId().hashCode()); hashCode = prime * hashCode + ((getBrokerInstances() == null) ? 0 : getBrokerInstances().hashCode()); hashCode = prime * hashCode + ((getBrokerName() == null) ? 0 : getBrokerName().hashCode()); hashCode = prime * hashCode + ((getBrokerState() == null) ? 0 : getBrokerState().hashCode()); hashCode = prime * hashCode + ((getConfigurations() == null) ? 0 : getConfigurations().hashCode()); hashCode = prime * hashCode + ((getCreated() == null) ? 0 : getCreated().hashCode()); hashCode = prime * hashCode + ((getDeploymentMode() == null) ? 0 : getDeploymentMode().hashCode()); hashCode = prime * hashCode + ((getEngineType() == null) ? 0 : getEngineType().hashCode()); hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode()); hashCode = prime * hashCode + ((getHostInstanceType() == null) ? 0 : getHostInstanceType().hashCode()); hashCode = prime * hashCode + ((getLogs() == null) ? 0 : getLogs().hashCode()); hashCode = prime * hashCode + ((getMaintenanceWindowStartTime() == null) ? 0 : getMaintenanceWindowStartTime().hashCode()); hashCode = prime * hashCode + ((getPendingEngineVersion() == null) ? 0 : getPendingEngineVersion().hashCode()); hashCode = prime * hashCode + ((getPubliclyAccessible() == null) ? 0 : getPubliclyAccessible().hashCode()); hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getUsers() == null) ? 0 : getUsers().hashCode()); return hashCode; }
if (other.getConfigurations() == null ^ this.getConfigurations() == null) return false; if (other.getConfigurations() != null && other.getConfigurations().equals(this.getConfigurations()) == false) return false; if (other.getCreated() == null ^ this.getCreated() == null)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Configurations == false) return false; Configurations other = (Configurations) obj; if (other.getCurrent() == null ^ this.getCurrent() == null) return false; if (other.getCurrent() != null && other.getCurrent().equals(this.getCurrent()) == false) return false; if (other.getHistory() == null ^ this.getHistory() == null) return false; if (other.getHistory() != null && other.getHistory().equals(this.getHistory()) == false) return false; if (other.getPending() == null ^ this.getPending() == null) return false; if (other.getPending() != null && other.getPending().equals(this.getPending()) == false) return false; return true; }
/** * The history of configurations applied to the broker. * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setHistory(java.util.Collection)} or {@link #withHistory(java.util.Collection)} if you want to override * the existing values. * </p> * * @param history * The history of configurations applied to the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public Configurations withHistory(ConfigurationId... history) { if (this.history == null) { setHistory(new java.util.ArrayList<ConfigurationId>(history.length)); } for (ConfigurationId ele : history) { this.history.add(ele); } return this; }
/** * The current configuration of the broker. * * @param current * The current configuration of the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public Configurations withCurrent(ConfigurationId current) { setCurrent(current); 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 (getCurrent() != null) sb.append("Current: ").append(getCurrent()).append(","); if (getHistory() != null) sb.append("History: ").append(getHistory()).append(","); if (getPending() != null) sb.append("Pending: ").append(getPending()); sb.append("}"); return sb.toString(); }
/** * The history of configurations applied to the broker. * * @param history * The history of configurations applied to the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public Configurations withHistory(java.util.Collection<ConfigurationId> history) { setHistory(history); return this; }
/** * Marshall the given parameter object. */ public void marshall(Configurations configurations, ProtocolMarshaller protocolMarshaller) { if (configurations == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(configurations.getCurrent(), CURRENT_BINDING); protocolMarshaller.marshall(configurations.getHistory(), HISTORY_BINDING); protocolMarshaller.marshall(configurations.getPending(), PENDING_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * The history of configurations applied to the broker. * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setHistory(java.util.Collection)} or {@link #withHistory(java.util.Collection)} if you want to override * the existing values. * </p> * * @param history * The history of configurations applied to the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public Configurations withHistory(ConfigurationId... history) { if (this.history == null) { setHistory(new java.util.ArrayList<ConfigurationId>(history.length)); } for (ConfigurationId ele : history) { this.history.add(ele); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCurrent() == null) ? 0 : getCurrent().hashCode()); hashCode = prime * hashCode + ((getHistory() == null) ? 0 : getHistory().hashCode()); hashCode = prime * hashCode + ((getPending() == null) ? 0 : getPending().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Configurations == false) return false; Configurations other = (Configurations) obj; if (other.getCurrent() == null ^ this.getCurrent() == null) return false; if (other.getCurrent() != null && other.getCurrent().equals(this.getCurrent()) == false) return false; if (other.getHistory() == null ^ this.getHistory() == null) return false; if (other.getHistory() != null && other.getHistory().equals(this.getHistory()) == false) return false; if (other.getPending() == null ^ this.getPending() == null) return false; if (other.getPending() != null && other.getPending().equals(this.getPending()) == false) return false; return true; }