@@ -279,5 +279,77 @@ def get_dataset_with_http_info(dataset_id, opts = {})
279279 end
280280 return data , status_code , headers
281281 end
282+
283+ # Edit a dataset.
284+ #
285+ # @see #update_dataset_with_http_info
286+ def update_dataset ( dataset_id , body , opts = { } )
287+ data , _status_code , _headers = update_dataset_with_http_info ( dataset_id , body , opts )
288+ data
289+ end
290+
291+ # Edit a dataset.
292+ #
293+ # Edits the dataset associated with the ID.
294+ #
295+ # @param dataset_id [String] The ID of a defined dataset.
296+ # @param body [DatasetUpdateRequest] Dataset payload
297+ # @param opts [Hash] the optional parameters
298+ # @return [Array<(DatasetResponseSingle, Integer, Hash)>] DatasetResponseSingle data, response status code and response headers
299+ def update_dataset_with_http_info ( dataset_id , body , opts = { } )
300+
301+ if @api_client . config . debugging
302+ @api_client . config . logger . debug 'Calling API: DatasetsAPI.update_dataset ...'
303+ end
304+ # verify the required parameter 'dataset_id' is set
305+ if @api_client . config . client_side_validation && dataset_id . nil?
306+ fail ArgumentError , "Missing the required parameter 'dataset_id' when calling DatasetsAPI.update_dataset"
307+ end
308+ # verify the required parameter 'body' is set
309+ if @api_client . config . client_side_validation && body . nil?
310+ fail ArgumentError , "Missing the required parameter 'body' when calling DatasetsAPI.update_dataset"
311+ end
312+ # resource path
313+ local_var_path = '/api/v2/datasets/{dataset_id}' . sub ( '{dataset_id}' , CGI . escape ( dataset_id . to_s ) . gsub ( '%2F' , '/' ) )
314+
315+ # query parameters
316+ query_params = opts [ :query_params ] || { }
317+
318+ # header parameters
319+ header_params = opts [ :header_params ] || { }
320+ # HTTP header 'Accept' (if needed)
321+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
322+ # HTTP header 'Content-Type'
323+ header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] )
324+
325+ # form parameters
326+ form_params = opts [ :form_params ] || { }
327+
328+ # http body (model)
329+ post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( body )
330+
331+ # return_type
332+ return_type = opts [ :debug_return_type ] || 'DatasetResponseSingle'
333+
334+ # auth_names
335+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth , :AuthZ ]
336+
337+ new_options = opts . merge (
338+ :operation => :update_dataset ,
339+ :header_params => header_params ,
340+ :query_params => query_params ,
341+ :form_params => form_params ,
342+ :body => post_body ,
343+ :auth_names => auth_names ,
344+ :return_type => return_type ,
345+ :api_version => "V2"
346+ )
347+
348+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Put , local_var_path , new_options )
349+ if @api_client . config . debugging
350+ @api_client . config . logger . debug "API called: DatasetsAPI#update_dataset\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
351+ end
352+ return data , status_code , headers
353+ end
282354 end
283355end
0 commit comments