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.
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.
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.
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.
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.
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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003e\u003ccode\u003eAttributeContext.Types.Resource\u003c/code\u003e defines the core attributes for a resource, which is an addressable entity provided by a destination service, such as a file on a network storage service.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionalities for message handling, comparison, cloning, and buffer management.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes various properties such as \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eService\u003c/code\u003e, \u003ccode\u003eType\u003c/code\u003e, \u003ccode\u003eLabels\u003c/code\u003e, \u003ccode\u003eLocation\u003c/code\u003e, \u003ccode\u003eDisplayName\u003c/code\u003e, \u003ccode\u003eCreateTime\u003c/code\u003e, \u003ccode\u003eUpdateTime\u003c/code\u003e, \u003ccode\u003eDeleteTime\u003c/code\u003e, \u003ccode\u003eUid\u003c/code\u003e, and \u003ccode\u003eEtag\u003c/code\u003e, which provide details about the resource's identity, metadata, timestamps, and state.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAttributeContext.Types.Resource\u003c/code\u003e offers methods like \u003ccode\u003eClone()\u003c/code\u003e, \u003ccode\u003eEquals()\u003c/code\u003e, \u003ccode\u003eGetHashCode()\u003c/code\u003e, \u003ccode\u003eMergeFrom()\u003c/code\u003e, \u003ccode\u003eWriteTo()\u003c/code\u003e, and \u003ccode\u003eCalculateSize()\u003c/code\u003e to perform operations like deep cloning, equality checks, hash code generation, merging data, writing to streams, and calculating message size.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains fields such as \u003ccode\u003eAnnotationsFieldNumber\u003c/code\u003e, \u003ccode\u003eCreateTimeFieldNumber\u003c/code\u003e, \u003ccode\u003eDeleteTimeFieldNumber\u003c/code\u003e, and many more that are each associated with a field number that is used to identify the specific data within the resource.\u003c/p\u003e\n"]]],[],null,["# Class AttributeContext.Types.Resource (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AttributeContext.Types.Resource)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Rpc.Context.AttributeContext.Types.Resource)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Rpc.Context.AttributeContext.Types.Resource)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Rpc.Context.AttributeContext.Types.Resource) \n\n public sealed class AttributeContext.Types.Resource : IMessage\u003cAttributeContext.Types.Resource\u003e, IEquatable\u003cAttributeContext.Types.Resource\u003e, IDeepCloneable\u003cAttributeContext.Types.Resource\u003e, IBufferMessage, IMessage\n\nThis message defines core attributes for a resource. A resource is an\naddressable (named) entity provided by the destination service. For\nexample, a file stored on a network storage service. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AttributeContext.Types.Resource \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AttributeContext](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AttributeContext)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AttributeContext.Types)[Resource](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AttributeContext.Types.Resource), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AttributeContext](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AttributeContext)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AttributeContext.Types)[Resource](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AttributeContext.Types.Resource), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AttributeContext](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AttributeContext)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AttributeContext.Types)[Resource](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AttributeContext.Types.Resource), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Rpc.Context](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context)\n\nAssembly\n--------\n\nGoogle.Api.CommonProtos.dll\n\nConstructors\n------------\n\n### Resource()\n\n public Resource()\n\n### Resource(Resource)\n\n public Resource(AttributeContext.Types.Resource other)\n\nFields\n------\n\n### AnnotationsFieldNumber\n\n public const int AnnotationsFieldNumber = 6\n\nField number for the \"annotations\" field.\n\n### CreateTimeFieldNumber\n\n public const int CreateTimeFieldNumber = 8\n\nField number for the \"create_time\" field.\n\n### DeleteTimeFieldNumber\n\n public const int DeleteTimeFieldNumber = 10\n\nField number for the \"delete_time\" field.\n\n### DisplayNameFieldNumber\n\n public const int DisplayNameFieldNumber = 7\n\nField number for the \"display_name\" field.\n\n### EtagFieldNumber\n\n public const int EtagFieldNumber = 11\n\nField number for the \"etag\" field.\n\n### LabelsFieldNumber\n\n public const int LabelsFieldNumber = 4\n\nField number for the \"labels\" field.\n\n### LocationFieldNumber\n\n public const int LocationFieldNumber = 12\n\nField number for the \"location\" field.\n\n### NameFieldNumber\n\n public const int NameFieldNumber = 2\n\nField number for the \"name\" field.\n\n### ServiceFieldNumber\n\n public const int ServiceFieldNumber = 1\n\nField number for the \"service\" field.\n\n### TypeFieldNumber\n\n public const int TypeFieldNumber = 3\n\nField number for the \"type\" field.\n\n### UidFieldNumber\n\n public const int UidFieldNumber = 5\n\nField number for the \"uid\" field.\n\n### UpdateTimeFieldNumber\n\n public const int UpdateTimeFieldNumber = 9\n\nField number for the \"update_time\" field.\n\nProperties\n----------\n\n### Annotations\n\n public MapField\u003cstring, string\u003e Annotations { get; }\n\nAnnotations is an unstructured key-value map stored with a resource that\nmay be set by external tools to store and retrieve arbitrary metadata.\nThey are not queryable and should be preserved when modifying objects.\n\nMore info:\n\u003chttps://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\u003e\n\n### CreateTime\n\n public Timestamp CreateTime { get; set; }\n\nOutput only. The timestamp when the resource was created. This may\nbe either the time creation was initiated or when it was completed.\n\n### DeleteTime\n\n public Timestamp DeleteTime { get; set; }\n\nOutput only. The timestamp when the resource was deleted.\nIf the resource is not deleted, this must be empty.\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### DisplayName\n\n public string DisplayName { get; set; }\n\nMutable. The display name set by clients. Must be \\\u003c= 63 characters.\n\n### Etag\n\n public string Etag { get; set; }\n\nOutput only. An opaque value that uniquely identifies a version or\ngeneration of a resource. It can be used to confirm that the client\nand server agree on the ordering of a resource being written.\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nThe labels or tags on the resource, such as AWS resource tags and\nKubernetes resource labels.\n\n### Location\n\n public string Location { get; set; }\n\nImmutable. The location of the resource. The location encoding is\nspecific to the service provider, and new encoding may be introduced\nas the service evolves.\n\nFor Google Cloud products, the encoding is what is used by Google Cloud\nAPIs, such as `us-east1`, `aws-us-east-1`, and `azure-eastus2`. The\nsemantics of `location` is identical to the\n`cloud.googleapis.com/location` label used by some Google Cloud APIs.\n\n### Name\n\n public string Name { get; set; }\n\nThe stable identifier (name) of a resource on the `service`. A resource\ncan be logically identified as \"//{resource.service}/{resource.name}\".\nThe differences between a resource name and a URI are:\n\n- Resource name is a logical identifier, independent of network protocol and API version. For example, `//pubsub.googleapis.com/projects/123/topics/news-feed`.\n- 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`.\n\nSee \u003chttps://cloud.google.com/apis/design/resource_names\u003e for details.\n\n### Parser\n\n public static MessageParser\u003cAttributeContext.Types.Resource\u003e Parser { get; }\n\n### Service\n\n public string Service { get; set; }\n\nThe name of the service that this resource belongs to, such as\n`pubsub.googleapis.com`. The service may be different from the DNS\nhostname that actually serves the request.\n\n### Type\n\n public string Type { get; set; }\n\nThe type of the resource. The syntax is platform-specific because\ndifferent platforms define their resources differently.\n\nFor Google APIs, the type format must be \"{service}/{kind}\", such as\n\"pubsub.googleapis.com/Topic\".\n\n### Uid\n\n public string Uid { get; set; }\n\nThe unique identifier of the resource. UID is unique in the time\nand space for this resource within the scope of the service. It is\ntypically generated by the server on successful creation of a resource\nand must not be changed. UID is used to uniquely identify resources\nwith resource name reuses. This should be a UUID4.\n\n### UpdateTime\n\n public Timestamp UpdateTime { get; set; }\n\nOutput only. The timestamp when the resource was last updated. Any\nchange to the resource made by users must refresh this value.\nChanges to a resource made by the service should refresh this value.\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### Clone()\n\n public AttributeContext.Types.Resource Clone()\n\n### Equals(Resource)\n\n public bool Equals(AttributeContext.Types.Resource other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\n### MergeFrom(Resource)\n\n public void MergeFrom(AttributeContext.Types.Resource other)\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)"]]