public sealed class ApiSpec : IMessage<ApiSpec>, IEquatable<ApiSpec>, IDeepCloneable<ApiSpec>, IBufferMessage, IMessage
Reference documentation and code samples for the Apigee Registry v1 API class ApiSpec.
Describes a version of an API in a structured way.
ApiSpecs provide formal descriptions that consumers can use to use a version.
ApiSpec resources are intended to be fully-resolved descriptions of an
ApiVersion. When specs consist of multiple files, these should be bundled
together (e.g., in a zip archive) and stored as a unit. Multiple specs can
exist to provide representations in different API description formats.
Synchronization of these representations would be provided by tooling and
background services.
public MapField<string, string> Annotations { get; }
Annotations attach non-identifying metadata to resources.
Annotation keys and values are less restricted than those of labels, but
should be generally used for small values of broad interest. Larger, topic-
specific metadata should be stored in Artifacts.
Input only. The contents of the spec.
Provided by API callers when specs are created or updated.
To access the contents of a spec, use GetApiSpecContents.
Labels attach identifying metadata to resources. Identifying metadata can
be used to filter list operations.
Label keys and values can be no longer than 64 characters
(Unicode codepoints), can only contain lowercase letters, numeric
characters, underscores and dashes. International characters are allowed.
No more than 64 user labels can be associated with one resource (System
labels are excluded).
See https://goo.gl/xmQnxf for more information and examples of labels.
System reserved label keys are prefixed with
apigeeregistry.googleapis.com/ and cannot be changed.
A style (format) descriptor for this spec that is specified as a Media Type
(https://en.wikipedia.org/wiki/Media_type). Possible values include
application/vnd.apigee.proto, application/vnd.apigee.openapi, and
application/vnd.apigee.graphql, with possible suffixes representing
compression types. These hypothetical names are defined in the vendor tree
defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
Content types can specify compression. Currently only GZip compression is
supported (indicated with "+gzip").
Output only. Immutable. The revision ID of the spec.
A new revision is committed whenever the spec contents are changed.
The format is an 8-character hexadecimal string.
The original source URI of the spec (if one exists).
This is an external location that can be used for reference purposes
but which may not be authoritative since this external resource may
change after the spec is retrieved.
[[["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-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eApiSpec\u003c/code\u003e class in the Apigee Registry v1 API represents a structured description of an API version, enabling consumers to utilize a specific version.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eApiSpec\u003c/code\u003e resources are intended to provide a comprehensive description of an \u003ccode\u003eApiVersion\u003c/code\u003e, and can exist in multiple formats with tooling handling synchronization.\u003c/p\u003e\n"],["\u003cp\u003eKey features of \u003ccode\u003eApiSpec\u003c/code\u003e include properties such as \u003ccode\u003eContents\u003c/code\u003e, \u003ccode\u003eMimeType\u003c/code\u003e, \u003ccode\u003eHash\u003c/code\u003e, \u003ccode\u003eLabels\u003c/code\u003e, and \u003ccode\u003eAnnotations\u003c/code\u003e to describe the spec file, its format, metadata, and content.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods to access detailed information about the spec, including creation and update timestamps (\u003ccode\u003eCreateTime\u003c/code\u003e, \u003ccode\u003eRevisionCreateTime\u003c/code\u003e, \u003ccode\u003eRevisionUpdateTime\u003c/code\u003e) and its size in bytes (\u003ccode\u003eSizeBytes\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eApiSpec\u003c/code\u003e implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, ensuring it supports common operations and standards for message objects.\u003c/p\u003e\n"]]],[],null,["# Apigee Registry v1 API - Class ApiSpec (1.0.0-beta07)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta07 (latest)](/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpec)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/1.0.0-beta06/Google.Cloud.ApigeeRegistry.V1.ApiSpec) \n\n public sealed class ApiSpec : IMessage\u003cApiSpec\u003e, IEquatable\u003cApiSpec\u003e, IDeepCloneable\u003cApiSpec\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Apigee Registry v1 API class ApiSpec.\n\nDescribes a version of an API in a structured way.\nApiSpecs provide formal descriptions that consumers can use to use a version.\nApiSpec resources are intended to be fully-resolved descriptions of an\nApiVersion. When specs consist of multiple files, these should be bundled\ntogether (e.g., in a zip archive) and stored as a unit. Multiple specs can\nexist to provide representations in different API description formats.\nSynchronization of these representations would be provided by tooling and\nbackground services. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ApiSpec \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ApiSpec](/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpec), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ApiSpec](/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpec), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ApiSpec](/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpec), [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.ApigeeRegistry.V1](/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.ApigeeRegistry.V1.dll\n\nConstructors\n------------\n\n### ApiSpec()\n\n public ApiSpec()\n\n### ApiSpec(ApiSpec)\n\n public ApiSpec(ApiSpec other)\n\nProperties\n----------\n\n### Annotations\n\n public MapField\u003cstring, string\u003e Annotations { get; }\n\nAnnotations attach non-identifying metadata to resources.\n\nAnnotation keys and values are less restricted than those of labels, but\nshould be generally used for small values of broad interest. Larger, topic-\nspecific metadata should be stored in Artifacts.\n\n### ApiSpecName\n\n public ApiSpecName ApiSpecName { get; set; }\n\n[ApiSpecName](/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpecName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpec#Google_Cloud_ApigeeRegistry_V1_ApiSpec_Name) resource name property.\n\n### Contents\n\n public ByteString Contents { get; set; }\n\nInput only. The contents of the spec.\nProvided by API callers when specs are created or updated.\nTo access the contents of a spec, use GetApiSpecContents.\n\n### CreateTime\n\n public Timestamp CreateTime { get; set; }\n\nOutput only. Creation timestamp; when the spec resource was created.\n\n### Description\n\n public string Description { get; set; }\n\nA detailed description.\n\n### Filename\n\n public string Filename { get; set; }\n\nA possibly-hierarchical name used to refer to the spec from other specs.\n\n### Hash\n\n public string Hash { get; set; }\n\nOutput only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is\nthe hash of the uncompressed spec.\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nLabels attach identifying metadata to resources. Identifying metadata can\nbe used to filter list operations.\n\nLabel keys and values can be no longer than 64 characters\n(Unicode codepoints), can only contain lowercase letters, numeric\ncharacters, underscores and dashes. International characters are allowed.\nNo more than 64 user labels can be associated with one resource (System\nlabels are excluded).\n\nSee \u003chttps://goo.gl/xmQnxf\u003e for more information and examples of labels.\nSystem reserved label keys are prefixed with\n`apigeeregistry.googleapis.com/` and cannot be changed.\n\n### MimeType\n\n public string MimeType { get; set; }\n\nA style (format) descriptor for this spec that is specified as a Media Type\n(\u003chttps://en.wikipedia.org/wiki/Media_type\u003e). Possible values include\n`application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and\n`application/vnd.apigee.graphql`, with possible suffixes representing\ncompression types. These hypothetical names are defined in the vendor tree\ndefined in RFC6838 (\u003chttps://tools.ietf.org/html/rfc6838\u003e) and are not final.\nContent types can specify compression. Currently only GZip compression is\nsupported (indicated with \"+gzip\").\n\n### Name\n\n public string Name { get; set; }\n\nResource name.\n\n### RevisionCreateTime\n\n public Timestamp RevisionCreateTime { get; set; }\n\nOutput only. Revision creation timestamp; when the represented revision was created.\n\n### RevisionId\n\n public string RevisionId { get; set; }\n\nOutput only. Immutable. The revision ID of the spec.\nA new revision is committed whenever the spec contents are changed.\nThe format is an 8-character hexadecimal string.\n\n### RevisionUpdateTime\n\n public Timestamp RevisionUpdateTime { get; set; }\n\nOutput only. Last update timestamp: when the represented revision was last modified.\n\n### SizeBytes\n\n public int SizeBytes { get; set; }\n\nOutput only. The size of the spec file in bytes. If the spec is gzipped, this is the\nsize of the uncompressed spec.\n\n### SourceUri\n\n public string SourceUri { get; set; }\n\nThe original source URI of the spec (if one exists).\nThis is an external location that can be used for reference purposes\nbut which may not be authoritative since this external resource may\nchange after the spec is retrieved."]]