Package org.jclouds.openstack.domain
Class Link
java.lang.Object
org.jclouds.openstack.domain.Link
For convenience, resources contain links to themselves. This allows a client to easily obtain a
resource URIs rather than to construct them.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
Relations associated with resources. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Link.Builder
builder()
static Link
create
(Link.Relation relation, String type, URI href) static Link
create
(Link.Relation relation, URI href) boolean
getHref()
There are three kinds of link relations associated with resources.getType()
int
hashCode()
toString()
-
Field Details
-
relation
-
type
-
href
-
-
Constructor Details
-
Link
@ConstructorProperties({"rel","type","href"}) protected Link(Link.Relation relation, @Nullable String type, URI href)
-
-
Method Details
-
create
-
create
-
builder
-
toBuilder
-
getRelation
There are three kinds of link relations associated with resources. A self link contains a versioned link to the resource. These links should be used in cases where the link will be followed immediately. A bookmark link provides a permanent link to a resource that is appropriate for long term storage. An alternate link can contain an alternate representation of the resource. For example, an OpenStack Compute image may have an alternate representation in the OpenStack Image service. Note that the type attribute here is used to provide a hint as to the type of representation to expect when following the link.- Returns:
- the relation of the resource in the current OpenStack deployment
-
getType
- Returns:
- the type of the resource or null if not specified
-
getHref
- Returns:
- the href of the resource
-
equals
-
hashCode
public int hashCode() -
toString
-