Resource
extends Message
in package
This message defines core attributes for a resource. A resource is an addressable (named) entity provided by the destination service. For example, a file stored on a network storage service.
Generated from protobuf message google.rpc.context.AttributeContext.Resource
Table of Contents
Properties
- $create_time : mixed
- Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.
- $delete_time : mixed
- Output only. The timestamp when the resource was deleted.
- $display_name : mixed
- Mutable. The display name set by clients. Must be <= 63 characters.
- $etag : mixed
- Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written.
- $location : mixed
- Immutable. The location of the resource. The location encoding is specific to the service provider, and new encoding may be introduced as the service evolves.
- $name : mixed
- The stable identifier (name) of a resource on the `service`. A resource can be logically identified as "//{resource.service}/{resource.name}".
- $service : mixed
- The name of the service that this resource belongs to, such as `pubsub.googleapis.com`. The service may be different from the DNS hostname that actually serves the request.
- $type : mixed
- The type of the resource. The syntax is platform-specific because different platforms define their resources differently.
- $uid : mixed
- The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4.
- $update_time : mixed
- Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value.
- $annotations : mixed
- Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
- $labels : mixed
- The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.
Methods
- __construct() : mixed
- Constructor.
- clearCreateTime() : mixed
- clearDeleteTime() : mixed
- clearUpdateTime() : mixed
- getAnnotations() : MapField
- Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
- getCreateTime() : Timestamp|null
- Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.
- getDeleteTime() : Timestamp|null
- Output only. The timestamp when the resource was deleted.
- getDisplayName() : string
- Mutable. The display name set by clients. Must be <= 63 characters.
- getEtag() : string
- Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written.
- getLabels() : MapField
- The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.
- getLocation() : string
- Immutable. The location of the resource. The location encoding is specific to the service provider, and new encoding may be introduced as the service evolves.
- getName() : string
- The stable identifier (name) of a resource on the `service`. A resource can be logically identified as "//{resource.service}/{resource.name}".
- getService() : string
- The name of the service that this resource belongs to, such as `pubsub.googleapis.com`. The service may be different from the DNS hostname that actually serves the request.
- getType() : string
- The type of the resource. The syntax is platform-specific because different platforms define their resources differently.
- getUid() : string
- The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4.
- getUpdateTime() : Timestamp|null
- Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value.
- hasCreateTime() : mixed
- hasDeleteTime() : mixed
- hasUpdateTime() : mixed
- setAnnotations() : $this
- Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
- setCreateTime() : $this
- Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.
- setDeleteTime() : $this
- Output only. The timestamp when the resource was deleted.
- setDisplayName() : $this
- Mutable. The display name set by clients. Must be <= 63 characters.
- setEtag() : $this
- Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written.
- setLabels() : $this
- The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.
- setLocation() : $this
- Immutable. The location of the resource. The location encoding is specific to the service provider, and new encoding may be introduced as the service evolves.
- setName() : $this
- The stable identifier (name) of a resource on the `service`. A resource can be logically identified as "//{resource.service}/{resource.name}".
- setService() : $this
- The name of the service that this resource belongs to, such as `pubsub.googleapis.com`. The service may be different from the DNS hostname that actually serves the request.
- setType() : $this
- The type of the resource. The syntax is platform-specific because different platforms define their resources differently.
- setUid() : $this
- The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4.
- setUpdateTime() : $this
- Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value.
Properties
$create_time
Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.
protected
mixed
$create_time
= null
Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"];
$delete_time
Output only. The timestamp when the resource was deleted.
protected
mixed
$delete_time
= null
If the resource is not deleted, this must be empty.
Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [json_name = "deleteTime"];
$display_name
Mutable. The display name set by clients. Must be <= 63 characters.
protected
mixed
$display_name
= ''
Generated from protobuf field string display_name = 7 [json_name = "displayName"];
$etag
Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written.
protected
mixed
$etag
= ''
Generated from protobuf field string etag = 11 [json_name = "etag"];
$location
Immutable. The location of the resource. The location encoding is specific to the service provider, and new encoding may be introduced as the service evolves.
protected
mixed
$location
= ''
For Google Cloud products, the encoding is what is used by Google Cloud
APIs, such as us-east1, aws-us-east-1, and azure-eastus2. The
semantics of location is identical to the
cloud.googleapis.com/location label used by some Google Cloud APIs.
Generated from protobuf field string location = 12 [json_name = "location"];
$name
The stable identifier (name) of a resource on the `service`. A resource can be logically identified as "//{resource.service}/{resource.name}".
protected
mixed
$name
= ''
The differences between a resource name and a URI are:
- Resource name is a logical identifier, independent of network
protocol and API version. For example,
//pubsub.googleapis.com/projects/123/topics/news-feed. - URI often includes protocol and version information, so it can
be used directly by applications. For example,
https://pubsub.googleapis.com/v1/projects/123/topics/news-feed. See https://cloud.google.com/apis/design/resource_names for details.
Generated from protobuf field string name = 2 [json_name = "name"];
$service
The name of the service that this resource belongs to, such as `pubsub.googleapis.com`. The service may be different from the DNS hostname that actually serves the request.
protected
mixed
$service
= ''
Generated from protobuf field string service = 1 [json_name = "service"];
$type
The type of the resource. The syntax is platform-specific because different platforms define their resources differently.
protected
mixed
$type
= ''
For Google APIs, the type format must be "{service}/{kind}", such as "pubsub.googleapis.com/Topic".
Generated from protobuf field string type = 3 [json_name = "type"];
$uid
The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4.
protected
mixed
$uid
= ''
Generated from protobuf field string uid = 5 [json_name = "uid"];
$update_time
Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value.
protected
mixed
$update_time
= null
Changes to a resource made by the service should refresh this value.
Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"];
$annotations
Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
private
mixed
$annotations
They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/user-guide/annotations
Generated from protobuf field map<string, string> annotations = 6 [json_name = "annotations"];
$labels
The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.
private
mixed
$labels
Generated from protobuf field map<string, string> labels = 4 [json_name = "labels"];
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
- $data : array<string|int, mixed> = NULL
-
{ Optional. Data for populating the Message object.
@type string $service The name of the service that this resource belongs to, such as `pubsub.googleapis.com`. The service may be different from the DNS hostname that actually serves the request. @type string $name The stable identifier (name) of a resource on the `service`. A resource can be logically identified as "//{resource.service}/{resource.name}". The differences between a resource name and a URI are: * Resource name is a logical identifier, independent of network protocol and API version. For example, `//pubsub.googleapis.com/projects/123/topics/news-feed`. * URI often includes protocol and version information, so it can be used directly by applications. For example, `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`. See https://cloud.google.com/apis/design/resource_names for details. @type string $type The type of the resource. The syntax is platform-specific because different platforms define their resources differently. For Google APIs, the type format must be "{service}/{kind}", such as "pubsub.googleapis.com/Topic". @type array|\Google\Protobuf\Internal\MapField $labels The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels. @type string $uid The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4. @type array|\Google\Protobuf\Internal\MapField $annotations Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/user-guide/annotations @type string $display_name Mutable. The display name set by clients. Must be <= 63 characters. @type \Google\Protobuf\Timestamp $create_time Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed. @type \Google\Protobuf\Timestamp $update_time Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value. Changes to a resource made by the service should refresh this value. @type \Google\Protobuf\Timestamp $delete_time Output only. The timestamp when the resource was deleted. If the resource is not deleted, this must be empty. @type string $etag Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written. @type string $location Immutable. The location of the resource. The location encoding is specific to the service provider, and new encoding may be introduced as the service evolves. For Google Cloud products, the encoding is what is used by Google Cloud APIs, such as `us-east1`, `aws-us-east-1`, and `azure-eastus2`. The semantics of `location` is identical to the `cloud.googleapis.com/location` label used by some Google Cloud APIs.}
clearCreateTime()
public
clearCreateTime() : mixed
clearDeleteTime()
public
clearDeleteTime() : mixed
clearUpdateTime()
public
clearUpdateTime() : mixed
getAnnotations()
Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
public
getAnnotations() : MapField
They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/user-guide/annotations
Generated from protobuf field map<string, string> annotations = 6 [json_name = "annotations"];
Return values
MapFieldgetCreateTime()
Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.
public
getCreateTime() : Timestamp|null
Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"];
Return values
Timestamp|nullgetDeleteTime()
Output only. The timestamp when the resource was deleted.
public
getDeleteTime() : Timestamp|null
If the resource is not deleted, this must be empty.
Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [json_name = "deleteTime"];
Return values
Timestamp|nullgetDisplayName()
Mutable. The display name set by clients. Must be <= 63 characters.
public
getDisplayName() : string
Generated from protobuf field string display_name = 7 [json_name = "displayName"];
Return values
stringgetEtag()
Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written.
public
getEtag() : string
Generated from protobuf field string etag = 11 [json_name = "etag"];
Return values
stringgetLabels()
The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.
public
getLabels() : MapField
Generated from protobuf field map<string, string> labels = 4 [json_name = "labels"];
Return values
MapFieldgetLocation()
Immutable. The location of the resource. The location encoding is specific to the service provider, and new encoding may be introduced as the service evolves.
public
getLocation() : string
For Google Cloud products, the encoding is what is used by Google Cloud
APIs, such as us-east1, aws-us-east-1, and azure-eastus2. The
semantics of location is identical to the
cloud.googleapis.com/location label used by some Google Cloud APIs.
Generated from protobuf field string location = 12 [json_name = "location"];
Return values
stringgetName()
The stable identifier (name) of a resource on the `service`. A resource can be logically identified as "//{resource.service}/{resource.name}".
public
getName() : string
The differences between a resource name and a URI are:
- Resource name is a logical identifier, independent of network
protocol and API version. For example,
//pubsub.googleapis.com/projects/123/topics/news-feed. - URI often includes protocol and version information, so it can
be used directly by applications. For example,
https://pubsub.googleapis.com/v1/projects/123/topics/news-feed. See https://cloud.google.com/apis/design/resource_names for details.
Generated from protobuf field string name = 2 [json_name = "name"];
Return values
stringgetService()
The name of the service that this resource belongs to, such as `pubsub.googleapis.com`. The service may be different from the DNS hostname that actually serves the request.
public
getService() : string
Generated from protobuf field string service = 1 [json_name = "service"];
Return values
stringgetType()
The type of the resource. The syntax is platform-specific because different platforms define their resources differently.
public
getType() : string
For Google APIs, the type format must be "{service}/{kind}", such as "pubsub.googleapis.com/Topic".
Generated from protobuf field string type = 3 [json_name = "type"];
Return values
stringgetUid()
The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4.
public
getUid() : string
Generated from protobuf field string uid = 5 [json_name = "uid"];
Return values
stringgetUpdateTime()
Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value.
public
getUpdateTime() : Timestamp|null
Changes to a resource made by the service should refresh this value.
Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"];
Return values
Timestamp|nullhasCreateTime()
public
hasCreateTime() : mixed
hasDeleteTime()
public
hasDeleteTime() : mixed
hasUpdateTime()
public
hasUpdateTime() : mixed
setAnnotations()
Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
public
setAnnotations(array<string|int, mixed>|MapField $var) : $this
They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/user-guide/annotations
Generated from protobuf field map<string, string> annotations = 6 [json_name = "annotations"];
Parameters
- $var : array<string|int, mixed>|MapField
Return values
$thissetCreateTime()
Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.
public
setCreateTime(Timestamp $var) : $this
Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"];
Parameters
- $var : Timestamp
Return values
$thissetDeleteTime()
Output only. The timestamp when the resource was deleted.
public
setDeleteTime(Timestamp $var) : $this
If the resource is not deleted, this must be empty.
Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [json_name = "deleteTime"];
Parameters
- $var : Timestamp
Return values
$thissetDisplayName()
Mutable. The display name set by clients. Must be <= 63 characters.
public
setDisplayName(string $var) : $this
Generated from protobuf field string display_name = 7 [json_name = "displayName"];
Parameters
- $var : string
Return values
$thissetEtag()
Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written.
public
setEtag(string $var) : $this
Generated from protobuf field string etag = 11 [json_name = "etag"];
Parameters
- $var : string
Return values
$thissetLabels()
The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.
public
setLabels(array<string|int, mixed>|MapField $var) : $this
Generated from protobuf field map<string, string> labels = 4 [json_name = "labels"];
Parameters
- $var : array<string|int, mixed>|MapField
Return values
$thissetLocation()
Immutable. The location of the resource. The location encoding is specific to the service provider, and new encoding may be introduced as the service evolves.
public
setLocation(string $var) : $this
For Google Cloud products, the encoding is what is used by Google Cloud
APIs, such as us-east1, aws-us-east-1, and azure-eastus2. The
semantics of location is identical to the
cloud.googleapis.com/location label used by some Google Cloud APIs.
Generated from protobuf field string location = 12 [json_name = "location"];
Parameters
- $var : string
Return values
$thissetName()
The stable identifier (name) of a resource on the `service`. A resource can be logically identified as "//{resource.service}/{resource.name}".
public
setName(string $var) : $this
The differences between a resource name and a URI are:
- Resource name is a logical identifier, independent of network
protocol and API version. For example,
//pubsub.googleapis.com/projects/123/topics/news-feed. - URI often includes protocol and version information, so it can
be used directly by applications. For example,
https://pubsub.googleapis.com/v1/projects/123/topics/news-feed. See https://cloud.google.com/apis/design/resource_names for details.
Generated from protobuf field string name = 2 [json_name = "name"];
Parameters
- $var : string
Return values
$thissetService()
The name of the service that this resource belongs to, such as `pubsub.googleapis.com`. The service may be different from the DNS hostname that actually serves the request.
public
setService(string $var) : $this
Generated from protobuf field string service = 1 [json_name = "service"];
Parameters
- $var : string
Return values
$thissetType()
The type of the resource. The syntax is platform-specific because different platforms define their resources differently.
public
setType(string $var) : $this
For Google APIs, the type format must be "{service}/{kind}", such as "pubsub.googleapis.com/Topic".
Generated from protobuf field string type = 3 [json_name = "type"];
Parameters
- $var : string
Return values
$thissetUid()
The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4.
public
setUid(string $var) : $this
Generated from protobuf field string uid = 5 [json_name = "uid"];
Parameters
- $var : string
Return values
$thissetUpdateTime()
Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value.
public
setUpdateTime(Timestamp $var) : $this
Changes to a resource made by the service should refresh this value.
Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"];
Parameters
- $var : Timestamp