public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "restApiId": return Optional.ofNullable(clazz.cast(restApiId())); case "deploymentId": return Optional.ofNullable(clazz.cast(deploymentId())); case "embed": return Optional.ofNullable(clazz.cast(embed())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "restApiId": return Optional.ofNullable(clazz.cast(restApiId())); case "deploymentId": return Optional.ofNullable(clazz.cast(deploymentId())); case "embed": return Optional.ofNullable(clazz.cast(embed())); default: return Optional.empty(); } }
@Override public String toString() { return ToString.builder("GetDeploymentRequest").add("RestApiId", restApiId()).add("DeploymentId", deploymentId()) .add("Embed", embed()).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("GetDeploymentRequest").add("RestApiId", restApiId()).add("DeploymentId", deploymentId()) .add("Embed", embed()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(restApiId()); hashCode = 31 * hashCode + Objects.hashCode(deploymentId()); hashCode = 31 * hashCode + Objects.hashCode(embed()); return hashCode; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(restApiId()); hashCode = 31 * hashCode + Objects.hashCode(deploymentId()); hashCode = 31 * hashCode + Objects.hashCode(embed()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetDeploymentRequest)) { return false; } GetDeploymentRequest other = (GetDeploymentRequest) obj; return Objects.equals(restApiId(), other.restApiId()) && Objects.equals(deploymentId(), other.deploymentId()) && Objects.equals(embed(), other.embed()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetDeploymentRequest)) { return false; } GetDeploymentRequest other = (GetDeploymentRequest) obj; return Objects.equals(restApiId(), other.restApiId()) && Objects.equals(deploymentId(), other.deploymentId()) && Objects.equals(embed(), other.embed()); }