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

com.jdcloud.sdk.service.iam.model.Resource Maven / Gradle / Ivy

/*
 * 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.iam.model;

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

/**
 * resource
 */
public class Resource  implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 资源id集合,传*表示对所有id生效
     * Required:true
     */
    @Required
    private List ids;

    /**
     * 资源类型,云主机-server、镜像-image、云硬盘-volume、vpc-vpc、公网Ip-floatingIp、负载均衡-loadbalance、云数据库(mysql)-database、云缓存-cache
     * Required:true
     */
    @Required
    private String type;


    /**
     * get 资源id集合,传*表示对所有id生效
     *
     * @return
     */
    public List getIds() {
        return ids;
    }

    /**
     * set 资源id集合,传*表示对所有id生效
     *
     * @param ids
     */
    public void setIds(List ids) {
        this.ids = ids;
    }

    /**
     * get 资源类型,云主机-server、镜像-image、云硬盘-volume、vpc-vpc、公网Ip-floatingIp、负载均衡-loadbalance、云数据库(mysql)-database、云缓存-cache
     *
     * @return
     */
    public String getType() {
        return type;
    }

    /**
     * set 资源类型,云主机-server、镜像-image、云硬盘-volume、vpc-vpc、公网Ip-floatingIp、负载均衡-loadbalance、云数据库(mysql)-database、云缓存-cache
     *
     * @param type
     */
    public void setType(String type) {
        this.type = type;
    }


    /**
     * set 资源id集合,传*表示对所有id生效
     *
     * @param ids
     */
    public Resource ids(List ids) {
        this.ids = ids;
        return this;
    }

    /**
     * set 资源类型,云主机-server、镜像-image、云硬盘-volume、vpc-vpc、公网Ip-floatingIp、负载均衡-loadbalance、云数据库(mysql)-database、云缓存-cache
     *
     * @param type
     */
    public Resource type(String type) {
        this.type = type;
        return this;
    }


    /**
     * add item to 资源id集合,传*表示对所有id生效
     *
     * @param id
     */
    public void addId(String id) {
        if (this.ids == null) {
            this.ids = new ArrayList<>();
        }
        this.ids.add(id);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy