
org.xlcloud.openstack.model.identity.keystone.KeystoneUser 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.openstack.model.identity.keystone;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonRootName;
import org.xlcloud.openstack.model.common.AnyTypeAdapter;
import org.xlcloud.openstack.model.identity.Role;
import org.xlcloud.openstack.model.identity.User;
@XmlRootElement(name = "user")
@XmlAccessorType(XmlAccessType.NONE)
@JsonRootName("user")
public class KeystoneUser implements Serializable, User {
@XmlAttribute
private String id;
@XmlAttribute
private String name;
@XmlAttribute
private String username;
@XmlAttribute
private String password;
@XmlAttribute
private String email;
@XmlAttribute
private boolean enabled;
@XmlAttribute
private String tenantId;
@XmlElement(name = "roles")
@JsonDeserialize(as=List.class, contentAs=KeystoneRole.class)
@XmlJavaTypeAdapter(AnyTypeAdapter.class)
private List roles;
@JsonProperty("roles_links")
private List rolesLinks;
@JsonProperty
private Map extra;
public KeystoneUser() {
}
public KeystoneUser(String id, String name) {
this.id = id;
this.name = name;
}
/* (non-Javadoc)
* @see org.openstack.model.identity.keystone.User#getId()
*/
@Override
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
/* (non-Javadoc)
* @see org.openstack.model.identity.keystone.User#getName()
*/
@Override
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/* (non-Javadoc)
* @see org.openstack.model.identity.keystone.User#getPassword()
*/
@Override
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
/* (non-Javadoc)
* @see org.openstack.model.identity.keystone.User#getEmail()
*/
@Override
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
/* (non-Javadoc)
* @see org.openstack.model.identity.keystone.User#isEnabled()
*/
@Override
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
/* (non-Javadoc)
* @see org.openstack.model.identity.keystone.User#getUsername()
*/
@Override
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public List getRolesLinks() {
return rolesLinks;
}
public void setRolesLinks(List rolesLinks) {
this.rolesLinks = rolesLinks;
}
/* (non-Javadoc)
* @see org.openstack.model.identity.keystone.User#getRoles()
*/
@Override
public List getRoles() {
return roles;
}
public void setRoles(List roles) {
this.roles = roles;
}
public Map getExtra() {
return extra;
}
public void setExtra(Map extra) {
this.extra = extra;
}
@Override
public String toString() {
return "User [id=" + id + ", name=" + name + ", email=" + email + ", enabled=" + enabled + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy