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