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()
Resource(AttributeContext.Types.Resource)
public Resource(AttributeContext.Types.Resource other)
Parameter
Fields
LabelsFieldNumber
public const int LabelsFieldNumber = 4
Field number for the "labels" field.
Field Value
NameFieldNumber
public const int NameFieldNumber = 2
Field number for the "name" field.
Field Value
ServiceFieldNumber
public const int ServiceFieldNumber = 1
Field number for the "service" field.
Field Value
TypeFieldNumber
public const int TypeFieldNumber = 3
Field number for the "type" field.
Field Value
Properties
Descriptor
public static Protobuf.Reflection.MessageDescriptor Descriptor { get; }
Property Value
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
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
Parser
public static Protobuf.MessageParser<AttributeContext.Types.Resource> Parser { get; }
Property Value
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
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
Methods
CalculateSize()
public int CalculateSize()
Returns
Clone()
public AttributeContext.Types.Resource Clone()
Returns
Equals(AttributeContext.Types.Resource)
public bool Equals(AttributeContext.Types.Resource other)
Parameter
Returns
Equals(Object)
public override bool Equals(object other)
Parameter
Returns
GetHashCode()
public override int GetHashCode()
Returns
MergeFrom(Protobuf.CodedInputStream)
public void MergeFrom(Protobuf.CodedInputStream input)
Parameter
MergeFrom(AttributeContext.Types.Resource)
public void MergeFrom(AttributeContext.Types.Resource other)
Parameter
ToString()
public override string ToString()
Returns
WriteTo(Protobuf.CodedOutputStream)
public void WriteTo(Protobuf.CodedOutputStream output)
Parameter