Class AttributeContext.Types.Resource (2.15.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
Name Description
other AttributeContextTypesResource

Fields

AnnotationsFieldNumber

public const int AnnotationsFieldNumber = 6

Field number for the "annotations" field.

Field Value
Type Description
int

CreateTimeFieldNumber

public const int CreateTimeFieldNumber = 8

Field number for the "create_time" field.

Field Value
Type Description
int

DeleteTimeFieldNumber

public const int DeleteTimeFieldNumber = 10

Field number for the "delete_time" field.

Field Value
Type Description
int

DisplayNameFieldNumber

public const int DisplayNameFieldNumber = 7

Field number for the "display_name" field.

Field Value
Type Description
int

EtagFieldNumber

public const int EtagFieldNumber = 11

Field number for the "etag" field.

Field Value
Type Description
int

LabelsFieldNumber

public const int LabelsFieldNumber = 4

Field number for the "labels" field.

Field Value
Type Description
int

LocationFieldNumber

public const int LocationFieldNumber = 12

Field number for the "location" field.

Field Value
Type Description
int

NameFieldNumber

public const int NameFieldNumber = 2

Field number for the "name" field.

Field Value
Type Description
int

ServiceFieldNumber

public const int ServiceFieldNumber = 1

Field number for the "service" field.

Field Value
Type Description
int

TypeFieldNumber

public const int TypeFieldNumber = 3

Field number for the "type" field.

Field Value
Type Description
int

UidFieldNumber

public const int UidFieldNumber = 5

Field number for the "uid" field.

Field Value
Type Description
int

UpdateTimeFieldNumber

public const int UpdateTimeFieldNumber = 9

Field number for the "update_time" field.

Field Value
Type Description
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
Type Description
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
Type Description
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
Type Description
Timestamp

Descriptor

public static MessageDescriptor Descriptor { get; }
Property Value
Type Description
MessageDescriptor

DisplayName

public string DisplayName { get; set; }

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

Property Value
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
string

Parser

public static MessageParser<AttributeContext.Types.Resource> Parser { get; }
Property Value
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
Timestamp

Methods

CalculateSize()

public int CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

Returns
Type Description
int

The number of bytes required to write this message to a coded output stream.

Clone()

public AttributeContext.Types.Resource Clone()

Creates a deep clone of this object.

Returns
Type Description
AttributeContextTypesResource

A deep clone of this object.

Equals(Resource)

public bool Equals(AttributeContext.Types.Resource other)
Parameter
Name Description
other AttributeContextTypesResource
Returns
Type Description
bool

Equals(object)

public override bool Equals(object other)
Parameter
Name Description
other object
Returns
Type Description
bool
Overrides

GetHashCode()

public override int GetHashCode()
Returns
Type Description
int
Overrides

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)

Merges the data from the specified coded input stream with the current message.

Parameter
Name Description
input CodedInputStream
Remarks

See the user guide for precise merge semantics.

MergeFrom(Resource)

public void MergeFrom(AttributeContext.Types.Resource other)

Merges the given message into this one.

Parameter
Name Description
other AttributeContextTypesResource
Remarks

See the user guide for precise merge semantics.

ToString()

public override string ToString()
Returns
Type Description
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)

Writes the data to the given coded output stream.

Parameter
Name Description
output CodedOutputStream

Coded output stream to write the data to. Must not be null.