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