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