Package com.azure.data.cosmos
Class Resource
- java.lang.Object
-
- com.azure.data.cosmos.JsonSerializable
-
- com.azure.data.cosmos.Resource
-
- Direct Known Subclasses:
CosmosConflictProperties
,CosmosContainerProperties
,CosmosDatabaseProperties
,CosmosError
,CosmosItemProperties
,CosmosPermissionProperties
,CosmosStoredProcedureProperties
,CosmosTriggerProperties
,CosmosUserDefinedFunctionProperties
,CosmosUserProperties
,DatabaseAccount
public class Resource extends JsonSerializable
Represents the base resource in the Azure Cosmos DB database service.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
etag()
Get the entity tag associated with the resource.String
id()
Gets the name of the resource.Resource
id(String id)
Sets the name of the resource.String
resourceId()
Gets the ID associated with the resource.Resource
resourceId(String resourceId)
Set the ID associated with the resource.String
selfLink()
Get the self-link associated with the resource.OffsetDateTime
timestamp()
Get the last modified timestamp associated with the resource.-
Methods inherited from class com.azure.data.cosmos.JsonSerializable
get, getBoolean, getCollection, getDouble, getInt, getList, getLogger, getLong, getMap, getObject, getObjectByPath, getString, has, toJson, toJson, toObject, toString
-
-
-
-
Constructor Detail
-
Resource
protected Resource(Resource resource)
Copy constructor.- Parameters:
resource
- resource to by copied.
-
Resource
protected Resource()
Constructor.
-
Resource
protected Resource(String jsonString)
Constructor.- Parameters:
jsonString
- the json string that represents the resource.
-
-
Method Detail
-
id
public String id()
Gets the name of the resource.- Returns:
- the name of the resource.
-
id
public Resource id(String id)
Sets the name of the resource.- Parameters:
id
- the name of the resource.- Returns:
- the resource.
-
resourceId
public String resourceId()
Gets the ID associated with the resource.- Returns:
- the ID associated with the resource.
-
resourceId
public Resource resourceId(String resourceId)
Set the ID associated with the resource.- Parameters:
resourceId
- the ID associated with the resource.- Returns:
- the resource.
-
selfLink
public String selfLink()
Get the self-link associated with the resource.- Returns:
- the self link.
-
timestamp
public OffsetDateTime timestamp()
Get the last modified timestamp associated with the resource.- Returns:
- the timestamp.
-
etag
public String etag()
Get the entity tag associated with the resource.- Returns:
- the e tag.
-
-