com.huaweicloud.sdk.workspaceapp.v1.model.ServerAddress Maven / Gradle / Ivy
package com.huaweicloud.sdk.workspaceapp.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* ServerAddress
*/
public class ServerAddress {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "addr")
private String addr;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "version")
private Integer version;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "OS-EXT-IPS-MAC:mac_addr")
private String osEXTIPSMACMacAddr;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "OS-EXT-IPS:type")
private String osEXTIPSType;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "OS-EXT-IPS:port_id")
private String osEXTIPSPortId;
public ServerAddress withAddr(String addr) {
this.addr = addr;
return this;
}
/**
* IP地址信息。
* @return addr
*/
public String getAddr() {
return addr;
}
public void setAddr(String addr) {
this.addr = addr;
}
public ServerAddress withVersion(Integer version) {
this.version = version;
return this;
}
/**
* IP地址类型: `4` - IPV4 `6` - IPV6
* @return version
*/
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public ServerAddress withOsEXTIPSMACMacAddr(String osEXTIPSMACMacAddr) {
this.osEXTIPSMACMacAddr = osEXTIPSMACMacAddr;
return this;
}
/**
* MAC地址。
* @return osEXTIPSMACMacAddr
*/
public String getOsEXTIPSMACMacAddr() {
return osEXTIPSMACMacAddr;
}
public void setOsEXTIPSMACMacAddr(String osEXTIPSMACMacAddr) {
this.osEXTIPSMACMacAddr = osEXTIPSMACMacAddr;
}
public ServerAddress withOsEXTIPSType(String osEXTIPSType) {
this.osEXTIPSType = osEXTIPSType;
return this;
}
/**
* IP地址分配方式,字符串是大小写不敏感格式。 * `fixed` - 代表私有IP地址。 * `floating` - 代表浮动IP地址。
* @return osEXTIPSType
*/
public String getOsEXTIPSType() {
return osEXTIPSType;
}
public void setOsEXTIPSType(String osEXTIPSType) {
this.osEXTIPSType = osEXTIPSType;
}
public ServerAddress withOsEXTIPSPortId(String osEXTIPSPortId) {
this.osEXTIPSPortId = osEXTIPSPortId;
return this;
}
/**
* IP地址对应的端口ID。
* @return osEXTIPSPortId
*/
public String getOsEXTIPSPortId() {
return osEXTIPSPortId;
}
public void setOsEXTIPSPortId(String osEXTIPSPortId) {
this.osEXTIPSPortId = osEXTIPSPortId;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ServerAddress that = (ServerAddress) obj;
return Objects.equals(this.addr, that.addr) && Objects.equals(this.version, that.version)
&& Objects.equals(this.osEXTIPSMACMacAddr, that.osEXTIPSMACMacAddr)
&& Objects.equals(this.osEXTIPSType, that.osEXTIPSType)
&& Objects.equals(this.osEXTIPSPortId, that.osEXTIPSPortId);
}
@Override
public int hashCode() {
return Objects.hash(addr, version, osEXTIPSMACMacAddr, osEXTIPSType, osEXTIPSPortId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ServerAddress {\n");
sb.append(" addr: ").append(toIndentedString(addr)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" osEXTIPSMACMacAddr: ").append(toIndentedString(osEXTIPSMACMacAddr)).append("\n");
sb.append(" osEXTIPSType: ").append(toIndentedString(osEXTIPSType)).append("\n");
sb.append(" osEXTIPSPortId: ").append(toIndentedString(osEXTIPSPortId)).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 ");
}
}