@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getConsoleURL() == null) ? 0 : getConsoleURL().hashCode()); hashCode = prime * hashCode + ((getEndpoints() == null) ? 0 : getEndpoints().hashCode()); hashCode = prime * hashCode + ((getIpAddress() == null) ? 0 : getIpAddress().hashCode()); return hashCode; }
/** * The URL of the broker's ActiveMQ Web Console. * * @param consoleURL * The URL of the broker's ActiveMQ Web Console. * @return Returns a reference to this object so that method calls can be chained together. */ public BrokerInstance withConsoleURL(String consoleURL) { setConsoleURL(consoleURL); return this; }
/** * The broker's wire-level protocol endpoints. * * @param endpoints * The broker's wire-level protocol endpoints. * @return Returns a reference to this object so that method calls can be chained together. */ public BrokerInstance withEndpoints(java.util.Collection<String> endpoints) { setEndpoints(endpoints); return this; }
public BrokerInstance unmarshall(JsonUnmarshallerContext context) throws Exception { BrokerInstance brokerInstance = new BrokerInstance(); if (context.testExpression("consoleURL", targetDepth)) { context.nextToken(); brokerInstance.setConsoleURL(context.getUnmarshaller(String.class).unmarshall(context)); brokerInstance.setEndpoints(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); brokerInstance.setIpAddress(context.getUnmarshaller(String.class).unmarshall(context));
/** * The IP address of the Elastic Network Interface (ENI) attached to the broker. * * @param ipAddress * The IP address of the Elastic Network Interface (ENI) attached to the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public BrokerInstance withIpAddress(String ipAddress) { setIpAddress(ipAddress); return this; }
public BrokerInstance unmarshall(JsonUnmarshallerContext context) throws Exception { BrokerInstance brokerInstance = new BrokerInstance(); if (context.testExpression("consoleURL", targetDepth)) { context.nextToken(); brokerInstance.setConsoleURL(context.getUnmarshaller(String.class).unmarshall(context)); brokerInstance.setEndpoints(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); brokerInstance.setIpAddress(context.getUnmarshaller(String.class).unmarshall(context));
/** * The IP address of the Elastic Network Interface (ENI) attached to the broker. * * @param ipAddress * The IP address of the Elastic Network Interface (ENI) attached to the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public BrokerInstance withIpAddress(String ipAddress) { setIpAddress(ipAddress); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BrokerInstance == false) return false; BrokerInstance other = (BrokerInstance) obj; if (other.getConsoleURL() == null ^ this.getConsoleURL() == null) return false; if (other.getConsoleURL() != null && other.getConsoleURL().equals(this.getConsoleURL()) == false) return false; if (other.getEndpoints() == null ^ this.getEndpoints() == null) return false; if (other.getEndpoints() != null && other.getEndpoints().equals(this.getEndpoints()) == false) return false; if (other.getIpAddress() == null ^ this.getIpAddress() == null) return false; if (other.getIpAddress() != null && other.getIpAddress().equals(this.getIpAddress()) == false) return false; return true; }
/** * The broker's wire-level protocol endpoints. * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setEndpoints(java.util.Collection)} or {@link #withEndpoints(java.util.Collection)} if you want to * override the existing values. * </p> * * @param endpoints * The broker's wire-level protocol endpoints. * @return Returns a reference to this object so that method calls can be chained together. */ public BrokerInstance withEndpoints(String... endpoints) { if (this.endpoints == null) { setEndpoints(new java.util.ArrayList<String>(endpoints.length)); } for (String ele : endpoints) { this.endpoints.add(ele); } return this; }
/** * The URL of the broker's ActiveMQ Web Console. * * @param consoleURL * The URL of the broker's ActiveMQ Web Console. * @return Returns a reference to this object so that method calls can be chained together. */ public BrokerInstance withConsoleURL(String consoleURL) { setConsoleURL(consoleURL); 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 (getConsoleURL() != null) sb.append("ConsoleURL: ").append(getConsoleURL()).append(","); if (getEndpoints() != null) sb.append("Endpoints: ").append(getEndpoints()).append(","); if (getIpAddress() != null) sb.append("IpAddress: ").append(getIpAddress()); sb.append("}"); return sb.toString(); }
/** * The broker's wire-level protocol endpoints. * * @param endpoints * The broker's wire-level protocol endpoints. * @return Returns a reference to this object so that method calls can be chained together. */ public BrokerInstance withEndpoints(java.util.Collection<String> endpoints) { setEndpoints(endpoints); return this; }
/** * Marshall the given parameter object. */ public void marshall(BrokerInstance brokerInstance, ProtocolMarshaller protocolMarshaller) { if (brokerInstance == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(brokerInstance.getConsoleURL(), CONSOLEURL_BINDING); protocolMarshaller.marshall(brokerInstance.getEndpoints(), ENDPOINTS_BINDING); protocolMarshaller.marshall(brokerInstance.getIpAddress(), IPADDRESS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * The broker's wire-level protocol endpoints. * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setEndpoints(java.util.Collection)} or {@link #withEndpoints(java.util.Collection)} if you want to * override the existing values. * </p> * * @param endpoints * The broker's wire-level protocol endpoints. * @return Returns a reference to this object so that method calls can be chained together. */ public BrokerInstance withEndpoints(String... endpoints) { if (this.endpoints == null) { setEndpoints(new java.util.ArrayList<String>(endpoints.length)); } for (String ele : endpoints) { this.endpoints.add(ele); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getConsoleURL() == null) ? 0 : getConsoleURL().hashCode()); hashCode = prime * hashCode + ((getEndpoints() == null) ? 0 : getEndpoints().hashCode()); hashCode = prime * hashCode + ((getIpAddress() == null) ? 0 : getIpAddress().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BrokerInstance == false) return false; BrokerInstance other = (BrokerInstance) obj; if (other.getConsoleURL() == null ^ this.getConsoleURL() == null) return false; if (other.getConsoleURL() != null && other.getConsoleURL().equals(this.getConsoleURL()) == false) return false; if (other.getEndpoints() == null ^ this.getEndpoints() == null) return false; if (other.getEndpoints() != null && other.getEndpoints().equals(this.getEndpoints()) == false) return false; if (other.getIpAddress() == null ^ this.getIpAddress() == null) return false; if (other.getIpAddress() != null && other.getIpAddress().equals(this.getIpAddress()) == false) return false; return true; }
/** * 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 (getConsoleURL() != null) sb.append("ConsoleURL: ").append(getConsoleURL()).append(","); if (getEndpoints() != null) sb.append("Endpoints: ").append(getEndpoints()).append(","); if (getIpAddress() != null) sb.append("IpAddress: ").append(getIpAddress()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(BrokerInstance brokerInstance, ProtocolMarshaller protocolMarshaller) { if (brokerInstance == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(brokerInstance.getConsoleURL(), CONSOLEURL_BINDING); protocolMarshaller.marshall(brokerInstance.getEndpoints(), ENDPOINTS_BINDING); protocolMarshaller.marshall(brokerInstance.getIpAddress(), IPADDRESS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }