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

com.emc.storageos.model.tenant.TenantCreateParam Maven / Gradle / Ivy

There is a newer version: 3.5.0.0
Show newest version
/*
 * Copyright (c) 2015 EMC Corporation
 * All Rights Reserved
 */
package com.emc.storageos.model.tenant;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import java.util.ArrayList;
import java.util.List;

import com.emc.storageos.model.valid.Length;

@XmlRootElement(name = "tenant_create")
public class TenantCreateParam extends TenantParam {

    private String label;
    private List userMappings;

    public TenantCreateParam() {
    }

    public TenantCreateParam(String label, List userMappings) {
        this.label = label;
        this.userMappings = userMappings;
    }

    /**
     * Name of the tenant to create
     * 
     * @valid any free form string within length limits
     */
    @XmlElement(required = true, name = "name")
    @Length(min = 2, max = 128)
    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    /**
     * List of user mappings for this tenant
     * 
     * @valid none
     */
    @XmlElementWrapper(name = "user_mappings")
    @XmlElement(required = true, name = "user_mapping")
    public List getUserMappings() {
        if (userMappings == null) {
            userMappings = new ArrayList();
        }
        return userMappings;
    }

    public void setUserMappings(List userMappings) {
        this.userMappings = userMappings;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy