vsphere-automation-content 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +79 -0
- data/README.md +229 -0
- data/Rakefile +10 -0
- data/docs/ConfigurationApi.md +91 -0
- data/docs/ContentConfigurationModel.md +11 -0
- data/docs/ContentConfigurationResult.md +8 -0
- data/docs/ContentConfigurationUpdate.md +8 -0
- data/docs/ContentLibraryFind.md +8 -0
- data/docs/ContentLibraryFindResult.md +8 -0
- data/docs/ContentLibraryFindSpec.md +9 -0
- data/docs/ContentLibraryItemCopy.md +9 -0
- data/docs/ContentLibraryItemCopyResult.md +8 -0
- data/docs/ContentLibraryItemCreate.md +9 -0
- data/docs/ContentLibraryItemCreateResult.md +8 -0
- data/docs/ContentLibraryItemDownloadSessionCreate.md +9 -0
- data/docs/ContentLibraryItemDownloadSessionCreateResult.md +8 -0
- data/docs/ContentLibraryItemDownloadSessionFail.md +8 -0
- data/docs/ContentLibraryItemDownloadSessionKeepAlive.md +8 -0
- data/docs/ContentLibraryItemDownloadSessionListResult.md +8 -0
- data/docs/ContentLibraryItemDownloadSessionModel.md +14 -0
- data/docs/ContentLibraryItemDownloadSessionModelState.md +7 -0
- data/docs/ContentLibraryItemDownloadSessionResult.md +8 -0
- data/docs/ContentLibraryItemDownloadsessionFileEndpointType.md +7 -0
- data/docs/ContentLibraryItemDownloadsessionFileGet.md +8 -0
- data/docs/ContentLibraryItemDownloadsessionFileInfo.md +14 -0
- data/docs/ContentLibraryItemDownloadsessionFileListResult.md +8 -0
- data/docs/ContentLibraryItemDownloadsessionFilePrepare.md +9 -0
- data/docs/ContentLibraryItemDownloadsessionFilePrepareResult.md +8 -0
- data/docs/ContentLibraryItemDownloadsessionFilePrepareStatus.md +7 -0
- data/docs/ContentLibraryItemDownloadsessionFileResult.md +8 -0
- data/docs/ContentLibraryItemFileChecksumAlgorithm.md +7 -0
- data/docs/ContentLibraryItemFileChecksumInfo.md +9 -0
- data/docs/ContentLibraryItemFileGet.md +8 -0
- data/docs/ContentLibraryItemFileInfo.md +12 -0
- data/docs/ContentLibraryItemFileListResult.md +8 -0
- data/docs/ContentLibraryItemFileResult.md +8 -0
- data/docs/ContentLibraryItemFind.md +8 -0
- data/docs/ContentLibraryItemFindResult.md +8 -0
- data/docs/ContentLibraryItemFindSpec.md +12 -0
- data/docs/ContentLibraryItemListResult.md +8 -0
- data/docs/ContentLibraryItemModel.md +21 -0
- data/docs/ContentLibraryItemResult.md +8 -0
- data/docs/ContentLibraryItemStorageGet.md +8 -0
- data/docs/ContentLibraryItemStorageInfo.md +14 -0
- data/docs/ContentLibraryItemStorageListResult.md +8 -0
- data/docs/ContentLibraryItemStorageResult.md +8 -0
- data/docs/ContentLibraryItemTransferEndpoint.md +9 -0
- data/docs/ContentLibraryItemTransferStatus.md +7 -0
- data/docs/ContentLibraryItemUpdate.md +8 -0
- data/docs/ContentLibraryItemUpdateSessionCreate.md +9 -0
- data/docs/ContentLibraryItemUpdateSessionCreateResult.md +8 -0
- data/docs/ContentLibraryItemUpdateSessionFail.md +8 -0
- data/docs/ContentLibraryItemUpdateSessionKeepAlive.md +8 -0
- data/docs/ContentLibraryItemUpdateSessionListResult.md +8 -0
- data/docs/ContentLibraryItemUpdateSessionModel.md +16 -0
- data/docs/ContentLibraryItemUpdateSessionModelState.md +7 -0
- data/docs/ContentLibraryItemUpdateSessionResult.md +8 -0
- data/docs/ContentLibraryItemUpdateSessionUpdate.md +8 -0
- data/docs/ContentLibraryItemUpdatesessionCertificateInfo.md +11 -0
- data/docs/ContentLibraryItemUpdatesessionFileAdd.md +8 -0
- data/docs/ContentLibraryItemUpdatesessionFileAddResult.md +8 -0
- data/docs/ContentLibraryItemUpdatesessionFileAddSpec.md +12 -0
- data/docs/ContentLibraryItemUpdatesessionFileGet.md +8 -0
- data/docs/ContentLibraryItemUpdatesessionFileInfo.md +17 -0
- data/docs/ContentLibraryItemUpdatesessionFileListResult.md +8 -0
- data/docs/ContentLibraryItemUpdatesessionFileRemove.md +8 -0
- data/docs/ContentLibraryItemUpdatesessionFileResult.md +8 -0
- data/docs/ContentLibraryItemUpdatesessionFileSourceType.md +7 -0
- data/docs/ContentLibraryItemUpdatesessionFileValidateResult.md +8 -0
- data/docs/ContentLibraryItemUpdatesessionFileValidationError.md +9 -0
- data/docs/ContentLibraryItemUpdatesessionFileValidationResult.md +10 -0
- data/docs/ContentLibraryItemUpdatesessionPreviewInfo.md +10 -0
- data/docs/ContentLibraryItemUpdatesessionPreviewInfoState.md +7 -0
- data/docs/ContentLibraryItemUpdatesessionPreviewWarningInfo.md +10 -0
- data/docs/ContentLibraryItemUpdatesessionWarningBehavior.md +9 -0
- data/docs/ContentLibraryItemUpdatesessionWarningType.md +7 -0
- data/docs/ContentLibraryListResult.md +8 -0
- data/docs/ContentLibraryModel.md +20 -0
- data/docs/ContentLibraryModelLibraryType.md +7 -0
- data/docs/ContentLibraryOptimizationInfo.md +8 -0
- data/docs/ContentLibraryPublishInfo.md +14 -0
- data/docs/ContentLibraryPublishInfoAuthenticationMethod.md +7 -0
- data/docs/ContentLibraryResult.md +8 -0
- data/docs/ContentLibraryStorageBacking.md +10 -0
- data/docs/ContentLibraryStorageBackingType.md +7 -0
- data/docs/ContentLibrarySubscribedItemSync.md +8 -0
- data/docs/ContentLibrarySubscriptionInfo.md +14 -0
- data/docs/ContentLibrarySubscriptionInfoAuthenticationMethod.md +7 -0
- data/docs/ContentLibraryUpdate.md +8 -0
- data/docs/ContentLocalLibraryCreate.md +9 -0
- data/docs/ContentLocalLibraryCreateResult.md +8 -0
- data/docs/ContentLocalLibraryListResult.md +8 -0
- data/docs/ContentLocalLibraryResult.md +8 -0
- data/docs/ContentLocalLibraryUpdate.md +8 -0
- data/docs/ContentSubscribedLibraryCreate.md +9 -0
- data/docs/ContentSubscribedLibraryCreateResult.md +8 -0
- data/docs/ContentSubscribedLibraryListResult.md +8 -0
- data/docs/ContentSubscribedLibraryProbe.md +8 -0
- data/docs/ContentSubscribedLibraryProbeResult.md +10 -0
- data/docs/ContentSubscribedLibraryProbeResultStatus.md +7 -0
- data/docs/ContentSubscribedLibraryResult.md +8 -0
- data/docs/ContentSubscribedLibraryUpdate.md +8 -0
- data/docs/LibraryApi.md +181 -0
- data/docs/LibraryItemApi.md +318 -0
- data/docs/LibraryItemDownloadSessionApi.md +320 -0
- data/docs/LibraryItemDownloadsessionFileApi.md +144 -0
- data/docs/LibraryItemFileApi.md +98 -0
- data/docs/LibraryItemStorageApi.md +98 -0
- data/docs/LibraryItemUpdateSessionApi.md +408 -0
- data/docs/LibraryItemUpdatesessionFileApi.md +233 -0
- data/docs/LibrarySubscribedItemApi.md +96 -0
- data/docs/LocalLibraryApi.md +224 -0
- data/docs/SubscribedLibraryApi.md +354 -0
- data/docs/VapiStdErrorsConcurrentChange.md +9 -0
- data/docs/VapiStdErrorsConcurrentChangeError.md +9 -0
- data/docs/VapiStdErrorsInvalidArgument.md +9 -0
- data/docs/VapiStdErrorsInvalidArgumentError.md +9 -0
- data/docs/VapiStdErrorsInvalidElementConfiguration.md +9 -0
- data/docs/VapiStdErrorsInvalidElementConfigurationError.md +9 -0
- data/docs/VapiStdErrorsInvalidElementType.md +9 -0
- data/docs/VapiStdErrorsInvalidElementTypeError.md +9 -0
- data/docs/VapiStdErrorsNotAllowedInCurrentState.md +9 -0
- data/docs/VapiStdErrorsNotAllowedInCurrentStateError.md +9 -0
- data/docs/VapiStdErrorsNotFound.md +9 -0
- data/docs/VapiStdErrorsNotFoundError.md +9 -0
- data/docs/VapiStdErrorsResourceBusy.md +9 -0
- data/docs/VapiStdErrorsResourceBusyError.md +9 -0
- data/docs/VapiStdErrorsResourceInaccessible.md +9 -0
- data/docs/VapiStdErrorsResourceInaccessibleError.md +9 -0
- data/docs/VapiStdErrorsUnauthorized.md +9 -0
- data/docs/VapiStdErrorsUnauthorizedError.md +9 -0
- data/docs/VapiStdErrorsUnsupported.md +9 -0
- data/docs/VapiStdErrorsUnsupportedError.md +9 -0
- data/docs/VapiStdLocalizableMessage.md +10 -0
- data/git_push.sh +55 -0
- data/lib/vsphere-automation-content.rb +168 -0
- data/lib/vsphere-automation-content/api/configuration_api.rb +122 -0
- data/lib/vsphere-automation-content/api/library_api.rb +238 -0
- data/lib/vsphere-automation-content/api/library_item_api.rb +416 -0
- data/lib/vsphere-automation-content/api/library_item_download_session_api.rb +397 -0
- data/lib/vsphere-automation-content/api/library_item_downloadsession_file_api.rb +205 -0
- data/lib/vsphere-automation-content/api/library_item_file_api.rb +140 -0
- data/lib/vsphere-automation-content/api/library_item_storage_api.rb +140 -0
- data/lib/vsphere-automation-content/api/library_item_update_session_api.rb +505 -0
- data/lib/vsphere-automation-content/api/library_item_updatesession_file_api.rb +318 -0
- data/lib/vsphere-automation-content/api/library_subscribed_item_api.rb +131 -0
- data/lib/vsphere-automation-content/api/local_library_api.rb +289 -0
- data/lib/vsphere-automation-content/api/subscribed_library_api.rb +444 -0
- data/lib/vsphere-automation-content/api_client.rb +386 -0
- data/lib/vsphere-automation-content/api_error.rb +36 -0
- data/lib/vsphere-automation-content/configuration.rb +200 -0
- data/lib/vsphere-automation-content/models/content_configuration_model.rb +214 -0
- data/lib/vsphere-automation-content/models/content_configuration_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_configuration_update.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_find.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_find_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_find_spec.rb +193 -0
- data/lib/vsphere-automation-content/models/content_library_item_copy.rb +198 -0
- data/lib/vsphere-automation-content/models/content_library_item_copy_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_create.rb +198 -0
- data/lib/vsphere-automation-content/models/content_library_item_create_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_download_session_create.rb +198 -0
- data/lib/vsphere-automation-content/models/content_library_item_download_session_create_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_download_session_fail.rb +189 -0
- data/lib/vsphere-automation-content/models/content_library_item_download_session_keep_alive.rb +184 -0
- data/lib/vsphere-automation-content/models/content_library_item_download_session_list_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_item_download_session_model.rb +242 -0
- data/lib/vsphere-automation-content/models/content_library_item_download_session_model_state.rb +31 -0
- data/lib/vsphere-automation-content/models/content_library_item_download_session_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_endpoint_type.rb +30 -0
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_get.rb +189 -0
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_info.rb +255 -0
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_list_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_prepare.rb +198 -0
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_prepare_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_prepare_status.rb +33 -0
- data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_file_checksum_algorithm.rb +32 -0
- data/lib/vsphere-automation-content/models/content_library_item_file_checksum_info.rb +198 -0
- data/lib/vsphere-automation-content/models/content_library_item_file_get.rb +189 -0
- data/lib/vsphere-automation-content/models/content_library_item_file_info.rb +243 -0
- data/lib/vsphere-automation-content/models/content_library_item_file_list_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_item_file_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_find.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_find_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_item_find_spec.rb +224 -0
- data/lib/vsphere-automation-content/models/content_library_item_list_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_item_model.rb +314 -0
- data/lib/vsphere-automation-content/models/content_library_item_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_storage_get.rb +189 -0
- data/lib/vsphere-automation-content/models/content_library_item_storage_info.rb +274 -0
- data/lib/vsphere-automation-content/models/content_library_item_storage_list_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_item_storage_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_item_transfer_endpoint.rb +199 -0
- data/lib/vsphere-automation-content/models/content_library_item_transfer_status.rb +33 -0
- data/lib/vsphere-automation-content/models/content_library_item_update.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_update_session_create.rb +198 -0
- data/lib/vsphere-automation-content/models/content_library_item_update_session_create_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_update_session_fail.rb +189 -0
- data/lib/vsphere-automation-content/models/content_library_item_update_session_keep_alive.rb +184 -0
- data/lib/vsphere-automation-content/models/content_library_item_update_session_list_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_item_update_session_model.rb +263 -0
- data/lib/vsphere-automation-content/models/content_library_item_update_session_model_state.rb +32 -0
- data/lib/vsphere-automation-content/models/content_library_item_update_session_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_update_session_update.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_certificate_info.rb +234 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_add.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_add_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_add_spec.rb +231 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_get.rb +189 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_info.rb +288 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_list_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_remove.rb +189 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_source_type.rb +31 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_validate_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_validation_error.rb +203 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_validation_result.rb +223 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_preview_info.rb +209 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_preview_info_state.rb +32 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_preview_warning_info.rb +217 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_warning_behavior.rb +203 -0
- data/lib/vsphere-automation-content/models/content_library_item_updatesession_warning_type.rb +32 -0
- data/lib/vsphere-automation-content/models/content_library_list_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_library_model.rb +302 -0
- data/lib/vsphere-automation-content/models/content_library_model_library_type.rb +30 -0
- data/lib/vsphere-automation-content/models/content_library_optimization_info.rb +184 -0
- data/lib/vsphere-automation-content/models/content_library_publish_info.rb +243 -0
- data/lib/vsphere-automation-content/models/content_library_publish_info_authentication_method.rb +30 -0
- data/lib/vsphere-automation-content/models/content_library_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_library_storage_backing.rb +203 -0
- data/lib/vsphere-automation-content/models/content_library_storage_backing_type.rb +30 -0
- data/lib/vsphere-automation-content/models/content_library_subscribed_item_sync.rb +189 -0
- data/lib/vsphere-automation-content/models/content_library_subscription_info.rb +243 -0
- data/lib/vsphere-automation-content/models/content_library_subscription_info_authentication_method.rb +30 -0
- data/lib/vsphere-automation-content/models/content_library_update.rb +188 -0
- data/lib/vsphere-automation-content/models/content_local_library_create.rb +198 -0
- data/lib/vsphere-automation-content/models/content_local_library_create_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_local_library_list_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_local_library_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_local_library_update.rb +188 -0
- data/lib/vsphere-automation-content/models/content_subscribed_library_create.rb +198 -0
- data/lib/vsphere-automation-content/models/content_subscribed_library_create_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_subscribed_library_list_result.rb +190 -0
- data/lib/vsphere-automation-content/models/content_subscribed_library_probe.rb +188 -0
- data/lib/vsphere-automation-content/models/content_subscribed_library_probe_result.rb +215 -0
- data/lib/vsphere-automation-content/models/content_subscribed_library_probe_result_status.rb +36 -0
- data/lib/vsphere-automation-content/models/content_subscribed_library_result.rb +188 -0
- data/lib/vsphere-automation-content/models/content_subscribed_library_update.rb +188 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_concurrent_change.rb +201 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_concurrent_change_error.rb +192 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_argument.rb +201 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_argument_error.rb +192 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_configuration.rb +201 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_configuration_error.rb +192 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_type.rb +201 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_type_error.rb +192 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_not_allowed_in_current_state.rb +201 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_not_allowed_in_current_state_error.rb +192 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_not_found.rb +201 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_not_found_error.rb +192 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_resource_busy.rb +201 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_resource_busy_error.rb +192 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_resource_inaccessible.rb +201 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_resource_inaccessible_error.rb +192 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_unauthorized.rb +201 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_unauthorized_error.rb +192 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_unsupported.rb +201 -0
- data/lib/vsphere-automation-content/models/vapi_std_errors_unsupported_error.rb +192 -0
- data/lib/vsphere-automation-content/models/vapi_std_localizable_message.rb +221 -0
- data/lib/vsphere-automation-content/version.rb +15 -0
- data/spec/api/configuration_api_spec.rb +54 -0
- data/spec/api/library_api_spec.rb +77 -0
- data/spec/api/library_item_api_spec.rb +112 -0
- data/spec/api/library_item_download_session_api_spec.rb +112 -0
- data/spec/api/library_item_downloadsession_file_api_spec.rb +68 -0
- data/spec/api/library_item_file_api_spec.rb +56 -0
- data/spec/api/library_item_storage_api_spec.rb +56 -0
- data/spec/api/library_item_update_session_api_spec.rb +135 -0
- data/spec/api/library_item_updatesession_file_api_spec.rb +91 -0
- data/spec/api/library_subscribed_item_api_spec.rb +56 -0
- data/spec/api/local_library_api_spec.rb +88 -0
- data/spec/api/subscribed_library_api_spec.rb +121 -0
- data/spec/api_client_spec.rb +224 -0
- data/spec/configuration_spec.rb +40 -0
- data/spec/models/content_configuration_model_spec.rb +57 -0
- data/spec/models/content_configuration_result_spec.rb +39 -0
- data/spec/models/content_configuration_update_spec.rb +39 -0
- data/spec/models/content_library_find_result_spec.rb +39 -0
- data/spec/models/content_library_find_spec.rb +39 -0
- data/spec/models/content_library_find_spec_spec.rb +45 -0
- data/spec/models/content_library_item_copy_result_spec.rb +39 -0
- data/spec/models/content_library_item_copy_spec.rb +45 -0
- data/spec/models/content_library_item_create_result_spec.rb +39 -0
- data/spec/models/content_library_item_create_spec.rb +45 -0
- data/spec/models/content_library_item_download_session_create_result_spec.rb +39 -0
- data/spec/models/content_library_item_download_session_create_spec.rb +45 -0
- data/spec/models/content_library_item_download_session_fail_spec.rb +39 -0
- data/spec/models/content_library_item_download_session_keep_alive_spec.rb +39 -0
- data/spec/models/content_library_item_download_session_list_result_spec.rb +39 -0
- data/spec/models/content_library_item_download_session_model_spec.rb +75 -0
- data/spec/models/content_library_item_download_session_model_state_spec.rb +33 -0
- data/spec/models/content_library_item_download_session_result_spec.rb +39 -0
- data/spec/models/content_library_item_downloadsession_file_endpoint_type_spec.rb +33 -0
- data/spec/models/content_library_item_downloadsession_file_get_spec.rb +39 -0
- data/spec/models/content_library_item_downloadsession_file_info_spec.rb +75 -0
- data/spec/models/content_library_item_downloadsession_file_list_result_spec.rb +39 -0
- data/spec/models/content_library_item_downloadsession_file_prepare_result_spec.rb +39 -0
- data/spec/models/content_library_item_downloadsession_file_prepare_spec.rb +45 -0
- data/spec/models/content_library_item_downloadsession_file_prepare_status_spec.rb +33 -0
- data/spec/models/content_library_item_downloadsession_file_result_spec.rb +39 -0
- data/spec/models/content_library_item_file_checksum_algorithm_spec.rb +33 -0
- data/spec/models/content_library_item_file_checksum_info_spec.rb +45 -0
- data/spec/models/content_library_item_file_get_spec.rb +39 -0
- data/spec/models/content_library_item_file_info_spec.rb +63 -0
- data/spec/models/content_library_item_file_list_result_spec.rb +39 -0
- data/spec/models/content_library_item_file_result_spec.rb +39 -0
- data/spec/models/content_library_item_find_result_spec.rb +39 -0
- data/spec/models/content_library_item_find_spec.rb +39 -0
- data/spec/models/content_library_item_find_spec_spec.rb +63 -0
- data/spec/models/content_library_item_list_result_spec.rb +39 -0
- data/spec/models/content_library_item_model_spec.rb +117 -0
- data/spec/models/content_library_item_result_spec.rb +39 -0
- data/spec/models/content_library_item_storage_get_spec.rb +39 -0
- data/spec/models/content_library_item_storage_info_spec.rb +75 -0
- data/spec/models/content_library_item_storage_list_result_spec.rb +39 -0
- data/spec/models/content_library_item_storage_result_spec.rb +39 -0
- data/spec/models/content_library_item_transfer_endpoint_spec.rb +45 -0
- data/spec/models/content_library_item_transfer_status_spec.rb +33 -0
- data/spec/models/content_library_item_update_session_create_result_spec.rb +39 -0
- data/spec/models/content_library_item_update_session_create_spec.rb +45 -0
- data/spec/models/content_library_item_update_session_fail_spec.rb +39 -0
- data/spec/models/content_library_item_update_session_keep_alive_spec.rb +39 -0
- data/spec/models/content_library_item_update_session_list_result_spec.rb +39 -0
- data/spec/models/content_library_item_update_session_model_spec.rb +87 -0
- data/spec/models/content_library_item_update_session_model_state_spec.rb +33 -0
- data/spec/models/content_library_item_update_session_result_spec.rb +39 -0
- data/spec/models/content_library_item_update_session_update_spec.rb +39 -0
- data/spec/models/content_library_item_update_spec.rb +39 -0
- data/spec/models/content_library_item_updatesession_certificate_info_spec.rb +57 -0
- data/spec/models/content_library_item_updatesession_file_add_result_spec.rb +39 -0
- data/spec/models/content_library_item_updatesession_file_add_spec.rb +39 -0
- data/spec/models/content_library_item_updatesession_file_add_spec_spec.rb +63 -0
- data/spec/models/content_library_item_updatesession_file_get_spec.rb +39 -0
- data/spec/models/content_library_item_updatesession_file_info_spec.rb +93 -0
- data/spec/models/content_library_item_updatesession_file_list_result_spec.rb +39 -0
- data/spec/models/content_library_item_updatesession_file_remove_spec.rb +39 -0
- data/spec/models/content_library_item_updatesession_file_result_spec.rb +39 -0
- data/spec/models/content_library_item_updatesession_file_source_type_spec.rb +33 -0
- data/spec/models/content_library_item_updatesession_file_validate_result_spec.rb +39 -0
- data/spec/models/content_library_item_updatesession_file_validation_error_spec.rb +45 -0
- data/spec/models/content_library_item_updatesession_file_validation_result_spec.rb +51 -0
- data/spec/models/content_library_item_updatesession_preview_info_spec.rb +51 -0
- data/spec/models/content_library_item_updatesession_preview_info_state_spec.rb +33 -0
- data/spec/models/content_library_item_updatesession_preview_warning_info_spec.rb +51 -0
- data/spec/models/content_library_item_updatesession_warning_behavior_spec.rb +45 -0
- data/spec/models/content_library_item_updatesession_warning_type_spec.rb +33 -0
- data/spec/models/content_library_list_result_spec.rb +39 -0
- data/spec/models/content_library_model_library_type_spec.rb +33 -0
- data/spec/models/content_library_model_spec.rb +111 -0
- data/spec/models/content_library_optimization_info_spec.rb +39 -0
- data/spec/models/content_library_publish_info_authentication_method_spec.rb +33 -0
- data/spec/models/content_library_publish_info_spec.rb +75 -0
- data/spec/models/content_library_result_spec.rb +39 -0
- data/spec/models/content_library_storage_backing_spec.rb +51 -0
- data/spec/models/content_library_storage_backing_type_spec.rb +33 -0
- data/spec/models/content_library_subscribed_item_sync_spec.rb +39 -0
- data/spec/models/content_library_subscription_info_authentication_method_spec.rb +33 -0
- data/spec/models/content_library_subscription_info_spec.rb +75 -0
- data/spec/models/content_library_update_spec.rb +39 -0
- data/spec/models/content_local_library_create_result_spec.rb +39 -0
- data/spec/models/content_local_library_create_spec.rb +45 -0
- data/spec/models/content_local_library_list_result_spec.rb +39 -0
- data/spec/models/content_local_library_result_spec.rb +39 -0
- data/spec/models/content_local_library_update_spec.rb +39 -0
- data/spec/models/content_subscribed_library_create_result_spec.rb +39 -0
- data/spec/models/content_subscribed_library_create_spec.rb +45 -0
- data/spec/models/content_subscribed_library_list_result_spec.rb +39 -0
- data/spec/models/content_subscribed_library_probe_result_spec.rb +51 -0
- data/spec/models/content_subscribed_library_probe_result_status_spec.rb +33 -0
- data/spec/models/content_subscribed_library_probe_spec.rb +39 -0
- data/spec/models/content_subscribed_library_result_spec.rb +39 -0
- data/spec/models/content_subscribed_library_update_spec.rb +39 -0
- data/spec/models/vapi_std_errors_concurrent_change_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_concurrent_change_spec.rb +45 -0
- data/spec/models/vapi_std_errors_invalid_argument_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_invalid_argument_spec.rb +45 -0
- data/spec/models/vapi_std_errors_invalid_element_configuration_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_invalid_element_configuration_spec.rb +45 -0
- data/spec/models/vapi_std_errors_invalid_element_type_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_invalid_element_type_spec.rb +45 -0
- data/spec/models/vapi_std_errors_not_allowed_in_current_state_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_not_allowed_in_current_state_spec.rb +45 -0
- data/spec/models/vapi_std_errors_not_found_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_not_found_spec.rb +45 -0
- data/spec/models/vapi_std_errors_resource_busy_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_resource_busy_spec.rb +45 -0
- data/spec/models/vapi_std_errors_resource_inaccessible_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_resource_inaccessible_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unauthorized_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unauthorized_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unsupported_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unsupported_spec.rb +45 -0
- data/spec/models/vapi_std_localizable_message_spec.rb +51 -0
- data/spec/spec_helper.rb +109 -0
- data/vsphere-automation-content.gemspec +44 -0
- metadata +725 -0
data/lib/vsphere-automation-content/models/content_library_item_download_session_keep_alive.rb
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# content
|
5
|
+
|
6
|
+
# VMware vSphere® Content Library empowers vSphere Admins to effectively manage VM templates, vApps, ISO images and scripts with ease.
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
module VSphereAutomation
|
14
|
+
module Content
|
15
|
+
class ContentLibraryItemDownloadSessionKeepAlive
|
16
|
+
# Optional update to the progress property of the session. If specified, the new progress should be greater then the current progress. See {@link DownloadSessionModel#clientProgress}.
|
17
|
+
attr_accessor :progress
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'progress' => :'progress'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'progress' => :'Integer'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the object
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return unless attributes.is_a?(Hash)
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
40
|
+
|
41
|
+
if attributes.has_key?(:'progress')
|
42
|
+
self.progress = attributes[:'progress']
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
47
|
+
# @return Array for valid properties with the reasons
|
48
|
+
def list_invalid_properties
|
49
|
+
invalid_properties = Array.new
|
50
|
+
invalid_properties
|
51
|
+
end
|
52
|
+
|
53
|
+
# Check to see if the all the properties in the model are valid
|
54
|
+
# @return true if the model is valid
|
55
|
+
def valid?
|
56
|
+
true
|
57
|
+
end
|
58
|
+
|
59
|
+
# Checks equality by comparing each attribute.
|
60
|
+
# @param [Object] Object to be compared
|
61
|
+
def ==(o)
|
62
|
+
return true if self.equal?(o)
|
63
|
+
self.class == o.class &&
|
64
|
+
progress == o.progress
|
65
|
+
end
|
66
|
+
|
67
|
+
# @see the `==` method
|
68
|
+
# @param [Object] Object to be compared
|
69
|
+
def eql?(o)
|
70
|
+
self == o
|
71
|
+
end
|
72
|
+
|
73
|
+
# Calculates hash code according to all attributes.
|
74
|
+
# @return [Fixnum] Hash code
|
75
|
+
def hash
|
76
|
+
[progress].hash
|
77
|
+
end
|
78
|
+
|
79
|
+
# Builds the object from hash
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
81
|
+
# @return [Object] Returns the model itself
|
82
|
+
def build_from_hash(attributes)
|
83
|
+
return nil unless attributes.is_a?(Hash)
|
84
|
+
self.class.openapi_types.each_pair do |key, type|
|
85
|
+
if type =~ /\AArray<(.*)>/i
|
86
|
+
# check to ensure the input is an array given that the the attribute
|
87
|
+
# is documented as an array but the input is not
|
88
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
89
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
90
|
+
end
|
91
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
92
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
93
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
94
|
+
end
|
95
|
+
|
96
|
+
self
|
97
|
+
end
|
98
|
+
|
99
|
+
# Deserializes the data based on type
|
100
|
+
# @param string type Data type
|
101
|
+
# @param string value Value to be deserialized
|
102
|
+
# @return [Object] Deserialized data
|
103
|
+
def _deserialize(type, value)
|
104
|
+
case type.to_sym
|
105
|
+
when :DateTime
|
106
|
+
DateTime.parse(value)
|
107
|
+
when :Date
|
108
|
+
Date.parse(value)
|
109
|
+
when :String
|
110
|
+
value.to_s
|
111
|
+
when :Integer
|
112
|
+
value.to_i
|
113
|
+
when :Float
|
114
|
+
value.to_f
|
115
|
+
when :BOOLEAN
|
116
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
117
|
+
true
|
118
|
+
else
|
119
|
+
false
|
120
|
+
end
|
121
|
+
when :Object
|
122
|
+
# generic object (usually a Hash), return directly
|
123
|
+
value
|
124
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
125
|
+
inner_type = Regexp.last_match[:inner_type]
|
126
|
+
value.map { |v| _deserialize(inner_type, v) }
|
127
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
128
|
+
k_type = Regexp.last_match[:k_type]
|
129
|
+
v_type = Regexp.last_match[:v_type]
|
130
|
+
{}.tap do |hash|
|
131
|
+
value.each do |k, v|
|
132
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
else # model
|
136
|
+
temp_model = VSphereAutomation::Content.const_get(type).new
|
137
|
+
temp_model.build_from_hash(value)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# Returns the string representation of the object
|
142
|
+
# @return [String] String presentation of the object
|
143
|
+
def to_s
|
144
|
+
to_hash.to_s
|
145
|
+
end
|
146
|
+
|
147
|
+
# to_body is an alias to to_hash (backward compatibility)
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
149
|
+
def to_body
|
150
|
+
to_hash
|
151
|
+
end
|
152
|
+
|
153
|
+
# Returns the object in the form of hash
|
154
|
+
# @return [Hash] Returns the object in the form of hash
|
155
|
+
def to_hash
|
156
|
+
hash = {}
|
157
|
+
self.class.attribute_map.each_pair do |attr, param|
|
158
|
+
value = self.send(attr)
|
159
|
+
next if value.nil?
|
160
|
+
hash[param] = _to_hash(value)
|
161
|
+
end
|
162
|
+
hash
|
163
|
+
end
|
164
|
+
|
165
|
+
# Outputs non-array value in the form of hash
|
166
|
+
# For object, use to_hash. Otherwise, just return the value
|
167
|
+
# @param [Object] value Any valid value
|
168
|
+
# @return [Hash] Returns the value in the form of hash
|
169
|
+
def _to_hash(value)
|
170
|
+
if value.is_a?(Array)
|
171
|
+
value.compact.map { |v| _to_hash(v) }
|
172
|
+
elsif value.is_a?(Hash)
|
173
|
+
{}.tap do |hash|
|
174
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
175
|
+
end
|
176
|
+
elsif value.respond_to? :to_hash
|
177
|
+
value.to_hash
|
178
|
+
else
|
179
|
+
value
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
data/lib/vsphere-automation-content/models/content_library_item_download_session_list_result.rb
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# content
|
5
|
+
|
6
|
+
# VMware vSphere® Content Library empowers vSphere Admins to effectively manage VM templates, vApps, ISO images and scripts with ease.
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
module VSphereAutomation
|
14
|
+
module Content
|
15
|
+
class ContentLibraryItemDownloadSessionListResult
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'value' => :'value'
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.openapi_types
|
27
|
+
{
|
28
|
+
:'value' => :'Array<String>'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Initializes the object
|
33
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
34
|
+
def initialize(attributes = {})
|
35
|
+
return unless attributes.is_a?(Hash)
|
36
|
+
|
37
|
+
# convert string to symbol for hash key
|
38
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
39
|
+
|
40
|
+
if attributes.has_key?(:'value')
|
41
|
+
if (value = attributes[:'value']).is_a?(Array)
|
42
|
+
self.value = value
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
48
|
+
# @return Array for valid properties with the reasons
|
49
|
+
def list_invalid_properties
|
50
|
+
invalid_properties = Array.new
|
51
|
+
if @value.nil?
|
52
|
+
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
53
|
+
end
|
54
|
+
|
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
|
+
return false if @value.nil?
|
62
|
+
true
|
63
|
+
end
|
64
|
+
|
65
|
+
# Checks equality by comparing each attribute.
|
66
|
+
# @param [Object] Object to be compared
|
67
|
+
def ==(o)
|
68
|
+
return true if self.equal?(o)
|
69
|
+
self.class == o.class &&
|
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
|
+
[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
|
@@ -0,0 +1,242 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# content
|
5
|
+
|
6
|
+
# VMware vSphere® Content Library empowers vSphere Admins to effectively manage VM templates, vApps, ISO images and scripts with ease.
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
module VSphereAutomation
|
14
|
+
module Content
|
15
|
+
class ContentLibraryItemDownloadSessionModel
|
16
|
+
# The identifier of this download session.
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# The identifier of the library item whose content is being downloaded.
|
20
|
+
attr_accessor :library_item_id
|
21
|
+
|
22
|
+
# The content version of the library item whose content is being downloaded. This value is the {@link ItemModel#contentVersion} at the time when the session is created for the library item.
|
23
|
+
attr_accessor :library_item_content_version
|
24
|
+
|
25
|
+
attr_accessor :error_message
|
26
|
+
|
27
|
+
# The progress that has been made with the download. This property is to be updated by the client during the download process to indicate the progress of its work in completing the download. The initial progress is 0 until updated by the client. The maximum value is 100, which indicates that the download is complete.
|
28
|
+
attr_accessor :client_progress
|
29
|
+
|
30
|
+
attr_accessor :state
|
31
|
+
|
32
|
+
# Indicates the time after which the session will expire. The session is guaranteed not to expire before this time.
|
33
|
+
attr_accessor :expiration_time
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'id' => :'id',
|
39
|
+
:'library_item_id' => :'library_item_id',
|
40
|
+
:'library_item_content_version' => :'library_item_content_version',
|
41
|
+
:'error_message' => :'error_message',
|
42
|
+
:'client_progress' => :'client_progress',
|
43
|
+
:'state' => :'state',
|
44
|
+
:'expiration_time' => :'expiration_time'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.openapi_types
|
50
|
+
{
|
51
|
+
:'id' => :'String',
|
52
|
+
:'library_item_id' => :'String',
|
53
|
+
:'library_item_content_version' => :'String',
|
54
|
+
:'error_message' => :'VapiStdLocalizableMessage',
|
55
|
+
:'client_progress' => :'Integer',
|
56
|
+
:'state' => :'ContentLibraryItemDownloadSessionModelState',
|
57
|
+
:'expiration_time' => :'DateTime'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
return unless attributes.is_a?(Hash)
|
65
|
+
|
66
|
+
# convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
68
|
+
|
69
|
+
if attributes.has_key?(:'id')
|
70
|
+
self.id = attributes[:'id']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'library_item_id')
|
74
|
+
self.library_item_id = attributes[:'library_item_id']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'library_item_content_version')
|
78
|
+
self.library_item_content_version = attributes[:'library_item_content_version']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'error_message')
|
82
|
+
self.error_message = attributes[:'error_message']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'client_progress')
|
86
|
+
self.client_progress = attributes[:'client_progress']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'state')
|
90
|
+
self.state = attributes[:'state']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'expiration_time')
|
94
|
+
self.expiration_time = attributes[:'expiration_time']
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
99
|
+
# @return Array for valid properties with the reasons
|
100
|
+
def list_invalid_properties
|
101
|
+
invalid_properties = Array.new
|
102
|
+
invalid_properties
|
103
|
+
end
|
104
|
+
|
105
|
+
# Check to see if the all the properties in the model are valid
|
106
|
+
# @return true if the model is valid
|
107
|
+
def valid?
|
108
|
+
true
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
id == o.id &&
|
117
|
+
library_item_id == o.library_item_id &&
|
118
|
+
library_item_content_version == o.library_item_content_version &&
|
119
|
+
error_message == o.error_message &&
|
120
|
+
client_progress == o.client_progress &&
|
121
|
+
state == o.state &&
|
122
|
+
expiration_time == o.expiration_time
|
123
|
+
end
|
124
|
+
|
125
|
+
# @see the `==` method
|
126
|
+
# @param [Object] Object to be compared
|
127
|
+
def eql?(o)
|
128
|
+
self == o
|
129
|
+
end
|
130
|
+
|
131
|
+
# Calculates hash code according to all attributes.
|
132
|
+
# @return [Fixnum] Hash code
|
133
|
+
def hash
|
134
|
+
[id, library_item_id, library_item_content_version, error_message, client_progress, state, expiration_time].hash
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def build_from_hash(attributes)
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
142
|
+
self.class.openapi_types.each_pair do |key, type|
|
143
|
+
if type =~ /\AArray<(.*)>/i
|
144
|
+
# check to ensure the input is an array given that the the attribute
|
145
|
+
# is documented as an array but the input is not
|
146
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
147
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
148
|
+
end
|
149
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
150
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
151
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
152
|
+
end
|
153
|
+
|
154
|
+
self
|
155
|
+
end
|
156
|
+
|
157
|
+
# Deserializes the data based on type
|
158
|
+
# @param string type Data type
|
159
|
+
# @param string value Value to be deserialized
|
160
|
+
# @return [Object] Deserialized data
|
161
|
+
def _deserialize(type, value)
|
162
|
+
case type.to_sym
|
163
|
+
when :DateTime
|
164
|
+
DateTime.parse(value)
|
165
|
+
when :Date
|
166
|
+
Date.parse(value)
|
167
|
+
when :String
|
168
|
+
value.to_s
|
169
|
+
when :Integer
|
170
|
+
value.to_i
|
171
|
+
when :Float
|
172
|
+
value.to_f
|
173
|
+
when :BOOLEAN
|
174
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
175
|
+
true
|
176
|
+
else
|
177
|
+
false
|
178
|
+
end
|
179
|
+
when :Object
|
180
|
+
# generic object (usually a Hash), return directly
|
181
|
+
value
|
182
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
183
|
+
inner_type = Regexp.last_match[:inner_type]
|
184
|
+
value.map { |v| _deserialize(inner_type, v) }
|
185
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
186
|
+
k_type = Regexp.last_match[:k_type]
|
187
|
+
v_type = Regexp.last_match[:v_type]
|
188
|
+
{}.tap do |hash|
|
189
|
+
value.each do |k, v|
|
190
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
else # model
|
194
|
+
temp_model = VSphereAutomation::Content.const_get(type).new
|
195
|
+
temp_model.build_from_hash(value)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the string representation of the object
|
200
|
+
# @return [String] String presentation of the object
|
201
|
+
def to_s
|
202
|
+
to_hash.to_s
|
203
|
+
end
|
204
|
+
|
205
|
+
# to_body is an alias to to_hash (backward compatibility)
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_body
|
208
|
+
to_hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the object in the form of hash
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
213
|
+
def to_hash
|
214
|
+
hash = {}
|
215
|
+
self.class.attribute_map.each_pair do |attr, param|
|
216
|
+
value = self.send(attr)
|
217
|
+
next if value.nil?
|
218
|
+
hash[param] = _to_hash(value)
|
219
|
+
end
|
220
|
+
hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Outputs non-array value in the form of hash
|
224
|
+
# For object, use to_hash. Otherwise, just return the value
|
225
|
+
# @param [Object] value Any valid value
|
226
|
+
# @return [Hash] Returns the value in the form of hash
|
227
|
+
def _to_hash(value)
|
228
|
+
if value.is_a?(Array)
|
229
|
+
value.compact.map { |v| _to_hash(v) }
|
230
|
+
elsif value.is_a?(Hash)
|
231
|
+
{}.tap do |hash|
|
232
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
233
|
+
end
|
234
|
+
elsif value.respond_to? :to_hash
|
235
|
+
value.to_hash
|
236
|
+
else
|
237
|
+
value
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|
242
|
+
end
|