public MapField<string, string> Annotations { get; }
Optional. User annotations. These attributes can only be set and used by
the user, and not by Artifact Registry. See
https://google.aip.dev/128#annotations for more details such as format and
size limitations.
Required. The files that belong to this attachment.
If the file ID part contains slashes, they are escaped. E.g.
projects/p1/locations/us-central1/repositories/repo1/files/sha:<sha-of-file>.
Output only. The name of the OCI version that this attachment created. Only
populated for Docker attachments. E.g.
projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1.
Required. The target the attachment is for, can be a Version, Package or
Repository. E.g.
projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference information for the \u003ccode\u003eAttachment\u003c/code\u003e class within the Google Cloud Artifact Registry v1 API, which is used to manage metadata associated with artifacts.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAttachment\u003c/code\u003e class allows for the addition of files, user annotations, and includes properties for tracking creation and update times, namespaces, and a target resource.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eAttachment\u003c/code\u003e class documentation is version 2.9.0, with documentation available for versions ranging back to 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003eAttachments can be linked to various targets, such as a specific Version, Package, or Repository within the Artifact Registry.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAttachment\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and is part of the \u003ccode\u003eGoogle.Cloud.ArtifactRegistry.V1\u003c/code\u003e namespace.\u003c/p\u003e\n"]]],[],null,["# Artifact Registry v1 API - Class Attachment (2.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.10.0 (latest)](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/2.9.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/2.8.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/2.7.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/2.6.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/2.5.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/2.4.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/2.3.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/2.2.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/2.1.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/2.0.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/1.1.0/Google.Cloud.ArtifactRegistry.V1.Attachment)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/1.0.0/Google.Cloud.ArtifactRegistry.V1.Attachment) \n\n public sealed class Attachment : IMessage\u003cAttachment\u003e, IEquatable\u003cAttachment\u003e, IDeepCloneable\u003cAttachment\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Artifact Registry v1 API class Attachment.\n\nAn Attachment refers to additional metadata that can be attached to\nartifacts in Artifact Registry. An attachment consists of one or more files. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Attachment \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Attachment](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest/Google.Cloud.ArtifactRegistry.V1.Attachment), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Attachment](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest/Google.Cloud.ArtifactRegistry.V1.Attachment), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Attachment](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest/Google.Cloud.ArtifactRegistry.V1.Attachment), [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.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.ArtifactRegistry.V1](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest/Google.Cloud.ArtifactRegistry.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.ArtifactRegistry.V1.dll\n\nConstructors\n------------\n\n### Attachment()\n\n public Attachment()\n\n### Attachment(Attachment)\n\n public Attachment(Attachment other)\n\nProperties\n----------\n\n### Annotations\n\n public MapField\u003cstring, string\u003e Annotations { get; }\n\nOptional. User annotations. These attributes can only be set and used by\nthe user, and not by Artifact Registry. See\n\u003chttps://google.aip.dev/128#annotations\u003e for more details such as format and\nsize limitations.\n\n### AttachmentName\n\n public AttachmentName AttachmentName { get; set; }\n\n[AttachmentName](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest/Google.Cloud.ArtifactRegistry.V1.AttachmentName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest/Google.Cloud.ArtifactRegistry.V1.Attachment#Google_Cloud_ArtifactRegistry_V1_Attachment_Name) resource name property.\n\n### AttachmentNamespace\n\n public string AttachmentNamespace { get; set; }\n\nThe namespace this attachment belongs to.\nE.g. If an attachment is created by artifact analysis, namespace is set\nto `artifactanalysis.googleapis.com`.\n\n### CreateTime\n\n public Timestamp CreateTime { get; set; }\n\nOutput only. The time when the attachment was created.\n\n### Files\n\n public RepeatedField\u003cstring\u003e Files { get; }\n\nRequired. The files that belong to this attachment.\nIf the file ID part contains slashes, they are escaped. E.g.\n`projects/p1/locations/us-central1/repositories/repo1/files/sha:\u003csha-of-file\u003e`.\n\n### FilesAsFileNames\n\n public ResourceNameList\u003cFileName\u003e FilesAsFileNames { get; }\n\n[FileName](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest/Google.Cloud.ArtifactRegistry.V1.FileName)-typed view over the [Files](/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest/Google.Cloud.ArtifactRegistry.V1.Attachment#Google_Cloud_ArtifactRegistry_V1_Attachment_Files) resource name property.\n\n### Name\n\n public string Name { get; set; }\n\nThe name of the attachment. E.g.\n`projects/p1/locations/us/repositories/repo/attachments/sbom`.\n\n### OciVersionName\n\n public string OciVersionName { get; set; }\n\nOutput only. The name of the OCI version that this attachment created. Only\npopulated for Docker attachments. E.g.\n`projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`.\n\n### Target\n\n public string Target { get; set; }\n\nRequired. The target the attachment is for, can be a Version, Package or\nRepository. E.g.\n`projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`.\n\n### Type\n\n public string Type { get; set; }\n\nType of attachment.\nE.g. `application/vnd.spdx+json`\n\n### UpdateTime\n\n public Timestamp UpdateTime { get; set; }\n\nOutput only. The time when the attachment was last updated."]]