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 'date'
|
12
10
|
|
@@ -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 'date'
|
12
10
|
|
@@ -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 'date'
|
12
10
|
|
@@ -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 'date'
|
12
10
|
|
@@ -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 'date'
|
12
10
|
|
@@ -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 'date'
|
12
10
|
|
data/lib/vsphere-automation-content/models/content_subscribed_library_probe_result_status.rb
CHANGED
@@ -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 'date'
|
12
10
|
|
@@ -14,14 +12,14 @@ module VSphereAutomation
|
|
14
12
|
module Content
|
15
13
|
class ContentSubscribedLibraryProbeResultStatus
|
16
14
|
|
17
|
-
SUCCESS =
|
18
|
-
INVALID_URL =
|
19
|
-
TIMED_OUT =
|
20
|
-
HOST_NOT_FOUND =
|
21
|
-
RESOURCE_NOT_FOUND =
|
22
|
-
INVALID_CREDENTIALS =
|
23
|
-
CERTIFICATE_ERROR =
|
24
|
-
UNKNOWN_ERROR =
|
15
|
+
SUCCESS = "SUCCESS".freeze
|
16
|
+
INVALID_URL = "INVALID_URL".freeze
|
17
|
+
TIMED_OUT = "TIMED_OUT".freeze
|
18
|
+
HOST_NOT_FOUND = "HOST_NOT_FOUND".freeze
|
19
|
+
RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND".freeze
|
20
|
+
INVALID_CREDENTIALS = "INVALID_CREDENTIALS".freeze
|
21
|
+
CERTIFICATE_ERROR = "CERTIFICATE_ERROR".freeze
|
22
|
+
UNKNOWN_ERROR = "UNKNOWN_ERROR".freeze
|
25
23
|
|
26
24
|
# Builds the enum from string
|
27
25
|
# @param [String] The enum value in the form of the string
|
@@ -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 'date'
|
12
10
|
|
@@ -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 'date'
|
12
10
|
|
@@ -0,0 +1,199 @@
|
|
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 'date'
|
10
|
+
|
11
|
+
module VSphereAutomation
|
12
|
+
module Content
|
13
|
+
class VapiStdErrorsAlreadyExists
|
14
|
+
# Stack of one or more localizable messages for human {@term error} consumers. <p> The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.
|
15
|
+
attr_accessor :messages
|
16
|
+
|
17
|
+
# Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully. <p> {@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.
|
18
|
+
attr_accessor :data
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'messages' => :'messages',
|
24
|
+
:'data' => :'data'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'messages' => :'Array<VapiStdLocalizableMessage>',
|
32
|
+
:'data' => :'Object'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Initializes the object
|
37
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
38
|
+
def initialize(attributes = {})
|
39
|
+
return unless attributes.is_a?(Hash)
|
40
|
+
|
41
|
+
# convert string to symbol for hash key
|
42
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
43
|
+
|
44
|
+
if attributes.has_key?(:'messages')
|
45
|
+
if (value = attributes[:'messages']).is_a?(Array)
|
46
|
+
self.messages = value
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
if attributes.has_key?(:'data')
|
51
|
+
self.data = attributes[:'data']
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
56
|
+
# @return Array for valid properties with the reasons
|
57
|
+
def list_invalid_properties
|
58
|
+
invalid_properties = Array.new
|
59
|
+
if @messages.nil?
|
60
|
+
invalid_properties.push('invalid value for "messages", messages cannot be nil.')
|
61
|
+
end
|
62
|
+
|
63
|
+
invalid_properties
|
64
|
+
end
|
65
|
+
|
66
|
+
# Check to see if the all the properties in the model are valid
|
67
|
+
# @return true if the model is valid
|
68
|
+
def valid?
|
69
|
+
return false if @messages.nil?
|
70
|
+
true
|
71
|
+
end
|
72
|
+
|
73
|
+
# Checks equality by comparing each attribute.
|
74
|
+
# @param [Object] Object to be compared
|
75
|
+
def ==(o)
|
76
|
+
return true if self.equal?(o)
|
77
|
+
self.class == o.class &&
|
78
|
+
messages == o.messages &&
|
79
|
+
data == o.data
|
80
|
+
end
|
81
|
+
|
82
|
+
# @see the `==` method
|
83
|
+
# @param [Object] Object to be compared
|
84
|
+
def eql?(o)
|
85
|
+
self == o
|
86
|
+
end
|
87
|
+
|
88
|
+
# Calculates hash code according to all attributes.
|
89
|
+
# @return [Fixnum] Hash code
|
90
|
+
def hash
|
91
|
+
[messages, data].hash
|
92
|
+
end
|
93
|
+
|
94
|
+
# Builds the object from hash
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
# @return [Object] Returns the model itself
|
97
|
+
def build_from_hash(attributes)
|
98
|
+
return nil unless attributes.is_a?(Hash)
|
99
|
+
self.class.openapi_types.each_pair do |key, type|
|
100
|
+
if type =~ /\AArray<(.*)>/i
|
101
|
+
# check to ensure the input is an array given that the the attribute
|
102
|
+
# is documented as an array but the input is not
|
103
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
104
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
105
|
+
end
|
106
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
107
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
108
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
109
|
+
end
|
110
|
+
|
111
|
+
self
|
112
|
+
end
|
113
|
+
|
114
|
+
# Deserializes the data based on type
|
115
|
+
# @param string type Data type
|
116
|
+
# @param string value Value to be deserialized
|
117
|
+
# @return [Object] Deserialized data
|
118
|
+
def _deserialize(type, value)
|
119
|
+
case type.to_sym
|
120
|
+
when :DateTime
|
121
|
+
DateTime.parse(value)
|
122
|
+
when :Date
|
123
|
+
Date.parse(value)
|
124
|
+
when :String
|
125
|
+
value.to_s
|
126
|
+
when :Integer
|
127
|
+
value.to_i
|
128
|
+
when :Float
|
129
|
+
value.to_f
|
130
|
+
when :BOOLEAN
|
131
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
132
|
+
true
|
133
|
+
else
|
134
|
+
false
|
135
|
+
end
|
136
|
+
when :Object
|
137
|
+
# generic object (usually a Hash), return directly
|
138
|
+
value
|
139
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
140
|
+
inner_type = Regexp.last_match[:inner_type]
|
141
|
+
value.map { |v| _deserialize(inner_type, v) }
|
142
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
143
|
+
k_type = Regexp.last_match[:k_type]
|
144
|
+
v_type = Regexp.last_match[:v_type]
|
145
|
+
{}.tap do |hash|
|
146
|
+
value.each do |k, v|
|
147
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
else # model
|
151
|
+
temp_model = VSphereAutomation::Content.const_get(type).new
|
152
|
+
temp_model.build_from_hash(value)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
# Returns the string representation of the object
|
157
|
+
# @return [String] String presentation of the object
|
158
|
+
def to_s
|
159
|
+
to_hash.to_s
|
160
|
+
end
|
161
|
+
|
162
|
+
# to_body is an alias to to_hash (backward compatibility)
|
163
|
+
# @return [Hash] Returns the object in the form of hash
|
164
|
+
def to_body
|
165
|
+
to_hash
|
166
|
+
end
|
167
|
+
|
168
|
+
# Returns the object in the form of hash
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
def to_hash
|
171
|
+
hash = {}
|
172
|
+
self.class.attribute_map.each_pair do |attr, param|
|
173
|
+
value = self.send(attr)
|
174
|
+
next if value.nil?
|
175
|
+
hash[param] = _to_hash(value)
|
176
|
+
end
|
177
|
+
hash
|
178
|
+
end
|
179
|
+
|
180
|
+
# Outputs non-array value in the form of hash
|
181
|
+
# For object, use to_hash. Otherwise, just return the value
|
182
|
+
# @param [Object] value Any valid value
|
183
|
+
# @return [Hash] Returns the value in the form of hash
|
184
|
+
def _to_hash(value)
|
185
|
+
if value.is_a?(Array)
|
186
|
+
value.compact.map { |v| _to_hash(v) }
|
187
|
+
elsif value.is_a?(Hash)
|
188
|
+
{}.tap do |hash|
|
189
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
190
|
+
end
|
191
|
+
elsif value.respond_to? :to_hash
|
192
|
+
value.to_hash
|
193
|
+
else
|
194
|
+
value
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
@@ -0,0 +1,190 @@
|
|
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 'date'
|
10
|
+
|
11
|
+
module VSphereAutomation
|
12
|
+
module Content
|
13
|
+
class VapiStdErrorsAlreadyExistsError
|
14
|
+
attr_accessor :type
|
15
|
+
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'type' => :'type',
|
22
|
+
:'value' => :'value'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'type' => :'String',
|
30
|
+
:'value' => :'VapiStdErrorsAlreadyExists'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Initializes the object
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
41
|
+
|
42
|
+
if attributes.has_key?(:'type')
|
43
|
+
self.type = attributes[:'type']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes.has_key?(:'value')
|
47
|
+
self.value = attributes[:'value']
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
52
|
+
# @return Array for valid properties with the reasons
|
53
|
+
def list_invalid_properties
|
54
|
+
invalid_properties = Array.new
|
55
|
+
invalid_properties
|
56
|
+
end
|
57
|
+
|
58
|
+
# Check to see if the all the properties in the model are valid
|
59
|
+
# @return true if the model is valid
|
60
|
+
def valid?
|
61
|
+
true
|
62
|
+
end
|
63
|
+
|
64
|
+
# Checks equality by comparing each attribute.
|
65
|
+
# @param [Object] Object to be compared
|
66
|
+
def ==(o)
|
67
|
+
return true if self.equal?(o)
|
68
|
+
self.class == o.class &&
|
69
|
+
type == o.type &&
|
70
|
+
value == o.value
|
71
|
+
end
|
72
|
+
|
73
|
+
# @see the `==` method
|
74
|
+
# @param [Object] Object to be compared
|
75
|
+
def eql?(o)
|
76
|
+
self == o
|
77
|
+
end
|
78
|
+
|
79
|
+
# Calculates hash code according to all attributes.
|
80
|
+
# @return [Fixnum] Hash code
|
81
|
+
def hash
|
82
|
+
[type, value].hash
|
83
|
+
end
|
84
|
+
|
85
|
+
# Builds the object from hash
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
87
|
+
# @return [Object] Returns the model itself
|
88
|
+
def build_from_hash(attributes)
|
89
|
+
return nil unless attributes.is_a?(Hash)
|
90
|
+
self.class.openapi_types.each_pair do |key, type|
|
91
|
+
if type =~ /\AArray<(.*)>/i
|
92
|
+
# check to ensure the input is an array given that the the attribute
|
93
|
+
# is documented as an array but the input is not
|
94
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
95
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
96
|
+
end
|
97
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
98
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
99
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
100
|
+
end
|
101
|
+
|
102
|
+
self
|
103
|
+
end
|
104
|
+
|
105
|
+
# Deserializes the data based on type
|
106
|
+
# @param string type Data type
|
107
|
+
# @param string value Value to be deserialized
|
108
|
+
# @return [Object] Deserialized data
|
109
|
+
def _deserialize(type, value)
|
110
|
+
case type.to_sym
|
111
|
+
when :DateTime
|
112
|
+
DateTime.parse(value)
|
113
|
+
when :Date
|
114
|
+
Date.parse(value)
|
115
|
+
when :String
|
116
|
+
value.to_s
|
117
|
+
when :Integer
|
118
|
+
value.to_i
|
119
|
+
when :Float
|
120
|
+
value.to_f
|
121
|
+
when :BOOLEAN
|
122
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
123
|
+
true
|
124
|
+
else
|
125
|
+
false
|
126
|
+
end
|
127
|
+
when :Object
|
128
|
+
# generic object (usually a Hash), return directly
|
129
|
+
value
|
130
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
131
|
+
inner_type = Regexp.last_match[:inner_type]
|
132
|
+
value.map { |v| _deserialize(inner_type, v) }
|
133
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
134
|
+
k_type = Regexp.last_match[:k_type]
|
135
|
+
v_type = Regexp.last_match[:v_type]
|
136
|
+
{}.tap do |hash|
|
137
|
+
value.each do |k, v|
|
138
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
else # model
|
142
|
+
temp_model = VSphereAutomation::Content.const_get(type).new
|
143
|
+
temp_model.build_from_hash(value)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Returns the string representation of the object
|
148
|
+
# @return [String] String presentation of the object
|
149
|
+
def to_s
|
150
|
+
to_hash.to_s
|
151
|
+
end
|
152
|
+
|
153
|
+
# to_body is an alias to to_hash (backward compatibility)
|
154
|
+
# @return [Hash] Returns the object in the form of hash
|
155
|
+
def to_body
|
156
|
+
to_hash
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the object in the form of hash
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
161
|
+
def to_hash
|
162
|
+
hash = {}
|
163
|
+
self.class.attribute_map.each_pair do |attr, param|
|
164
|
+
value = self.send(attr)
|
165
|
+
next if value.nil?
|
166
|
+
hash[param] = _to_hash(value)
|
167
|
+
end
|
168
|
+
hash
|
169
|
+
end
|
170
|
+
|
171
|
+
# Outputs non-array value in the form of hash
|
172
|
+
# For object, use to_hash. Otherwise, just return the value
|
173
|
+
# @param [Object] value Any valid value
|
174
|
+
# @return [Hash] Returns the value in the form of hash
|
175
|
+
def _to_hash(value)
|
176
|
+
if value.is_a?(Array)
|
177
|
+
value.compact.map { |v| _to_hash(v) }
|
178
|
+
elsif value.is_a?(Hash)
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
181
|
+
end
|
182
|
+
elsif value.respond_to? :to_hash
|
183
|
+
value.to_hash
|
184
|
+
else
|
185
|
+
value
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|