Copied!

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

CloneableInstantiable
Methods
public __construct( $data = NULL)
 

Constructor.

  • param array $data { 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/concepts/overview/working-with-objects/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.
    
    }
public Google\Protobuf\Internal\Message::__debugInfo()
public Google\Protobuf\Internal\Message::byteSize()
 
  • ignore
public Google\Protobuf\Internal\Message::clear()
 

Clear all containing fields.

  • return null
public clearCreateTime()
public clearDeleteTime()
public clearUpdateTime()
public Google\Protobuf\Internal\Message::discardUnknownFields()
 

Clear all unknown fields previously parsed.

  • return null
public 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.

They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/

Generated from protobuf field map<string, string> annotations = 6;

  • return \Google\Protobuf\Internal\MapField
public getCreateTime()
 

Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.

Generated from protobuf field .google.protobuf.Timestamp create_time = 8;

  • return \Google\Protobuf\Timestamp|null
public getDeleteTime()
 

Output only. The timestamp when the resource was deleted.

If the resource is not deleted, this must be empty.

Generated from protobuf field .google.protobuf.Timestamp delete_time = 10;

  • return \Google\Protobuf\Timestamp|null
public getDisplayName()
 

Mutable. The display name set by clients. Must be <= 63 characters.

Generated from protobuf field string display_name = 7;

  • return string
public getEtag()
 

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.

Generated from protobuf field string etag = 11;

  • return string
public getLabels()
 

The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.

Generated from protobuf field map<string, string> labels = 4;

  • return \Google\Protobuf\Internal\MapField
public getLocation()
 

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.

Generated from protobuf field string location = 12;

  • return string
public getName()
 

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.

Generated from protobuf field string name = 2;

  • return string
public getService()
 

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.

Generated from protobuf field string service = 1;

  • return string
public getType()
 

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".

Generated from protobuf field string type = 3;

  • return string
public getUid()
 

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.

Generated from protobuf field string uid = 5;

  • return string
public getUpdateTime()
 

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.

Generated from protobuf field .google.protobuf.Timestamp update_time = 9;

  • return \Google\Protobuf\Timestamp|null
public hasCreateTime()
public hasDeleteTime()
public hasUpdateTime()
public Google\Protobuf\Internal\Message::jsonByteSize( $options = 0)
 
  • ignore
public Google\Protobuf\Internal\Message::mergeFrom( $msg)
 

Merges the contents of the specified message into current message.

This method merges the contents of the specified message into the current message. Singular fields that are set in the specified message overwrite the corresponding fields in the current message. Repeated fields are appended. Map fields key-value pairs are overwritten. Singular/Oneof sub-messages are recursively merged. All overwritten sub-messages are deep-copied.

  • param object $msg Protobuf message to be merged from.
  • return null
public Google\Protobuf\Internal\Message::mergeFromJsonString( $data, $ignore_unknown = false)
 

Parses a json string to protobuf message.

This function takes a string in the json wire format, matching the encoding output by serializeToJsonString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Json protobuf data.
  • param bool $ignore_unknown
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::mergeFromString( $data)
 

Parses a protocol buffer contained in a string.

This function takes a string in the (non-human-readable) binary wire format, matching the encoding output by serializeToString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Binary protobuf data.
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::parseFromJsonStream( $input, $ignore_unknown)
 
  • ignore
public Google\Protobuf\Internal\Message::parseFromStream( $input)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonString( $options = 0)
 

Serialize the message to json string.

  • return string Serialized json protobuf data.
public Google\Protobuf\Internal\Message::serializeToStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToString()
 

Serialize the message to string.

  • return string Serialized binary protobuf data.
public setAnnotations( $var)
 

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/concepts/overview/working-with-objects/annotations/

Generated from protobuf field map<string, string> annotations = 6;

  • param array|\Google\Protobuf\Internal\MapField $var
  • return $this
public setCreateTime( $var)
 

Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.

Generated from protobuf field .google.protobuf.Timestamp create_time = 8;

  • param \Google\Protobuf\Timestamp $var
  • return $this
public setDeleteTime( $var)
 

Output only. The timestamp when the resource was deleted.

If the resource is not deleted, this must be empty.

Generated from protobuf field .google.protobuf.Timestamp delete_time = 10;

  • param \Google\Protobuf\Timestamp $var
  • return $this
public setDisplayName( $var)
 

Mutable. The display name set by clients. Must be <= 63 characters.

Generated from protobuf field string display_name = 7;

  • param string $var
  • return $this
public setEtag( $var)
 

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.

Generated from protobuf field string etag = 11;

  • param string $var
  • return $this
public setLabels( $var)
 

The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.

Generated from protobuf field map<string, string> labels = 4;

  • param array|\Google\Protobuf\Internal\MapField $var
  • return $this
public setLocation( $var)
 

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.

Generated from protobuf field string location = 12;

  • param string $var
  • return $this
public setName( $var)
 

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.

Generated from protobuf field string name = 2;

  • param string $var
  • return $this
public setService( $var)
 

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.

Generated from protobuf field string service = 1;

  • param string $var
  • return $this
public setType( $var)
 

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".

Generated from protobuf field string type = 3;

  • param string $var
  • return $this
public setUid( $var)
 

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.

Generated from protobuf field string uid = 5;

  • param string $var
  • return $this
public setUpdateTime( $var)
 

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.

Generated from protobuf field .google.protobuf.Timestamp update_time = 9;

  • param \Google\Protobuf\Timestamp $var
  • return $this
Properties
protected $create_time = NULL
 

Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.

Generated from protobuf field .google.protobuf.Timestamp create_time = 8;

protected $delete_time = NULL
 

Output only. The timestamp when the resource was deleted.

If the resource is not deleted, this must be empty.

Generated from protobuf field .google.protobuf.Timestamp delete_time = 10;

protected $display_name = ''
 

Mutable. The display name set by clients. Must be <= 63 characters.

Generated from protobuf field string display_name = 7;

protected $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.

Generated from protobuf field string etag = 11;

protected $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.

Generated from protobuf field string location = 12;

protected $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.

Generated from protobuf field string name = 2;

protected $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.

Generated from protobuf field string service = 1;

protected $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".

Generated from protobuf field string type = 3;

protected $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.

Generated from protobuf field string uid = 5;

protected $update_time = NULL
 

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.

Generated from protobuf field .google.protobuf.Timestamp update_time = 9;

Methods
protected Google\Protobuf\Internal\Message::hasOneof( $number)
protected Google\Protobuf\Internal\Message::mergeFromArray(array $array)
 

Populates the message from a user-supplied PHP array. Array keys correspond to Message properties and nested message properties.

Example:

$message->mergeFromArray([
    'name' => 'This is a message name',
    'interval' => [
         'startTime' => time() - 60,
         'endTime' => time(),
    ]
]);

This method will trigger an error if it is passed data that cannot be converted to the correct type. For example, a StringValue field must receive data that is either a string or a StringValue object.

  • param array $array An array containing message properties and values.
  • return null
protected Google\Protobuf\Internal\Message::mergeFromJsonArray( $array, $ignore_unknown)
protected Google\Protobuf\Internal\Message::readOneof( $number)
protected Google\Protobuf\Internal\Message::readWrapperValue( $member)
protected Google\Protobuf\Internal\Message::whichOneof( $oneof_name)
protected Google\Protobuf\Internal\Message::writeOneof( $number, $value)
protected Google\Protobuf\Internal\Message::writeWrapperValue( $member, $value)
Properties
private $annotations = NULL
 

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/concepts/overview/working-with-objects/annotations/

Generated from protobuf field map<string, string> annotations = 6;

private $labels = NULL
 

The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.

Generated from protobuf field map<string, string> labels = 4;

© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration