vsphere-automation-content 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -6
  3. data/README.md +15 -16
  4. data/docs/ConfigurationApi.md +4 -8
  5. data/docs/LibraryApi.md +3 -5
  6. data/docs/LibraryItemApi.md +6 -10
  7. data/docs/LibraryItemDownloadSessionApi.md +3 -5
  8. data/docs/LibraryItemDownloadsessionFileApi.md +3 -5
  9. data/docs/LibraryItemFileApi.md +3 -5
  10. data/docs/LibraryItemStorageApi.md +3 -5
  11. data/docs/LibraryItemUpdateSessionApi.md +3 -5
  12. data/docs/LibraryItemUpdatesessionFileApi.md +3 -5
  13. data/docs/LibrarySubscribedItemApi.md +3 -5
  14. data/docs/LocalLibraryApi.md +3 -5
  15. data/docs/SubscribedLibraryApi.md +3 -5
  16. data/lib/vsphere-automation-content/api/configuration_api.rb +4 -15
  17. data/lib/vsphere-automation-content/api/library_api.rb +4 -15
  18. data/lib/vsphere-automation-content/api/library_item_api.rb +8 -30
  19. data/lib/vsphere-automation-content/api/library_item_download_session_api.rb +4 -15
  20. data/lib/vsphere-automation-content/api/library_item_downloadsession_file_api.rb +4 -15
  21. data/lib/vsphere-automation-content/api/library_item_file_api.rb +4 -15
  22. data/lib/vsphere-automation-content/api/library_item_storage_api.rb +4 -15
  23. data/lib/vsphere-automation-content/api/library_item_update_session_api.rb +4 -15
  24. data/lib/vsphere-automation-content/api/library_item_updatesession_file_api.rb +4 -15
  25. data/lib/vsphere-automation-content/api/library_subscribed_item_api.rb +4 -15
  26. data/lib/vsphere-automation-content/api/local_library_api.rb +4 -15
  27. data/lib/vsphere-automation-content/api/subscribed_library_api.rb +4 -15
  28. data/lib/vsphere-automation-content/api_client.rb +1 -1
  29. data/lib/vsphere-automation-content/version.rb +1 -1
  30. data/pkg/vsphere-automation-content-0.2.2.gem +0 -0
  31. data/vsphere-automation-content.gemspec +2 -2
  32. metadata +7 -6
@@ -4,12 +4,12 @@ All URIs are relative to *https://<vcenter>/rest*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**evict**](LibrarySubscribedItemApi.md#evict) | **POST** /com/vmware/content/library/subscribed-item/id:{library_item_id} | Evicts the cached content of a library item in a subscribed library. <p> This {@term operation} allows the cached content of a library item to be removed to free up storage capacity. This {@term operation} will only work when a library item is synchronized on-demand. When a library is not synchronized on-demand, it always attempts to keep its cache up-to-date with the published source. Evicting the library item will set {@link ItemModel#cached} to false.
7
+ [**evict**](LibrarySubscribedItemApi.md#evict) | **POST** /com/vmware/content/library/subscribed-item/id:{library_item_id}?~action=evict | Evicts the cached content of a library item in a subscribed library. <p> This {@term operation} allows the cached content of a library item to be removed to free up storage capacity. This {@term operation} will only work when a library item is synchronized on-demand. When a library is not synchronized on-demand, it always attempts to keep its cache up-to-date with the published source. Evicting the library item will set {@link ItemModel#cached} to false.
8
8
  [**sync**](LibrarySubscribedItemApi.md#sync) | **POST** /com/vmware/content/library/subscribed-item/id:{library_item_id}?~action=sync | Forces the synchronization of an individual library item in a subscribed library. <p> Synchronizing an individual item will update that item's metadata from the remote source. If the source library item on the remote library has been deleted, this {@term operation} will delete the library item from the subscribed library as well. <p> The default behavior of the synchronization is determined by the {@link SubscriptionInfo} of the library which owns the library item. <ul> <li>If {@link SubscriptionInfo#onDemand} is true, then the file content is not synchronized by default. In this case, only the library item metadata is synchronized. The file content may still be forcefully synchronized by passing true for the {@param.name forceSyncContent} {@term parameter}.</li> <li>If {@link SubscriptionInfo#onDemand} is false, then this call will always synchronize the file content. The {@param.name forceSyncContent} {@term parameter} is ignored when the subscription is not on-demand.</li> </ul> When the file content has been synchronized, the {@link ItemModel#cached} {@term field} will be true. <p> This {@term operation} will return immediately and create an asynchronous task to perform the synchronization.
9
9
 
10
10
 
11
11
  # **evict**
12
- > evict(library_item_id, action)
12
+ > evict(library_item_id)
13
13
 
14
14
  Evicts the cached content of a library item in a subscribed library. <p> This {@term operation} allows the cached content of a library item to be removed to free up storage capacity. This {@term operation} will only work when a library item is synchronized on-demand. When a library is not synchronized on-demand, it always attempts to keep its cache up-to-date with the published source. Evicting the library item will set {@link ItemModel#cached} to false.
15
15
 
@@ -27,11 +27,10 @@ end
27
27
 
28
28
  api_instance = VSphereAutomation::Content::LibrarySubscribedItemApi.new
29
29
  library_item_id = 'library_item_id_example' # String | Identifier of the library item whose content should be evicted.
30
- action = 'action_example' # String | ~action=evict
31
30
 
32
31
  begin
33
32
  #Evicts the cached content of a library item in a subscribed library. <p> This {@term operation} allows the cached content of a library item to be removed to free up storage capacity. This {@term operation} will only work when a library item is synchronized on-demand. When a library is not synchronized on-demand, it always attempts to keep its cache up-to-date with the published source. Evicting the library item will set {@link ItemModel#cached} to false.
34
- api_instance.evict(library_item_id, action)
33
+ api_instance.evict(library_item_id)
35
34
  rescue VSphereAutomation::ApiError => e
36
35
  puts "Exception when calling LibrarySubscribedItemApi->evict: #{e}"
37
36
  end
@@ -42,7 +41,6 @@ end
42
41
  Name | Type | Description | Notes
43
42
  ------------- | ------------- | ------------- | -------------
44
43
  **library_item_id** | **String**| Identifier of the library item whose content should be evicted. |
45
- **action** | **String**| ~action&#x3D;evict |
46
44
 
47
45
  ### Return type
48
46
 
@@ -8,7 +8,7 @@ Method | HTTP request | Description
8
8
  [**delete**](LocalLibraryApi.md#delete) | **DELETE** /com/vmware/content/local-library/id:{library_id} | Deletes the specified local library. &lt;p&gt; Deleting a local library will remove the entry immediately and begin an asynchronous task to remove all cached content for the library. If the asynchronous task fails, file content may remain on the storage backing. This content will require manual removal.
9
9
  [**get**](LocalLibraryApi.md#get) | **GET** /com/vmware/content/local-library/id:{library_id} | Returns a given local library.
10
10
  [**list**](LocalLibraryApi.md#list) | **GET** /com/vmware/content/local-library | Returns the identifiers of all local libraries in the Content Library.
11
- [**publish**](LocalLibraryApi.md#publish) | **POST** /com/vmware/content/local-library/id:{library_id} | Publishes the library to specified subscriptions. If no subscriptions are specified, then publishes the library to all its subscriptions.
11
+ [**publish**](LocalLibraryApi.md#publish) | **POST** /com/vmware/content/local-library/id:{library_id}?~action&#x3D;publish | Publishes the library to specified subscriptions. If no subscriptions are specified, then publishes the library to all its subscriptions.
12
12
  [**update**](LocalLibraryApi.md#update) | **PATCH** /com/vmware/content/local-library/id:{library_id} | Updates the properties of a local library. &lt;p&gt; This is an incremental update to the local library. {@term Fields} that are {@term unset} in the update specification will be left unchanged.
13
13
 
14
14
 
@@ -208,7 +208,7 @@ This endpoint does not need any parameter.
208
208
 
209
209
 
210
210
  # **publish**
211
- > publish(library_id, action, opts)
211
+ > publish(library_id, opts)
212
212
 
213
213
  Publishes the library to specified subscriptions. If no subscriptions are specified, then publishes the library to all its subscriptions.
214
214
 
@@ -226,14 +226,13 @@ end
226
226
 
227
227
  api_instance = VSphereAutomation::Content::LocalLibraryApi.new
228
228
  library_id = 'library_id_example' # String | Identifier of the published library.
229
- action = 'action_example' # String | ~action=publish
230
229
  opts = {
231
230
  request_body: Content::ContentLocalLibraryPublish.new # ContentLocalLibraryPublish |
232
231
  }
233
232
 
234
233
  begin
235
234
  #Publishes the library to specified subscriptions. If no subscriptions are specified, then publishes the library to all its subscriptions.
236
- api_instance.publish(library_id, action, opts)
235
+ api_instance.publish(library_id, opts)
237
236
  rescue VSphereAutomation::ApiError => e
238
237
  puts "Exception when calling LocalLibraryApi->publish: #{e}"
239
238
  end
@@ -244,7 +243,6 @@ end
244
243
  Name | Type | Description | Notes
245
244
  ------------- | ------------- | ------------- | -------------
246
245
  **library_id** | **String**| Identifier of the published library. |
247
- **action** | **String**| ~action&#x3D;publish |
248
246
  **request_body** | [**ContentLocalLibraryPublish**](ContentLocalLibraryPublish.md)| | [optional]
249
247
 
250
248
  ### Return type
@@ -10,7 +10,7 @@ Method | HTTP request | Description
10
10
  [**get**](SubscribedLibraryApi.md#get) | **GET** /com/vmware/content/subscribed-library/id:{library_id} | Returns a given subscribed library.
11
11
  [**list**](SubscribedLibraryApi.md#list) | **GET** /com/vmware/content/subscribed-library | Returns the identifiers of all subscribed libraries in the Content Library.
12
12
  [**probe**](SubscribedLibraryApi.md#probe) | **POST** /com/vmware/content/subscribed-library?~action&#x3D;probe | Probes remote library subscription information, including URL, SSL certificate and password. The resulting {@link ProbeResult} {@term structure} describes whether or not the subscription configuration is successful.
13
- [**sync**](SubscribedLibraryApi.md#sync) | **POST** /com/vmware/content/subscribed-library/id:{library_id} | Forces the synchronization of the subscribed library. &lt;p&gt; Synchronizing a subscribed library forcefully with this {@term operation} will perform the same synchronization behavior as would run periodically for the library. The {@link SubscriptionInfo#onDemand} setting is respected. Calling this {@term operation} on a library that is already in the process of synchronizing will have no effect.
13
+ [**sync**](SubscribedLibraryApi.md#sync) | **POST** /com/vmware/content/subscribed-library/id:{library_id}?~action&#x3D;sync | Forces the synchronization of the subscribed library. &lt;p&gt; Synchronizing a subscribed library forcefully with this {@term operation} will perform the same synchronization behavior as would run periodically for the library. The {@link SubscriptionInfo#onDemand} setting is respected. Calling this {@term operation} on a library that is already in the process of synchronizing will have no effect.
14
14
  [**update**](SubscribedLibraryApi.md#update) | **PATCH** /com/vmware/content/subscribed-library/id:{library_id} | Updates the properties of a subscribed library. &lt;p&gt; This is an incremental update to the subscribed library. {@term Fields} that are {@term unset} in the update specification will be left unchanged.
15
15
 
16
16
 
@@ -309,7 +309,7 @@ Name | Type | Description | Notes
309
309
 
310
310
 
311
311
  # **sync**
312
- > sync(library_id, action)
312
+ > sync(library_id)
313
313
 
314
314
  Forces the synchronization of the subscribed library. <p> Synchronizing a subscribed library forcefully with this {@term operation} will perform the same synchronization behavior as would run periodically for the library. The {@link SubscriptionInfo#onDemand} setting is respected. Calling this {@term operation} on a library that is already in the process of synchronizing will have no effect.
315
315
 
@@ -327,11 +327,10 @@ end
327
327
 
328
328
  api_instance = VSphereAutomation::Content::SubscribedLibraryApi.new
329
329
  library_id = 'library_id_example' # String | Identifier of the subscribed library to synchronize.
330
- action = 'action_example' # String | ~action=sync
331
330
 
332
331
  begin
333
332
  #Forces the synchronization of the subscribed library. <p> Synchronizing a subscribed library forcefully with this {@term operation} will perform the same synchronization behavior as would run periodically for the library. The {@link SubscriptionInfo#onDemand} setting is respected. Calling this {@term operation} on a library that is already in the process of synchronizing will have no effect.
334
- api_instance.sync(library_id, action)
333
+ api_instance.sync(library_id)
335
334
  rescue VSphereAutomation::ApiError => e
336
335
  puts "Exception when calling SubscribedLibraryApi->sync: #{e}"
337
336
  end
@@ -342,7 +341,6 @@ end
342
341
  Name | Type | Description | Notes
343
342
  ------------- | ------------- | ------------- | -------------
344
343
  **library_id** | **String**| Identifier of the subscribed library to synchronize. |
345
- **action** | **String**| ~action&#x3D;sync |
346
344
 
347
345
  ### Return type
348
346
 
@@ -17,37 +17,26 @@ module VSphereAutomation
17
17
  @api_client = api_client
18
18
  end
19
19
  # Retrieves the current configuration values.
20
- # @param action ~action&#x3D;get
21
20
  # @param [Hash] opts the optional parameters
22
21
  # @return [ContentConfigurationResult|]
23
- def get(action, opts = {})
24
- data, _status_code, _headers = get_with_http_info(action, opts)
22
+ def get(opts = {})
23
+ data, _status_code, _headers = get_with_http_info(opts)
25
24
  data
26
25
  end
27
26
 
28
27
  # Retrieves the current configuration values.
29
28
  # @api private
30
- # @param action ~action&#x3D;get
31
29
  # @param [Hash] opts the optional parameters
32
30
  # @return [Array<(ContentConfigurationResult|, Fixnum, Hash)>] data, response status code and response headers
33
- def get_with_http_info(action, opts = {})
31
+ def get_with_http_info(opts = {})
34
32
  if @api_client.config.debugging
35
33
  @api_client.config.logger.debug 'Calling API: ConfigurationApi.get ...'
36
34
  end
37
- # verify the required parameter 'action' is set
38
- if @api_client.config.client_side_validation && action.nil?
39
- fail ArgumentError, "Missing the required parameter 'action' when calling ConfigurationApi.get"
40
- end
41
- # verify enum value
42
- if @api_client.config.client_side_validation && !['get'].include?(action)
43
- fail ArgumentError, "invalid value for 'action', must be one of get"
44
- end
45
35
  # resource path
46
- local_var_path = '/com/vmware/content/configuration'
36
+ local_var_path = '/com/vmware/content/configuration?~action=get'
47
37
 
48
38
  # query parameters
49
39
  query_params = {}
50
- query_params[:'~action'] = action
51
40
 
52
41
  # header parameters
53
42
  header_params = {}
@@ -17,43 +17,32 @@ module VSphereAutomation
17
17
  @api_client = api_client
18
18
  end
19
19
  # Returns a list of all the visible (as determined by authorization policy) libraries matching the requested {@link Library.FindSpec}.
20
- # @param action ~action&#x3D;find
21
20
  # @param request_body
22
21
  # @param [Hash] opts the optional parameters
23
22
  # @return [ContentLibraryFindResult|VapiStdErrorsInvalidArgumentError|]
24
- def find(action, request_body, opts = {})
25
- data, _status_code, _headers = find_with_http_info(action, request_body, opts)
23
+ def find(request_body, opts = {})
24
+ data, _status_code, _headers = find_with_http_info(request_body, opts)
26
25
  data
27
26
  end
28
27
 
29
28
  # Returns a list of all the visible (as determined by authorization policy) libraries matching the requested {@link Library.FindSpec}.
30
29
  # @api private
31
- # @param action ~action&#x3D;find
32
30
  # @param request_body
33
31
  # @param [Hash] opts the optional parameters
34
32
  # @return [Array<(ContentLibraryFindResult|VapiStdErrorsInvalidArgumentError|, Fixnum, Hash)>] data, response status code and response headers
35
- def find_with_http_info(action, request_body, opts = {})
33
+ def find_with_http_info(request_body, opts = {})
36
34
  if @api_client.config.debugging
37
35
  @api_client.config.logger.debug 'Calling API: LibraryApi.find ...'
38
36
  end
39
- # verify the required parameter 'action' is set
40
- if @api_client.config.client_side_validation && action.nil?
41
- fail ArgumentError, "Missing the required parameter 'action' when calling LibraryApi.find"
42
- end
43
- # verify enum value
44
- if @api_client.config.client_side_validation && !['find'].include?(action)
45
- fail ArgumentError, "invalid value for 'action', must be one of find"
46
- end
47
37
  # verify the required parameter 'request_body' is set
48
38
  if @api_client.config.client_side_validation && request_body.nil?
49
39
  fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryApi.find"
50
40
  end
51
41
  # resource path
52
- local_var_path = '/com/vmware/content/library'
42
+ local_var_path = '/com/vmware/content/library?~action=find'
53
43
 
54
44
  # query parameters
55
45
  query_params = {}
56
- query_params[:'~action'] = action
57
46
 
58
47
  # header parameters
59
48
  header_params = {}
@@ -18,23 +18,21 @@ module VSphereAutomation
18
18
  end
19
19
  # 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.
20
20
  # @param source_library_item_id Identifier of the existing library item from which the content will be copied.
21
- # @param action ~action&#x3D;copy
22
21
  # @param request_body
23
22
  # @param [Hash] opts the optional parameters
24
23
  # @return [ContentLibraryItemCopyResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|]
25
- def copy(source_library_item_id, action, request_body, opts = {})
26
- data, _status_code, _headers = copy_with_http_info(source_library_item_id, action, request_body, opts)
24
+ def copy(source_library_item_id, request_body, opts = {})
25
+ data, _status_code, _headers = copy_with_http_info(source_library_item_id, request_body, opts)
27
26
  data
28
27
  end
29
28
 
30
29
  # Copies a library item. &lt;p&gt; 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. &lt;p&gt; 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. &lt;p&gt; A library item cannot be copied into a subscribed library.
31
30
  # @api private
32
31
  # @param source_library_item_id Identifier of the existing library item from which the content will be copied.
33
- # @param action ~action&#x3D;copy
34
32
  # @param request_body
35
33
  # @param [Hash] opts the optional parameters
36
34
  # @return [Array<(ContentLibraryItemCopyResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>] data, response status code and response headers
37
- def copy_with_http_info(source_library_item_id, action, request_body, opts = {})
35
+ def copy_with_http_info(source_library_item_id, request_body, opts = {})
38
36
  if @api_client.config.debugging
39
37
  @api_client.config.logger.debug 'Calling API: LibraryItemApi.copy ...'
40
38
  end
@@ -42,24 +40,15 @@ module VSphereAutomation
42
40
  if @api_client.config.client_side_validation && source_library_item_id.nil?
43
41
  fail ArgumentError, "Missing the required parameter 'source_library_item_id' when calling LibraryItemApi.copy"
44
42
  end
45
- # verify the required parameter 'action' is set
46
- if @api_client.config.client_side_validation && action.nil?
47
- fail ArgumentError, "Missing the required parameter 'action' when calling LibraryItemApi.copy"
48
- end
49
- # verify enum value
50
- if @api_client.config.client_side_validation && !['copy'].include?(action)
51
- fail ArgumentError, "invalid value for 'action', must be one of copy"
52
- end
53
43
  # verify the required parameter 'request_body' is set
54
44
  if @api_client.config.client_side_validation && request_body.nil?
55
45
  fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemApi.copy"
56
46
  end
57
47
  # resource path
58
- local_var_path = '/com/vmware/content/library/item/id:{source_library_item_id}'.sub('{' + 'source_library_item_id' + '}', source_library_item_id.to_s)
48
+ 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)
59
49
 
60
50
  # query parameters
61
51
  query_params = {}
62
- query_params[:'~action'] = action
63
52
 
64
53
  # header parameters
65
54
  header_params = {}
@@ -364,23 +353,21 @@ module VSphereAutomation
364
353
  end
365
354
  # 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.
366
355
  # @param library_item_id Library item identifier.
367
- # @param action ~action&#x3D;publish
368
356
  # @param request_body
369
357
  # @param [Hash] opts the optional parameters
370
358
  # @return [|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil]
371
- def publish(library_item_id, action, request_body, opts = {})
372
- publish_with_http_info(library_item_id, action, request_body, opts)
359
+ def publish(library_item_id, request_body, opts = {})
360
+ publish_with_http_info(library_item_id, request_body, opts)
373
361
  nil
374
362
  end
375
363
 
376
364
  # 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.
377
365
  # @api private
378
366
  # @param library_item_id Library item identifier.
379
- # @param action ~action&#x3D;publish
380
367
  # @param request_body
381
368
  # @param [Hash] opts the optional parameters
382
369
  # @return [Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
383
- def publish_with_http_info(library_item_id, action, request_body, opts = {})
370
+ def publish_with_http_info(library_item_id, request_body, opts = {})
384
371
  if @api_client.config.debugging
385
372
  @api_client.config.logger.debug 'Calling API: LibraryItemApi.publish ...'
386
373
  end
@@ -388,24 +375,15 @@ module VSphereAutomation
388
375
  if @api_client.config.client_side_validation && library_item_id.nil?
389
376
  fail ArgumentError, "Missing the required parameter 'library_item_id' when calling LibraryItemApi.publish"
390
377
  end
391
- # verify the required parameter 'action' is set
392
- if @api_client.config.client_side_validation && action.nil?
393
- fail ArgumentError, "Missing the required parameter 'action' when calling LibraryItemApi.publish"
394
- end
395
- # verify enum value
396
- if @api_client.config.client_side_validation && !['publish'].include?(action)
397
- fail ArgumentError, "invalid value for 'action', must be one of publish"
398
- end
399
378
  # verify the required parameter 'request_body' is set
400
379
  if @api_client.config.client_side_validation && request_body.nil?
401
380
  fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemApi.publish"
402
381
  end
403
382
  # resource path
404
- local_var_path = '/com/vmware/content/library/item/id:{library_item_id}'.sub('{' + 'library_item_id' + '}', library_item_id.to_s)
383
+ local_var_path = '/com/vmware/content/library/item/id:{library_item_id}?~action=publish'.sub('{' + 'library_item_id' + '}', library_item_id.to_s)
405
384
 
406
385
  # query parameters
407
386
  query_params = {}
408
- query_params[:'~action'] = action
409
387
 
410
388
  # header parameters
411
389
  header_params = {}
@@ -175,23 +175,21 @@ module VSphereAutomation
175
175
  end
176
176
  # Terminates the download session with a client specified error message. <p> This is useful in transmitting client side failures (for example, not being able to download a file) to the server side.
177
177
  # @param download_session_id Identifier of the download session to fail.
178
- # @param action ~action&#x3D;fail
179
178
  # @param request_body
180
179
  # @param [Hash] opts the optional parameters
181
180
  # @return [|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|nil]
182
- def fail(download_session_id, action, request_body, opts = {})
183
- fail_with_http_info(download_session_id, action, request_body, opts)
181
+ def fail(download_session_id, request_body, opts = {})
182
+ fail_with_http_info(download_session_id, request_body, opts)
184
183
  nil
185
184
  end
186
185
 
187
186
  # Terminates the download session with a client specified error message. &lt;p&gt; This is useful in transmitting client side failures (for example, not being able to download a file) to the server side.
188
187
  # @api private
189
188
  # @param download_session_id Identifier of the download session to fail.
190
- # @param action ~action&#x3D;fail
191
189
  # @param request_body
192
190
  # @param [Hash] opts the optional parameters
193
191
  # @return [Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
194
- def fail_with_http_info(download_session_id, action, request_body, opts = {})
192
+ def fail_with_http_info(download_session_id, request_body, opts = {})
195
193
  if @api_client.config.debugging
196
194
  @api_client.config.logger.debug 'Calling API: LibraryItemDownloadSessionApi.fail ...'
197
195
  end
@@ -199,24 +197,15 @@ module VSphereAutomation
199
197
  if @api_client.config.client_side_validation && download_session_id.nil?
200
198
  fail ArgumentError, "Missing the required parameter 'download_session_id' when calling LibraryItemDownloadSessionApi.fail"
201
199
  end
202
- # verify the required parameter 'action' is set
203
- if @api_client.config.client_side_validation && action.nil?
204
- fail ArgumentError, "Missing the required parameter 'action' when calling LibraryItemDownloadSessionApi.fail"
205
- end
206
- # verify enum value
207
- if @api_client.config.client_side_validation && !['fail'].include?(action)
208
- fail ArgumentError, "invalid value for 'action', must be one of fail"
209
- end
210
200
  # verify the required parameter 'request_body' is set
211
201
  if @api_client.config.client_side_validation && request_body.nil?
212
202
  fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemDownloadSessionApi.fail"
213
203
  end
214
204
  # resource path
215
- local_var_path = '/com/vmware/content/library/item/download-session/id:{download_session_id}'.sub('{' + 'download_session_id' + '}', download_session_id.to_s)
205
+ local_var_path = '/com/vmware/content/library/item/download-session/id:{download_session_id}?~action=fail'.sub('{' + 'download_session_id' + '}', download_session_id.to_s)
216
206
 
217
207
  # query parameters
218
208
  query_params = {}
219
- query_params[:'~action'] = action
220
209
 
221
210
  # header parameters
222
211
  header_params = {}
@@ -136,23 +136,21 @@ module VSphereAutomation
136
136
  end
137
137
  # Requests a file to be prepared for download.
138
138
  # @param download_session_id Identifier of the download session.
139
- # @param action ~action&#x3D;prepare
140
139
  # @param request_body
141
140
  # @param [Hash] opts the optional parameters
142
141
  # @return [ContentLibraryItemDownloadsessionFilePrepareResult|VapiStdErrorsInvalidArgumentError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|]
143
- def prepare(download_session_id, action, request_body, opts = {})
144
- data, _status_code, _headers = prepare_with_http_info(download_session_id, action, request_body, opts)
142
+ def prepare(download_session_id, request_body, opts = {})
143
+ data, _status_code, _headers = prepare_with_http_info(download_session_id, request_body, opts)
145
144
  data
146
145
  end
147
146
 
148
147
  # Requests a file to be prepared for download.
149
148
  # @api private
150
149
  # @param download_session_id Identifier of the download session.
151
- # @param action ~action&#x3D;prepare
152
150
  # @param request_body
153
151
  # @param [Hash] opts the optional parameters
154
152
  # @return [Array<(ContentLibraryItemDownloadsessionFilePrepareResult|VapiStdErrorsInvalidArgumentError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>] data, response status code and response headers
155
- def prepare_with_http_info(download_session_id, action, request_body, opts = {})
153
+ def prepare_with_http_info(download_session_id, request_body, opts = {})
156
154
  if @api_client.config.debugging
157
155
  @api_client.config.logger.debug 'Calling API: LibraryItemDownloadsessionFileApi.prepare ...'
158
156
  end
@@ -160,24 +158,15 @@ module VSphereAutomation
160
158
  if @api_client.config.client_side_validation && download_session_id.nil?
161
159
  fail ArgumentError, "Missing the required parameter 'download_session_id' when calling LibraryItemDownloadsessionFileApi.prepare"
162
160
  end
163
- # verify the required parameter 'action' is set
164
- if @api_client.config.client_side_validation && action.nil?
165
- fail ArgumentError, "Missing the required parameter 'action' when calling LibraryItemDownloadsessionFileApi.prepare"
166
- end
167
- # verify enum value
168
- if @api_client.config.client_side_validation && !['prepare'].include?(action)
169
- fail ArgumentError, "invalid value for 'action', must be one of prepare"
170
- end
171
161
  # verify the required parameter 'request_body' is set
172
162
  if @api_client.config.client_side_validation && request_body.nil?
173
163
  fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemDownloadsessionFileApi.prepare"
174
164
  end
175
165
  # resource path
176
- local_var_path = '/com/vmware/content/library/item/downloadsession/file/id:{download_session_id}'.sub('{' + 'download_session_id' + '}', download_session_id.to_s)
166
+ local_var_path = '/com/vmware/content/library/item/downloadsession/file/id:{download_session_id}?~action=prepare'.sub('{' + 'download_session_id' + '}', download_session_id.to_s)
177
167
 
178
168
  # query parameters
179
169
  query_params = {}
180
- query_params[:'~action'] = action
181
170
 
182
171
  # header parameters
183
172
  header_params = {}
@@ -18,23 +18,21 @@ module VSphereAutomation
18
18
  end
19
19
  # Retrieves the information for a single file in a library item by its name.
20
20
  # @param library_item_id Identifier of the library item whose file information should be returned.
21
- # @param action ~action&#x3D;get
22
21
  # @param request_body
23
22
  # @param [Hash] opts the optional parameters
24
23
  # @return [ContentLibraryItemFileResult|VapiStdErrorsNotFoundError|]
25
- def get(library_item_id, action, request_body, opts = {})
26
- data, _status_code, _headers = get_with_http_info(library_item_id, action, request_body, opts)
24
+ def get(library_item_id, request_body, opts = {})
25
+ data, _status_code, _headers = get_with_http_info(library_item_id, request_body, opts)
27
26
  data
28
27
  end
29
28
 
30
29
  # Retrieves the information for a single file in a library item by its name.
31
30
  # @api private
32
31
  # @param library_item_id Identifier of the library item whose file information should be returned.
33
- # @param action ~action&#x3D;get
34
32
  # @param request_body
35
33
  # @param [Hash] opts the optional parameters
36
34
  # @return [Array<(ContentLibraryItemFileResult|VapiStdErrorsNotFoundError|, Fixnum, Hash)>] data, response status code and response headers
37
- def get_with_http_info(library_item_id, action, request_body, opts = {})
35
+ def get_with_http_info(library_item_id, request_body, opts = {})
38
36
  if @api_client.config.debugging
39
37
  @api_client.config.logger.debug 'Calling API: LibraryItemFileApi.get ...'
40
38
  end
@@ -42,24 +40,15 @@ module VSphereAutomation
42
40
  if @api_client.config.client_side_validation && library_item_id.nil?
43
41
  fail ArgumentError, "Missing the required parameter 'library_item_id' when calling LibraryItemFileApi.get"
44
42
  end
45
- # verify the required parameter 'action' is set
46
- if @api_client.config.client_side_validation && action.nil?
47
- fail ArgumentError, "Missing the required parameter 'action' when calling LibraryItemFileApi.get"
48
- end
49
- # verify enum value
50
- if @api_client.config.client_side_validation && !['get'].include?(action)
51
- fail ArgumentError, "invalid value for 'action', must be one of get"
52
- end
53
43
  # verify the required parameter 'request_body' is set
54
44
  if @api_client.config.client_side_validation && request_body.nil?
55
45
  fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemFileApi.get"
56
46
  end
57
47
  # resource path
58
- local_var_path = '/com/vmware/content/library/item/file/id:{library_item_id}'.sub('{' + 'library_item_id' + '}', library_item_id.to_s)
48
+ local_var_path = '/com/vmware/content/library/item/file/id:{library_item_id}?~action=get'.sub('{' + 'library_item_id' + '}', library_item_id.to_s)
59
49
 
60
50
  # query parameters
61
51
  query_params = {}
62
- query_params[:'~action'] = action
63
52
 
64
53
  # header parameters
65
54
  header_params = {}
@@ -18,23 +18,21 @@ module VSphereAutomation
18
18
  end
19
19
  # Retrieves the storage information for a specific file in a library item.
20
20
  # @param library_item_id Identifier of the library item whose storage information should be retrieved.
21
- # @param action ~action&#x3D;get
22
21
  # @param request_body
23
22
  # @param [Hash] opts the optional parameters
24
23
  # @return [ContentLibraryItemStorageResult|VapiStdErrorsNotFoundError|]
25
- def get(library_item_id, action, request_body, opts = {})
26
- data, _status_code, _headers = get_with_http_info(library_item_id, action, request_body, opts)
24
+ def get(library_item_id, request_body, opts = {})
25
+ data, _status_code, _headers = get_with_http_info(library_item_id, request_body, opts)
27
26
  data
28
27
  end
29
28
 
30
29
  # Retrieves the storage information for a specific file in a library item.
31
30
  # @api private
32
31
  # @param library_item_id Identifier of the library item whose storage information should be retrieved.
33
- # @param action ~action&#x3D;get
34
32
  # @param request_body
35
33
  # @param [Hash] opts the optional parameters
36
34
  # @return [Array<(ContentLibraryItemStorageResult|VapiStdErrorsNotFoundError|, Fixnum, Hash)>] data, response status code and response headers
37
- def get_with_http_info(library_item_id, action, request_body, opts = {})
35
+ def get_with_http_info(library_item_id, request_body, opts = {})
38
36
  if @api_client.config.debugging
39
37
  @api_client.config.logger.debug 'Calling API: LibraryItemStorageApi.get ...'
40
38
  end
@@ -42,24 +40,15 @@ module VSphereAutomation
42
40
  if @api_client.config.client_side_validation && library_item_id.nil?
43
41
  fail ArgumentError, "Missing the required parameter 'library_item_id' when calling LibraryItemStorageApi.get"
44
42
  end
45
- # verify the required parameter 'action' is set
46
- if @api_client.config.client_side_validation && action.nil?
47
- fail ArgumentError, "Missing the required parameter 'action' when calling LibraryItemStorageApi.get"
48
- end
49
- # verify enum value
50
- if @api_client.config.client_side_validation && !['get'].include?(action)
51
- fail ArgumentError, "invalid value for 'action', must be one of get"
52
- end
53
43
  # verify the required parameter 'request_body' is set
54
44
  if @api_client.config.client_side_validation && request_body.nil?
55
45
  fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemStorageApi.get"
56
46
  end
57
47
  # resource path
58
- local_var_path = '/com/vmware/content/library/item/storage/id:{library_item_id}'.sub('{' + 'library_item_id' + '}', library_item_id.to_s)
48
+ local_var_path = '/com/vmware/content/library/item/storage/id:{library_item_id}?~action=get'.sub('{' + 'library_item_id' + '}', library_item_id.to_s)
59
49
 
60
50
  # query parameters
61
51
  query_params = {}
62
- query_params[:'~action'] = action
63
52
 
64
53
  # header parameters
65
54
  header_params = {}
@@ -68,21 +68,19 @@ module VSphereAutomation
68
68
  end
69
69
  # Completes the update session. This indicates that the client has finished making all the changes required to the underlying library item. If the client is pushing the content to the server, the library item will be updated once this call returns. If the server is pulling the content, the call may return before the changes become visible. In that case, the client can track the session to know when the server is done. <p> This {@term operation} requires the session to be in the {@link UpdateSessionModel.State#ACTIVE} state. <p> Depending on the type of the library item associated with this session, a type adapter may be invoked to verify the validity of the files uploaded. The user can explicitly validate the session before completing the session by using the {@link content.library.item.updatesession.File#validate} {@term operation}. <p> Modifications are not visible to other clients unless the session is completed and all necessary files have been received.
70
70
  # @param update_session_id Identifier of the update session that should be completed.
71
- # @param action ~action&#x3D;complete
72
71
  # @param [Hash] opts the optional parameters
73
72
  # @return [|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|nil]
74
- def complete(update_session_id, action, opts = {})
75
- complete_with_http_info(update_session_id, action, opts)
73
+ def complete(update_session_id, opts = {})
74
+ complete_with_http_info(update_session_id, opts)
76
75
  nil
77
76
  end
78
77
 
79
78
  # Completes the update session. This indicates that the client has finished making all the changes required to the underlying library item. If the client is pushing the content to the server, the library item will be updated once this call returns. If the server is pulling the content, the call may return before the changes become visible. In that case, the client can track the session to know when the server is done. &lt;p&gt; This {@term operation} requires the session to be in the {@link UpdateSessionModel.State#ACTIVE} state. &lt;p&gt; Depending on the type of the library item associated with this session, a type adapter may be invoked to verify the validity of the files uploaded. The user can explicitly validate the session before completing the session by using the {@link content.library.item.updatesession.File#validate} {@term operation}. &lt;p&gt; Modifications are not visible to other clients unless the session is completed and all necessary files have been received.
80
79
  # @api private
81
80
  # @param update_session_id Identifier of the update session that should be completed.
82
- # @param action ~action&#x3D;complete
83
81
  # @param [Hash] opts the optional parameters
84
82
  # @return [Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
85
- def complete_with_http_info(update_session_id, action, opts = {})
83
+ def complete_with_http_info(update_session_id, opts = {})
86
84
  if @api_client.config.debugging
87
85
  @api_client.config.logger.debug 'Calling API: LibraryItemUpdateSessionApi.complete ...'
88
86
  end
@@ -90,20 +88,11 @@ module VSphereAutomation
90
88
  if @api_client.config.client_side_validation && update_session_id.nil?
91
89
  fail ArgumentError, "Missing the required parameter 'update_session_id' when calling LibraryItemUpdateSessionApi.complete"
92
90
  end
93
- # verify the required parameter 'action' is set
94
- if @api_client.config.client_side_validation && action.nil?
95
- fail ArgumentError, "Missing the required parameter 'action' when calling LibraryItemUpdateSessionApi.complete"
96
- end
97
- # verify enum value
98
- if @api_client.config.client_side_validation && !['complete'].include?(action)
99
- fail ArgumentError, "invalid value for 'action', must be one of complete"
100
- end
101
91
  # resource path
102
- local_var_path = '/com/vmware/content/library/item/update-session/id:{update_session_id}'.sub('{' + 'update_session_id' + '}', update_session_id.to_s)
92
+ local_var_path = '/com/vmware/content/library/item/update-session/id:{update_session_id}?~action=complete'.sub('{' + 'update_session_id' + '}', update_session_id.to_s)
103
93
 
104
94
  # query parameters
105
95
  query_params = {}
106
- query_params[:'~action'] = action
107
96
 
108
97
  # header parameters
109
98
  header_params = {}