Show / Hide Table of Contents

Class ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.CreateRequest

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.

Inheritance
object
ClientServiceRequest
ClientServiceRequest<GoogleCloudApihubV1Spec>
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>
ProjectsResource.LocationsResource.ApisResource.VersionsResource.SpecsResource.CreateRequest
Implements
IClientServiceRequest<GoogleCloudApihubV1Spec>
IClientServiceRequest
Inherited Members
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.Xgafv
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.AccessToken
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.Alt
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.Callback
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.Fields
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.Key
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.OauthToken
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.PrettyPrint
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.QuotaUser
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.UploadType
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.UploadProtocol
ClientServiceRequest<GoogleCloudApihubV1Spec>.Execute()
ClientServiceRequest<GoogleCloudApihubV1Spec>.ExecuteAsStream()
ClientServiceRequest<GoogleCloudApihubV1Spec>.ExecuteAsync()
ClientServiceRequest<GoogleCloudApihubV1Spec>.ExecuteAsync(CancellationToken)
ClientServiceRequest<GoogleCloudApihubV1Spec>.ExecuteAsStreamAsync()
ClientServiceRequest<GoogleCloudApihubV1Spec>.ExecuteAsStreamAsync(CancellationToken)
ClientServiceRequest<GoogleCloudApihubV1Spec>.CreateRequest(bool?)
ClientServiceRequest<GoogleCloudApihubV1Spec>.GenerateRequestUri()
ClientServiceRequest<GoogleCloudApihubV1Spec>.GetDefaultETagAction(string)
ClientServiceRequest<GoogleCloudApihubV1Spec>.ETagAction
ClientServiceRequest<GoogleCloudApihubV1Spec>.ModifyRequest
ClientServiceRequest<GoogleCloudApihubV1Spec>.ValidateParameters
ClientServiceRequest<GoogleCloudApihubV1Spec>.ApiVersion
ClientServiceRequest<GoogleCloudApihubV1Spec>.RequestParameters
ClientServiceRequest<GoogleCloudApihubV1Spec>.Service
ClientServiceRequest._unsuccessfulResponseHandlers
ClientServiceRequest._exceptionHandlers
ClientServiceRequest._executeInterceptors
ClientServiceRequest.AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler)
ClientServiceRequest.AddExceptionHandler(IHttpExceptionHandler)
ClientServiceRequest.AddExecuteInterceptor(IHttpExecuteInterceptor)
ClientServiceRequest.Credential
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.CreateRequest : APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>, IClientServiceRequest<GoogleCloudApihubV1Spec>, IClientServiceRequest

Constructors

CreateRequest(IClientService, GoogleCloudApihubV1Spec, string)

Constructs a new Create request.

Declaration
public CreateRequest(IClientService service, GoogleCloudApihubV1Spec body, string parent)
Parameters
Type Name Description
IClientService service
GoogleCloudApihubV1Spec body
string parent

Properties

HttpMethod

Gets the HTTP method.

Declaration
public override string HttpMethod { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<GoogleCloudApihubV1Spec>.HttpMethod

MethodName

Gets the method name.

Declaration
public override string MethodName { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<GoogleCloudApihubV1Spec>.MethodName

Parent

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

Declaration
[RequestParameter("parent", RequestParameterType.Path)]
public virtual string Parent { get; }
Property Value
Type Description
string

RestPath

Gets the REST path.

Declaration
public override string RestPath { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<GoogleCloudApihubV1Spec>.RestPath

SpecId

Optional. The ID to use for the spec, which will become the final component of the spec's resource name. This field is optional. * If provided, the same will be used. The service will throw an error if the specified id is already used by another spec in the API resource. * If not provided, a system generated id will be used. This value should be 4-500 characters, overall resource name which will be of format projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}, its length is limited to 1000 characters and valid characters are /a-z[0-9]-_/.

Declaration
[RequestParameter("specId", RequestParameterType.Query)]
public virtual string SpecId { get; set; }
Property Value
Type Description
string

Methods

GetBody()

Returns the body of the request.

Declaration
protected override object GetBody()
Returns
Type Description
object
Overrides
ClientServiceRequest<GoogleCloudApihubV1Spec>.GetBody()

InitParameters()

Initializes Create parameter list.

Declaration
protected override void InitParameters()
Overrides
APIhubBaseServiceRequest<GoogleCloudApihubV1Spec>.InitParameters()

Implements

IClientServiceRequest<TResponse>
IClientServiceRequest
In this article
Back to top Generated by DocFX