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

org.xlcloud.service.Account Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2012 AMG.lab, a Bull Group Company
 *
 * 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.
 */
package org.xlcloud.service;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * Top-level entity representing XLcloud Account. An account represents an owner
 * of XLcloud resources. Users are assigned to accounts to map them to
 * appropriate resources
 */
@XmlAccessorType( XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "projects",
    "users"
})
@XmlRootElement(name = "account")
public class Account extends Referenceable {
	

    /**
     * TODO Documentation serialVersionUID
     */
    private static final long serialVersionUID = -3792329113264018253L;

    private static final String RESOURCE_PREFIX = "accounts";

    private Users users;

    private Projects projects;

	@XmlAttribute
    private String name;
    
	@XmlAttribute
    private String osProjectId;

    /**
     * Gets the value of {@link #projects}.
     * 
     * @return value of {@link #projects}
     */
    public Projects getProjects() {
        return projects;
    }

    /**
     * Sets the value of {@link #projects}.
     * 
     * @param projects
     *            - value
     */
    public void setProjects(Projects projects) {
        this.projects = projects;
    }

    /**
     * Gets the value of the name property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of {@link #users}.
     * @return value of {@link #users}
     */
    public Users getUsers() {
        return users;
    }

    /**
     * Sets the value of {@link #users}.
     * @param users - value
     */
    public void setUsers(Users users) {
        this.users = users;
    }
    
    /**
     * Gets the value of {@link #osProjectId}.
     * @return value of {@link #osProjectId}
     */
    public String getOsProjectId() {
        return osProjectId;
    }

    /**
     * Sets the value of {@link #osProjectId}.
     * @param osProjectId - value
     */
    public void setOsProjectId(String osProjectId) {
        this.osProjectId = osProjectId;
    }

    @Override
	protected String getResourcePrefix() {
		return RESOURCE_PREFIX;
	}
    
    /** {@inheritDoc} */
    @Override
    public String toString() {
        return new ToStringBuilder(this).append("id", id).append("name", name).append("users", users).toString();

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy