Package com.azure.cosmos.models
Class CosmosItemResponse<T>
- java.lang.Object
-
- com.azure.cosmos.models.CosmosItemResponse<T>
-
- Type Parameters:
T
- the type parameter
public class CosmosItemResponse<T> extends Object
The type Cosmos item response. This contains the item and response methods
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getActivityId()
Gets the Activity ID for the request.String
getCurrentResourceQuotaUsage()
Gets the current size of this entity (in megabytes (MB) for server resources and in count for master resources)CosmosDiagnostics
getDiagnostics()
Gets the diagnostics information for the current request to Azure Cosmos DB service.Duration
getDuration()
Gets the end-to-end request latency for the current request to Azure Cosmos DB service.String
getETag()
Gets the ETag from the response headers.T
getItem()
Gets the resource.String
getMaxResourceQuota()
Gets the maximum size limit for this entity (in megabytes (MB) for server resources and in count for master resources).double
getRequestCharge()
Gets the request charge as request units (RU) consumed by the operation.Map<String,String>
getResponseHeaders()
Gets the headers associated with the response.String
getSessionToken()
Gets the token used for managing client's consistency requirements.int
getStatusCode()
Gets the HTTP status code associated with the response.
-
-
-
Method Detail
-
getItem
public T getItem()
Gets the resource.- Returns:
- the resource
-
getMaxResourceQuota
public String getMaxResourceQuota()
Gets the maximum size limit for this entity (in megabytes (MB) for server resources and in count for master resources).- Returns:
- the max resource quota.
-
getCurrentResourceQuotaUsage
public String getCurrentResourceQuotaUsage()
Gets the current size of this entity (in megabytes (MB) for server resources and in count for master resources)- Returns:
- the current resource quota usage.
-
getActivityId
public String getActivityId()
Gets the Activity ID for the request.- Returns:
- the activity getId.
-
getRequestCharge
public double getRequestCharge()
Gets the request charge as request units (RU) consumed by the operation.For more information about the RU and factors that can impact the effective charges please visit Request Units in Azure Cosmos DB
- Returns:
- the request charge.
-
getStatusCode
public int getStatusCode()
Gets the HTTP status code associated with the response.- Returns:
- the status code.
-
getSessionToken
public String getSessionToken()
Gets the token used for managing client's consistency requirements.- Returns:
- the session token.
-
getResponseHeaders
public Map<String,String> getResponseHeaders()
Gets the headers associated with the response.- Returns:
- the response headers.
-
getDiagnostics
public CosmosDiagnostics getDiagnostics()
Gets the diagnostics information for the current request to Azure Cosmos DB service.- Returns:
- diagnostics information for the current request to Azure Cosmos DB service.
-
getDuration
public Duration getDuration()
Gets the end-to-end request latency for the current request to Azure Cosmos DB service.- Returns:
- end-to-end request latency for the current request to Azure Cosmos DB service.
-
getETag
public String getETag()
Gets the ETag from the response headers. This is only relevant when getting response from the server. Null in case of delete operation.- Returns:
- ETag
-
-