Show / Hide Table of Contents

Class ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource

The "specs" collection of methods.

Inheritance
object
ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.APIhub.v1
Assembly: Google.Apis.APIhub.v1.dll
Syntax
public class ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource

Constructors

SpecsResource(IClientService)

Constructs a new resource.

Declaration
public SpecsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Create(GoogleCloudApihubV1Spec, string)

Add a spec to an API version in the API hub. Multiple specs can be added to an API version. Note, while adding a spec, at least one of contents or source_uri must be provided. If contents is provided, then spec_type must also be provided. On adding a spec with contents to the version, the operations present in it will be added to the version.Note that the file contents in the spec should be of the same type as defined in the projects/{project}/locations/{location}/attributes/system-spec-type attribute associated with spec resource. Note that specs of various types can be uploaded, however parsing of details is supported for OpenAPI spec currently. In order to access the information parsed from the spec, use the GetSpec method. In order to access the raw contents for a particular spec, use the GetSpecContents method. In order to access the operations parsed from the spec, use the ListAPIOperations method.

Declaration
public virtual ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.CreateRequest Create(GoogleCloudApihubV1Spec body, string parent)
Parameters
Type Name Description
GoogleCloudApihubV1Spec body

The body of the request.

string parent

Required. The parent resource for Spec. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}

Returns
Type Description
ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.CreateRequest

Delete(string)

Delete a spec. Deleting a spec will also delete the associated operations from the version.

Declaration
public virtual ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.DeleteRequest Delete(string name)
Parameters
Type Name Description
string name

Required. The name of the spec to delete. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

Returns
Type Description
ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.DeleteRequest

Get(string)

Get details about the information parsed from a spec. Note that this method does not return the raw spec contents. Use GetSpecContents method to retrieve the same.

Declaration
public virtual ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.GetRequest Get(string name)
Parameters
Type Name Description
string name

Required. The name of the spec to retrieve. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

Returns
Type Description
ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.GetRequest

GetContents(string)

Get spec contents.

Declaration
public virtual ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.GetContentsRequest GetContents(string name)
Parameters
Type Name Description
string name

Required. The name of the spec whose contents need to be retrieved. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

Returns
Type Description
ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.GetContentsRequest

Lint(GoogleCloudApihubV1LintSpecRequest, string)

Lints the requested spec and updates the corresponding API Spec with the lint response. This lint response will be available in all subsequent Get and List Spec calls to Core service.

Declaration
public virtual ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.LintRequest Lint(GoogleCloudApihubV1LintSpecRequest body, string name)
Parameters
Type Name Description
GoogleCloudApihubV1LintSpecRequest body

The body of the request.

string name

Required. The name of the spec to be linted. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

Returns
Type Description
ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.LintRequest

List(string)

List specs corresponding to a particular API resource.

Declaration
public virtual ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.ListRequest List(string parent)
Parameters
Type Name Description
string parent

Required. The parent, which owns this collection of specs. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}

Returns
Type Description
ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.ListRequest

Patch(GoogleCloudApihubV1Spec, string)

Update spec. The following fields in the spec can be updated: * display_name * source_uri * lint_response * attributes * contents * spec_type In case of an OAS spec, updating spec contents can lead to: 1. Creation, deletion and update of operations. 2. Creation, deletion and update of definitions. 3. Update of other info parsed out from the new spec. In case of contents or source_uri being present in update mask, spec_type must also be present. Also, spec_type can not be present in update mask if contents or source_uri is not present. The update_mask should be used to specify the fields being updated.

Declaration
public virtual ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.PatchRequest Patch(GoogleCloudApihubV1Spec body, string name)
Parameters
Type Name Description
GoogleCloudApihubV1Spec body

The body of the request.

string name

Identifier. The name of the spec. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

Returns
Type Description
ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.PatchRequest
In this article
Back to top Generated by DocFX