Exemple #1
0
        /// <summary>
        /// Modify an existing translucent 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="translucentMaterial">a translucent material object</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <ApiResponse <Object> > MaterialTranslucentUuidPutAsyncWithHttpInfo(string uuid, TranslucentMaterialSchema translucentMaterial)
        {
            // verify the required parameter 'uuid' is set
            if (uuid == null)
            {
                throw new ApiException(400, "Missing required parameter 'uuid' when calling TranslucentMaterialApi->MaterialTranslucentUuidPut");
            }
            // verify the required parameter 'translucentMaterial' is set
            if (translucentMaterial == null)
            {
                throw new ApiException(400, "Missing required parameter 'translucentMaterial' when calling TranslucentMaterialApi->MaterialTranslucentUuidPut");
            }

            var    localVarPath         = "/material/translucent/{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 (translucentMaterial != null && translucentMaterial.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(translucentMaterial); // http body (model) parameter
            }
            else
            {
                localVarPostBody = translucentMaterial; // 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("MaterialTranslucentUuidPut", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <Object>(localVarStatusCode,
                                            localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                            null));
        }
Exemple #2
0
 /// <summary>
 /// Modify an existing translucent 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="translucentMaterial">a translucent material object</param>
 /// <returns>Task of void</returns>
 public async System.Threading.Tasks.Task MaterialTranslucentUuidPutAsync(string uuid, TranslucentMaterialSchema translucentMaterial)
 {
     await MaterialTranslucentUuidPutAsyncWithHttpInfo(uuid, translucentMaterial);
 }
Exemple #3
0
 /// <summary>
 /// Modify an existing translucent 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="translucentMaterial">a translucent material object</param>
 /// <returns></returns>
 public void MaterialTranslucentUuidPut(string uuid, TranslucentMaterialSchema translucentMaterial)
 {
     MaterialTranslucentUuidPutWithHttpInfo(uuid, translucentMaterial);
 }
Exemple #4
0
        /// <summary>
        /// Create a new translucent material object Adds a new translucent material object to the database
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="translucentMaterial">a translucent material object</param>
        /// <returns>Task of InlineResponse204</returns>
        public async System.Threading.Tasks.Task <InlineResponse204> MaterialTranslucentPostAsync(TranslucentMaterialSchema translucentMaterial)
        {
            ApiResponse <InlineResponse204> localVarResponse = await MaterialTranslucentPostAsyncWithHttpInfo(translucentMaterial);

            return(localVarResponse.Data);
        }
Exemple #5
0
        /// <summary>
        /// Create a new translucent material object Adds a new translucent material object to the database
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="translucentMaterial">a translucent material object</param>
        /// <returns>ApiResponse of InlineResponse204</returns>
        public ApiResponse <InlineResponse204> MaterialTranslucentPostWithHttpInfo(TranslucentMaterialSchema translucentMaterial)
        {
            // verify the required parameter 'translucentMaterial' is set
            if (translucentMaterial == null)
            {
                throw new ApiException(400, "Missing required parameter 'translucentMaterial' when calling TranslucentMaterialApi->MaterialTranslucentPost");
            }

            var    localVarPath         = "/material/translucent";
            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 (translucentMaterial != null && translucentMaterial.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(translucentMaterial); // http body (model) parameter
            }
            else
            {
                localVarPostBody = translucentMaterial; // 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("MaterialTranslucentPost", 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))));
        }
Exemple #6
0
        /// <summary>
        /// Create a new translucent material object Adds a new translucent material object to the database
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="translucentMaterial">a translucent material object</param>
        /// <returns>InlineResponse204</returns>
        public InlineResponse204 MaterialTranslucentPost(TranslucentMaterialSchema translucentMaterial)
        {
            ApiResponse <InlineResponse204> localVarResponse = MaterialTranslucentPostWithHttpInfo(translucentMaterial);

            return(localVarResponse.Data);
        }