# Apigee Registry v1 API - Class ApiSpec (1.0.0-beta08)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.0.0-beta08 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpec)
- [1.0.0-beta07](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/1.0.0-beta07/Google.Cloud.ApigeeRegistry.V1.ApiSpec)

    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.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ApiSpec

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ApiSpec](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpec), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ApiSpec](https://docs.cloud.google.com/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](https://docs.cloud.google.com/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)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.ApigeeRegistry.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1)

## Assembly

Google.Cloud.ApigeeRegistry.V1.dll

## Constructors

### ApiSpec()

    public ApiSpec()

### ApiSpec(ApiSpec)

    public ApiSpec(ApiSpec other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpec` |

## Properties

### Annotations

    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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### ApiSpecName

    public ApiSpecName ApiSpecName { get; set; }

[ApiSpecName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpecName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpec#Google_Cloud_ApigeeRegistry_V1_ApiSpec_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApigeeRegistry.V1/latest/Google.Cloud.ApigeeRegistry.V1.ApiSpecName` |   |

### Contents

    public ByteString Contents { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` |   |

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. Creation timestamp; when the spec resource was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### Description

    public string Description { get; set; }

A detailed description.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Filename

    public string Filename { get; set; }

A possibly-hierarchical name used to refer to the spec from other specs.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Hash

    public string Hash { get; set; }

Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is
the hash of the uncompressed spec.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Labels

    public MapField<string, string> Labels { get; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### MimeType

    public string MimeType { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Name

    public string Name { get; set; }

Resource name.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### RevisionCreateTime

    public Timestamp RevisionCreateTime { get; set; }

Output only. Revision creation timestamp; when the represented revision was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### RevisionId

    public string RevisionId { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### RevisionUpdateTime

    public Timestamp RevisionUpdateTime { get; set; }

Output only. Last update timestamp: when the represented revision was last modified.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### SizeBytes

    public int SizeBytes { get; set; }

Output only. The size of the spec file in bytes. If the spec is gzipped, this is the
size of the uncompressed spec.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### SourceUri

    public string SourceUri { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |