org.jclouds.openstack.v2_0.domain
Class Resource

java.lang.Object
  extended by org.jclouds.openstack.v2_0.domain.Resource
All Implemented Interfaces:
Comparable<Resource>
Direct Known Subclasses:
ApiMetadata, Extension

public class Resource
extends Object
implements Comparable<Resource>

Resource found in a paginated collection

Author:
AdrianCole
See Also:

Nested Class Summary
static class Resource.Builder<T extends Resource.Builder<T>>
           
 
Constructor Summary
protected Resource(String id, String name, Set<Link> links)
           
 
Method Summary
static Resource.Builder<?> builder()
           
 int compareTo(Resource that)
           
 boolean equals(Object obj)
           
 String getId()
          When providing an ID, it is assumed that the resource exists in the current OpenStack deployment
 Set<Link> getLinks()
           
 String getName()
           
 int hashCode()
           
protected  com.google.common.base.Objects.ToStringHelper string()
           
 Resource.Builder<?> toBuilder()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resource

@ConstructorProperties(value={"id","name","links"})
protected Resource(String id,
                                              @Nullable
                                              String name,
                                              @Nullable
                                              Set<Link> links)
Method Detail

builder

public static Resource.Builder<?> builder()

toBuilder

public Resource.Builder<?> toBuilder()

getId

public String getId()
When providing an ID, it is assumed that the resource exists in the current OpenStack deployment

Returns:
the id of the resource in the current OpenStack deployment

getName

@Nullable
public String getName()
Returns:
the name of the resource

getLinks

public Set<Link> getLinks()
Returns:
the links of the id address allocated to the new server

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

string

protected com.google.common.base.Objects.ToStringHelper string()

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Resource that)
Specified by:
compareTo in interface Comparable<Resource>


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.