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
@@ -0,0 +1,263 @@
|
|
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 ContentLibraryItemUpdateSessionModel
|
16
|
+
# The identifier of this update session.
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# The identifier of the library item to which content will be uploaded or removed.
|
20
|
+
attr_accessor :library_item_id
|
21
|
+
|
22
|
+
# The content version of the library item whose content is being modified. 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 upload. This property is to be updated by the client during the upload process to indicate the progress of its work in completing the upload. The initial progress is 0 until updated by the client. The maximum value is 100, which indicates that the update 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 earlier than this time.
|
33
|
+
attr_accessor :expiration_time
|
34
|
+
|
35
|
+
attr_accessor :preview_info
|
36
|
+
|
37
|
+
# Indicates the update session behavior if warnings are raised in the session preview. Any warning which is raised by session preview but not ignored by the client will, by default, fail the update session.
|
38
|
+
attr_accessor :warning_behavior
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'id' => :'id',
|
44
|
+
:'library_item_id' => :'library_item_id',
|
45
|
+
:'library_item_content_version' => :'library_item_content_version',
|
46
|
+
:'error_message' => :'error_message',
|
47
|
+
:'client_progress' => :'client_progress',
|
48
|
+
:'state' => :'state',
|
49
|
+
:'expiration_time' => :'expiration_time',
|
50
|
+
:'preview_info' => :'preview_info',
|
51
|
+
:'warning_behavior' => :'warning_behavior'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Attribute type mapping.
|
56
|
+
def self.openapi_types
|
57
|
+
{
|
58
|
+
:'id' => :'String',
|
59
|
+
:'library_item_id' => :'String',
|
60
|
+
:'library_item_content_version' => :'String',
|
61
|
+
:'error_message' => :'VapiStdLocalizableMessage',
|
62
|
+
:'client_progress' => :'Integer',
|
63
|
+
:'state' => :'ContentLibraryItemUpdateSessionModelState',
|
64
|
+
:'expiration_time' => :'DateTime',
|
65
|
+
:'preview_info' => :'ContentLibraryItemUpdatesessionPreviewInfo',
|
66
|
+
:'warning_behavior' => :'Array<ContentLibraryItemUpdatesessionWarningBehavior>'
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
# Initializes the object
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
72
|
+
def initialize(attributes = {})
|
73
|
+
return unless attributes.is_a?(Hash)
|
74
|
+
|
75
|
+
# convert string to symbol for hash key
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
77
|
+
|
78
|
+
if attributes.has_key?(:'id')
|
79
|
+
self.id = attributes[:'id']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.has_key?(:'library_item_id')
|
83
|
+
self.library_item_id = attributes[:'library_item_id']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.has_key?(:'library_item_content_version')
|
87
|
+
self.library_item_content_version = attributes[:'library_item_content_version']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.has_key?(:'error_message')
|
91
|
+
self.error_message = attributes[:'error_message']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.has_key?(:'client_progress')
|
95
|
+
self.client_progress = attributes[:'client_progress']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'state')
|
99
|
+
self.state = attributes[:'state']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.has_key?(:'expiration_time')
|
103
|
+
self.expiration_time = attributes[:'expiration_time']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'preview_info')
|
107
|
+
self.preview_info = attributes[:'preview_info']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.has_key?(:'warning_behavior')
|
111
|
+
if (value = attributes[:'warning_behavior']).is_a?(Array)
|
112
|
+
self.warning_behavior = value
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
118
|
+
# @return Array for valid properties with the reasons
|
119
|
+
def list_invalid_properties
|
120
|
+
invalid_properties = Array.new
|
121
|
+
invalid_properties
|
122
|
+
end
|
123
|
+
|
124
|
+
# Check to see if the all the properties in the model are valid
|
125
|
+
# @return true if the model is valid
|
126
|
+
def valid?
|
127
|
+
true
|
128
|
+
end
|
129
|
+
|
130
|
+
# Checks equality by comparing each attribute.
|
131
|
+
# @param [Object] Object to be compared
|
132
|
+
def ==(o)
|
133
|
+
return true if self.equal?(o)
|
134
|
+
self.class == o.class &&
|
135
|
+
id == o.id &&
|
136
|
+
library_item_id == o.library_item_id &&
|
137
|
+
library_item_content_version == o.library_item_content_version &&
|
138
|
+
error_message == o.error_message &&
|
139
|
+
client_progress == o.client_progress &&
|
140
|
+
state == o.state &&
|
141
|
+
expiration_time == o.expiration_time &&
|
142
|
+
preview_info == o.preview_info &&
|
143
|
+
warning_behavior == o.warning_behavior
|
144
|
+
end
|
145
|
+
|
146
|
+
# @see the `==` method
|
147
|
+
# @param [Object] Object to be compared
|
148
|
+
def eql?(o)
|
149
|
+
self == o
|
150
|
+
end
|
151
|
+
|
152
|
+
# Calculates hash code according to all attributes.
|
153
|
+
# @return [Fixnum] Hash code
|
154
|
+
def hash
|
155
|
+
[id, library_item_id, library_item_content_version, error_message, client_progress, state, expiration_time, preview_info, warning_behavior].hash
|
156
|
+
end
|
157
|
+
|
158
|
+
# Builds the object from hash
|
159
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
160
|
+
# @return [Object] Returns the model itself
|
161
|
+
def build_from_hash(attributes)
|
162
|
+
return nil unless attributes.is_a?(Hash)
|
163
|
+
self.class.openapi_types.each_pair do |key, type|
|
164
|
+
if type =~ /\AArray<(.*)>/i
|
165
|
+
# check to ensure the input is an array given that the the attribute
|
166
|
+
# is documented as an array but the input is not
|
167
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
168
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
169
|
+
end
|
170
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
171
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
172
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
173
|
+
end
|
174
|
+
|
175
|
+
self
|
176
|
+
end
|
177
|
+
|
178
|
+
# Deserializes the data based on type
|
179
|
+
# @param string type Data type
|
180
|
+
# @param string value Value to be deserialized
|
181
|
+
# @return [Object] Deserialized data
|
182
|
+
def _deserialize(type, value)
|
183
|
+
case type.to_sym
|
184
|
+
when :DateTime
|
185
|
+
DateTime.parse(value)
|
186
|
+
when :Date
|
187
|
+
Date.parse(value)
|
188
|
+
when :String
|
189
|
+
value.to_s
|
190
|
+
when :Integer
|
191
|
+
value.to_i
|
192
|
+
when :Float
|
193
|
+
value.to_f
|
194
|
+
when :BOOLEAN
|
195
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
196
|
+
true
|
197
|
+
else
|
198
|
+
false
|
199
|
+
end
|
200
|
+
when :Object
|
201
|
+
# generic object (usually a Hash), return directly
|
202
|
+
value
|
203
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
204
|
+
inner_type = Regexp.last_match[:inner_type]
|
205
|
+
value.map { |v| _deserialize(inner_type, v) }
|
206
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
207
|
+
k_type = Regexp.last_match[:k_type]
|
208
|
+
v_type = Regexp.last_match[:v_type]
|
209
|
+
{}.tap do |hash|
|
210
|
+
value.each do |k, v|
|
211
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
else # model
|
215
|
+
temp_model = VSphereAutomation::Content.const_get(type).new
|
216
|
+
temp_model.build_from_hash(value)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the string representation of the object
|
221
|
+
# @return [String] String presentation of the object
|
222
|
+
def to_s
|
223
|
+
to_hash.to_s
|
224
|
+
end
|
225
|
+
|
226
|
+
# to_body is an alias to to_hash (backward compatibility)
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
228
|
+
def to_body
|
229
|
+
to_hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Returns the object in the form of hash
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
234
|
+
def to_hash
|
235
|
+
hash = {}
|
236
|
+
self.class.attribute_map.each_pair do |attr, param|
|
237
|
+
value = self.send(attr)
|
238
|
+
next if value.nil?
|
239
|
+
hash[param] = _to_hash(value)
|
240
|
+
end
|
241
|
+
hash
|
242
|
+
end
|
243
|
+
|
244
|
+
# Outputs non-array value in the form of hash
|
245
|
+
# For object, use to_hash. Otherwise, just return the value
|
246
|
+
# @param [Object] value Any valid value
|
247
|
+
# @return [Hash] Returns the value in the form of hash
|
248
|
+
def _to_hash(value)
|
249
|
+
if value.is_a?(Array)
|
250
|
+
value.compact.map { |v| _to_hash(v) }
|
251
|
+
elsif value.is_a?(Hash)
|
252
|
+
{}.tap do |hash|
|
253
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
254
|
+
end
|
255
|
+
elsif value.respond_to? :to_hash
|
256
|
+
value.to_hash
|
257
|
+
else
|
258
|
+
value
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
end
|
@@ -0,0 +1,32 @@
|
|
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 ContentLibraryItemUpdateSessionModelState
|
16
|
+
|
17
|
+
ACTIVE = 'ACTIVE'.freeze
|
18
|
+
DONE = 'DONE'.freeze
|
19
|
+
ERROR = 'ERROR'.freeze
|
20
|
+
CANCELED = 'CANCELED'.freeze
|
21
|
+
|
22
|
+
# Builds the enum from string
|
23
|
+
# @param [String] The enum value in the form of the string
|
24
|
+
# @return [String] The enum value
|
25
|
+
def build_from_hash(value)
|
26
|
+
constantValues = ContentLibraryItemUpdateSessionModelState.constants.select { |c| ContentLibraryItemUpdateSessionModelState::const_get(c) == value }
|
27
|
+
raise "Invalid ENUM value #{value} for class #ContentLibraryItemUpdateSessionModelState" if constantValues.empty?
|
28
|
+
value
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,188 @@
|
|
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 ContentLibraryItemUpdateSessionResult
|
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' => :'ContentLibraryItemUpdateSessionModel'
|
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
|
+
self.value = attributes[:'value']
|
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
|