public class Resource
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Represents a resource.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
id
The resource's identifier.
|
private java.lang.String |
parentId
The parent resource's identifier.
|
private java.lang.String |
path
The full path for this resource.
|
private java.lang.String |
pathPart
The last path segment for this resource.
|
private java.util.Map<java.lang.String,Method> |
resourceMethods
Map of methods for this resource, which is included only if the request
uses the embed query option.
|
Constructor and Description |
---|
Resource() |
Modifier and Type | Method and Description |
---|---|
Resource |
addResourceMethodsEntry(java.lang.String key,
Method value) |
Resource |
clearResourceMethodsEntries()
Removes all the entries added into ResourceMethods.
|
Resource |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getId()
The resource's identifier.
|
java.lang.String |
getParentId()
The parent resource's identifier.
|
java.lang.String |
getPath()
The full path for this resource.
|
java.lang.String |
getPathPart()
The last path segment for this resource.
|
java.util.Map<java.lang.String,Method> |
getResourceMethods()
Map of methods for this resource, which is included only if the request
uses the embed query option.
|
int |
hashCode() |
void |
setId(java.lang.String id)
The resource's identifier.
|
void |
setParentId(java.lang.String parentId)
The parent resource's identifier.
|
void |
setPath(java.lang.String path)
The full path for this resource.
|
void |
setPathPart(java.lang.String pathPart)
The last path segment for this resource.
|
void |
setResourceMethods(java.util.Map<java.lang.String,Method> resourceMethods)
Map of methods for this resource, which is included only if the request
uses the embed query option.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Resource |
withId(java.lang.String id)
The resource's identifier.
|
Resource |
withParentId(java.lang.String parentId)
The parent resource's identifier.
|
Resource |
withPath(java.lang.String path)
The full path for this resource.
|
Resource |
withPathPart(java.lang.String pathPart)
The last path segment for this resource.
|
Resource |
withResourceMethods(java.util.Map<java.lang.String,Method> resourceMethods)
Map of methods for this resource, which is included only if the request
uses the embed query option.
|
private java.lang.String id
The resource's identifier.
private java.lang.String parentId
The parent resource's identifier.
private java.lang.String pathPart
The last path segment for this resource.
private java.lang.String path
The full path for this resource.
private java.util.Map<java.lang.String,Method> resourceMethods
Map of methods for this resource, which is included only if the request uses the embed query option.
public void setId(java.lang.String id)
The resource's identifier.
id
- The resource's identifier.public java.lang.String getId()
The resource's identifier.
public Resource withId(java.lang.String id)
The resource's identifier.
id
- The resource's identifier.public void setParentId(java.lang.String parentId)
The parent resource's identifier.
parentId
- The parent resource's identifier.public java.lang.String getParentId()
The parent resource's identifier.
public Resource withParentId(java.lang.String parentId)
The parent resource's identifier.
parentId
- The parent resource's identifier.public void setPathPart(java.lang.String pathPart)
The last path segment for this resource.
pathPart
- The last path segment for this resource.public java.lang.String getPathPart()
The last path segment for this resource.
public Resource withPathPart(java.lang.String pathPart)
The last path segment for this resource.
pathPart
- The last path segment for this resource.public void setPath(java.lang.String path)
The full path for this resource.
path
- The full path for this resource.public java.lang.String getPath()
The full path for this resource.
public Resource withPath(java.lang.String path)
The full path for this resource.
path
- The full path for this resource.public java.util.Map<java.lang.String,Method> getResourceMethods()
Map of methods for this resource, which is included only if the request uses the embed query option.
public void setResourceMethods(java.util.Map<java.lang.String,Method> resourceMethods)
Map of methods for this resource, which is included only if the request uses the embed query option.
resourceMethods
- Map of methods for this resource, which is included only if the
request uses the embed query option.public Resource withResourceMethods(java.util.Map<java.lang.String,Method> resourceMethods)
Map of methods for this resource, which is included only if the request uses the embed query option.
resourceMethods
- Map of methods for this resource, which is included only if the
request uses the embed query option.public Resource clearResourceMethodsEntries()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Resource clone()
clone
in class java.lang.Object