Class AttributeContext.Types.Resource (2.10.0)

public sealed class AttributeContext.Types.Resource : IMessage<AttributeContext.Types.Resource>, IEquatable<AttributeContext.Types.Resource>, IDeepCloneable<AttributeContext.Types.Resource>, IBufferMessage, IMessage

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.

Inheritance

object > AttributeContext.Types.Resource

Namespace

Google.Rpc.Context

Assembly

Google.Api.CommonProtos.dll

Constructors

Resource()

public Resource()

Resource(Resource)

public Resource(AttributeContext.Types.Resource other)
Parameter
NameDescription
otherAttributeContextTypesResource

Fields

AnnotationsFieldNumber

public const int AnnotationsFieldNumber = 6

Field number for the "annotations" field.

Field Value
TypeDescription
int

CreateTimeFieldNumber

public const int CreateTimeFieldNumber = 8

Field number for the "create_time" field.

Field Value
TypeDescription
int

DeleteTimeFieldNumber

public const int DeleteTimeFieldNumber = 10

Field number for the "delete_time" field.

Field Value
TypeDescription
int

DisplayNameFieldNumber

public const int DisplayNameFieldNumber = 7

Field number for the "display_name" field.

Field Value
TypeDescription
int

EtagFieldNumber

public const int EtagFieldNumber = 11

Field number for the "etag" field.

Field Value
TypeDescription
int

LabelsFieldNumber

public const int LabelsFieldNumber = 4

Field number for the "labels" field.

Field Value
TypeDescription
int

LocationFieldNumber

public const int LocationFieldNumber = 12

Field number for the "location" field.

Field Value
TypeDescription
int

NameFieldNumber

public const int NameFieldNumber = 2

Field number for the "name" field.

Field Value
TypeDescription
int

ServiceFieldNumber

public const int ServiceFieldNumber = 1

Field number for the "service" field.

Field Value
TypeDescription
int

TypeFieldNumber

public const int TypeFieldNumber = 3

Field number for the "type" field.

Field Value
TypeDescription
int

UidFieldNumber

public const int UidFieldNumber = 5

Field number for the "uid" field.

Field Value
TypeDescription
int

UpdateTimeFieldNumber

public const int UpdateTimeFieldNumber = 9

Field number for the "update_time" field.

Field Value
TypeDescription
int

Properties

Annotations

public MapField<string, string> Annotations { get; }

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

Property Value
TypeDescription
MapFieldstringstring

CreateTime

public Timestamp CreateTime { get; set; }

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

Property Value
TypeDescription
Timestamp

DeleteTime

public Timestamp DeleteTime { get; set; }

Output only. The timestamp when the resource was deleted. If the resource is not deleted, this must be empty.

Property Value
TypeDescription
Timestamp

Descriptor

public static MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
MessageDescriptor

DisplayName

public string DisplayName { get; set; }

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

Property Value
TypeDescription
string

Etag

public string Etag { get; set; }

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.

Property Value
TypeDescription
string

Labels

public MapField<string, string> Labels { get; }

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

Property Value
TypeDescription
MapFieldstringstring

Location

public string Location { get; set; }

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.

Property Value
TypeDescription
string

Name

public string Name { get; set; }

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.

Property Value
TypeDescription
string

Parser

public static MessageParser<AttributeContext.Types.Resource> Parser { get; }
Property Value
TypeDescription
MessageParserAttributeContextTypesResource

Service

public string Service { get; set; }

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.

Property Value
TypeDescription
string

Type

public string Type { get; set; }

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

Property Value
TypeDescription
string

Uid

public string Uid { get; set; }

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.

Property Value
TypeDescription
string

UpdateTime

public Timestamp UpdateTime { get; set; }

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.

Property Value
TypeDescription
Timestamp

Methods

CalculateSize()

public int CalculateSize()
Returns
TypeDescription
int

Clone()

public AttributeContext.Types.Resource Clone()
Returns
TypeDescription
AttributeContextTypesResource

Equals(Resource)

public bool Equals(AttributeContext.Types.Resource other)
Parameter
NameDescription
otherAttributeContextTypesResource
Returns
TypeDescription
bool

Equals(object)

public override bool Equals(object other)
Parameter
NameDescription
otherobject
Returns
TypeDescription
bool
Overrides

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
int
Overrides

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream

MergeFrom(Resource)

public void MergeFrom(AttributeContext.Types.Resource other)
Parameter
NameDescription
otherAttributeContextTypesResource

ToString()

public override string ToString()
Returns
TypeDescription
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream