/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * 
 * 
 *
 * 
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */

package com.jdcloud.sdk.service.iotcloudgateway.model;

import java.util.List;
import java.util.ArrayList;
import com.jdcloud.sdk.annotation.Required;

/**
 * newInstanceSpec
 */
public class NewInstanceSpec  implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 可用区ID， 如果两个可用区一样，也需输入两个azId
     * Required:true
     */
    @Required
    private List<String> azId;

    /**
     * AZ1实例硬件规格
     * Required:true
     */
    @Required
    private String az1flavor;

    /**
     * AZ1节点个数
     * Required:true
     */
    @Required
    private Integer az1replica;

    /**
     * AZ1云硬盘大小
     * Required:true
     */
    @Required
    private Integer az1storagesize;

    /**
     * AZ2实例硬件规格
     * Required:true
     */
    @Required
    private String az2flavor;

    /**
     * AZ2节点个数
     * Required:true
     */
    @Required
    private Integer az2replica;

    /**
     * AZ2云硬盘大小
     * Required:true
     */
    @Required
    private Integer az2storagesize;


    /**
     * get 可用区ID， 如果两个可用区一样，也需输入两个azId
     *
     * @return
     */
    public List<String> getAzId() {
        return azId;
    }

    /**
     * set 可用区ID， 如果两个可用区一样，也需输入两个azId
     *
     * @param azId
     */
    public void setAzId(List<String> azId) {
        this.azId = azId;
    }

    /**
     * get AZ1实例硬件规格
     *
     * @return
     */
    public String getAz1flavor() {
        return az1flavor;
    }

    /**
     * set AZ1实例硬件规格
     *
     * @param az1flavor
     */
    public void setAz1flavor(String az1flavor) {
        this.az1flavor = az1flavor;
    }

    /**
     * get AZ1节点个数
     *
     * @return
     */
    public Integer getAz1replica() {
        return az1replica;
    }

    /**
     * set AZ1节点个数
     *
     * @param az1replica
     */
    public void setAz1replica(Integer az1replica) {
        this.az1replica = az1replica;
    }

    /**
     * get AZ1云硬盘大小
     *
     * @return
     */
    public Integer getAz1storagesize() {
        return az1storagesize;
    }

    /**
     * set AZ1云硬盘大小
     *
     * @param az1storagesize
     */
    public void setAz1storagesize(Integer az1storagesize) {
        this.az1storagesize = az1storagesize;
    }

    /**
     * get AZ2实例硬件规格
     *
     * @return
     */
    public String getAz2flavor() {
        return az2flavor;
    }

    /**
     * set AZ2实例硬件规格
     *
     * @param az2flavor
     */
    public void setAz2flavor(String az2flavor) {
        this.az2flavor = az2flavor;
    }

    /**
     * get AZ2节点个数
     *
     * @return
     */
    public Integer getAz2replica() {
        return az2replica;
    }

    /**
     * set AZ2节点个数
     *
     * @param az2replica
     */
    public void setAz2replica(Integer az2replica) {
        this.az2replica = az2replica;
    }

    /**
     * get AZ2云硬盘大小
     *
     * @return
     */
    public Integer getAz2storagesize() {
        return az2storagesize;
    }

    /**
     * set AZ2云硬盘大小
     *
     * @param az2storagesize
     */
    public void setAz2storagesize(Integer az2storagesize) {
        this.az2storagesize = az2storagesize;
    }


    /**
     * set 可用区ID， 如果两个可用区一样，也需输入两个azId
     *
     * @param azId
     */
    public NewInstanceSpec azId(List<String> azId) {
        this.azId = azId;
        return this;
    }

    /**
     * set AZ1实例硬件规格
     *
     * @param az1flavor
     */
    public NewInstanceSpec az1flavor(String az1flavor) {
        this.az1flavor = az1flavor;
        return this;
    }

    /**
     * set AZ1节点个数
     *
     * @param az1replica
     */
    public NewInstanceSpec az1replica(Integer az1replica) {
        this.az1replica = az1replica;
        return this;
    }

    /**
     * set AZ1云硬盘大小
     *
     * @param az1storagesize
     */
    public NewInstanceSpec az1storagesize(Integer az1storagesize) {
        this.az1storagesize = az1storagesize;
        return this;
    }

    /**
     * set AZ2实例硬件规格
     *
     * @param az2flavor
     */
    public NewInstanceSpec az2flavor(String az2flavor) {
        this.az2flavor = az2flavor;
        return this;
    }

    /**
     * set AZ2节点个数
     *
     * @param az2replica
     */
    public NewInstanceSpec az2replica(Integer az2replica) {
        this.az2replica = az2replica;
        return this;
    }

    /**
     * set AZ2云硬盘大小
     *
     * @param az2storagesize
     */
    public NewInstanceSpec az2storagesize(Integer az2storagesize) {
        this.az2storagesize = az2storagesize;
        return this;
    }


    /**
     * add item to 可用区ID， 如果两个可用区一样，也需输入两个azId
     *
     * @param azId
     */
    public void addAzId(String azId) {
        if (this.azId == null) {
            this.azId = new ArrayList<>();
        }
        this.azId.add(azId);
    }

}