com.huaweicloud.sdk.geip.v3.model.CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth Maven / Gradle / Ivy
package com.huaweicloud.sdk.geip.v3.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
/**
* CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth
*/
public class CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "id")
private String id;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "ingress_size")
private Integer ingressSize;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "charge_mode")
private String chargeMode;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "size")
private Integer size;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "name")
private String name;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "tags")
private List tags = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "type")
private String type;
public CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth withId(String id) {
this.id = id;
return this;
}
/**
* 全域公网带宽的ID
* @return id
*/
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth withIngressSize(Integer ingressSize) {
this.ingressSize = ingressSize;
return this;
}
/**
* 全域公网带宽大小(入云方向)
* minimum: 0
* maximum: 2147483647
* @return ingressSize
*/
public Integer getIngressSize() {
return ingressSize;
}
public void setIngressSize(Integer ingressSize) {
this.ingressSize = ingressSize;
}
public CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth withChargeMode(String chargeMode) {
this.chargeMode = chargeMode;
return this;
}
/**
* 计费模式
* @return chargeMode
*/
public String getChargeMode() {
return chargeMode;
}
public void setChargeMode(String chargeMode) {
this.chargeMode = chargeMode;
}
public CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth withSize(Integer size) {
this.size = size;
return this;
}
/**
* 全域公网带宽大小(出云方向)
* minimum: 0
* maximum: 2147483647
* @return size
*/
public Integer getSize() {
return size;
}
public void setSize(Integer size) {
this.size = size;
}
public CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth withName(String name) {
this.name = name;
return this;
}
/**
* - 功能说明:全域公网带宽名称 - 取值范围:1-64,支持数字、字母、中文、_(下划线)、-(中划线)、.(点)
* @return name
*/
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth withTags(
List tags) {
this.tags = tags;
return this;
}
public CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth addTagsItem(
CreateGlobalEipRequestBodyGlobalEipTags tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(tagsItem);
return this;
}
public CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth withTags(
Consumer> tagsSetter) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
tagsSetter.accept(this.tags);
return this;
}
/**
* 全域弹性公网IP段标签
* @return tags
*/
public List getTags() {
return tags;
}
public void setTags(List tags) {
this.tags = tags;
}
public CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth withType(String type) {
this.type = type;
return this;
}
/**
* 全域公网带宽类型
* @return type
*/
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth that =
(CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth) obj;
return Objects.equals(this.id, that.id) && Objects.equals(this.ingressSize, that.ingressSize)
&& Objects.equals(this.chargeMode, that.chargeMode) && Objects.equals(this.size, that.size)
&& Objects.equals(this.name, that.name) && Objects.equals(this.tags, that.tags)
&& Objects.equals(this.type, that.type);
}
@Override
public int hashCode() {
return Objects.hash(id, ingressSize, chargeMode, size, name, tags, type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" ingressSize: ").append(toIndentedString(ingressSize)).append("\n");
sb.append(" chargeMode: ").append(toIndentedString(chargeMode)).append("\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).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 ");
}
}