Class AttributeContext.Types.Resource

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

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(AttributeContext.Types.Resource)

public Resource(AttributeContext.Types.Resource other)
Parameter
TypeNameDescription
AttributeContext.Types.Resourceother

Fields

LabelsFieldNumber

public const int LabelsFieldNumber = 4

Field number for the "labels" field.

Field Value
TypeDescription
Int32

NameFieldNumber

public const int NameFieldNumber = 2

Field number for the "name" field.

Field Value
TypeDescription
Int32

ServiceFieldNumber

public const int ServiceFieldNumber = 1

Field number for the "service" field.

Field Value
TypeDescription
Int32

TypeFieldNumber

public const int TypeFieldNumber = 3

Field number for the "type" field.

Field Value
TypeDescription
Int32

Properties

Descriptor

public static Protobuf.Reflection.MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
Protobuf.Reflection.MessageDescriptor

Labels

public Protobuf.Collections.MapField<string, string> Labels { get; }

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

Property Value
TypeDescription
Protobuf.Collections.MapField<String, 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 Protobuf.MessageParser<AttributeContext.Types.Resource> Parser { get; }
Property Value
TypeDescription
Protobuf.MessageParser<AttributeContext.Types.Resource>

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

Property Value
TypeDescription
String

Methods

CalculateSize()

public int CalculateSize()
Returns
TypeDescription
Int32

Clone()

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

Equals(AttributeContext.Types.Resource)

public bool Equals(AttributeContext.Types.Resource other)
Parameter
TypeNameDescription
AttributeContext.Types.Resourceother
Returns
TypeDescription
Boolean

Equals(Object)

public override bool Equals(object other)
Parameter
TypeNameDescription
Objectother
Returns
TypeDescription
Boolean

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32

MergeFrom(Protobuf.CodedInputStream)

public void MergeFrom(Protobuf.CodedInputStream input)
Parameter
TypeNameDescription
Protobuf.CodedInputStreaminput

MergeFrom(AttributeContext.Types.Resource)

public void MergeFrom(AttributeContext.Types.Resource other)
Parameter
TypeNameDescription
AttributeContext.Types.Resourceother

ToString()

public override string ToString()
Returns
TypeDescription
String

WriteTo(Protobuf.CodedOutputStream)

public void WriteTo(Protobuf.CodedOutputStream output)
Parameter
TypeNameDescription
Protobuf.CodedOutputStreamoutput

Implements