示例#1
0
        /// <summary>
        /// Modify an existing analysis_grid object Modifies any parameter (except uuid) of a daylight_factor 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 daylight_factor recipe.</param>
        /// <param name="recipe">A analysis_grid JSON objectr with a uuid key.</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <ApiResponse <Object> > RecipeDaylightFactorGridbasedUuidPutAsyncWithHttpInfo(string uuid, DaylightFactorGridBasedSchema recipe)
        {
            // verify the required parameter 'uuid' is set
            if (uuid == null)
            {
                throw new ApiException(400, "Missing required parameter 'uuid' when calling DaylightFactorRecipeApi->RecipeDaylightFactorGridbasedUuidPut");
            }
            // verify the required parameter 'recipe' is set
            if (recipe == null)
            {
                throw new ApiException(400, "Missing required parameter 'recipe' when calling DaylightFactorRecipeApi->RecipeDaylightFactorGridbasedUuidPut");
            }

            var    localVarPath         = "/recipe/daylight_factor/gridbased/{uuid}";
            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 (uuid != null)
            {
                localVarPathParams.Add("uuid", Configuration.ApiClient.ParameterToString(uuid));               // path parameter
            }
            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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                       localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

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

            return(new ApiResponse <Object>(localVarStatusCode,
                                            localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                            null));
        }
示例#2
0
 /// <summary>
 /// Modify an existing analysis_grid object Modifies any parameter (except uuid) of a daylight_factor 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 daylight_factor recipe.</param>
 /// <param name="recipe">A analysis_grid JSON objectr with a uuid key.</param>
 /// <returns>Task of void</returns>
 public async System.Threading.Tasks.Task RecipeDaylightFactorGridbasedUuidPutAsync(string uuid, DaylightFactorGridBasedSchema recipe)
 {
     await RecipeDaylightFactorGridbasedUuidPutAsyncWithHttpInfo(uuid, recipe);
 }
示例#3
0
        /// <summary>
        /// Create a new analysis_grid object Adds a new analysis_grid object to the list
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="recipe">A analysis_grid JSON objectr with a uuid key.</param>
        /// <returns>Task of InlineResponse204</returns>
        public async System.Threading.Tasks.Task <InlineResponse204> RecipeDaylightFactorGridbasedPostAsync(DaylightFactorGridBasedSchema recipe)
        {
            ApiResponse <InlineResponse204> localVarResponse = await RecipeDaylightFactorGridbasedPostAsyncWithHttpInfo(recipe);

            return(localVarResponse.Data);
        }
示例#4
0
 /// <summary>
 /// Modify an existing analysis_grid object Modifies any parameter (except uuid) of a daylight_factor 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 daylight_factor recipe.</param>
 /// <param name="recipe">A analysis_grid JSON objectr with a uuid key.</param>
 /// <returns></returns>
 public void RecipeDaylightFactorGridbasedUuidPut(string uuid, DaylightFactorGridBasedSchema recipe)
 {
     RecipeDaylightFactorGridbasedUuidPutWithHttpInfo(uuid, recipe);
 }
示例#5
0
        /// <summary>
        /// Create a new analysis_grid object Adds a new analysis_grid object to the list
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="recipe">A analysis_grid JSON objectr with a uuid key.</param>
        /// <returns>InlineResponse204</returns>
        public InlineResponse204 RecipeDaylightFactorGridbasedPost(DaylightFactorGridBasedSchema recipe)
        {
            ApiResponse <InlineResponse204> localVarResponse = RecipeDaylightFactorGridbasedPostWithHttpInfo(recipe);

            return(localVarResponse.Data);
        }