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