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

com.huaweicloud.sdk.cloudide.v2.model.StacksAttribute Maven / Gradle / Ivy

There is a newer version: 3.1.114
Show newest version
package com.huaweicloud.sdk.cloudide.v2.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;

/**
 * StacksAttribute
 */
public class StacksAttribute {

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

    private List specs = null;

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

    private String suggest;

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

    private String suggestTitle;

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

    private List volumes = null;

    public StacksAttribute withSpecs(List specs) {
        this.specs = specs;
        return this;
    }

    public StacksAttribute addSpecsItem(String specsItem) {
        if (this.specs == null) {
            this.specs = new ArrayList<>();
        }
        this.specs.add(specsItem);
        return this;
    }

    public StacksAttribute withSpecs(Consumer> specsSetter) {
        if (this.specs == null) {
            this.specs = new ArrayList<>();
        }
        specsSetter.accept(this.specs);
        return this;
    }

    /**
     * 规格列表
     * @return specs
     */
    public List getSpecs() {
        return specs;
    }

    public void setSpecs(List specs) {
        this.specs = specs;
    }

    public StacksAttribute withSuggest(String suggest) {
        this.suggest = suggest;
        return this;
    }

    /**
     * 提示id
     * @return suggest
     */
    public String getSuggest() {
        return suggest;
    }

    public void setSuggest(String suggest) {
        this.suggest = suggest;
    }

    public StacksAttribute withSuggestTitle(String suggestTitle) {
        this.suggestTitle = suggestTitle;
        return this;
    }

    /**
     * 提示信息
     * @return suggestTitle
     */
    public String getSuggestTitle() {
        return suggestTitle;
    }

    public void setSuggestTitle(String suggestTitle) {
        this.suggestTitle = suggestTitle;
    }

    public StacksAttribute withVolumes(List volumes) {
        this.volumes = volumes;
        return this;
    }

    public StacksAttribute addVolumesItem(String volumesItem) {
        if (this.volumes == null) {
            this.volumes = new ArrayList<>();
        }
        this.volumes.add(volumesItem);
        return this;
    }

    public StacksAttribute withVolumes(Consumer> volumesSetter) {
        if (this.volumes == null) {
            this.volumes = new ArrayList<>();
        }
        volumesSetter.accept(this.volumes);
        return this;
    }

    /**
     * 卷容量列表
     * @return volumes
     */
    public List getVolumes() {
        return volumes;
    }

    public void setVolumes(List volumes) {
        this.volumes = volumes;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        StacksAttribute that = (StacksAttribute) obj;
        return Objects.equals(this.specs, that.specs) && Objects.equals(this.suggest, that.suggest)
            && Objects.equals(this.suggestTitle, that.suggestTitle) && Objects.equals(this.volumes, that.volumes);
    }

    @Override
    public int hashCode() {
        return Objects.hash(specs, suggest, suggestTitle, volumes);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class StacksAttribute {\n");
        sb.append("    specs: ").append(toIndentedString(specs)).append("\n");
        sb.append("    suggest: ").append(toIndentedString(suggest)).append("\n");
        sb.append("    suggestTitle: ").append(toIndentedString(suggestTitle)).append("\n");
        sb.append("    volumes: ").append(toIndentedString(volumes)).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