Class: VSphereAutomation::Content::LibraryItemApi
- Inherits:
-
Object
- Object
- VSphereAutomation::Content::LibraryItemApi
- Defined in:
- lib/vsphere-automation-content/api/library_item_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#copy(source_library_item_id, request_body, opts = {}) ⇒ ContentLibraryItemCopyResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|
Copies a library item.
-
#copy_with_http_info(source_library_item_id, request_body, opts = {}) ⇒ Array<(ContentLibraryItemCopyResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>
private
Copies a library item.
-
#create(request_body, opts = {}) ⇒ ContentLibraryItemCreateResult|VapiStdErrorsAlreadyExistsError|VapiStdErrorsNotFoundError|
Creates a new library item.
-
#create_with_http_info(request_body, opts = {}) ⇒ Array<(ContentLibraryItemCreateResult|VapiStdErrorsAlreadyExistsError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>
private
Creates a new library item.
-
#delete(library_item_id, opts = {}) ⇒ |VapiStdErrorsInvalidElementTypeError|VapiStdErrorsNotFoundError|nil
Deletes a library item.
-
#delete_with_http_info(library_item_id, opts = {}) ⇒ Array<(|VapiStdErrorsInvalidElementTypeError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>
private
Deletes a library item.
-
#find(request_body, opts = {}) ⇒ ContentLibraryItemFindResult|VapiStdErrorsInvalidArgumentError|
Returns identifiers of all the visible (as determined by authorization policy) library items matching the requested Item.FindSpec.
-
#find_with_http_info(request_body, opts = {}) ⇒ Array<(ContentLibraryItemFindResult|VapiStdErrorsInvalidArgumentError|, Fixnum, Hash)>
private
Returns identifiers of all the visible (as determined by authorization policy) library items matching the requested Item.FindSpec.
-
#get(library_item_id, opts = {}) ⇒ ContentLibraryItemResult|VapiStdErrorsNotFoundError|
Returns the ItemModel with the given identifier.
-
#get_with_http_info(library_item_id, opts = {}) ⇒ Array<(ContentLibraryItemResult|VapiStdErrorsNotFoundError|, Fixnum, Hash)>
private
Returns the ItemModel with the given identifier.
-
#initialize(api_client = ApiClient.default) ⇒ LibraryItemApi
constructor
A new instance of LibraryItemApi.
-
#list(library_id, opts = {}) ⇒ ContentLibraryItemListResult|VapiStdErrorsNotFoundError|
Returns the identifiers of all items in the given library.
-
#list_with_http_info(library_id, opts = {}) ⇒ Array<(ContentLibraryItemListResult|VapiStdErrorsNotFoundError|, Fixnum, Hash)>
private
Returns the identifiers of all items in the given library.
-
#publish(library_item_id, request_body, opts = {}) ⇒ |VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil
Publishes the library item to specified subscriptions of the library.
-
#publish_with_http_info(library_item_id, request_body, opts = {}) ⇒ Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>
private
Publishes the library item to specified subscriptions of the library.
-
#update(library_item_id, request_body, opts = {}) ⇒ |VapiStdErrorsAlreadyExistsError|VapiStdErrorsNotFoundError|nil
Updates the specified properties of a library item.
-
#update_with_http_info(library_item_id, request_body, opts = {}) ⇒ Array<(|VapiStdErrorsAlreadyExistsError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>
private
Updates the specified properties of a library item.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LibraryItemApi
Returns a new instance of LibraryItemApi.
16 17 18 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#copy(source_library_item_id, request_body, opts = {}) ⇒ ContentLibraryItemCopyResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|
Copies a library item. <p> Copying a library item allows a duplicate to be made within the same or different library. The copy occurs by first creating a new library item, whose identifier is returned. The content of the library item is then copied asynchronously. This copy can be tracked as a task. <p> If the copy fails, Content Library Service will roll back the copy by deleting any content that was already copied, and removing the new library item. A failure during rollback may require manual cleanup by an administrator. <p> A library item cannot be copied into a subscribed library.
24 25 26 27 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 24 def copy(source_library_item_id, request_body, opts = {}) data, _status_code, _headers = copy_with_http_info(source_library_item_id, request_body, opts) data end |
#copy_with_http_info(source_library_item_id, request_body, opts = {}) ⇒ Array<(ContentLibraryItemCopyResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Copies a library item. <p> Copying a library item allows a duplicate to be made within the same or different library. The copy occurs by first creating a new library item, whose identifier is returned. The content of the library item is then copied asynchronously. This copy can be tracked as a task. <p> If the copy fails, Content Library Service will roll back the copy by deleting any content that was already copied, and removing the new library item. A failure during rollback may require manual cleanup by an administrator. <p> A library item cannot be copied into a subscribed library.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 35 def copy_with_http_info(source_library_item_id, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LibraryItemApi.copy ...' end # verify the required parameter 'source_library_item_id' is set if @api_client.config.client_side_validation && source_library_item_id.nil? fail ArgumentError, "Missing the required parameter 'source_library_item_id' when calling LibraryItemApi.copy" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemApi.copy" end # resource path local_var_path = '/com/vmware/content/library/item/id:{source_library_item_id}?~action=copy'.sub('{' + 'source_library_item_id' + '}', source_library_item_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request_body) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => { '200' => 'Content::ContentLibraryItemCopyResult', '400' => 'Content::VapiStdErrorsNotAllowedInCurrentStateError', '404' => 'Content::VapiStdErrorsNotFoundError', }) if @api_client.config.debugging @api_client.config.logger.debug "API called: LibraryItemApi#copy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create(request_body, opts = {}) ⇒ ContentLibraryItemCreateResult|VapiStdErrorsAlreadyExistsError|VapiStdErrorsNotFoundError|
Creates a new library item. <p> A new library item is created without any content. After creation, content can be added through the UpdateSession and File services. <p> A library item cannot be created in a subscribed library.
86 87 88 89 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 86 def create(request_body, opts = {}) data, _status_code, _headers = create_with_http_info(request_body, opts) data end |
#create_with_http_info(request_body, opts = {}) ⇒ Array<(ContentLibraryItemCreateResult|VapiStdErrorsAlreadyExistsError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new library item. <p> A new library item is created without any content. After creation, content can be added through the UpdateSession and File services. <p> A library item cannot be created in a subscribed library.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 96 def create_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LibraryItemApi.create ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemApi.create" end # resource path local_var_path = '/com/vmware/content/library/item' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request_body) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => { '200' => 'Content::ContentLibraryItemCreateResult', '400' => 'Content::VapiStdErrorsAlreadyExistsError', '404' => 'Content::VapiStdErrorsNotFoundError', }) if @api_client.config.debugging @api_client.config.logger.debug "API called: LibraryItemApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete(library_item_id, opts = {}) ⇒ |VapiStdErrorsInvalidElementTypeError|VapiStdErrorsNotFoundError|nil
Deletes a library item. <p> This operation will immediately remove the item from the library that owns it. The content of the item will be asynchronously removed from the storage backings. The content deletion can be tracked with a task. In the event that the task fails, an administrator may need to manually remove the files from the storage backing. <p> This operation cannot be used to delete a library item that is a member of a subscribed library. Removing an item from a subscribed library requires deleting the item from the original published local library and syncing the subscribed library.
143 144 145 146 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 143 def delete(library_item_id, opts = {}) delete_with_http_info(library_item_id, opts) nil end |
#delete_with_http_info(library_item_id, opts = {}) ⇒ Array<(|VapiStdErrorsInvalidElementTypeError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Deletes a library item. <p> This operation will immediately remove the item from the library that owns it. The content of the item will be asynchronously removed from the storage backings. The content deletion can be tracked with a task. In the event that the task fails, an administrator may need to manually remove the files from the storage backing. <p> This operation cannot be used to delete a library item that is a member of a subscribed library. Removing an item from a subscribed library requires deleting the item from the original published local library and syncing the subscribed library.
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 153 def delete_with_http_info(library_item_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LibraryItemApi.delete ...' end # verify the required parameter 'library_item_id' is set if @api_client.config.client_side_validation && library_item_id.nil? fail ArgumentError, "Missing the required parameter 'library_item_id' when calling LibraryItemApi.delete" end # resource path local_var_path = '/com/vmware/content/library/item/id:{library_item_id}'.sub('{' + 'library_item_id' + '}', library_item_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: LibraryItemApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#find(request_body, opts = {}) ⇒ ContentLibraryItemFindResult|VapiStdErrorsInvalidArgumentError|
Returns identifiers of all the visible (as determined by authorization policy) library items matching the requested Item.FindSpec.
193 194 195 196 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 193 def find(request_body, opts = {}) data, _status_code, _headers = find_with_http_info(request_body, opts) data end |
#find_with_http_info(request_body, opts = {}) ⇒ Array<(ContentLibraryItemFindResult|VapiStdErrorsInvalidArgumentError|, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns identifiers of all the visible (as determined by authorization policy) library items matching the requested Item.FindSpec.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 203 def find_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LibraryItemApi.find ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemApi.find" end # resource path local_var_path = '/com/vmware/content/library/item?~action=find' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request_body) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => { '200' => 'Content::ContentLibraryItemFindResult', '400' => 'Content::VapiStdErrorsInvalidArgumentError', }) if @api_client.config.debugging @api_client.config.logger.debug "API called: LibraryItemApi#find\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get(library_item_id, opts = {}) ⇒ ContentLibraryItemResult|VapiStdErrorsNotFoundError|
Returns the ItemModel with the given identifier.
249 250 251 252 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 249 def get(library_item_id, opts = {}) data, _status_code, _headers = get_with_http_info(library_item_id, opts) data end |
#get_with_http_info(library_item_id, opts = {}) ⇒ Array<(ContentLibraryItemResult|VapiStdErrorsNotFoundError|, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the ItemModel with the given identifier.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 259 def get_with_http_info(library_item_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LibraryItemApi.get ...' end # verify the required parameter 'library_item_id' is set if @api_client.config.client_side_validation && library_item_id.nil? fail ArgumentError, "Missing the required parameter 'library_item_id' when calling LibraryItemApi.get" end # resource path local_var_path = '/com/vmware/content/library/item/id:{library_item_id}'.sub('{' + 'library_item_id' + '}', library_item_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => { '200' => 'Content::ContentLibraryItemResult', '404' => 'Content::VapiStdErrorsNotFoundError', }) if @api_client.config.debugging @api_client.config.logger.debug "API called: LibraryItemApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list(library_id, opts = {}) ⇒ ContentLibraryItemListResult|VapiStdErrorsNotFoundError|
Returns the identifiers of all items in the given library.
303 304 305 306 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 303 def list(library_id, opts = {}) data, _status_code, _headers = list_with_http_info(library_id, opts) data end |
#list_with_http_info(library_id, opts = {}) ⇒ Array<(ContentLibraryItemListResult|VapiStdErrorsNotFoundError|, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the identifiers of all items in the given library.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 313 def list_with_http_info(library_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LibraryItemApi.list ...' end # verify the required parameter 'library_id' is set if @api_client.config.client_side_validation && library_id.nil? fail ArgumentError, "Missing the required parameter 'library_id' when calling LibraryItemApi.list" end # resource path local_var_path = '/com/vmware/content/library/item' # query parameters query_params = {} query_params[:'library_id'] = library_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => { '200' => 'Content::ContentLibraryItemListResult', '404' => 'Content::VapiStdErrorsNotFoundError', }) if @api_client.config.debugging @api_client.config.logger.debug "API called: LibraryItemApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#publish(library_item_id, request_body, opts = {}) ⇒ |VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil
Publishes the library item to specified subscriptions of the library. If no subscriptions are specified, then publishes the library item to all subscriptions of the library.
359 360 361 362 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 359 def publish(library_item_id, request_body, opts = {}) publish_with_http_info(library_item_id, request_body, opts) nil end |
#publish_with_http_info(library_item_id, request_body, opts = {}) ⇒ Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Publishes the library item to specified subscriptions of the library. If no subscriptions are specified, then publishes the library item to all subscriptions of the library.
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 370 def publish_with_http_info(library_item_id, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LibraryItemApi.publish ...' end # verify the required parameter 'library_item_id' is set if @api_client.config.client_side_validation && library_item_id.nil? fail ArgumentError, "Missing the required parameter 'library_item_id' when calling LibraryItemApi.publish" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemApi.publish" end # resource path local_var_path = '/com/vmware/content/library/item/id:{library_item_id}?~action=publish'.sub('{' + 'library_item_id' + '}', library_item_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request_body) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: LibraryItemApi#publish\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update(library_item_id, request_body, opts = {}) ⇒ |VapiStdErrorsAlreadyExistsError|VapiStdErrorsNotFoundError|nil
Updates the specified properties of a library item. <p> This is an incremental update to the library item. Fields that are unset in the update specification are left unchanged. <p> This operation cannot update a library item that is a member of a subscribed library. Those items must be updated in the source published library and synchronized to the subscribed library.
417 418 419 420 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 417 def update(library_item_id, request_body, opts = {}) update_with_http_info(library_item_id, request_body, opts) nil end |
#update_with_http_info(library_item_id, request_body, opts = {}) ⇒ Array<(|VapiStdErrorsAlreadyExistsError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Updates the specified properties of a library item. <p> This is an incremental update to the library item. Fields that are unset in the update specification are left unchanged. <p> This operation cannot update a library item that is a member of a subscribed library. Those items must be updated in the source published library and synchronized to the subscribed library.
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/vsphere-automation-content/api/library_item_api.rb', line 428 def update_with_http_info(library_item_id, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LibraryItemApi.update ...' end # verify the required parameter 'library_item_id' is set if @api_client.config.client_side_validation && library_item_id.nil? fail ArgumentError, "Missing the required parameter 'library_item_id' when calling LibraryItemApi.update" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemApi.update" end # resource path local_var_path = '/com/vmware/content/library/item/id:{library_item_id}'.sub('{' + 'library_item_id' + '}', library_item_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request_body) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: LibraryItemApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |