コード例 #1
0
        public virtual IActionResult InstallTemplateFromStore([FromBody] TemplateIdentifier templateIdentifier)
        {
            //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(200, default(Object));
            //TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(401);
            //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(404);
            //TODO: Uncomment the next line to return response 429 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(429);
            //TODO: Uncomment the next line to return response 500 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(500);
            //TODO: Uncomment the next line to return response 503 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(503);
            //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(0);
            string exampleJson = null;

            var example = exampleJson != null
            ? JsonConvert.DeserializeObject <Object>(exampleJson)
            : default(Object);

            //TODO: Change the data returned
            return(new ObjectResult(example));
        }
コード例 #2
0
        /// <summary>
        /// Install a template from the public template store to your corporate catalog Install a template from the public template store to your corporate catalog
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="templateIdentifier">The template to be installed</param>
        /// <returns>Task of ApiResponse (Object)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <Object> > InstallTemplateFromStoreAsyncWithHttpInfo(TemplateIdentifier templateIdentifier)
        {
            // verify the required parameter 'templateIdentifier' is set
            if (templateIdentifier == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'templateIdentifier' when calling CatalogApi->InstallTemplateFromStore");
            }


            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.Data = templateIdentifier;

            // authentication (bearerAuth) required
            // bearer authentication required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <Object>("/catalog/templates/installFromStore", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("InstallTemplateFromStore", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
コード例 #3
0
        /// <summary>
        /// Install a template from the public template store to your corporate catalog Install a template from the public template store to your corporate catalog
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="templateIdentifier">The template to be installed</param>
        /// <returns>Task of Object</returns>
        public async System.Threading.Tasks.Task <Object> InstallTemplateFromStoreAsync(TemplateIdentifier templateIdentifier)
        {
            Org.OpenAPITools.Client.ApiResponse <Object> localVarResponse = await InstallTemplateFromStoreAsyncWithHttpInfo(templateIdentifier);

            return(localVarResponse.Data);
        }
コード例 #4
0
 /// <summary>
 /// Install a template from the public template store to your corporate catalog Install a template from the public template store to your corporate catalog
 /// </summary>
 /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="templateIdentifier">The template to be installed</param>
 /// <returns>Object</returns>
 public Object InstallTemplateFromStore(TemplateIdentifier templateIdentifier)
 {
     Org.OpenAPITools.Client.ApiResponse <Object> localVarResponse = InstallTemplateFromStoreWithHttpInfo(templateIdentifier);
     return(localVarResponse.Data);
 }