API hub v1 API - Class Spec (1.0.0-beta02)

public sealed class Spec : IMessage<Spec>, IEquatable<Spec>, IDeepCloneable<Spec>, IBufferMessage, IMessage

Reference documentation and code samples for the API hub v1 API class Spec.

Represents a spec associated with an API version in the API Hub. Note that specs of various types can be uploaded, however parsing of details is supported for OpenAPI spec currently.

Inheritance

object > Spec

Namespace

Google.Cloud.ApiHub.V1

Assembly

Google.Cloud.ApiHub.V1.dll

Constructors

Spec()

public Spec()

Spec(Spec)

public Spec(Spec other)
Parameter
Name Description
other Spec

Properties

Attributes

public MapField<string, AttributeValues> Attributes { get; }

Optional. The list of user defined attributes associated with the spec. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute}. The value is the attribute values associated with the resource.

Property Value
Type Description
MapFieldstringAttributeValues

Contents

public SpecContents Contents { get; set; }

Optional. Input only. The contents of the uploaded spec.

Property Value
Type Description
SpecContents

CreateTime

public Timestamp CreateTime { get; set; }

Output only. The time at which the spec was created.

Property Value
Type Description
Timestamp

Details

public SpecDetails Details { get; set; }

Output only. Details parsed from the spec.

Property Value
Type Description
SpecDetails

DisplayName

public string DisplayName { get; set; }

Required. The display name of the spec. This can contain the file name of the spec.

Property Value
Type Description
string

Documentation

public Documentation Documentation { get; set; }

Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

Property Value
Type Description
Documentation

LintResponse

public LintResponse LintResponse { get; set; }

Optional. The lint response for the spec.

Property Value
Type Description
LintResponse

Name

public string Name { get; set; }

Identifier. The name of the spec.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

Property Value
Type Description
string

ParsingMode

public Spec.Types.ParsingMode ParsingMode { get; set; }

Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

Property Value
Type Description
SpecTypesParsingMode

SourceUri

public string SourceUri { get; set; }

Optional. The URI of the spec source in case file is uploaded from an external version control system.

Property Value
Type Description
string

SpecName

public SpecName SpecName { get; set; }

SpecName-typed view over the Name resource name property.

Property Value
Type Description
SpecName

SpecType

public AttributeValues SpecType { get; set; }

Required. The type of spec. The value should be one of the allowed values defined for projects/{project}/locations/{location}/attributes/system-spec-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.

Note, this field is mandatory if content is provided.

Property Value
Type Description
AttributeValues

UpdateTime

public Timestamp UpdateTime { get; set; }

Output only. The time at which the spec was last updated.

Property Value
Type Description
Timestamp