com.huaweicloud.sdk.er.v3.model.AssociateRouteTableResponse Maven / Gradle / Ivy
package com.huaweicloud.sdk.er.v3.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huaweicloud.sdk.core.SdkResponse;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Response Object
*/
public class AssociateRouteTableResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "association")
private Association association;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "request_id")
private String requestId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "X-Client-Token")
private String xClientToken;
public AssociateRouteTableResponse withAssociation(Association association) {
this.association = association;
return this;
}
public AssociateRouteTableResponse withAssociation(Consumer associationSetter) {
if (this.association == null) {
this.association = new Association();
associationSetter.accept(this.association);
}
return this;
}
/**
* Get association
* @return association
*/
public Association getAssociation() {
return association;
}
public void setAssociation(Association association) {
this.association = association;
}
public AssociateRouteTableResponse withRequestId(String requestId) {
this.requestId = requestId;
return this;
}
/**
* 请求ID
* @return requestId
*/
public String getRequestId() {
return requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public AssociateRouteTableResponse withXClientToken(String xClientToken) {
this.xClientToken = xClientToken;
return this;
}
/**
* Get xClientToken
* @return xClientToken
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "X-Client-Token")
public String getXClientToken() {
return xClientToken;
}
public void setXClientToken(String xClientToken) {
this.xClientToken = xClientToken;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
AssociateRouteTableResponse that = (AssociateRouteTableResponse) obj;
return Objects.equals(this.association, that.association) && Objects.equals(this.requestId, that.requestId)
&& Objects.equals(this.xClientToken, that.xClientToken);
}
@Override
public int hashCode() {
return Objects.hash(association, requestId, xClientToken);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AssociateRouteTableResponse {\n");
sb.append(" association: ").append(toIndentedString(association)).append("\n");
sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
sb.append(" xClientToken: ").append(toIndentedString(xClientToken)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}