/// <summary> /// Modify an existing light_source material file Modifies any parameter (except uuid) of a material file by completely replacing the definition file. 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 material.</param> /// <param name="lightSourceMaterial">a light_source material object</param> /// <returns>Task of ApiResponse</returns> public async System.Threading.Tasks.Task <ApiResponse <Object> > MaterialLightSourceUuidPutAsyncWithHttpInfo(string uuid, LightSourceMaterialSchema lightSourceMaterial) { // verify the required parameter 'uuid' is set if (uuid == null) { throw new ApiException(400, "Missing required parameter 'uuid' when calling LightSourceMaterialApi->MaterialLightSourceUuidPut"); } // verify the required parameter 'lightSourceMaterial' is set if (lightSourceMaterial == null) { throw new ApiException(400, "Missing required parameter 'lightSourceMaterial' when calling LightSourceMaterialApi->MaterialLightSourceUuidPut"); } var localVarPath = "/material/light_source/{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 (lightSourceMaterial != null && lightSourceMaterial.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(lightSourceMaterial); // http body (model) parameter } else { localVarPostBody = lightSourceMaterial; // 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("MaterialLightSourceUuidPut", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <Object>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null)); }
/// <summary> /// Modify an existing light_source material file Modifies any parameter (except uuid) of a material file by completely replacing the definition file. 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 material.</param> /// <param name="lightSourceMaterial">a light_source material object</param> /// <returns>Task of void</returns> public async System.Threading.Tasks.Task MaterialLightSourceUuidPutAsync(string uuid, LightSourceMaterialSchema lightSourceMaterial) { await MaterialLightSourceUuidPutAsyncWithHttpInfo(uuid, lightSourceMaterial); }
/// <summary> /// Modify an existing light_source material file Modifies any parameter (except uuid) of a material file by completely replacing the definition file. 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 material.</param> /// <param name="lightSourceMaterial">a light_source material object</param> /// <returns></returns> public void MaterialLightSourceUuidPut(string uuid, LightSourceMaterialSchema lightSourceMaterial) { MaterialLightSourceUuidPutWithHttpInfo(uuid, lightSourceMaterial); }
/// <summary> /// Create a new light_source material object Adds a new light_source material object to the database /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="lightSourceMaterial">a light_source material object</param> /// <returns>Task of InlineResponse204</returns> public async System.Threading.Tasks.Task <InlineResponse204> MaterialLightSourcePostAsync(LightSourceMaterialSchema lightSourceMaterial) { ApiResponse <InlineResponse204> localVarResponse = await MaterialLightSourcePostAsyncWithHttpInfo(lightSourceMaterial); return(localVarResponse.Data); }
/// <summary> /// Create a new light_source material object Adds a new light_source material object to the database /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="lightSourceMaterial">a light_source material object</param> /// <returns>ApiResponse of InlineResponse204</returns> public ApiResponse <InlineResponse204> MaterialLightSourcePostWithHttpInfo(LightSourceMaterialSchema lightSourceMaterial) { // verify the required parameter 'lightSourceMaterial' is set if (lightSourceMaterial == null) { throw new ApiException(400, "Missing required parameter 'lightSourceMaterial' when calling LightSourceMaterialApi->MaterialLightSourcePost"); } var localVarPath = "/material/light_source"; 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 (lightSourceMaterial != null && lightSourceMaterial.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(lightSourceMaterial); // http body (model) parameter } else { localVarPostBody = lightSourceMaterial; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("MaterialLightSourcePost", 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)))); }
/// <summary> /// Create a new light_source material object Adds a new light_source material object to the database /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="lightSourceMaterial">a light_source material object</param> /// <returns>InlineResponse204</returns> public InlineResponse204 MaterialLightSourcePost(LightSourceMaterialSchema lightSourceMaterial) { ApiResponse <InlineResponse204> localVarResponse = MaterialLightSourcePostWithHttpInfo(lightSourceMaterial); return(localVarResponse.Data); }