Exemplo n.º 1
0
 /// <summary>
 /// Modify an existing three_phase object Modifies any parameter (except uuid) of a three_phase recipe object by completely replacing the definition object. A finer grain method can be set up later.
 /// </summary>
 /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="uuid">The unique identifier of the three_phase recipe.</param>
 /// <param name="recipe">A three_phase JSON objectr with a uuid key.</param>
 /// <returns></returns>
 public void RecipeThreePhaseGridbasedUuidPut(string uuid, ThreePhaselGridBasedSchema recipe)
 {
     RecipeThreePhaseGridbasedUuidPutWithHttpInfo(uuid, recipe);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Create a new three_phase object Adds a new three_phase object to the list
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="recipe">A three_phase JSON objectr with a uuid key.</param>
        /// <returns>Task of InlineResponse204</returns>
        public async System.Threading.Tasks.Task <InlineResponse204> RecipeThreePhaseGridbasedPostAsync(ThreePhaselGridBasedSchema recipe)
        {
            ApiResponse <InlineResponse204> localVarResponse = await RecipeThreePhaseGridbasedPostAsyncWithHttpInfo(recipe);

            return(localVarResponse.Data);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Create a new three_phase object Adds a new three_phase object to the list
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="recipe">A three_phase JSON objectr with a uuid key.</param>
        /// <returns>Task of ApiResponse (InlineResponse204)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <InlineResponse204> > RecipeThreePhaseGridbasedPostAsyncWithHttpInfo(ThreePhaselGridBasedSchema recipe)
        {
            // verify the required parameter 'recipe' is set
            if (recipe == null)
            {
                throw new ApiException(400, "Missing required parameter 'recipe' when calling ThreePhaseRecipeApi->RecipeThreePhaseGridbasedPost");
            }

            var    localVarPath         = "/recipe/three_phase/gridbased";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType    = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
            };
            String localVarHttpHeaderAccept    = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (recipe != null && recipe.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(recipe); // http body (model) parameter
            }
            else
            {
                localVarPostBody = recipe; // byte array
            }


            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                       Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                       localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("RecipeThreePhaseGridbasedPost", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <InlineResponse204>(localVarStatusCode,
                                                       localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                       (InlineResponse204)Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse204))));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Create a new three_phase object Adds a new three_phase object to the list
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="recipe">A three_phase JSON objectr with a uuid key.</param>
        /// <returns>InlineResponse204</returns>
        public InlineResponse204 RecipeThreePhaseGridbasedPost(ThreePhaselGridBasedSchema recipe)
        {
            ApiResponse <InlineResponse204> localVarResponse = RecipeThreePhaseGridbasedPostWithHttpInfo(recipe);

            return(localVarResponse.Data);
        }