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
@@ -0,0 +1,188 @@
|
|
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 ContentLibrarySubscriptionsListResult
|
14
|
+
attr_accessor :value
|
15
|
+
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
:'value' => :'value'
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Attribute type mapping.
|
24
|
+
def self.openapi_types
|
25
|
+
{
|
26
|
+
:'value' => :'Array<ContentLibrarySubscriptionsSummary>'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Initializes the object
|
31
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
32
|
+
def initialize(attributes = {})
|
33
|
+
return unless attributes.is_a?(Hash)
|
34
|
+
|
35
|
+
# convert string to symbol for hash key
|
36
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
37
|
+
|
38
|
+
if attributes.has_key?(:'value')
|
39
|
+
if (value = attributes[:'value']).is_a?(Array)
|
40
|
+
self.value = value
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
46
|
+
# @return Array for valid properties with the reasons
|
47
|
+
def list_invalid_properties
|
48
|
+
invalid_properties = Array.new
|
49
|
+
if @value.nil?
|
50
|
+
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
51
|
+
end
|
52
|
+
|
53
|
+
invalid_properties
|
54
|
+
end
|
55
|
+
|
56
|
+
# Check to see if the all the properties in the model are valid
|
57
|
+
# @return true if the model is valid
|
58
|
+
def valid?
|
59
|
+
return false if @value.nil?
|
60
|
+
true
|
61
|
+
end
|
62
|
+
|
63
|
+
# Checks equality by comparing each attribute.
|
64
|
+
# @param [Object] Object to be compared
|
65
|
+
def ==(o)
|
66
|
+
return true if self.equal?(o)
|
67
|
+
self.class == o.class &&
|
68
|
+
value == o.value
|
69
|
+
end
|
70
|
+
|
71
|
+
# @see the `==` method
|
72
|
+
# @param [Object] Object to be compared
|
73
|
+
def eql?(o)
|
74
|
+
self == o
|
75
|
+
end
|
76
|
+
|
77
|
+
# Calculates hash code according to all attributes.
|
78
|
+
# @return [Fixnum] Hash code
|
79
|
+
def hash
|
80
|
+
[value].hash
|
81
|
+
end
|
82
|
+
|
83
|
+
# Builds the object from hash
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
85
|
+
# @return [Object] Returns the model itself
|
86
|
+
def build_from_hash(attributes)
|
87
|
+
return nil unless attributes.is_a?(Hash)
|
88
|
+
self.class.openapi_types.each_pair do |key, type|
|
89
|
+
if type =~ /\AArray<(.*)>/i
|
90
|
+
# check to ensure the input is an array given that the the attribute
|
91
|
+
# is documented as an array but the input is not
|
92
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
93
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
94
|
+
end
|
95
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
96
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
97
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
98
|
+
end
|
99
|
+
|
100
|
+
self
|
101
|
+
end
|
102
|
+
|
103
|
+
# Deserializes the data based on type
|
104
|
+
# @param string type Data type
|
105
|
+
# @param string value Value to be deserialized
|
106
|
+
# @return [Object] Deserialized data
|
107
|
+
def _deserialize(type, value)
|
108
|
+
case type.to_sym
|
109
|
+
when :DateTime
|
110
|
+
DateTime.parse(value)
|
111
|
+
when :Date
|
112
|
+
Date.parse(value)
|
113
|
+
when :String
|
114
|
+
value.to_s
|
115
|
+
when :Integer
|
116
|
+
value.to_i
|
117
|
+
when :Float
|
118
|
+
value.to_f
|
119
|
+
when :BOOLEAN
|
120
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
121
|
+
true
|
122
|
+
else
|
123
|
+
false
|
124
|
+
end
|
125
|
+
when :Object
|
126
|
+
# generic object (usually a Hash), return directly
|
127
|
+
value
|
128
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
129
|
+
inner_type = Regexp.last_match[:inner_type]
|
130
|
+
value.map { |v| _deserialize(inner_type, v) }
|
131
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
132
|
+
k_type = Regexp.last_match[:k_type]
|
133
|
+
v_type = Regexp.last_match[:v_type]
|
134
|
+
{}.tap do |hash|
|
135
|
+
value.each do |k, v|
|
136
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
else # model
|
140
|
+
temp_model = VSphereAutomation::Content.const_get(type).new
|
141
|
+
temp_model.build_from_hash(value)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Returns the string representation of the object
|
146
|
+
# @return [String] String presentation of the object
|
147
|
+
def to_s
|
148
|
+
to_hash.to_s
|
149
|
+
end
|
150
|
+
|
151
|
+
# to_body is an alias to to_hash (backward compatibility)
|
152
|
+
# @return [Hash] Returns the object in the form of hash
|
153
|
+
def to_body
|
154
|
+
to_hash
|
155
|
+
end
|
156
|
+
|
157
|
+
# Returns the object in the form of hash
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
159
|
+
def to_hash
|
160
|
+
hash = {}
|
161
|
+
self.class.attribute_map.each_pair do |attr, param|
|
162
|
+
value = self.send(attr)
|
163
|
+
next if value.nil?
|
164
|
+
hash[param] = _to_hash(value)
|
165
|
+
end
|
166
|
+
hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Outputs non-array value in the form of hash
|
170
|
+
# For object, use to_hash. Otherwise, just return the value
|
171
|
+
# @param [Object] value Any valid value
|
172
|
+
# @return [Hash] Returns the value in the form of hash
|
173
|
+
def _to_hash(value)
|
174
|
+
if value.is_a?(Array)
|
175
|
+
value.compact.map { |v| _to_hash(v) }
|
176
|
+
elsif value.is_a?(Hash)
|
177
|
+
{}.tap do |hash|
|
178
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
179
|
+
end
|
180
|
+
elsif value.respond_to? :to_hash
|
181
|
+
value.to_hash
|
182
|
+
else
|
183
|
+
value
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
@@ -0,0 +1,28 @@
|
|
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 ContentLibrarySubscriptionsLocation
|
14
|
+
|
15
|
+
LOCAL = "LOCAL".freeze
|
16
|
+
REMOTE = "REMOTE".freeze
|
17
|
+
|
18
|
+
# Builds the enum from string
|
19
|
+
# @param [String] The enum value in the form of the string
|
20
|
+
# @return [String] The enum value
|
21
|
+
def build_from_hash(value)
|
22
|
+
constantValues = ContentLibrarySubscriptionsLocation.constants.select { |c| ContentLibrarySubscriptionsLocation::const_get(c) == value }
|
23
|
+
raise "Invalid ENUM value #{value} for class #ContentLibrarySubscriptionsLocation" if constantValues.empty?
|
24
|
+
value
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,222 @@
|
|
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 ContentLibrarySubscriptionsPlacementInfo
|
14
|
+
# Virtual machine folder into which the virtual machine template should be placed.
|
15
|
+
attr_accessor :folder
|
16
|
+
|
17
|
+
# Cluster onto which the virtual machine template should be placed.
|
18
|
+
attr_accessor :cluster
|
19
|
+
|
20
|
+
# Resource pool into which the virtual machine template should be placed.
|
21
|
+
attr_accessor :resource_pool
|
22
|
+
|
23
|
+
# Host onto which the virtual machine template should be placed. If {@name #host} and {@name #resourcePool} are both specified, {@name #resourcePool} must belong to {@name #host}. If {@name #host} and {@name #cluster} are both specified, {@name #host} must be a member of {@name #cluster}.
|
24
|
+
attr_accessor :host
|
25
|
+
|
26
|
+
# Network that backs the virtual Ethernet adapters in the virtual machine template.
|
27
|
+
attr_accessor :network
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'folder' => :'folder',
|
33
|
+
:'cluster' => :'cluster',
|
34
|
+
:'resource_pool' => :'resource_pool',
|
35
|
+
:'host' => :'host',
|
36
|
+
:'network' => :'network'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'folder' => :'String',
|
44
|
+
:'cluster' => :'String',
|
45
|
+
:'resource_pool' => :'String',
|
46
|
+
:'host' => :'String',
|
47
|
+
:'network' => :'String'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
return unless attributes.is_a?(Hash)
|
55
|
+
|
56
|
+
# convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
|
+
|
59
|
+
if attributes.has_key?(:'folder')
|
60
|
+
self.folder = attributes[:'folder']
|
61
|
+
end
|
62
|
+
|
63
|
+
if attributes.has_key?(:'cluster')
|
64
|
+
self.cluster = attributes[:'cluster']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'resource_pool')
|
68
|
+
self.resource_pool = attributes[:'resource_pool']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'host')
|
72
|
+
self.host = attributes[:'host']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'network')
|
76
|
+
self.network = attributes[:'network']
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
invalid_properties = Array.new
|
84
|
+
invalid_properties
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check to see if the all the properties in the model are valid
|
88
|
+
# @return true if the model is valid
|
89
|
+
def valid?
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Checks equality by comparing each attribute.
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def ==(o)
|
96
|
+
return true if self.equal?(o)
|
97
|
+
self.class == o.class &&
|
98
|
+
folder == o.folder &&
|
99
|
+
cluster == o.cluster &&
|
100
|
+
resource_pool == o.resource_pool &&
|
101
|
+
host == o.host &&
|
102
|
+
network == o.network
|
103
|
+
end
|
104
|
+
|
105
|
+
# @see the `==` method
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def eql?(o)
|
108
|
+
self == o
|
109
|
+
end
|
110
|
+
|
111
|
+
# Calculates hash code according to all attributes.
|
112
|
+
# @return [Fixnum] Hash code
|
113
|
+
def hash
|
114
|
+
[folder, cluster, resource_pool, host, network].hash
|
115
|
+
end
|
116
|
+
|
117
|
+
# Builds the object from hash
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
+
# @return [Object] Returns the model itself
|
120
|
+
def build_from_hash(attributes)
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
123
|
+
if type =~ /\AArray<(.*)>/i
|
124
|
+
# check to ensure the input is an array given that the the attribute
|
125
|
+
# is documented as an array but the input is not
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
128
|
+
end
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
130
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
131
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
132
|
+
end
|
133
|
+
|
134
|
+
self
|
135
|
+
end
|
136
|
+
|
137
|
+
# Deserializes the data based on type
|
138
|
+
# @param string type Data type
|
139
|
+
# @param string value Value to be deserialized
|
140
|
+
# @return [Object] Deserialized data
|
141
|
+
def _deserialize(type, value)
|
142
|
+
case type.to_sym
|
143
|
+
when :DateTime
|
144
|
+
DateTime.parse(value)
|
145
|
+
when :Date
|
146
|
+
Date.parse(value)
|
147
|
+
when :String
|
148
|
+
value.to_s
|
149
|
+
when :Integer
|
150
|
+
value.to_i
|
151
|
+
when :Float
|
152
|
+
value.to_f
|
153
|
+
when :BOOLEAN
|
154
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
155
|
+
true
|
156
|
+
else
|
157
|
+
false
|
158
|
+
end
|
159
|
+
when :Object
|
160
|
+
# generic object (usually a Hash), return directly
|
161
|
+
value
|
162
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
163
|
+
inner_type = Regexp.last_match[:inner_type]
|
164
|
+
value.map { |v| _deserialize(inner_type, v) }
|
165
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
166
|
+
k_type = Regexp.last_match[:k_type]
|
167
|
+
v_type = Regexp.last_match[:v_type]
|
168
|
+
{}.tap do |hash|
|
169
|
+
value.each do |k, v|
|
170
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
else # model
|
174
|
+
temp_model = VSphereAutomation::Content.const_get(type).new
|
175
|
+
temp_model.build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
next if value.nil?
|
198
|
+
hash[param] = _to_hash(value)
|
199
|
+
end
|
200
|
+
hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Outputs non-array value in the form of hash
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
205
|
+
# @param [Object] value Any valid value
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
207
|
+
def _to_hash(value)
|
208
|
+
if value.is_a?(Array)
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
210
|
+
elsif value.is_a?(Hash)
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
213
|
+
end
|
214
|
+
elsif value.respond_to? :to_hash
|
215
|
+
value.to_hash
|
216
|
+
else
|
217
|
+
value
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
@@ -0,0 +1,186 @@
|
|
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 ContentLibrarySubscriptionsResult
|
14
|
+
attr_accessor :value
|
15
|
+
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
:'value' => :'value'
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Attribute type mapping.
|
24
|
+
def self.openapi_types
|
25
|
+
{
|
26
|
+
:'value' => :'ContentLibrarySubscriptionsInfo'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Initializes the object
|
31
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
32
|
+
def initialize(attributes = {})
|
33
|
+
return unless attributes.is_a?(Hash)
|
34
|
+
|
35
|
+
# convert string to symbol for hash key
|
36
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
37
|
+
|
38
|
+
if attributes.has_key?(:'value')
|
39
|
+
self.value = attributes[:'value']
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
44
|
+
# @return Array for valid properties with the reasons
|
45
|
+
def list_invalid_properties
|
46
|
+
invalid_properties = Array.new
|
47
|
+
if @value.nil?
|
48
|
+
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
49
|
+
end
|
50
|
+
|
51
|
+
invalid_properties
|
52
|
+
end
|
53
|
+
|
54
|
+
# Check to see if the all the properties in the model are valid
|
55
|
+
# @return true if the model is valid
|
56
|
+
def valid?
|
57
|
+
return false if @value.nil?
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
# Checks equality by comparing each attribute.
|
62
|
+
# @param [Object] Object to be compared
|
63
|
+
def ==(o)
|
64
|
+
return true if self.equal?(o)
|
65
|
+
self.class == o.class &&
|
66
|
+
value == o.value
|
67
|
+
end
|
68
|
+
|
69
|
+
# @see the `==` method
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def eql?(o)
|
72
|
+
self == o
|
73
|
+
end
|
74
|
+
|
75
|
+
# Calculates hash code according to all attributes.
|
76
|
+
# @return [Fixnum] Hash code
|
77
|
+
def hash
|
78
|
+
[value].hash
|
79
|
+
end
|
80
|
+
|
81
|
+
# Builds the object from hash
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
# @return [Object] Returns the model itself
|
84
|
+
def build_from_hash(attributes)
|
85
|
+
return nil unless attributes.is_a?(Hash)
|
86
|
+
self.class.openapi_types.each_pair do |key, type|
|
87
|
+
if type =~ /\AArray<(.*)>/i
|
88
|
+
# check to ensure the input is an array given that the the attribute
|
89
|
+
# is documented as an array but the input is not
|
90
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
92
|
+
end
|
93
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
94
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
95
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
96
|
+
end
|
97
|
+
|
98
|
+
self
|
99
|
+
end
|
100
|
+
|
101
|
+
# Deserializes the data based on type
|
102
|
+
# @param string type Data type
|
103
|
+
# @param string value Value to be deserialized
|
104
|
+
# @return [Object] Deserialized data
|
105
|
+
def _deserialize(type, value)
|
106
|
+
case type.to_sym
|
107
|
+
when :DateTime
|
108
|
+
DateTime.parse(value)
|
109
|
+
when :Date
|
110
|
+
Date.parse(value)
|
111
|
+
when :String
|
112
|
+
value.to_s
|
113
|
+
when :Integer
|
114
|
+
value.to_i
|
115
|
+
when :Float
|
116
|
+
value.to_f
|
117
|
+
when :BOOLEAN
|
118
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
119
|
+
true
|
120
|
+
else
|
121
|
+
false
|
122
|
+
end
|
123
|
+
when :Object
|
124
|
+
# generic object (usually a Hash), return directly
|
125
|
+
value
|
126
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
127
|
+
inner_type = Regexp.last_match[:inner_type]
|
128
|
+
value.map { |v| _deserialize(inner_type, v) }
|
129
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
130
|
+
k_type = Regexp.last_match[:k_type]
|
131
|
+
v_type = Regexp.last_match[:v_type]
|
132
|
+
{}.tap do |hash|
|
133
|
+
value.each do |k, v|
|
134
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
else # model
|
138
|
+
temp_model = VSphereAutomation::Content.const_get(type).new
|
139
|
+
temp_model.build_from_hash(value)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
# Returns the string representation of the object
|
144
|
+
# @return [String] String presentation of the object
|
145
|
+
def to_s
|
146
|
+
to_hash.to_s
|
147
|
+
end
|
148
|
+
|
149
|
+
# to_body is an alias to to_hash (backward compatibility)
|
150
|
+
# @return [Hash] Returns the object in the form of hash
|
151
|
+
def to_body
|
152
|
+
to_hash
|
153
|
+
end
|
154
|
+
|
155
|
+
# Returns the object in the form of hash
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
def to_hash
|
158
|
+
hash = {}
|
159
|
+
self.class.attribute_map.each_pair do |attr, param|
|
160
|
+
value = self.send(attr)
|
161
|
+
next if value.nil?
|
162
|
+
hash[param] = _to_hash(value)
|
163
|
+
end
|
164
|
+
hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Outputs non-array value in the form of hash
|
168
|
+
# For object, use to_hash. Otherwise, just return the value
|
169
|
+
# @param [Object] value Any valid value
|
170
|
+
# @return [Hash] Returns the value in the form of hash
|
171
|
+
def _to_hash(value)
|
172
|
+
if value.is_a?(Array)
|
173
|
+
value.compact.map { |v| _to_hash(v) }
|
174
|
+
elsif value.is_a?(Hash)
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
177
|
+
end
|
178
|
+
elsif value.respond_to? :to_hash
|
179
|
+
value.to_hash
|
180
|
+
else
|
181
|
+
value
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|