vsphere-automation-content 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +12 -1
- data/Gemfile.lock +57 -44
- data/README.md +61 -13
- data/Rakefile +8 -0
- data/docs/ConfigurationApi.md +30 -12
- data/docs/ContentConfigurationModel.md +1 -1
- data/docs/ContentLibraryItemDestinationSpec.md +8 -0
- data/docs/ContentLibraryItemFileInfo.md +1 -1
- data/docs/ContentLibraryItemFindSpec.md +1 -1
- data/docs/ContentLibraryItemModel.md +1 -1
- data/docs/ContentLibraryItemPublish.md +9 -0
- data/docs/ContentLibraryItemStorageInfo.md +1 -1
- data/docs/ContentLibraryItemUpdatesessionCertificateInfo.md +1 -1
- data/docs/ContentLibraryItemUpdatesessionFileInfo.md +1 -1
- data/docs/ContentLibraryItemUpdatesessionFileValidationResult.md +1 -1
- data/docs/ContentLibraryItemUpdatesessionPreviewWarningInfo.md +1 -1
- data/docs/ContentLibraryItemUpdatesessionWarningBehavior.md +1 -1
- data/docs/ContentLibraryOptimizationInfo.md +1 -1
- data/docs/ContentLibraryPublishInfo.md +2 -2
- data/docs/ContentLibrarySourceInfo.md +9 -0
- data/docs/ContentLibrarySubscribedItemSync.md +1 -1
- data/docs/ContentLibrarySubscriptionInfo.md +3 -2
- data/docs/ContentLibrarySubscriptionsCreate.md +9 -0
- data/docs/ContentLibrarySubscriptionsCreateResult.md +8 -0
- data/docs/ContentLibrarySubscriptionsCreateSpec.md +8 -0
- data/docs/ContentLibrarySubscriptionsCreateSpecNewSubscribedLibrary.md +12 -0
- data/docs/ContentLibrarySubscriptionsCreateSpecPlacement.md +12 -0
- data/docs/ContentLibrarySubscriptionsCreateSpecSubscribedLibrary.md +13 -0
- data/docs/ContentLibrarySubscriptionsCreateSpecSubscribedLibraryTarget.md +7 -0
- data/docs/ContentLibrarySubscriptionsCreateSpecVcenter.md +9 -0
- data/docs/ContentLibrarySubscriptionsDelete.md +8 -0
- data/docs/ContentLibrarySubscriptionsGet.md +8 -0
- data/docs/ContentLibrarySubscriptionsInfo.md +12 -0
- data/docs/ContentLibrarySubscriptionsListResult.md +8 -0
- data/docs/ContentLibrarySubscriptionsLocation.md +7 -0
- data/docs/ContentLibrarySubscriptionsPlacementInfo.md +12 -0
- data/docs/ContentLibrarySubscriptionsResult.md +8 -0
- data/docs/ContentLibrarySubscriptionsSummary.md +11 -0
- data/docs/ContentLibrarySubscriptionsUpdate.md +9 -0
- data/docs/ContentLibrarySubscriptionsUpdateSpec.md +9 -0
- data/docs/ContentLibrarySubscriptionsUpdateSpecPlacement.md +12 -0
- data/docs/ContentLibrarySubscriptionsUpdateSpecVcenter.md +9 -0
- data/docs/ContentLibrarySubscriptionsVcenterInfo.md +10 -0
- data/docs/ContentLocalLibraryDestinationSpec.md +8 -0
- data/docs/ContentLocalLibraryPublish.md +8 -0
- data/docs/LibraryApi.md +47 -17
- data/docs/LibraryItemApi.md +136 -31
- data/docs/LibraryItemDownloadSessionApi.md +76 -25
- data/docs/LibraryItemDownloadsessionFileApi.md +38 -15
- data/docs/LibraryItemFileApi.md +25 -9
- data/docs/LibraryItemStorageApi.md +25 -9
- data/docs/LibraryItemUpdateSessionApi.md +100 -35
- data/docs/LibraryItemUpdatesessionFileApi.md +60 -23
- data/docs/LibrarySubscribedItemApi.md +27 -11
- data/docs/LibrarySubscriptionsApi.md +269 -0
- data/docs/LocalLibraryApi.md +109 -18
- data/docs/SubscribedLibraryApi.md +89 -31
- data/docs/VapiStdErrorsAlreadyExists.md +9 -0
- data/docs/VapiStdErrorsAlreadyExistsError.md +9 -0
- data/docs/VapiStdErrorsError.md +9 -0
- data/docs/VapiStdErrorsErrorError.md +9 -0
- data/docs/VapiStdErrorsUnauthenticated.md +9 -0
- data/docs/VapiStdErrorsUnauthenticatedError.md +9 -0
- data/lib/vsphere-automation-content.rb +40 -9
- data/lib/vsphere-automation-content/api/configuration_api.rb +32 -23
- data/lib/vsphere-automation-content/api/library_api.rb +42 -33
- data/lib/vsphere-automation-content/api/library_item_api.rb +140 -62
- data/lib/vsphere-automation-content/api/library_item_download_session_api.rb +51 -42
- data/lib/vsphere-automation-content/api/library_item_downloadsession_file_api.rb +40 -31
- data/lib/vsphere-automation-content/api/library_item_file_api.rb +29 -20
- data/lib/vsphere-automation-content/api/library_item_storage_api.rb +29 -20
- data/lib/vsphere-automation-content/api/library_item_update_session_api.rb +67 -58
- data/lib/vsphere-automation-content/api/library_item_updatesession_file_api.rb +53 -44
- data/lib/vsphere-automation-content/api/library_subscribed_item_api.rb +32 -23
- data/lib/vsphere-automation-content/api/library_subscriptions_api.rb +325 -0
- data/lib/vsphere-automation-content/api/local_library_api.rb +97 -34
- data/lib/vsphere-automation-content/api/subscribed_library_api.rb +62 -53
- data/lib/vsphere-automation-content/api_client.rb +9 -5
- data/lib/vsphere-automation-content/api_error.rb +4 -6
- data/lib/vsphere-automation-content/configuration.rb +18 -6
- data/lib/vsphere-automation-content/models/content_configuration_model.rb +5 -7
- data/lib/vsphere-automation-content/models/content_configuration_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_configuration_update.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_find.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_find_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_find_spec.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_copy.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_copy_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_create.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_create_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_destination_spec.rb +187 -0
- data/lib/vsphere-automation-content/models/content_library_item_download_session_create.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_download_session_create_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_download_session_fail.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_download_session_keep_alive.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_download_session_list_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_download_session_model.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_download_session_model_state.rb +7 -9
- data/lib/vsphere-automation-content/models/content_library_item_download_session_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_endpoint_type.rb +6 -8
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_get.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_info.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_list_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_prepare.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_prepare_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_prepare_status.rb +9 -11
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_file_checksum_algorithm.rb +8 -10
- data/lib/vsphere-automation-content/models/content_library_item_file_checksum_info.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_file_get.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_file_info.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_item_file_list_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_file_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_find.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_find_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_find_spec.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_item_list_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_model.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_item_publish.rb +199 -0
- data/lib/vsphere-automation-content/models/content_library_item_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_storage_get.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_storage_info.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_item_storage_list_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_storage_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_transfer_endpoint.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_transfer_status.rb +9 -11
- data/lib/vsphere-automation-content/models/content_library_item_update.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_update_session_create.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_update_session_create_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_update_session_fail.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_update_session_keep_alive.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_update_session_list_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_update_session_model.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_update_session_model_state.rb +8 -10
- data/lib/vsphere-automation-content/models/content_library_item_update_session_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_update_session_update.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_certificate_info.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_add.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_add_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_add_spec.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_get.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_info.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_list_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_remove.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_source_type.rb +7 -9
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_validate_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_validation_error.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_validation_result.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_preview_info.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_preview_info_state.rb +8 -10
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_preview_warning_info.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_warning_behavior.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_warning_type.rb +8 -10
- data/lib/vsphere-automation-content/models/content_library_list_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_model.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_model_library_type.rb +6 -8
- data/lib/vsphere-automation-content/models/content_library_optimization_info.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_publish_info.rb +6 -8
- data/lib/vsphere-automation-content/models/content_library_publish_info_authentication_method.rb +6 -8
- data/lib/vsphere-automation-content/models/content_library_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_source_info.rb +192 -0
- data/lib/vsphere-automation-content/models/content_library_storage_backing.rb +4 -6
- data/lib/vsphere-automation-content/models/content_library_storage_backing_type.rb +6 -8
- data/lib/vsphere-automation-content/models/content_library_subscribed_item_sync.rb +5 -7
- data/lib/vsphere-automation-content/models/content_library_subscription_info.rb +19 -12
- data/lib/vsphere-automation-content/models/content_library_subscription_info_authentication_method.rb +6 -8
- data/lib/vsphere-automation-content/models/content_library_subscriptions_create.rb +196 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_create_result.rb +186 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_create_spec.rb +186 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_create_spec_new_subscribed_library.rb +244 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_create_spec_placement.rb +222 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_create_spec_subscribed_library.rb +237 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_create_spec_subscribed_library_target.rb +28 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_create_spec_vcenter.rb +197 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_delete.rb +187 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_get.rb +187 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_info.rb +239 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_list_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_location.rb +28 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_placement_info.rb +222 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_result.rb +186 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_summary.rb +227 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_update.rb +201 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_update_spec.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_update_spec_placement.rb +222 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_update_spec_vcenter.rb +192 -0
- data/lib/vsphere-automation-content/models/content_library_subscriptions_vcenter_info.rb +212 -0
- data/lib/vsphere-automation-content/models/content_library_update.rb +4 -6
- data/lib/vsphere-automation-content/models/content_local_library_create.rb +4 -6
- data/lib/vsphere-automation-content/models/content_local_library_create_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_local_library_destination_spec.rb +187 -0
- data/lib/vsphere-automation-content/models/content_local_library_list_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_local_library_publish.rb +184 -0
- data/lib/vsphere-automation-content/models/content_local_library_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_local_library_update.rb +4 -6
- data/lib/vsphere-automation-content/models/content_subscribed_library_create.rb +4 -6
- data/lib/vsphere-automation-content/models/content_subscribed_library_create_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_subscribed_library_list_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_subscribed_library_probe.rb +4 -6
- data/lib/vsphere-automation-content/models/content_subscribed_library_probe_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_subscribed_library_probe_result_status.rb +12 -14
- data/lib/vsphere-automation-content/models/content_subscribed_library_result.rb +4 -6
- data/lib/vsphere-automation-content/models/content_subscribed_library_update.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_already_exists.rb +199 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_already_exists_error.rb +190 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_concurrent_change.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_concurrent_change_error.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_error.rb +199 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_error_error.rb +190 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_argument.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_argument_error.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_configuration.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_configuration_error.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_type.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_type_error.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_not_allowed_in_current_state.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_not_allowed_in_current_state_error.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_not_found.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_not_found_error.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_resource_busy.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_resource_busy_error.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_resource_inaccessible.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_resource_inaccessible_error.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_unauthenticated.rb +199 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_unauthenticated_error.rb +190 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_unauthorized.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_unauthorized_error.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_unsupported.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_errors_unsupported_error.rb +4 -6
- data/lib/vsphere-automation-content/models/vapi_std_localizable_message.rb +4 -6
- data/lib/vsphere-automation-content/version.rb +5 -7
- data/spec/api/configuration_api_spec.rb +6 -7
- data/spec/api/library_api_spec.rb +7 -8
- data/spec/api/library_item_api_spec.rb +22 -10
- data/spec/api/library_item_download_session_api_spec.rb +8 -9
- data/spec/api/library_item_downloadsession_file_api_spec.rb +7 -8
- data/spec/api/library_item_file_api_spec.rb +6 -7
- data/spec/api/library_item_storage_api_spec.rb +6 -7
- data/spec/api/library_item_update_session_api_spec.rb +9 -10
- data/spec/api/library_item_updatesession_file_api_spec.rb +8 -9
- data/spec/api/library_subscribed_item_api_spec.rb +6 -7
- data/spec/api/library_subscriptions_api_spec.rb +90 -0
- data/spec/api/local_library_api_spec.rb +19 -8
- data/spec/api/subscribed_library_api_spec.rb +8 -9
- data/spec/api_client_spec.rb +4 -6
- data/spec/configuration_spec.rb +4 -6
- data/spec/models/content_configuration_model_spec.rb +4 -6
- data/spec/models/content_configuration_result_spec.rb +4 -6
- data/spec/models/content_configuration_update_spec.rb +4 -6
- data/spec/models/content_library_find_result_spec.rb +4 -6
- data/spec/models/content_library_find_spec.rb +4 -6
- data/spec/models/content_library_find_spec_spec.rb +4 -6
- data/spec/models/content_library_item_copy_result_spec.rb +4 -6
- data/spec/models/content_library_item_copy_spec.rb +4 -6
- data/spec/models/content_library_item_create_result_spec.rb +4 -6
- data/spec/models/content_library_item_create_spec.rb +4 -6
- data/spec/models/content_library_item_destination_spec_spec.rb +37 -0
- data/spec/models/content_library_item_download_session_create_result_spec.rb +4 -6
- data/spec/models/content_library_item_download_session_create_spec.rb +4 -6
- data/spec/models/content_library_item_download_session_fail_spec.rb +4 -6
- data/spec/models/content_library_item_download_session_keep_alive_spec.rb +4 -6
- data/spec/models/content_library_item_download_session_list_result_spec.rb +4 -6
- data/spec/models/content_library_item_download_session_model_spec.rb +4 -6
- data/spec/models/content_library_item_download_session_model_state_spec.rb +4 -6
- data/spec/models/content_library_item_download_session_result_spec.rb +4 -6
- data/spec/models/content_library_item_downloadsession_file_endpoint_type_spec.rb +4 -6
- data/spec/models/content_library_item_downloadsession_file_get_spec.rb +4 -6
- data/spec/models/content_library_item_downloadsession_file_info_spec.rb +4 -6
- data/spec/models/content_library_item_downloadsession_file_list_result_spec.rb +4 -6
- data/spec/models/content_library_item_downloadsession_file_prepare_result_spec.rb +4 -6
- data/spec/models/content_library_item_downloadsession_file_prepare_spec.rb +4 -6
- data/spec/models/content_library_item_downloadsession_file_prepare_status_spec.rb +4 -6
- data/spec/models/content_library_item_downloadsession_file_result_spec.rb +4 -6
- data/spec/models/content_library_item_file_checksum_algorithm_spec.rb +4 -6
- data/spec/models/content_library_item_file_checksum_info_spec.rb +4 -6
- data/spec/models/content_library_item_file_get_spec.rb +4 -6
- data/spec/models/content_library_item_file_info_spec.rb +4 -6
- data/spec/models/content_library_item_file_list_result_spec.rb +4 -6
- data/spec/models/content_library_item_file_result_spec.rb +4 -6
- data/spec/models/content_library_item_find_result_spec.rb +4 -6
- data/spec/models/content_library_item_find_spec.rb +4 -6
- data/spec/models/content_library_item_find_spec_spec.rb +4 -6
- data/spec/models/content_library_item_list_result_spec.rb +4 -6
- data/spec/models/content_library_item_model_spec.rb +4 -6
- data/spec/models/content_library_item_publish_spec.rb +43 -0
- data/spec/models/content_library_item_result_spec.rb +4 -6
- data/spec/models/content_library_item_storage_get_spec.rb +4 -6
- data/spec/models/content_library_item_storage_info_spec.rb +4 -6
- data/spec/models/content_library_item_storage_list_result_spec.rb +4 -6
- data/spec/models/content_library_item_storage_result_spec.rb +4 -6
- data/spec/models/content_library_item_transfer_endpoint_spec.rb +4 -6
- data/spec/models/content_library_item_transfer_status_spec.rb +4 -6
- data/spec/models/content_library_item_update_session_create_result_spec.rb +4 -6
- data/spec/models/content_library_item_update_session_create_spec.rb +4 -6
- data/spec/models/content_library_item_update_session_fail_spec.rb +4 -6
- data/spec/models/content_library_item_update_session_keep_alive_spec.rb +4 -6
- data/spec/models/content_library_item_update_session_list_result_spec.rb +4 -6
- data/spec/models/content_library_item_update_session_model_spec.rb +4 -6
- data/spec/models/content_library_item_update_session_model_state_spec.rb +4 -6
- data/spec/models/content_library_item_update_session_result_spec.rb +4 -6
- data/spec/models/content_library_item_update_session_update_spec.rb +4 -6
- data/spec/models/content_library_item_update_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_certificate_info_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_add_result_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_add_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_add_spec_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_get_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_info_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_list_result_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_remove_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_result_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_source_type_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_validate_result_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_validation_error_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_file_validation_result_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_preview_info_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_preview_info_state_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_preview_warning_info_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_warning_behavior_spec.rb +4 -6
- data/spec/models/content_library_item_updatesession_warning_type_spec.rb +4 -6
- data/spec/models/content_library_list_result_spec.rb +4 -6
- data/spec/models/content_library_model_library_type_spec.rb +4 -6
- data/spec/models/content_library_model_spec.rb +4 -6
- data/spec/models/content_library_optimization_info_spec.rb +4 -6
- data/spec/models/content_library_publish_info_authentication_method_spec.rb +4 -6
- data/spec/models/content_library_publish_info_spec.rb +4 -6
- data/spec/models/content_library_result_spec.rb +4 -6
- data/spec/models/content_library_source_info_spec.rb +43 -0
- data/spec/models/content_library_storage_backing_spec.rb +4 -6
- data/spec/models/content_library_storage_backing_type_spec.rb +4 -6
- data/spec/models/content_library_subscribed_item_sync_spec.rb +4 -6
- data/spec/models/content_library_subscription_info_authentication_method_spec.rb +4 -6
- data/spec/models/content_library_subscription_info_spec.rb +10 -6
- data/spec/models/content_library_subscriptions_create_result_spec.rb +37 -0
- data/spec/models/content_library_subscriptions_create_spec.rb +43 -0
- data/spec/models/content_library_subscriptions_create_spec_new_subscribed_library_spec.rb +61 -0
- data/spec/models/content_library_subscriptions_create_spec_placement_spec.rb +61 -0
- data/spec/models/content_library_subscriptions_create_spec_spec.rb +37 -0
- data/spec/models/content_library_subscriptions_create_spec_subscribed_library_spec.rb +67 -0
- data/spec/models/content_library_subscriptions_create_spec_subscribed_library_target_spec.rb +31 -0
- data/spec/models/content_library_subscriptions_create_spec_vcenter_spec.rb +43 -0
- data/spec/models/content_library_subscriptions_delete_spec.rb +37 -0
- data/spec/models/content_library_subscriptions_get_spec.rb +37 -0
- data/spec/models/content_library_subscriptions_info_spec.rb +61 -0
- data/spec/models/content_library_subscriptions_list_result_spec.rb +37 -0
- data/spec/models/content_library_subscriptions_location_spec.rb +31 -0
- data/spec/models/content_library_subscriptions_placement_info_spec.rb +61 -0
- data/spec/models/content_library_subscriptions_result_spec.rb +37 -0
- data/spec/models/content_library_subscriptions_summary_spec.rb +55 -0
- data/spec/models/content_library_subscriptions_update_spec.rb +43 -0
- data/spec/models/content_library_subscriptions_update_spec_placement_spec.rb +61 -0
- data/spec/models/content_library_subscriptions_update_spec_spec.rb +43 -0
- data/spec/models/content_library_subscriptions_update_spec_vcenter_spec.rb +43 -0
- data/spec/models/content_library_subscriptions_vcenter_info_spec.rb +49 -0
- data/spec/models/content_library_update_spec.rb +4 -6
- data/spec/models/content_local_library_create_result_spec.rb +4 -6
- data/spec/models/content_local_library_create_spec.rb +4 -6
- data/spec/models/content_local_library_destination_spec_spec.rb +37 -0
- data/spec/models/content_local_library_list_result_spec.rb +4 -6
- data/spec/models/content_local_library_publish_spec.rb +37 -0
- data/spec/models/content_local_library_result_spec.rb +4 -6
- data/spec/models/content_local_library_update_spec.rb +4 -6
- data/spec/models/content_subscribed_library_create_result_spec.rb +4 -6
- data/spec/models/content_subscribed_library_create_spec.rb +4 -6
- data/spec/models/content_subscribed_library_list_result_spec.rb +4 -6
- data/spec/models/content_subscribed_library_probe_result_spec.rb +4 -6
- data/spec/models/content_subscribed_library_probe_result_status_spec.rb +4 -6
- data/spec/models/content_subscribed_library_probe_spec.rb +4 -6
- data/spec/models/content_subscribed_library_result_spec.rb +4 -6
- data/spec/models/content_subscribed_library_update_spec.rb +4 -6
- data/spec/models/vapi_std_errors_already_exists_error_spec.rb +43 -0
- data/spec/models/vapi_std_errors_already_exists_spec.rb +43 -0
- data/spec/models/vapi_std_errors_concurrent_change_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_concurrent_change_spec.rb +4 -6
- data/spec/models/vapi_std_errors_error_error_spec.rb +43 -0
- data/spec/models/vapi_std_errors_error_spec.rb +43 -0
- data/spec/models/vapi_std_errors_invalid_argument_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_invalid_argument_spec.rb +4 -6
- data/spec/models/vapi_std_errors_invalid_element_configuration_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_invalid_element_configuration_spec.rb +4 -6
- data/spec/models/vapi_std_errors_invalid_element_type_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_invalid_element_type_spec.rb +4 -6
- data/spec/models/vapi_std_errors_not_allowed_in_current_state_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_not_allowed_in_current_state_spec.rb +4 -6
- data/spec/models/vapi_std_errors_not_found_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_not_found_spec.rb +4 -6
- data/spec/models/vapi_std_errors_resource_busy_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_resource_busy_spec.rb +4 -6
- data/spec/models/vapi_std_errors_resource_inaccessible_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_resource_inaccessible_spec.rb +4 -6
- data/spec/models/vapi_std_errors_unauthenticated_error_spec.rb +43 -0
- data/spec/models/vapi_std_errors_unauthenticated_spec.rb +43 -0
- data/spec/models/vapi_std_errors_unauthorized_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_unauthorized_spec.rb +4 -6
- data/spec/models/vapi_std_errors_unsupported_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_unsupported_spec.rb +4 -6
- data/spec/models/vapi_std_localizable_message_spec.rb +4 -6
- data/spec/spec_helper.rb +4 -6
- data/vsphere-automation-content.gemspec +11 -14
- metadata +150 -33
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
# content
|
1
|
+
# Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved.
|
2
|
+
# SPDX-License-Identifier: MIT
|
5
3
|
|
6
|
-
#
|
4
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
7
5
|
|
6
|
+
# content - VMware vSphere® Content Library empowers vSphere Admins to effectively manage VM templates, vApps, ISO images and scripts with ease.
|
8
7
|
|
9
|
-
=end
|
10
8
|
|
11
9
|
require 'uri'
|
12
10
|
|
@@ -20,21 +18,23 @@ module VSphereAutomation
|
|
20
18
|
end
|
21
19
|
# Requests file content to be changed (either created, or updated). Depending on the source type of the file, this {@term operation} will either return an upload endpoint where the client can push the content, or the server will pull from the provided source endpoint. If a file with the same name already exists in this session, this {@term operation} will be used to update the content of the existing file. <p> When importing a file directly from storage, where the source endpoint is a file or datastore URI, you will need to have the ContentLibrary.ReadStorage privilege on the library item. If the file is located in the same directory as the library storage backing folder, the server will move the file instead of copying it, thereby allowing instantaneous import of files for efficient backup and restore scenarios. In all other cases, a copy is performed rather than a move.
|
22
20
|
# @param update_session_id Identifier of the update session to be modified.
|
23
|
-
# @param
|
21
|
+
# @param action ~action=add
|
22
|
+
# @param request_body
|
24
23
|
# @param [Hash] opts the optional parameters
|
25
24
|
# @return [ContentLibraryItemUpdatesessionFileAddResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|]
|
26
|
-
def add(update_session_id,
|
27
|
-
data, _status_code, _headers = add_with_http_info(update_session_id,
|
25
|
+
def add(update_session_id, action, request_body, opts = {})
|
26
|
+
data, _status_code, _headers = add_with_http_info(update_session_id, action, request_body, opts)
|
28
27
|
data
|
29
28
|
end
|
30
29
|
|
31
30
|
# Requests file content to be changed (either created, or updated). Depending on the source type of the file, this {@term operation} will either return an upload endpoint where the client can push the content, or the server will pull from the provided source endpoint. If a file with the same name already exists in this session, this {@term operation} will be used to update the content of the existing file. <p> When importing a file directly from storage, where the source endpoint is a file or datastore URI, you will need to have the ContentLibrary.ReadStorage privilege on the library item. If the file is located in the same directory as the library storage backing folder, the server will move the file instead of copying it, thereby allowing instantaneous import of files for efficient backup and restore scenarios. In all other cases, a copy is performed rather than a move.
|
32
31
|
# @api private
|
33
32
|
# @param update_session_id Identifier of the update session to be modified.
|
34
|
-
# @param
|
33
|
+
# @param action ~action=add
|
34
|
+
# @param request_body
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
36
|
# @return [Array<(ContentLibraryItemUpdatesessionFileAddResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>] data, response status code and response headers
|
37
|
-
def add_with_http_info(update_session_id,
|
37
|
+
def add_with_http_info(update_session_id, action, request_body, opts = {})
|
38
38
|
if @api_client.config.debugging
|
39
39
|
@api_client.config.logger.debug 'Calling API: LibraryItemUpdatesessionFileApi.add ...'
|
40
40
|
end
|
@@ -42,20 +42,29 @@ module VSphereAutomation
|
|
42
42
|
if @api_client.config.client_side_validation && update_session_id.nil?
|
43
43
|
fail ArgumentError, "Missing the required parameter 'update_session_id' when calling LibraryItemUpdatesessionFileApi.add"
|
44
44
|
end
|
45
|
-
# verify the required parameter '
|
46
|
-
if @api_client.config.client_side_validation &&
|
47
|
-
fail ArgumentError, "Missing the required parameter '
|
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 LibraryItemUpdatesessionFileApi.add"
|
48
|
+
end
|
49
|
+
# verify enum value
|
50
|
+
if @api_client.config.client_side_validation && !['add'].include?(action)
|
51
|
+
fail ArgumentError, "invalid value for 'action', must be one of add"
|
52
|
+
end
|
53
|
+
# verify the required parameter 'request_body' is set
|
54
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
55
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemUpdatesessionFileApi.add"
|
48
56
|
end
|
49
57
|
# resource path
|
50
|
-
local_var_path = '/com/vmware/content/library/item/updatesession/file/id:{update_session_id}
|
58
|
+
local_var_path = '/com/vmware/content/library/item/updatesession/file/id:{update_session_id}'.sub('{' + 'update_session_id' + '}', update_session_id.to_s)
|
51
59
|
|
52
60
|
# query parameters
|
53
61
|
query_params = {}
|
62
|
+
query_params[:'~action'] = action
|
54
63
|
|
55
64
|
# header parameters
|
56
65
|
header_params = {}
|
57
66
|
# HTTP header 'Accept' (if needed)
|
58
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
67
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
68
|
# HTTP header 'Content-Type'
|
60
69
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
61
70
|
|
@@ -63,8 +72,8 @@ module VSphereAutomation
|
|
63
72
|
form_params = {}
|
64
73
|
|
65
74
|
# http body (model)
|
66
|
-
post_body = @api_client.object_to_http_body(
|
67
|
-
auth_names = []
|
75
|
+
post_body = @api_client.object_to_http_body(request_body)
|
76
|
+
auth_names = ['api_key']
|
68
77
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
69
78
|
:header_params => header_params,
|
70
79
|
:query_params => query_params,
|
@@ -84,21 +93,21 @@ module VSphereAutomation
|
|
84
93
|
end
|
85
94
|
# Retrieves information about a specific file in the snapshot of the library item at the time when the update session was created.
|
86
95
|
# @param update_session_id Identifier of the update session.
|
87
|
-
# @param
|
96
|
+
# @param request_body
|
88
97
|
# @param [Hash] opts the optional parameters
|
89
98
|
# @return [ContentLibraryItemUpdatesessionFileResult|VapiStdErrorsInvalidArgumentError|VapiStdErrorsNotFoundError|]
|
90
|
-
def get(update_session_id,
|
91
|
-
data, _status_code, _headers = get_with_http_info(update_session_id,
|
99
|
+
def get(update_session_id, request_body, opts = {})
|
100
|
+
data, _status_code, _headers = get_with_http_info(update_session_id, request_body, opts)
|
92
101
|
data
|
93
102
|
end
|
94
103
|
|
95
104
|
# Retrieves information about a specific file in the snapshot of the library item at the time when the update session was created.
|
96
105
|
# @api private
|
97
106
|
# @param update_session_id Identifier of the update session.
|
98
|
-
# @param
|
107
|
+
# @param request_body
|
99
108
|
# @param [Hash] opts the optional parameters
|
100
109
|
# @return [Array<(ContentLibraryItemUpdatesessionFileResult|VapiStdErrorsInvalidArgumentError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>] data, response status code and response headers
|
101
|
-
def get_with_http_info(update_session_id,
|
110
|
+
def get_with_http_info(update_session_id, request_body, opts = {})
|
102
111
|
if @api_client.config.debugging
|
103
112
|
@api_client.config.logger.debug 'Calling API: LibraryItemUpdatesessionFileApi.get ...'
|
104
113
|
end
|
@@ -106,9 +115,9 @@ module VSphereAutomation
|
|
106
115
|
if @api_client.config.client_side_validation && update_session_id.nil?
|
107
116
|
fail ArgumentError, "Missing the required parameter 'update_session_id' when calling LibraryItemUpdatesessionFileApi.get"
|
108
117
|
end
|
109
|
-
# verify the required parameter '
|
110
|
-
if @api_client.config.client_side_validation &&
|
111
|
-
fail ArgumentError, "Missing the required parameter '
|
118
|
+
# verify the required parameter 'request_body' is set
|
119
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
120
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemUpdatesessionFileApi.get"
|
112
121
|
end
|
113
122
|
# resource path
|
114
123
|
local_var_path = '/com/vmware/content/library/item/updatesession/file/id:{update_session_id}?~action=get'.sub('{' + 'update_session_id' + '}', update_session_id.to_s)
|
@@ -119,7 +128,7 @@ module VSphereAutomation
|
|
119
128
|
# header parameters
|
120
129
|
header_params = {}
|
121
130
|
# HTTP header 'Accept' (if needed)
|
122
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
131
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
123
132
|
# HTTP header 'Content-Type'
|
124
133
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
125
134
|
|
@@ -127,8 +136,8 @@ module VSphereAutomation
|
|
127
136
|
form_params = {}
|
128
137
|
|
129
138
|
# http body (model)
|
130
|
-
post_body = @api_client.object_to_http_body(
|
131
|
-
auth_names = []
|
139
|
+
post_body = @api_client.object_to_http_body(request_body)
|
140
|
+
auth_names = ['api_key']
|
132
141
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
133
142
|
:header_params => header_params,
|
134
143
|
:query_params => query_params,
|
@@ -177,14 +186,14 @@ module VSphereAutomation
|
|
177
186
|
# header parameters
|
178
187
|
header_params = {}
|
179
188
|
# HTTP header 'Accept' (if needed)
|
180
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
189
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
181
190
|
|
182
191
|
# form parameters
|
183
192
|
form_params = {}
|
184
193
|
|
185
194
|
# http body (model)
|
186
195
|
post_body = nil
|
187
|
-
auth_names = []
|
196
|
+
auth_names = ['api_key']
|
188
197
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
189
198
|
:header_params => header_params,
|
190
199
|
:query_params => query_params,
|
@@ -202,21 +211,21 @@ module VSphereAutomation
|
|
202
211
|
end
|
203
212
|
# Requests a file to be removed. The file will only be effectively removed when the update session is completed.
|
204
213
|
# @param update_session_id Identifier of the update session.
|
205
|
-
# @param
|
214
|
+
# @param request_body
|
206
215
|
# @param [Hash] opts the optional parameters
|
207
216
|
# @return [|VapiStdErrorsInvalidArgumentError|VapiStdErrorsNotFoundError|nil]
|
208
|
-
def remove(update_session_id,
|
209
|
-
remove_with_http_info(update_session_id,
|
217
|
+
def remove(update_session_id, request_body, opts = {})
|
218
|
+
remove_with_http_info(update_session_id, request_body, opts)
|
210
219
|
nil
|
211
220
|
end
|
212
221
|
|
213
222
|
# Requests a file to be removed. The file will only be effectively removed when the update session is completed.
|
214
223
|
# @api private
|
215
224
|
# @param update_session_id Identifier of the update session.
|
216
|
-
# @param
|
225
|
+
# @param request_body
|
217
226
|
# @param [Hash] opts the optional parameters
|
218
227
|
# @return [Array<(|VapiStdErrorsInvalidArgumentError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
219
|
-
def remove_with_http_info(update_session_id,
|
228
|
+
def remove_with_http_info(update_session_id, request_body, opts = {})
|
220
229
|
if @api_client.config.debugging
|
221
230
|
@api_client.config.logger.debug 'Calling API: LibraryItemUpdatesessionFileApi.remove ...'
|
222
231
|
end
|
@@ -224,9 +233,9 @@ module VSphereAutomation
|
|
224
233
|
if @api_client.config.client_side_validation && update_session_id.nil?
|
225
234
|
fail ArgumentError, "Missing the required parameter 'update_session_id' when calling LibraryItemUpdatesessionFileApi.remove"
|
226
235
|
end
|
227
|
-
# verify the required parameter '
|
228
|
-
if @api_client.config.client_side_validation &&
|
229
|
-
fail ArgumentError, "Missing the required parameter '
|
236
|
+
# verify the required parameter 'request_body' is set
|
237
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
238
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemUpdatesessionFileApi.remove"
|
230
239
|
end
|
231
240
|
# resource path
|
232
241
|
local_var_path = '/com/vmware/content/library/item/updatesession/file/id:{update_session_id}?~action=remove'.sub('{' + 'update_session_id' + '}', update_session_id.to_s)
|
@@ -237,7 +246,7 @@ module VSphereAutomation
|
|
237
246
|
# header parameters
|
238
247
|
header_params = {}
|
239
248
|
# HTTP header 'Accept' (if needed)
|
240
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
249
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
241
250
|
# HTTP header 'Content-Type'
|
242
251
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
243
252
|
|
@@ -245,8 +254,8 @@ module VSphereAutomation
|
|
245
254
|
form_params = {}
|
246
255
|
|
247
256
|
# http body (model)
|
248
|
-
post_body = @api_client.object_to_http_body(
|
249
|
-
auth_names = []
|
257
|
+
post_body = @api_client.object_to_http_body(request_body)
|
258
|
+
auth_names = ['api_key']
|
250
259
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
251
260
|
:header_params => header_params,
|
252
261
|
:query_params => query_params,
|
@@ -289,14 +298,14 @@ module VSphereAutomation
|
|
289
298
|
# header parameters
|
290
299
|
header_params = {}
|
291
300
|
# HTTP header 'Accept' (if needed)
|
292
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
301
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
293
302
|
|
294
303
|
# form parameters
|
295
304
|
form_params = {}
|
296
305
|
|
297
306
|
# http body (model)
|
298
307
|
post_body = nil
|
299
|
-
auth_names = []
|
308
|
+
auth_names = ['api_key']
|
300
309
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
301
310
|
:header_params => header_params,
|
302
311
|
:query_params => query_params,
|
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
# content
|
1
|
+
# Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved.
|
2
|
+
# SPDX-License-Identifier: MIT
|
5
3
|
|
6
|
-
#
|
4
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
7
5
|
|
6
|
+
# content - VMware vSphere® Content Library empowers vSphere Admins to effectively manage VM templates, vApps, ISO images and scripts with ease.
|
8
7
|
|
9
|
-
=end
|
10
8
|
|
11
9
|
require 'uri'
|
12
10
|
|
@@ -20,19 +18,21 @@ module VSphereAutomation
|
|
20
18
|
end
|
21
19
|
# 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.
|
22
20
|
# @param library_item_id Identifier of the library item whose content should be evicted.
|
21
|
+
# @param action ~action=evict
|
23
22
|
# @param [Hash] opts the optional parameters
|
24
23
|
# @return [|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|nil]
|
25
|
-
def evict(library_item_id, opts = {})
|
26
|
-
evict_with_http_info(library_item_id, opts)
|
24
|
+
def evict(library_item_id, action, opts = {})
|
25
|
+
evict_with_http_info(library_item_id, action, opts)
|
27
26
|
nil
|
28
27
|
end
|
29
28
|
|
30
29
|
# 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.
|
31
30
|
# @api private
|
32
31
|
# @param library_item_id Identifier of the library item whose content should be evicted.
|
32
|
+
# @param action ~action=evict
|
33
33
|
# @param [Hash] opts the optional parameters
|
34
34
|
# @return [Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
35
|
-
def evict_with_http_info(library_item_id, opts = {})
|
35
|
+
def evict_with_http_info(library_item_id, action, opts = {})
|
36
36
|
if @api_client.config.debugging
|
37
37
|
@api_client.config.logger.debug 'Calling API: LibrarySubscribedItemApi.evict ...'
|
38
38
|
end
|
@@ -40,23 +40,32 @@ module VSphereAutomation
|
|
40
40
|
if @api_client.config.client_side_validation && library_item_id.nil?
|
41
41
|
fail ArgumentError, "Missing the required parameter 'library_item_id' when calling LibrarySubscribedItemApi.evict"
|
42
42
|
end
|
43
|
+
# verify the required parameter 'action' is set
|
44
|
+
if @api_client.config.client_side_validation && action.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'action' when calling LibrarySubscribedItemApi.evict"
|
46
|
+
end
|
47
|
+
# verify enum value
|
48
|
+
if @api_client.config.client_side_validation && !['evict'].include?(action)
|
49
|
+
fail ArgumentError, "invalid value for 'action', must be one of evict"
|
50
|
+
end
|
43
51
|
# resource path
|
44
|
-
local_var_path = '/com/vmware/content/library/subscribed-item/id:{library_item_id}
|
52
|
+
local_var_path = '/com/vmware/content/library/subscribed-item/id:{library_item_id}'.sub('{' + 'library_item_id' + '}', library_item_id.to_s)
|
45
53
|
|
46
54
|
# query parameters
|
47
55
|
query_params = {}
|
56
|
+
query_params[:'~action'] = action
|
48
57
|
|
49
58
|
# header parameters
|
50
59
|
header_params = {}
|
51
60
|
# HTTP header 'Accept' (if needed)
|
52
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
62
|
|
54
63
|
# form parameters
|
55
64
|
form_params = {}
|
56
65
|
|
57
66
|
# http body (model)
|
58
67
|
post_body = nil
|
59
|
-
auth_names = []
|
68
|
+
auth_names = ['api_key']
|
60
69
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
61
70
|
:header_params => header_params,
|
62
71
|
:query_params => query_params,
|
@@ -70,21 +79,21 @@ module VSphereAutomation
|
|
70
79
|
end
|
71
80
|
# 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.
|
72
81
|
# @param library_item_id Identifier of the library item to synchronize.
|
73
|
-
# @param
|
82
|
+
# @param request_body
|
74
83
|
# @param [Hash] opts the optional parameters
|
75
84
|
# @return [|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|nil]
|
76
|
-
def sync(library_item_id,
|
77
|
-
sync_with_http_info(library_item_id,
|
85
|
+
def sync(library_item_id, request_body, opts = {})
|
86
|
+
sync_with_http_info(library_item_id, request_body, opts)
|
78
87
|
nil
|
79
88
|
end
|
80
89
|
|
81
90
|
# 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.
|
82
91
|
# @api private
|
83
92
|
# @param library_item_id Identifier of the library item to synchronize.
|
84
|
-
# @param
|
93
|
+
# @param request_body
|
85
94
|
# @param [Hash] opts the optional parameters
|
86
95
|
# @return [Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
87
|
-
def sync_with_http_info(library_item_id,
|
96
|
+
def sync_with_http_info(library_item_id, request_body, opts = {})
|
88
97
|
if @api_client.config.debugging
|
89
98
|
@api_client.config.logger.debug 'Calling API: LibrarySubscribedItemApi.sync ...'
|
90
99
|
end
|
@@ -92,9 +101,9 @@ module VSphereAutomation
|
|
92
101
|
if @api_client.config.client_side_validation && library_item_id.nil?
|
93
102
|
fail ArgumentError, "Missing the required parameter 'library_item_id' when calling LibrarySubscribedItemApi.sync"
|
94
103
|
end
|
95
|
-
# verify the required parameter '
|
96
|
-
if @api_client.config.client_side_validation &&
|
97
|
-
fail ArgumentError, "Missing the required parameter '
|
104
|
+
# verify the required parameter 'request_body' is set
|
105
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
106
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling LibrarySubscribedItemApi.sync"
|
98
107
|
end
|
99
108
|
# resource path
|
100
109
|
local_var_path = '/com/vmware/content/library/subscribed-item/id:{library_item_id}?~action=sync'.sub('{' + 'library_item_id' + '}', library_item_id.to_s)
|
@@ -105,7 +114,7 @@ module VSphereAutomation
|
|
105
114
|
# header parameters
|
106
115
|
header_params = {}
|
107
116
|
# HTTP header 'Accept' (if needed)
|
108
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
109
118
|
# HTTP header 'Content-Type'
|
110
119
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
111
120
|
|
@@ -113,8 +122,8 @@ module VSphereAutomation
|
|
113
122
|
form_params = {}
|
114
123
|
|
115
124
|
# http body (model)
|
116
|
-
post_body = @api_client.object_to_http_body(
|
117
|
-
auth_names = []
|
125
|
+
post_body = @api_client.object_to_http_body(request_body)
|
126
|
+
auth_names = ['api_key']
|
118
127
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
119
128
|
:header_params => header_params,
|
120
129
|
:query_params => query_params,
|
@@ -0,0 +1,325 @@
|
|
1
|
+
# Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved.
|
2
|
+
# SPDX-License-Identifier: MIT
|
3
|
+
|
4
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
5
|
+
|
6
|
+
# content - VMware vSphere® Content Library empowers vSphere Admins to effectively manage VM templates, vApps, ISO images and scripts with ease.
|
7
|
+
|
8
|
+
|
9
|
+
require 'uri'
|
10
|
+
|
11
|
+
module VSphereAutomation
|
12
|
+
module Content
|
13
|
+
class LibrarySubscriptionsApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# Creates a subscription of the published library.
|
20
|
+
# @param library Identifier of the published library.
|
21
|
+
# @param request_body
|
22
|
+
# @param [Hash] opts the optional parameters
|
23
|
+
# @return [ContentLibrarySubscriptionsCreateResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|]
|
24
|
+
def create(library, request_body, opts = {})
|
25
|
+
data, _status_code, _headers = create_with_http_info(library, request_body, opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# Creates a subscription of the published library.
|
30
|
+
# @api private
|
31
|
+
# @param library Identifier of the published library.
|
32
|
+
# @param request_body
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(ContentLibrarySubscriptionsCreateResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>] data, response status code and response headers
|
35
|
+
def create_with_http_info(library, request_body, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: LibrarySubscriptionsApi.create ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'library' is set
|
40
|
+
if @api_client.config.client_side_validation && library.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'library' when calling LibrarySubscriptionsApi.create"
|
42
|
+
end
|
43
|
+
# verify the required parameter 'request_body' is set
|
44
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling LibrarySubscriptionsApi.create"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/com/vmware/content/library/subscriptions/id:{library}'.sub('{' + 'library' + '}', library.to_s)
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = {}
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
57
|
+
# HTTP header 'Content-Type'
|
58
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
59
|
+
|
60
|
+
# form parameters
|
61
|
+
form_params = {}
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = @api_client.object_to_http_body(request_body)
|
65
|
+
auth_names = ['api_key']
|
66
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
67
|
+
:header_params => header_params,
|
68
|
+
:query_params => query_params,
|
69
|
+
:form_params => form_params,
|
70
|
+
:body => post_body,
|
71
|
+
:auth_names => auth_names,
|
72
|
+
:return_type => {
|
73
|
+
'200' => 'Content::ContentLibrarySubscriptionsCreateResult',
|
74
|
+
'400' => 'Content::VapiStdErrorsNotAllowedInCurrentStateError',
|
75
|
+
'401' => 'Content::VapiStdErrorsUnauthenticatedError',
|
76
|
+
'403' => 'Content::VapiStdErrorsUnauthorizedError',
|
77
|
+
'404' => 'Content::VapiStdErrorsNotFoundError',
|
78
|
+
})
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: LibrarySubscriptionsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
# Deletes the specified subscription of the published library. The subscribed library associated with the subscription will not be deleted.
|
85
|
+
# @param library Identifier of the published library.
|
86
|
+
# @param request_body
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil]
|
89
|
+
def delete(library, request_body, opts = {})
|
90
|
+
delete_with_http_info(library, request_body, opts)
|
91
|
+
nil
|
92
|
+
end
|
93
|
+
|
94
|
+
# Deletes the specified subscription of the published library. The subscribed library associated with the subscription will not be deleted.
|
95
|
+
# @api private
|
96
|
+
# @param library Identifier of the published library.
|
97
|
+
# @param request_body
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
100
|
+
def delete_with_http_info(library, request_body, opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug 'Calling API: LibrarySubscriptionsApi.delete ...'
|
103
|
+
end
|
104
|
+
# verify the required parameter 'library' is set
|
105
|
+
if @api_client.config.client_side_validation && library.nil?
|
106
|
+
fail ArgumentError, "Missing the required parameter 'library' when calling LibrarySubscriptionsApi.delete"
|
107
|
+
end
|
108
|
+
# verify the required parameter 'request_body' is set
|
109
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling LibrarySubscriptionsApi.delete"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = '/com/vmware/content/library/subscriptions/id:{library}?~action=delete'.sub('{' + 'library' + '}', library.to_s)
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = {}
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = {}
|
120
|
+
# HTTP header 'Accept' (if needed)
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
122
|
+
# HTTP header 'Content-Type'
|
123
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
124
|
+
|
125
|
+
# form parameters
|
126
|
+
form_params = {}
|
127
|
+
|
128
|
+
# http body (model)
|
129
|
+
post_body = @api_client.object_to_http_body(request_body)
|
130
|
+
auth_names = ['api_key']
|
131
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
132
|
+
:header_params => header_params,
|
133
|
+
:query_params => query_params,
|
134
|
+
:form_params => form_params,
|
135
|
+
:body => post_body,
|
136
|
+
:auth_names => auth_names)
|
137
|
+
if @api_client.config.debugging
|
138
|
+
@api_client.config.logger.debug "API called: LibrarySubscriptionsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
139
|
+
end
|
140
|
+
return data, status_code, headers
|
141
|
+
end
|
142
|
+
# Returns information about the specified subscription of the published library.
|
143
|
+
# @param library Identifier of the published library.
|
144
|
+
# @param request_body
|
145
|
+
# @param [Hash] opts the optional parameters
|
146
|
+
# @return [ContentLibrarySubscriptionsResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|]
|
147
|
+
def get(library, request_body, opts = {})
|
148
|
+
data, _status_code, _headers = get_with_http_info(library, request_body, opts)
|
149
|
+
data
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns information about the specified subscription of the published library.
|
153
|
+
# @api private
|
154
|
+
# @param library Identifier of the published library.
|
155
|
+
# @param request_body
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @return [Array<(ContentLibrarySubscriptionsResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>] data, response status code and response headers
|
158
|
+
def get_with_http_info(library, request_body, opts = {})
|
159
|
+
if @api_client.config.debugging
|
160
|
+
@api_client.config.logger.debug 'Calling API: LibrarySubscriptionsApi.get ...'
|
161
|
+
end
|
162
|
+
# verify the required parameter 'library' is set
|
163
|
+
if @api_client.config.client_side_validation && library.nil?
|
164
|
+
fail ArgumentError, "Missing the required parameter 'library' when calling LibrarySubscriptionsApi.get"
|
165
|
+
end
|
166
|
+
# verify the required parameter 'request_body' is set
|
167
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
168
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling LibrarySubscriptionsApi.get"
|
169
|
+
end
|
170
|
+
# resource path
|
171
|
+
local_var_path = '/com/vmware/content/library/subscriptions/id:{library}?~action=get'.sub('{' + 'library' + '}', library.to_s)
|
172
|
+
|
173
|
+
# query parameters
|
174
|
+
query_params = {}
|
175
|
+
|
176
|
+
# header parameters
|
177
|
+
header_params = {}
|
178
|
+
# HTTP header 'Accept' (if needed)
|
179
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
180
|
+
# HTTP header 'Content-Type'
|
181
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
182
|
+
|
183
|
+
# form parameters
|
184
|
+
form_params = {}
|
185
|
+
|
186
|
+
# http body (model)
|
187
|
+
post_body = @api_client.object_to_http_body(request_body)
|
188
|
+
auth_names = ['api_key']
|
189
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
190
|
+
:header_params => header_params,
|
191
|
+
:query_params => query_params,
|
192
|
+
:form_params => form_params,
|
193
|
+
:body => post_body,
|
194
|
+
:auth_names => auth_names,
|
195
|
+
:return_type => {
|
196
|
+
'200' => 'Content::ContentLibrarySubscriptionsResult',
|
197
|
+
'400' => 'Content::VapiStdErrorsNotAllowedInCurrentStateError',
|
198
|
+
'401' => 'Content::VapiStdErrorsUnauthenticatedError',
|
199
|
+
'403' => 'Content::VapiStdErrorsUnauthorizedError',
|
200
|
+
'404' => 'Content::VapiStdErrorsNotFoundError',
|
201
|
+
})
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug "API called: LibrarySubscriptionsApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
|
+
end
|
205
|
+
return data, status_code, headers
|
206
|
+
end
|
207
|
+
# Lists the subscriptions of the published library.
|
208
|
+
# @param library Identifier of the published library.
|
209
|
+
# @param [Hash] opts the optional parameters
|
210
|
+
# @return [ContentLibrarySubscriptionsListResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|]
|
211
|
+
def list(library, opts = {})
|
212
|
+
data, _status_code, _headers = list_with_http_info(library, opts)
|
213
|
+
data
|
214
|
+
end
|
215
|
+
|
216
|
+
# Lists the subscriptions of the published library.
|
217
|
+
# @api private
|
218
|
+
# @param library Identifier of the published library.
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @return [Array<(ContentLibrarySubscriptionsListResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>] data, response status code and response headers
|
221
|
+
def list_with_http_info(library, opts = {})
|
222
|
+
if @api_client.config.debugging
|
223
|
+
@api_client.config.logger.debug 'Calling API: LibrarySubscriptionsApi.list ...'
|
224
|
+
end
|
225
|
+
# verify the required parameter 'library' is set
|
226
|
+
if @api_client.config.client_side_validation && library.nil?
|
227
|
+
fail ArgumentError, "Missing the required parameter 'library' when calling LibrarySubscriptionsApi.list"
|
228
|
+
end
|
229
|
+
# resource path
|
230
|
+
local_var_path = '/com/vmware/content/library/subscriptions'
|
231
|
+
|
232
|
+
# query parameters
|
233
|
+
query_params = {}
|
234
|
+
query_params[:'library'] = library
|
235
|
+
|
236
|
+
# header parameters
|
237
|
+
header_params = {}
|
238
|
+
# HTTP header 'Accept' (if needed)
|
239
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
240
|
+
|
241
|
+
# form parameters
|
242
|
+
form_params = {}
|
243
|
+
|
244
|
+
# http body (model)
|
245
|
+
post_body = nil
|
246
|
+
auth_names = ['api_key']
|
247
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
248
|
+
:header_params => header_params,
|
249
|
+
:query_params => query_params,
|
250
|
+
:form_params => form_params,
|
251
|
+
:body => post_body,
|
252
|
+
:auth_names => auth_names,
|
253
|
+
:return_type => {
|
254
|
+
'200' => 'Content::ContentLibrarySubscriptionsListResult',
|
255
|
+
'400' => 'Content::VapiStdErrorsNotAllowedInCurrentStateError',
|
256
|
+
'401' => 'Content::VapiStdErrorsUnauthenticatedError',
|
257
|
+
'403' => 'Content::VapiStdErrorsUnauthorizedError',
|
258
|
+
'404' => 'Content::VapiStdErrorsNotFoundError',
|
259
|
+
})
|
260
|
+
if @api_client.config.debugging
|
261
|
+
@api_client.config.logger.debug "API called: LibrarySubscriptionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
262
|
+
end
|
263
|
+
return data, status_code, headers
|
264
|
+
end
|
265
|
+
# Updates the specified subscription of the published library. <p> This is an incremental update to the subscription. Except for the {@link UpdateSpecPlacement} {@term structure}, {@term fields} that are {@term unset} in the update specification will be left unchanged. If {@param.name spec#subscribedLibraryPlacement} is specified, all {@term fields} of the current subscribed library placement will be replaced by this placement.
|
266
|
+
# @param library Identifier of the published library.
|
267
|
+
# @param request_body
|
268
|
+
# @param [Hash] opts the optional parameters
|
269
|
+
# @return [|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil]
|
270
|
+
def update(library, request_body, opts = {})
|
271
|
+
update_with_http_info(library, request_body, opts)
|
272
|
+
nil
|
273
|
+
end
|
274
|
+
|
275
|
+
# Updates the specified subscription of the published library. <p> This is an incremental update to the subscription. Except for the {@link UpdateSpecPlacement} {@term structure}, {@term fields} that are {@term unset} in the update specification will be left unchanged. If {@param.name spec#subscribedLibraryPlacement} is specified, all {@term fields} of the current subscribed library placement will be replaced by this placement.
|
276
|
+
# @api private
|
277
|
+
# @param library Identifier of the published library.
|
278
|
+
# @param request_body
|
279
|
+
# @param [Hash] opts the optional parameters
|
280
|
+
# @return [Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
281
|
+
def update_with_http_info(library, request_body, opts = {})
|
282
|
+
if @api_client.config.debugging
|
283
|
+
@api_client.config.logger.debug 'Calling API: LibrarySubscriptionsApi.update ...'
|
284
|
+
end
|
285
|
+
# verify the required parameter 'library' is set
|
286
|
+
if @api_client.config.client_side_validation && library.nil?
|
287
|
+
fail ArgumentError, "Missing the required parameter 'library' when calling LibrarySubscriptionsApi.update"
|
288
|
+
end
|
289
|
+
# verify the required parameter 'request_body' is set
|
290
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
291
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling LibrarySubscriptionsApi.update"
|
292
|
+
end
|
293
|
+
# resource path
|
294
|
+
local_var_path = '/com/vmware/content/library/subscriptions/id:{library}'.sub('{' + 'library' + '}', library.to_s)
|
295
|
+
|
296
|
+
# query parameters
|
297
|
+
query_params = {}
|
298
|
+
|
299
|
+
# header parameters
|
300
|
+
header_params = {}
|
301
|
+
# HTTP header 'Accept' (if needed)
|
302
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
303
|
+
# HTTP header 'Content-Type'
|
304
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
305
|
+
|
306
|
+
# form parameters
|
307
|
+
form_params = {}
|
308
|
+
|
309
|
+
# http body (model)
|
310
|
+
post_body = @api_client.object_to_http_body(request_body)
|
311
|
+
auth_names = ['api_key']
|
312
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
313
|
+
:header_params => header_params,
|
314
|
+
:query_params => query_params,
|
315
|
+
:form_params => form_params,
|
316
|
+
:body => post_body,
|
317
|
+
:auth_names => auth_names)
|
318
|
+
if @api_client.config.debugging
|
319
|
+
@api_client.config.logger.debug "API called: LibrarySubscriptionsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
320
|
+
end
|
321
|
+
return data, status_code, headers
|
322
|
+
end
|
323
|
+
end
|
324
|
+
end
|
325
|
+
end
|