diff options
author | 2017-01-31 13:57:24 +0100 | |
---|---|---|
committer | 2017-01-31 14:55:11 +0100 | |
commit | 2e984294ac28c6f2ede290c38164c5d536ccaf4a (patch) | |
tree | 5eba5a929b7a961c98749fa69e03cfea58e1a724 /keystone-model/src/main/java/com/woorea/openstack/keystone/v3 | |
parent | 86c0f28c8ed469486b64d6422dc53e3a7bcc8adb (diff) |
Initial OpenECOMP MSO OpenStack SDK lib commit
Change-Id: Ieaacb2b2c0dcc469669880e73f0cda9fa59a6c5a
Signed-off-by: ChrisC <cc697w@intl.att.com>
Diffstat (limited to 'keystone-model/src/main/java/com/woorea/openstack/keystone/v3')
20 files changed, 1491 insertions, 0 deletions
diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java new file mode 100644 index 0000000..7caffb0 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java @@ -0,0 +1,284 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("auth") +public class Authentication implements Serializable { + + public static final class Identity { + + public static final Identity password(String userId, String password) { + Identity identity = new Identity(); + identity.getMethods().add("password"); + Password method = new Password(); + method.getUser().setId(userId); + method.getUser().setPassword(password); + identity.setPassword(method); + return identity; + } + + public static final Identity password(String domainName, String username, String password) { + Identity identity = new Identity(); + identity.getMethods().add("password"); + Password method = new Password(); + com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password.User.Domain domain = new com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password.User.Domain(); + domain.setName(domainName); + method.getUser().setDomain(domain); + method.getUser().setName(username); + method.getUser().setPassword(password); + identity.setPassword(method); + return identity; + } + + public static final Identity token(String token) { + Identity identity = new Identity(); + identity.getMethods().add("token"); + Token method = new Token(); + method.setId(token); + identity.setToken(method); + return identity; + } + + private List<String> methods = new ArrayList<String>(); + + public static final class Password { + + public static final class User { + + public static final class Domain { + + private String id; + + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } + + private Domain domain; + + private String id; + + private String name; + + private String password; + + public Domain getDomain() { + return domain; + } + + public void setDomain(Domain domain) { + this.domain = domain; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + } + + private User user = new User(); + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + } + + private Password password; + + public static final class Token { + + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + } + + private Token token; + + public List<String> getMethods() { + return methods; + } + + public void setMethods(List<String> methods) { + this.methods = methods; + } + + public Password getPassword() { + return password; + } + + public void setPassword(Password password) { + this.password = password; + } + + public Token getToken() { + return token; + } + + public void setToken(Token token) { + this.token = token; + } + + } + + private Identity identity; + + public static final class Scope { + + public static Scope project(String id) { + Scope scope = new Scope(); + Project project = new Project(); + project.setId(id); + scope.setProject(project); + return scope; + } + + public static Scope project(String domainName, String projectName) { + Scope scope = new Scope(); + com.woorea.openstack.keystone.v3.model.Authentication.Scope.Project.Domain domain = new com.woorea.openstack.keystone.v3.model.Authentication.Scope.Project.Domain(); + domain.setName(domainName); + Project project = new Project(); + project.setDomain(domain); + project.setName(projectName); + scope.setProject(project); + return scope; + } + + public static final class Project { + + public static final class Domain { + + private String id; + + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } + + private String id; + + private Domain domain; + + private String name; + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Domain getDomain() { + return domain; + } + + public void setDomain(Domain domain) { + this.domain = domain; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + } + + private Project project; + + public Project getProject() { + return project; + } + + public void setProject(Project project) { + this.project = project; + } + + } + + private Scope scope; + + public Identity getIdentity() { + return identity; + } + + public void setIdentity(Identity identity) { + this.identity = identity; + } + + public Scope getScope() { + return scope; + } + + public void setScope(Scope scope) { + this.scope = scope; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credential.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credential.java new file mode 100644 index 0000000..ef40a2a --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credential.java @@ -0,0 +1,61 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.util.HashMap; +import java.util.Map; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("credential") +public class Credential { + + private String id; + + private String projectId; + + private String type; + + private String userId; + + private Map<String, String> blob = new HashMap<String, String>(); + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public Map<String, String> getBlob() { + return blob; + } + + public void setBlob(Map<String, String> blob) { + this.blob = blob; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credentials.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credentials.java new file mode 100644 index 0000000..36eeda6 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credentials.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Credentials implements Iterable<Credential>, Serializable { + + @JsonProperty("credentials") + private List<Credential> list; + + /** + * @return the list + */ + public List<Credential> getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Credentials [list=" + list + "]"; + } + + @Override + public Iterator<Credential> iterator() { + return list.iterator(); + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domain.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domain.java new file mode 100644 index 0000000..9df4fe2 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domain.java @@ -0,0 +1,48 @@ +package com.woorea.openstack.keystone.v3.model; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("domain") +public class Domain { + + private String id; + + private String name; + + private String description; + + private Boolean enabled; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domains.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domains.java new file mode 100644 index 0000000..e42a6c4 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domains.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Domains implements Iterable<Domain>, Serializable { + + @JsonProperty("domains") + private List<Domain> list; + + /** + * @return the list + */ + public List<Domain> getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Domains [list=" + list + "]"; + } + + @Override + public Iterator<Domain> iterator() { + return list.iterator(); + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoint.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoint.java new file mode 100644 index 0000000..213e690 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoint.java @@ -0,0 +1,51 @@ +package com.woorea.openstack.keystone.v3.model; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("endpoint") +public class Endpoint { + + private String id; + + @JsonProperty("interface") + private String iface; + + private String name; + + @JsonProperty("service_id") + private String serviceId; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getInterface() { + return iface; + } + + public void setInterface(String iface) { + this.iface = iface; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getServiceId() { + return serviceId; + } + + public void setServiceId(String serviceId) { + this.serviceId = serviceId; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoints.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoints.java new file mode 100644 index 0000000..146e88b --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoints.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Endpoints implements Iterable<Endpoint>, Serializable { + + @JsonProperty("endpoints") + private List<Endpoint> list; + + /** + * @return the list + */ + public List<Endpoint> getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Endpoints [list=" + list + "]"; + } + + @Override + public Iterator<Endpoint> iterator() { + return list.iterator(); + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Group.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Group.java new file mode 100644 index 0000000..5e718b5 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Group.java @@ -0,0 +1,50 @@ +package com.woorea.openstack.keystone.v3.model; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("group") +public class Group { + + private String id; + + @JsonProperty("domain_id") + private String domainId; + + private String name; + + private String description; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDomainId() { + return domainId; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Groups.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Groups.java new file mode 100644 index 0000000..cc7b276 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Groups.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Groups implements Iterable<Group>, Serializable { + + @JsonProperty("groups") + private List<Group> list; + + /** + * @return the list + */ + public List<Group> getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Groups [list=" + list + "]"; + } + + @Override + public Iterator<Group> iterator() { + return list.iterator(); + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policies.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policies.java new file mode 100644 index 0000000..42da856 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policies.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Policies implements Iterable<Policy>, Serializable { + + @JsonProperty("policies") + private List<Policy> list; + + /** + * @return the list + */ + public List<Policy> getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Policies [list=" + list + "]"; + } + + @Override + public Iterator<Policy> iterator() { + return list.iterator(); + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policy.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policy.java new file mode 100644 index 0000000..5abf844 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policy.java @@ -0,0 +1,61 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.util.HashMap; +import java.util.Map; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("policy") +public class Policy { + + private String id; + + private String projectId; + + private String type; + + private String userId; + + private Map<String, String> blob = new HashMap<String, String>(); + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public Map<String, String> getBlob() { + return blob; + } + + public void setBlob(Map<String, String> blob) { + this.blob = blob; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Project.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Project.java new file mode 100644 index 0000000..070336e --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Project.java @@ -0,0 +1,50 @@ +package com.woorea.openstack.keystone.v3.model; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("project") +public class Project { + + private String id; + + @JsonProperty("domain_id") + private String domainId; + + private String name; + + private Boolean enabled; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDomainId() { + return domainId; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Projects.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Projects.java new file mode 100644 index 0000000..fa39064 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Projects.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Projects implements Iterable<Project>, Serializable { + + @JsonProperty("projects") + private List<Project> list; + + /** + * @return the list + */ + public List<Project> getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Projects [list=" + list + "]"; + } + + @Override + public Iterator<Project> iterator() { + return list.iterator(); + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Role.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Role.java new file mode 100644 index 0000000..09d47a1 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Role.java @@ -0,0 +1,67 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("role") +public class Role implements Serializable { + + private String id; + + private String name; + + private String description; + + private String enabled; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * @return the enabled + */ + public String getEnabled() { + return enabled; + } + + /** + * @param enabled the enabled to set + */ + public void setEnabled(String enabled) { + this.enabled = enabled; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Roles.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Roles.java new file mode 100644 index 0000000..5a4e3b4 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Roles.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Roles implements Iterable<Role>, Serializable { + + @JsonProperty("roles") + private List<Role> list; + + /** + * @return the list + */ + public List<Role> getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Roles [list=" + list + "]"; + } + + @Override + public Iterator<Role> iterator() { + return list.iterator(); + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Service.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Service.java new file mode 100644 index 0000000..578f2c1 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Service.java @@ -0,0 +1,48 @@ +package com.woorea.openstack.keystone.v3.model; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("service") +public class Service { + + private String id; + + private String type; + + private String name; + + private String description; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Services.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Services.java new file mode 100644 index 0000000..4383aec --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Services.java @@ -0,0 +1,36 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +import com.woorea.openstack.keystone.model.Service; + +public class Services implements Iterable<Service>, Serializable { + + @JsonProperty("services") + private List<Service> list; + + /** + * @return the list + */ + public List<Service> getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Services [list=" + list + "]"; + } + + @Override + public Iterator<Service> iterator() { + return list.iterator(); + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Token.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Token.java new file mode 100644 index 0000000..aee6fe5 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Token.java @@ -0,0 +1,370 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.Calendar; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("token") +@JsonIgnoreProperties(ignoreUnknown=true) +public class Token implements Serializable { + + private String id; + + @JsonProperty("expires_at") + private Calendar expiresAt; + + @JsonProperty("issued_at") + private Calendar issuedAt; + + private List<String> methods; + + @JsonIgnoreProperties(ignoreUnknown=true) + public static final class Domain { + + private String id; + + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + } + + private Domain domain; + + @JsonIgnoreProperties(ignoreUnknown=true) + public static final class Project { + + private Domain domain; + + private String id; + + private String name; + + public Domain getDomain() { + return domain; + } + + public void setDomain(Domain domain) { + this.domain = domain; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + } + + private Project project; + + @JsonIgnoreProperties(ignoreUnknown=true) + public static final class User { + + @JsonIgnoreProperties(ignoreUnknown=true) + private static final class Domain { + + private String id; + + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + } + + private String id; + + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + } + + private User user; + + @JsonIgnoreProperties(ignoreUnknown=true) + public static final class Role { + + private String id; + + private String name; + + } + + private List<Role> roles; + + public static final class Service { + + public static final class Endpoint { + + private String id; + + private String url; + + private String region; + + private Boolean enabled; + + @JsonProperty("legacy_endpoint_id") + private String legacyEndpointId; + + @JsonProperty("interface") + private String iface; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public String getLegacyEndpointId() { + return legacyEndpointId; + } + + public void setLegacyEndpointId(String legacyEndpointId) { + this.legacyEndpointId = legacyEndpointId; + } + + public String getInterface() { + return iface; + } + + public void setInterface(String iface) { + this.iface = iface; + } + + } + + private String id; + + private String type; + + private List<Endpoint> endpoints; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public List<Endpoint> getEndpoints() { + return endpoints; + } + + public void setEndpoints(List<Endpoint> endpoints) { + this.endpoints = endpoints; + } + + } + + private List<Service> catalog; + + + public String getId() { + return id; + } + + + + public void setId(String id) { + this.id = id; + } + + + + public Calendar getExpiresAt() { + return expiresAt; + } + + + + public void setExpiresAt(Calendar expiresAt) { + this.expiresAt = expiresAt; + } + + + + public Calendar getIssuedAt() { + return issuedAt; + } + + + + public void setIssuedAt(Calendar issuedAt) { + this.issuedAt = issuedAt; + } + + + + public List<String> getMethods() { + return methods; + } + + + + public void setMethods(List<String> methods) { + this.methods = methods; + } + + + + public Domain getDomain() { + return domain; + } + + + + public void setDomain(Domain domain) { + this.domain = domain; + } + + + + public Project getProject() { + return project; + } + + + + public void setProject(Project project) { + this.project = project; + } + + + + public User getUser() { + return user; + } + + + + public void setUser(User user) { + this.user = user; + } + + + + public List<Role> getRoles() { + return roles; + } + + + + public void setRoles(List<Role> roles) { + this.roles = roles; + } + + + + public List<Service> getCatalog() { + return catalog; + } + + + + public void setCatalog(List<Service> catalog) { + this.catalog = catalog; + } + + + @Override + public String toString() { + return "Token [id=" + id + ", expiresAt=" + expiresAt + ", issuedAt=" + + issuedAt + ", methods=" + methods + ", domain=" + domain + + ", project=" + project + ", user=" + user + ", roles=" + + roles + ", catalog=" + catalog + "]"; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/User.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/User.java new file mode 100644 index 0000000..3b1787b --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/User.java @@ -0,0 +1,91 @@ +package com.woorea.openstack.keystone.v3.model; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("user") +public class User { + + private String id; + + @JsonProperty("domain_id") + private String domainId; + + @JsonProperty("default_project_id") + private String defaultProjectId; + + private String name; + + private String password; + + private String email; + + private String description; + + private Boolean enabled; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDomainId() { + return domainId; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + public String getDefaultProjectId() { + return defaultProjectId; + } + + public void setDefaultProjectId(String defaultProjectId) { + this.defaultProjectId = defaultProjectId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + +} diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Users.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Users.java new file mode 100644 index 0000000..fa3c6d4 --- /dev/null +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Users.java @@ -0,0 +1,36 @@ +package com.woorea.openstack.keystone.v3.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +import com.woorea.openstack.keystone.model.User; + +public class Users implements Iterable<User>, Serializable { + + @JsonProperty("users") + private List<User> list; + + /** + * @return the list + */ + public List<User> getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Users [list=" + list + "]"; + } + + @Override + public Iterator<User> iterator() { + return list.iterator(); + } + +} |