public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "ipAddress": return Optional.ofNullable(clazz.cast(ipAddress())); case "macAddress": return Optional.ofNullable(clazz.cast(macAddress())); default: return Optional.empty(); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(ipAddress()); hashCode = 31 * hashCode + Objects.hashCode(macAddress()); return hashCode; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(ipAddress()); hashCode = 31 * hashCode + Objects.hashCode(macAddress()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "ipAddress": return Optional.ofNullable(clazz.cast(ipAddress())); case "macAddress": return Optional.ofNullable(clazz.cast(macAddress())); default: return Optional.empty(); } }
/** * 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. */ @Override public String toString() { return ToString.builder("AgentNetworkInfo").add("IpAddress", ipAddress()).add("MacAddress", macAddress()).build(); }
/** * 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. */ @Override public String toString() { return ToString.builder("AgentNetworkInfo").add("IpAddress", ipAddress()).add("MacAddress", macAddress()).build(); }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "ipAddress": return Optional.ofNullable(clazz.cast(ipAddress())); case "macAddress": return Optional.ofNullable(clazz.cast(macAddress())); default: return Optional.empty(); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(ipAddress()); hashCode = 31 * hashCode + Objects.hashCode(macAddress()); return hashCode; }
@Override public String toString() { return ToString.builder("AgentNetworkInfo").add("IpAddress", ipAddress()).add("MacAddress", macAddress()).build(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AgentNetworkInfo)) { return false; } AgentNetworkInfo other = (AgentNetworkInfo) obj; return Objects.equals(ipAddress(), other.ipAddress()) && Objects.equals(macAddress(), other.macAddress()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AgentNetworkInfo)) { return false; } AgentNetworkInfo other = (AgentNetworkInfo) obj; return Objects.equals(ipAddress(), other.ipAddress()) && Objects.equals(macAddress(), other.macAddress()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AgentNetworkInfo)) { return false; } AgentNetworkInfo other = (AgentNetworkInfo) obj; return Objects.equals(ipAddress(), other.ipAddress()) && Objects.equals(macAddress(), other.macAddress()); }
/** * Marshall the given parameter object */ public void marshall(AgentNetworkInfo agentNetworkInfo, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(agentNetworkInfo, "agentNetworkInfo"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(agentNetworkInfo.ipAddress(), IPADDRESS_BINDING); protocolMarshaller.marshall(agentNetworkInfo.macAddress(), MACADDRESS_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }