@@ -155,6 +155,78 @@ def delete_dataset_with_http_info(dataset_id, opts = {})
155155 return data , status_code , headers
156156 end
157157
158+ # Edits a dataset.
159+ #
160+ # @see #edit_dataset_with_http_info
161+ def edit_dataset ( dataset_id , body , opts = { } )
162+ data , _status_code , _headers = edit_dataset_with_http_info ( dataset_id , body , opts )
163+ data
164+ end
165+
166+ # Edits a dataset.
167+ #
168+ # Edits the dataset associated with the ID.
169+ #
170+ # @param dataset_id [String] The ID of a defined dataset.
171+ # @param body [DatasetEditRequest] Dataset payload
172+ # @param opts [Hash] the optional parameters
173+ # @return [Array<(DatasetResponseSingle, Integer, Hash)>] DatasetResponseSingle data, response status code and response headers
174+ def edit_dataset_with_http_info ( dataset_id , body , opts = { } )
175+
176+ if @api_client . config . debugging
177+ @api_client . config . logger . debug 'Calling API: DatasetsAPI.edit_dataset ...'
178+ end
179+ # verify the required parameter 'dataset_id' is set
180+ if @api_client . config . client_side_validation && dataset_id . nil?
181+ fail ArgumentError , "Missing the required parameter 'dataset_id' when calling DatasetsAPI.edit_dataset"
182+ end
183+ # verify the required parameter 'body' is set
184+ if @api_client . config . client_side_validation && body . nil?
185+ fail ArgumentError , "Missing the required parameter 'body' when calling DatasetsAPI.edit_dataset"
186+ end
187+ # resource path
188+ local_var_path = '/api/v2/datasets/{dataset_id}' . sub ( '{dataset_id}' , CGI . escape ( dataset_id . to_s ) . gsub ( '%2F' , '/' ) )
189+
190+ # query parameters
191+ query_params = opts [ :query_params ] || { }
192+
193+ # header parameters
194+ header_params = opts [ :header_params ] || { }
195+ # HTTP header 'Accept' (if needed)
196+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
197+ # HTTP header 'Content-Type'
198+ header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] )
199+
200+ # form parameters
201+ form_params = opts [ :form_params ] || { }
202+
203+ # http body (model)
204+ post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( body )
205+
206+ # return_type
207+ return_type = opts [ :debug_return_type ] || 'DatasetResponseSingle'
208+
209+ # auth_names
210+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth , :AuthZ ]
211+
212+ new_options = opts . merge (
213+ :operation => :edit_dataset ,
214+ :header_params => header_params ,
215+ :query_params => query_params ,
216+ :form_params => form_params ,
217+ :body => post_body ,
218+ :auth_names => auth_names ,
219+ :return_type => return_type ,
220+ :api_version => "V2"
221+ )
222+
223+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Put , local_var_path , new_options )
224+ if @api_client . config . debugging
225+ @api_client . config . logger . debug "API called: DatasetsAPI#edit_dataset\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
226+ end
227+ return data , status_code , headers
228+ end
229+
158230 # Get all datasets.
159231 #
160232 # @see #get_all_datasets_with_http_info
0 commit comments