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