All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.huaweicloud.sdk.geip.v3.model.CreateGlobalEipSegmentRequestBodyGlobalEipSegment Maven / Gradle / Ivy

There is a newer version: 3.1.114
Show newest version
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;

/**
 * 创建全域弹性公网IP段请求对象信息
 */
public class CreateGlobalEipSegmentRequestBodyGlobalEipSegment {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "name")

    private String name;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "description")

    private String description;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "geip_pool_name")

    private String geipPoolName;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "access_site")

    private String accessSite;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "mask")

    private Integer mask;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "internet_bandwidth")

    private CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth internetBandwidth;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "tags")

    private List tags = null;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "enterprise_project_id")

    private String enterpriseProjectId;

    public CreateGlobalEipSegmentRequestBodyGlobalEipSegment withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * - 功能说明:全域弹性公网IP段名称 - 取值范围:1-64,支持数字、字母、中文、_(下划线)、-(中划线)、.(点)
     * @return name
     */
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public CreateGlobalEipSegmentRequestBodyGlobalEipSegment withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * - 功能说明:用户自定义的资源描述 - 约束:   - 值的长度最大512字符,由数字、字母、中文、_(下划线)、-(中划线)、.(点)组成。
     * @return description
     */
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public CreateGlobalEipSegmentRequestBodyGlobalEipSegment withGeipPoolName(String geipPoolName) {
        this.geipPoolName = geipPoolName;
        return this;
    }

    /**
     * 全域弹性公网IP池子名称
     * @return geipPoolName
     */
    public String getGeipPoolName() {
        return geipPoolName;
    }

    public void setGeipPoolName(String geipPoolName) {
        this.geipPoolName = geipPoolName;
    }

    public CreateGlobalEipSegmentRequestBodyGlobalEipSegment withAccessSite(String accessSite) {
        this.accessSite = accessSite;
        return this;
    }

    /**
     * 接入点信息
     * @return accessSite
     */
    public String getAccessSite() {
        return accessSite;
    }

    public void setAccessSite(String accessSite) {
        this.accessSite = accessSite;
    }

    public CreateGlobalEipSegmentRequestBodyGlobalEipSegment withMask(Integer mask) {
        this.mask = mask;
        return this;
    }

    /**
     * 掩码长度。取值范围由GET /v3/{domain_id}/global-eip-segments/support-masks接口提供
     * minimum: 1
     * maximum: 128
     * @return mask
     */
    public Integer getMask() {
        return mask;
    }

    public void setMask(Integer mask) {
        this.mask = mask;
    }

    public CreateGlobalEipSegmentRequestBodyGlobalEipSegment withInternetBandwidth(
        CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth internetBandwidth) {
        this.internetBandwidth = internetBandwidth;
        return this;
    }

    public CreateGlobalEipSegmentRequestBodyGlobalEipSegment withInternetBandwidth(
        Consumer internetBandwidthSetter) {
        if (this.internetBandwidth == null) {
            this.internetBandwidth = new CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth();
            internetBandwidthSetter.accept(this.internetBandwidth);
        }

        return this;
    }

    /**
     * Get internetBandwidth
     * @return internetBandwidth
     */
    public CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth getInternetBandwidth() {
        return internetBandwidth;
    }

    public void setInternetBandwidth(
        CreateGlobalEipSegmentRequestBodyGlobalEipSegmentInternetBandwidth internetBandwidth) {
        this.internetBandwidth = internetBandwidth;
    }

    public CreateGlobalEipSegmentRequestBodyGlobalEipSegment withTags(
        List tags) {
        this.tags = tags;
        return this;
    }

    public CreateGlobalEipSegmentRequestBodyGlobalEipSegment addTagsItem(
        CreateGlobalEipRequestBodyGlobalEipTags tagsItem) {
        if (this.tags == null) {
            this.tags = new ArrayList<>();
        }
        this.tags.add(tagsItem);
        return this;
    }

    public CreateGlobalEipSegmentRequestBodyGlobalEipSegment 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 CreateGlobalEipSegmentRequestBodyGlobalEipSegment withEnterpriseProjectId(String enterpriseProjectId) {
        this.enterpriseProjectId = enterpriseProjectId;
        return this;
    }

    /**
     * - 企业项目ID。最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 - 创建全域弹性公网IP时,给全域弹性公网IP绑定企业项目ID。 - 不指定该参数时,默认值是 0 - 关于企业项目ID的获取及企业项目特性的详细信息,请参见[《企业管理用户指南》](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)。
     * @return enterpriseProjectId
     */
    public String getEnterpriseProjectId() {
        return enterpriseProjectId;
    }

    public void setEnterpriseProjectId(String enterpriseProjectId) {
        this.enterpriseProjectId = enterpriseProjectId;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        CreateGlobalEipSegmentRequestBodyGlobalEipSegment that =
            (CreateGlobalEipSegmentRequestBodyGlobalEipSegment) obj;
        return Objects.equals(this.name, that.name) && Objects.equals(this.description, that.description)
            && Objects.equals(this.geipPoolName, that.geipPoolName) && Objects.equals(this.accessSite, that.accessSite)
            && Objects.equals(this.mask, that.mask) && Objects.equals(this.internetBandwidth, that.internetBandwidth)
            && Objects.equals(this.tags, that.tags)
            && Objects.equals(this.enterpriseProjectId, that.enterpriseProjectId);
    }

    @Override
    public int hashCode() {
        return Objects
            .hash(name, description, geipPoolName, accessSite, mask, internetBandwidth, tags, enterpriseProjectId);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class CreateGlobalEipSegmentRequestBodyGlobalEipSegment {\n");
        sb.append("    name: ").append(toIndentedString(name)).append("\n");
        sb.append("    description: ").append(toIndentedString(description)).append("\n");
        sb.append("    geipPoolName: ").append(toIndentedString(geipPoolName)).append("\n");
        sb.append("    accessSite: ").append(toIndentedString(accessSite)).append("\n");
        sb.append("    mask: ").append(toIndentedString(mask)).append("\n");
        sb.append("    internetBandwidth: ").append(toIndentedString(internetBandwidth)).append("\n");
        sb.append("    tags: ").append(toIndentedString(tags)).append("\n");
        sb.append("    enterpriseProjectId: ").append(toIndentedString(enterpriseProjectId)).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    ");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy