vsphere-automation-content 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (409) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +229 -0
  5. data/Rakefile +10 -0
  6. data/docs/ConfigurationApi.md +91 -0
  7. data/docs/ContentConfigurationModel.md +11 -0
  8. data/docs/ContentConfigurationResult.md +8 -0
  9. data/docs/ContentConfigurationUpdate.md +8 -0
  10. data/docs/ContentLibraryFind.md +8 -0
  11. data/docs/ContentLibraryFindResult.md +8 -0
  12. data/docs/ContentLibraryFindSpec.md +9 -0
  13. data/docs/ContentLibraryItemCopy.md +9 -0
  14. data/docs/ContentLibraryItemCopyResult.md +8 -0
  15. data/docs/ContentLibraryItemCreate.md +9 -0
  16. data/docs/ContentLibraryItemCreateResult.md +8 -0
  17. data/docs/ContentLibraryItemDownloadSessionCreate.md +9 -0
  18. data/docs/ContentLibraryItemDownloadSessionCreateResult.md +8 -0
  19. data/docs/ContentLibraryItemDownloadSessionFail.md +8 -0
  20. data/docs/ContentLibraryItemDownloadSessionKeepAlive.md +8 -0
  21. data/docs/ContentLibraryItemDownloadSessionListResult.md +8 -0
  22. data/docs/ContentLibraryItemDownloadSessionModel.md +14 -0
  23. data/docs/ContentLibraryItemDownloadSessionModelState.md +7 -0
  24. data/docs/ContentLibraryItemDownloadSessionResult.md +8 -0
  25. data/docs/ContentLibraryItemDownloadsessionFileEndpointType.md +7 -0
  26. data/docs/ContentLibraryItemDownloadsessionFileGet.md +8 -0
  27. data/docs/ContentLibraryItemDownloadsessionFileInfo.md +14 -0
  28. data/docs/ContentLibraryItemDownloadsessionFileListResult.md +8 -0
  29. data/docs/ContentLibraryItemDownloadsessionFilePrepare.md +9 -0
  30. data/docs/ContentLibraryItemDownloadsessionFilePrepareResult.md +8 -0
  31. data/docs/ContentLibraryItemDownloadsessionFilePrepareStatus.md +7 -0
  32. data/docs/ContentLibraryItemDownloadsessionFileResult.md +8 -0
  33. data/docs/ContentLibraryItemFileChecksumAlgorithm.md +7 -0
  34. data/docs/ContentLibraryItemFileChecksumInfo.md +9 -0
  35. data/docs/ContentLibraryItemFileGet.md +8 -0
  36. data/docs/ContentLibraryItemFileInfo.md +12 -0
  37. data/docs/ContentLibraryItemFileListResult.md +8 -0
  38. data/docs/ContentLibraryItemFileResult.md +8 -0
  39. data/docs/ContentLibraryItemFind.md +8 -0
  40. data/docs/ContentLibraryItemFindResult.md +8 -0
  41. data/docs/ContentLibraryItemFindSpec.md +12 -0
  42. data/docs/ContentLibraryItemListResult.md +8 -0
  43. data/docs/ContentLibraryItemModel.md +21 -0
  44. data/docs/ContentLibraryItemResult.md +8 -0
  45. data/docs/ContentLibraryItemStorageGet.md +8 -0
  46. data/docs/ContentLibraryItemStorageInfo.md +14 -0
  47. data/docs/ContentLibraryItemStorageListResult.md +8 -0
  48. data/docs/ContentLibraryItemStorageResult.md +8 -0
  49. data/docs/ContentLibraryItemTransferEndpoint.md +9 -0
  50. data/docs/ContentLibraryItemTransferStatus.md +7 -0
  51. data/docs/ContentLibraryItemUpdate.md +8 -0
  52. data/docs/ContentLibraryItemUpdateSessionCreate.md +9 -0
  53. data/docs/ContentLibraryItemUpdateSessionCreateResult.md +8 -0
  54. data/docs/ContentLibraryItemUpdateSessionFail.md +8 -0
  55. data/docs/ContentLibraryItemUpdateSessionKeepAlive.md +8 -0
  56. data/docs/ContentLibraryItemUpdateSessionListResult.md +8 -0
  57. data/docs/ContentLibraryItemUpdateSessionModel.md +16 -0
  58. data/docs/ContentLibraryItemUpdateSessionModelState.md +7 -0
  59. data/docs/ContentLibraryItemUpdateSessionResult.md +8 -0
  60. data/docs/ContentLibraryItemUpdateSessionUpdate.md +8 -0
  61. data/docs/ContentLibraryItemUpdatesessionCertificateInfo.md +11 -0
  62. data/docs/ContentLibraryItemUpdatesessionFileAdd.md +8 -0
  63. data/docs/ContentLibraryItemUpdatesessionFileAddResult.md +8 -0
  64. data/docs/ContentLibraryItemUpdatesessionFileAddSpec.md +12 -0
  65. data/docs/ContentLibraryItemUpdatesessionFileGet.md +8 -0
  66. data/docs/ContentLibraryItemUpdatesessionFileInfo.md +17 -0
  67. data/docs/ContentLibraryItemUpdatesessionFileListResult.md +8 -0
  68. data/docs/ContentLibraryItemUpdatesessionFileRemove.md +8 -0
  69. data/docs/ContentLibraryItemUpdatesessionFileResult.md +8 -0
  70. data/docs/ContentLibraryItemUpdatesessionFileSourceType.md +7 -0
  71. data/docs/ContentLibraryItemUpdatesessionFileValidateResult.md +8 -0
  72. data/docs/ContentLibraryItemUpdatesessionFileValidationError.md +9 -0
  73. data/docs/ContentLibraryItemUpdatesessionFileValidationResult.md +10 -0
  74. data/docs/ContentLibraryItemUpdatesessionPreviewInfo.md +10 -0
  75. data/docs/ContentLibraryItemUpdatesessionPreviewInfoState.md +7 -0
  76. data/docs/ContentLibraryItemUpdatesessionPreviewWarningInfo.md +10 -0
  77. data/docs/ContentLibraryItemUpdatesessionWarningBehavior.md +9 -0
  78. data/docs/ContentLibraryItemUpdatesessionWarningType.md +7 -0
  79. data/docs/ContentLibraryListResult.md +8 -0
  80. data/docs/ContentLibraryModel.md +20 -0
  81. data/docs/ContentLibraryModelLibraryType.md +7 -0
  82. data/docs/ContentLibraryOptimizationInfo.md +8 -0
  83. data/docs/ContentLibraryPublishInfo.md +14 -0
  84. data/docs/ContentLibraryPublishInfoAuthenticationMethod.md +7 -0
  85. data/docs/ContentLibraryResult.md +8 -0
  86. data/docs/ContentLibraryStorageBacking.md +10 -0
  87. data/docs/ContentLibraryStorageBackingType.md +7 -0
  88. data/docs/ContentLibrarySubscribedItemSync.md +8 -0
  89. data/docs/ContentLibrarySubscriptionInfo.md +14 -0
  90. data/docs/ContentLibrarySubscriptionInfoAuthenticationMethod.md +7 -0
  91. data/docs/ContentLibraryUpdate.md +8 -0
  92. data/docs/ContentLocalLibraryCreate.md +9 -0
  93. data/docs/ContentLocalLibraryCreateResult.md +8 -0
  94. data/docs/ContentLocalLibraryListResult.md +8 -0
  95. data/docs/ContentLocalLibraryResult.md +8 -0
  96. data/docs/ContentLocalLibraryUpdate.md +8 -0
  97. data/docs/ContentSubscribedLibraryCreate.md +9 -0
  98. data/docs/ContentSubscribedLibraryCreateResult.md +8 -0
  99. data/docs/ContentSubscribedLibraryListResult.md +8 -0
  100. data/docs/ContentSubscribedLibraryProbe.md +8 -0
  101. data/docs/ContentSubscribedLibraryProbeResult.md +10 -0
  102. data/docs/ContentSubscribedLibraryProbeResultStatus.md +7 -0
  103. data/docs/ContentSubscribedLibraryResult.md +8 -0
  104. data/docs/ContentSubscribedLibraryUpdate.md +8 -0
  105. data/docs/LibraryApi.md +181 -0
  106. data/docs/LibraryItemApi.md +318 -0
  107. data/docs/LibraryItemDownloadSessionApi.md +320 -0
  108. data/docs/LibraryItemDownloadsessionFileApi.md +144 -0
  109. data/docs/LibraryItemFileApi.md +98 -0
  110. data/docs/LibraryItemStorageApi.md +98 -0
  111. data/docs/LibraryItemUpdateSessionApi.md +408 -0
  112. data/docs/LibraryItemUpdatesessionFileApi.md +233 -0
  113. data/docs/LibrarySubscribedItemApi.md +96 -0
  114. data/docs/LocalLibraryApi.md +224 -0
  115. data/docs/SubscribedLibraryApi.md +354 -0
  116. data/docs/VapiStdErrorsConcurrentChange.md +9 -0
  117. data/docs/VapiStdErrorsConcurrentChangeError.md +9 -0
  118. data/docs/VapiStdErrorsInvalidArgument.md +9 -0
  119. data/docs/VapiStdErrorsInvalidArgumentError.md +9 -0
  120. data/docs/VapiStdErrorsInvalidElementConfiguration.md +9 -0
  121. data/docs/VapiStdErrorsInvalidElementConfigurationError.md +9 -0
  122. data/docs/VapiStdErrorsInvalidElementType.md +9 -0
  123. data/docs/VapiStdErrorsInvalidElementTypeError.md +9 -0
  124. data/docs/VapiStdErrorsNotAllowedInCurrentState.md +9 -0
  125. data/docs/VapiStdErrorsNotAllowedInCurrentStateError.md +9 -0
  126. data/docs/VapiStdErrorsNotFound.md +9 -0
  127. data/docs/VapiStdErrorsNotFoundError.md +9 -0
  128. data/docs/VapiStdErrorsResourceBusy.md +9 -0
  129. data/docs/VapiStdErrorsResourceBusyError.md +9 -0
  130. data/docs/VapiStdErrorsResourceInaccessible.md +9 -0
  131. data/docs/VapiStdErrorsResourceInaccessibleError.md +9 -0
  132. data/docs/VapiStdErrorsUnauthorized.md +9 -0
  133. data/docs/VapiStdErrorsUnauthorizedError.md +9 -0
  134. data/docs/VapiStdErrorsUnsupported.md +9 -0
  135. data/docs/VapiStdErrorsUnsupportedError.md +9 -0
  136. data/docs/VapiStdLocalizableMessage.md +10 -0
  137. data/git_push.sh +55 -0
  138. data/lib/vsphere-automation-content.rb +168 -0
  139. data/lib/vsphere-automation-content/api/configuration_api.rb +122 -0
  140. data/lib/vsphere-automation-content/api/library_api.rb +238 -0
  141. data/lib/vsphere-automation-content/api/library_item_api.rb +416 -0
  142. data/lib/vsphere-automation-content/api/library_item_download_session_api.rb +397 -0
  143. data/lib/vsphere-automation-content/api/library_item_downloadsession_file_api.rb +205 -0
  144. data/lib/vsphere-automation-content/api/library_item_file_api.rb +140 -0
  145. data/lib/vsphere-automation-content/api/library_item_storage_api.rb +140 -0
  146. data/lib/vsphere-automation-content/api/library_item_update_session_api.rb +505 -0
  147. data/lib/vsphere-automation-content/api/library_item_updatesession_file_api.rb +318 -0
  148. data/lib/vsphere-automation-content/api/library_subscribed_item_api.rb +131 -0
  149. data/lib/vsphere-automation-content/api/local_library_api.rb +289 -0
  150. data/lib/vsphere-automation-content/api/subscribed_library_api.rb +444 -0
  151. data/lib/vsphere-automation-content/api_client.rb +386 -0
  152. data/lib/vsphere-automation-content/api_error.rb +36 -0
  153. data/lib/vsphere-automation-content/configuration.rb +200 -0
  154. data/lib/vsphere-automation-content/models/content_configuration_model.rb +214 -0
  155. data/lib/vsphere-automation-content/models/content_configuration_result.rb +188 -0
  156. data/lib/vsphere-automation-content/models/content_configuration_update.rb +188 -0
  157. data/lib/vsphere-automation-content/models/content_library_find.rb +188 -0
  158. data/lib/vsphere-automation-content/models/content_library_find_result.rb +190 -0
  159. data/lib/vsphere-automation-content/models/content_library_find_spec.rb +193 -0
  160. data/lib/vsphere-automation-content/models/content_library_item_copy.rb +198 -0
  161. data/lib/vsphere-automation-content/models/content_library_item_copy_result.rb +188 -0
  162. data/lib/vsphere-automation-content/models/content_library_item_create.rb +198 -0
  163. data/lib/vsphere-automation-content/models/content_library_item_create_result.rb +188 -0
  164. data/lib/vsphere-automation-content/models/content_library_item_download_session_create.rb +198 -0
  165. data/lib/vsphere-automation-content/models/content_library_item_download_session_create_result.rb +188 -0
  166. data/lib/vsphere-automation-content/models/content_library_item_download_session_fail.rb +189 -0
  167. data/lib/vsphere-automation-content/models/content_library_item_download_session_keep_alive.rb +184 -0
  168. data/lib/vsphere-automation-content/models/content_library_item_download_session_list_result.rb +190 -0
  169. data/lib/vsphere-automation-content/models/content_library_item_download_session_model.rb +242 -0
  170. data/lib/vsphere-automation-content/models/content_library_item_download_session_model_state.rb +31 -0
  171. data/lib/vsphere-automation-content/models/content_library_item_download_session_result.rb +188 -0
  172. data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_endpoint_type.rb +30 -0
  173. data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_get.rb +189 -0
  174. data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_info.rb +255 -0
  175. data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_list_result.rb +190 -0
  176. data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_prepare.rb +198 -0
  177. data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_prepare_result.rb +188 -0
  178. data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_prepare_status.rb +33 -0
  179. data/lib/vsphere-automation-content/models/content_library_item_downloadsession_file_result.rb +188 -0
  180. data/lib/vsphere-automation-content/models/content_library_item_file_checksum_algorithm.rb +32 -0
  181. data/lib/vsphere-automation-content/models/content_library_item_file_checksum_info.rb +198 -0
  182. data/lib/vsphere-automation-content/models/content_library_item_file_get.rb +189 -0
  183. data/lib/vsphere-automation-content/models/content_library_item_file_info.rb +243 -0
  184. data/lib/vsphere-automation-content/models/content_library_item_file_list_result.rb +190 -0
  185. data/lib/vsphere-automation-content/models/content_library_item_file_result.rb +188 -0
  186. data/lib/vsphere-automation-content/models/content_library_item_find.rb +188 -0
  187. data/lib/vsphere-automation-content/models/content_library_item_find_result.rb +190 -0
  188. data/lib/vsphere-automation-content/models/content_library_item_find_spec.rb +224 -0
  189. data/lib/vsphere-automation-content/models/content_library_item_list_result.rb +190 -0
  190. data/lib/vsphere-automation-content/models/content_library_item_model.rb +314 -0
  191. data/lib/vsphere-automation-content/models/content_library_item_result.rb +188 -0
  192. data/lib/vsphere-automation-content/models/content_library_item_storage_get.rb +189 -0
  193. data/lib/vsphere-automation-content/models/content_library_item_storage_info.rb +274 -0
  194. data/lib/vsphere-automation-content/models/content_library_item_storage_list_result.rb +190 -0
  195. data/lib/vsphere-automation-content/models/content_library_item_storage_result.rb +190 -0
  196. data/lib/vsphere-automation-content/models/content_library_item_transfer_endpoint.rb +199 -0
  197. data/lib/vsphere-automation-content/models/content_library_item_transfer_status.rb +33 -0
  198. data/lib/vsphere-automation-content/models/content_library_item_update.rb +188 -0
  199. data/lib/vsphere-automation-content/models/content_library_item_update_session_create.rb +198 -0
  200. data/lib/vsphere-automation-content/models/content_library_item_update_session_create_result.rb +188 -0
  201. data/lib/vsphere-automation-content/models/content_library_item_update_session_fail.rb +189 -0
  202. data/lib/vsphere-automation-content/models/content_library_item_update_session_keep_alive.rb +184 -0
  203. data/lib/vsphere-automation-content/models/content_library_item_update_session_list_result.rb +190 -0
  204. data/lib/vsphere-automation-content/models/content_library_item_update_session_model.rb +263 -0
  205. data/lib/vsphere-automation-content/models/content_library_item_update_session_model_state.rb +32 -0
  206. data/lib/vsphere-automation-content/models/content_library_item_update_session_result.rb +188 -0
  207. data/lib/vsphere-automation-content/models/content_library_item_update_session_update.rb +188 -0
  208. data/lib/vsphere-automation-content/models/content_library_item_updatesession_certificate_info.rb +234 -0
  209. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_add.rb +188 -0
  210. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_add_result.rb +188 -0
  211. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_add_spec.rb +231 -0
  212. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_get.rb +189 -0
  213. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_info.rb +288 -0
  214. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_list_result.rb +190 -0
  215. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_remove.rb +189 -0
  216. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_result.rb +188 -0
  217. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_source_type.rb +31 -0
  218. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_validate_result.rb +188 -0
  219. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_validation_error.rb +203 -0
  220. data/lib/vsphere-automation-content/models/content_library_item_updatesession_file_validation_result.rb +223 -0
  221. data/lib/vsphere-automation-content/models/content_library_item_updatesession_preview_info.rb +209 -0
  222. data/lib/vsphere-automation-content/models/content_library_item_updatesession_preview_info_state.rb +32 -0
  223. data/lib/vsphere-automation-content/models/content_library_item_updatesession_preview_warning_info.rb +217 -0
  224. data/lib/vsphere-automation-content/models/content_library_item_updatesession_warning_behavior.rb +203 -0
  225. data/lib/vsphere-automation-content/models/content_library_item_updatesession_warning_type.rb +32 -0
  226. data/lib/vsphere-automation-content/models/content_library_list_result.rb +190 -0
  227. data/lib/vsphere-automation-content/models/content_library_model.rb +302 -0
  228. data/lib/vsphere-automation-content/models/content_library_model_library_type.rb +30 -0
  229. data/lib/vsphere-automation-content/models/content_library_optimization_info.rb +184 -0
  230. data/lib/vsphere-automation-content/models/content_library_publish_info.rb +243 -0
  231. data/lib/vsphere-automation-content/models/content_library_publish_info_authentication_method.rb +30 -0
  232. data/lib/vsphere-automation-content/models/content_library_result.rb +188 -0
  233. data/lib/vsphere-automation-content/models/content_library_storage_backing.rb +203 -0
  234. data/lib/vsphere-automation-content/models/content_library_storage_backing_type.rb +30 -0
  235. data/lib/vsphere-automation-content/models/content_library_subscribed_item_sync.rb +189 -0
  236. data/lib/vsphere-automation-content/models/content_library_subscription_info.rb +243 -0
  237. data/lib/vsphere-automation-content/models/content_library_subscription_info_authentication_method.rb +30 -0
  238. data/lib/vsphere-automation-content/models/content_library_update.rb +188 -0
  239. data/lib/vsphere-automation-content/models/content_local_library_create.rb +198 -0
  240. data/lib/vsphere-automation-content/models/content_local_library_create_result.rb +188 -0
  241. data/lib/vsphere-automation-content/models/content_local_library_list_result.rb +190 -0
  242. data/lib/vsphere-automation-content/models/content_local_library_result.rb +188 -0
  243. data/lib/vsphere-automation-content/models/content_local_library_update.rb +188 -0
  244. data/lib/vsphere-automation-content/models/content_subscribed_library_create.rb +198 -0
  245. data/lib/vsphere-automation-content/models/content_subscribed_library_create_result.rb +188 -0
  246. data/lib/vsphere-automation-content/models/content_subscribed_library_list_result.rb +190 -0
  247. data/lib/vsphere-automation-content/models/content_subscribed_library_probe.rb +188 -0
  248. data/lib/vsphere-automation-content/models/content_subscribed_library_probe_result.rb +215 -0
  249. data/lib/vsphere-automation-content/models/content_subscribed_library_probe_result_status.rb +36 -0
  250. data/lib/vsphere-automation-content/models/content_subscribed_library_result.rb +188 -0
  251. data/lib/vsphere-automation-content/models/content_subscribed_library_update.rb +188 -0
  252. data/lib/vsphere-automation-content/models/vapi_std_errors_concurrent_change.rb +201 -0
  253. data/lib/vsphere-automation-content/models/vapi_std_errors_concurrent_change_error.rb +192 -0
  254. data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_argument.rb +201 -0
  255. data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_argument_error.rb +192 -0
  256. data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_configuration.rb +201 -0
  257. data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_configuration_error.rb +192 -0
  258. data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_type.rb +201 -0
  259. data/lib/vsphere-automation-content/models/vapi_std_errors_invalid_element_type_error.rb +192 -0
  260. data/lib/vsphere-automation-content/models/vapi_std_errors_not_allowed_in_current_state.rb +201 -0
  261. data/lib/vsphere-automation-content/models/vapi_std_errors_not_allowed_in_current_state_error.rb +192 -0
  262. data/lib/vsphere-automation-content/models/vapi_std_errors_not_found.rb +201 -0
  263. data/lib/vsphere-automation-content/models/vapi_std_errors_not_found_error.rb +192 -0
  264. data/lib/vsphere-automation-content/models/vapi_std_errors_resource_busy.rb +201 -0
  265. data/lib/vsphere-automation-content/models/vapi_std_errors_resource_busy_error.rb +192 -0
  266. data/lib/vsphere-automation-content/models/vapi_std_errors_resource_inaccessible.rb +201 -0
  267. data/lib/vsphere-automation-content/models/vapi_std_errors_resource_inaccessible_error.rb +192 -0
  268. data/lib/vsphere-automation-content/models/vapi_std_errors_unauthorized.rb +201 -0
  269. data/lib/vsphere-automation-content/models/vapi_std_errors_unauthorized_error.rb +192 -0
  270. data/lib/vsphere-automation-content/models/vapi_std_errors_unsupported.rb +201 -0
  271. data/lib/vsphere-automation-content/models/vapi_std_errors_unsupported_error.rb +192 -0
  272. data/lib/vsphere-automation-content/models/vapi_std_localizable_message.rb +221 -0
  273. data/lib/vsphere-automation-content/version.rb +15 -0
  274. data/spec/api/configuration_api_spec.rb +54 -0
  275. data/spec/api/library_api_spec.rb +77 -0
  276. data/spec/api/library_item_api_spec.rb +112 -0
  277. data/spec/api/library_item_download_session_api_spec.rb +112 -0
  278. data/spec/api/library_item_downloadsession_file_api_spec.rb +68 -0
  279. data/spec/api/library_item_file_api_spec.rb +56 -0
  280. data/spec/api/library_item_storage_api_spec.rb +56 -0
  281. data/spec/api/library_item_update_session_api_spec.rb +135 -0
  282. data/spec/api/library_item_updatesession_file_api_spec.rb +91 -0
  283. data/spec/api/library_subscribed_item_api_spec.rb +56 -0
  284. data/spec/api/local_library_api_spec.rb +88 -0
  285. data/spec/api/subscribed_library_api_spec.rb +121 -0
  286. data/spec/api_client_spec.rb +224 -0
  287. data/spec/configuration_spec.rb +40 -0
  288. data/spec/models/content_configuration_model_spec.rb +57 -0
  289. data/spec/models/content_configuration_result_spec.rb +39 -0
  290. data/spec/models/content_configuration_update_spec.rb +39 -0
  291. data/spec/models/content_library_find_result_spec.rb +39 -0
  292. data/spec/models/content_library_find_spec.rb +39 -0
  293. data/spec/models/content_library_find_spec_spec.rb +45 -0
  294. data/spec/models/content_library_item_copy_result_spec.rb +39 -0
  295. data/spec/models/content_library_item_copy_spec.rb +45 -0
  296. data/spec/models/content_library_item_create_result_spec.rb +39 -0
  297. data/spec/models/content_library_item_create_spec.rb +45 -0
  298. data/spec/models/content_library_item_download_session_create_result_spec.rb +39 -0
  299. data/spec/models/content_library_item_download_session_create_spec.rb +45 -0
  300. data/spec/models/content_library_item_download_session_fail_spec.rb +39 -0
  301. data/spec/models/content_library_item_download_session_keep_alive_spec.rb +39 -0
  302. data/spec/models/content_library_item_download_session_list_result_spec.rb +39 -0
  303. data/spec/models/content_library_item_download_session_model_spec.rb +75 -0
  304. data/spec/models/content_library_item_download_session_model_state_spec.rb +33 -0
  305. data/spec/models/content_library_item_download_session_result_spec.rb +39 -0
  306. data/spec/models/content_library_item_downloadsession_file_endpoint_type_spec.rb +33 -0
  307. data/spec/models/content_library_item_downloadsession_file_get_spec.rb +39 -0
  308. data/spec/models/content_library_item_downloadsession_file_info_spec.rb +75 -0
  309. data/spec/models/content_library_item_downloadsession_file_list_result_spec.rb +39 -0
  310. data/spec/models/content_library_item_downloadsession_file_prepare_result_spec.rb +39 -0
  311. data/spec/models/content_library_item_downloadsession_file_prepare_spec.rb +45 -0
  312. data/spec/models/content_library_item_downloadsession_file_prepare_status_spec.rb +33 -0
  313. data/spec/models/content_library_item_downloadsession_file_result_spec.rb +39 -0
  314. data/spec/models/content_library_item_file_checksum_algorithm_spec.rb +33 -0
  315. data/spec/models/content_library_item_file_checksum_info_spec.rb +45 -0
  316. data/spec/models/content_library_item_file_get_spec.rb +39 -0
  317. data/spec/models/content_library_item_file_info_spec.rb +63 -0
  318. data/spec/models/content_library_item_file_list_result_spec.rb +39 -0
  319. data/spec/models/content_library_item_file_result_spec.rb +39 -0
  320. data/spec/models/content_library_item_find_result_spec.rb +39 -0
  321. data/spec/models/content_library_item_find_spec.rb +39 -0
  322. data/spec/models/content_library_item_find_spec_spec.rb +63 -0
  323. data/spec/models/content_library_item_list_result_spec.rb +39 -0
  324. data/spec/models/content_library_item_model_spec.rb +117 -0
  325. data/spec/models/content_library_item_result_spec.rb +39 -0
  326. data/spec/models/content_library_item_storage_get_spec.rb +39 -0
  327. data/spec/models/content_library_item_storage_info_spec.rb +75 -0
  328. data/spec/models/content_library_item_storage_list_result_spec.rb +39 -0
  329. data/spec/models/content_library_item_storage_result_spec.rb +39 -0
  330. data/spec/models/content_library_item_transfer_endpoint_spec.rb +45 -0
  331. data/spec/models/content_library_item_transfer_status_spec.rb +33 -0
  332. data/spec/models/content_library_item_update_session_create_result_spec.rb +39 -0
  333. data/spec/models/content_library_item_update_session_create_spec.rb +45 -0
  334. data/spec/models/content_library_item_update_session_fail_spec.rb +39 -0
  335. data/spec/models/content_library_item_update_session_keep_alive_spec.rb +39 -0
  336. data/spec/models/content_library_item_update_session_list_result_spec.rb +39 -0
  337. data/spec/models/content_library_item_update_session_model_spec.rb +87 -0
  338. data/spec/models/content_library_item_update_session_model_state_spec.rb +33 -0
  339. data/spec/models/content_library_item_update_session_result_spec.rb +39 -0
  340. data/spec/models/content_library_item_update_session_update_spec.rb +39 -0
  341. data/spec/models/content_library_item_update_spec.rb +39 -0
  342. data/spec/models/content_library_item_updatesession_certificate_info_spec.rb +57 -0
  343. data/spec/models/content_library_item_updatesession_file_add_result_spec.rb +39 -0
  344. data/spec/models/content_library_item_updatesession_file_add_spec.rb +39 -0
  345. data/spec/models/content_library_item_updatesession_file_add_spec_spec.rb +63 -0
  346. data/spec/models/content_library_item_updatesession_file_get_spec.rb +39 -0
  347. data/spec/models/content_library_item_updatesession_file_info_spec.rb +93 -0
  348. data/spec/models/content_library_item_updatesession_file_list_result_spec.rb +39 -0
  349. data/spec/models/content_library_item_updatesession_file_remove_spec.rb +39 -0
  350. data/spec/models/content_library_item_updatesession_file_result_spec.rb +39 -0
  351. data/spec/models/content_library_item_updatesession_file_source_type_spec.rb +33 -0
  352. data/spec/models/content_library_item_updatesession_file_validate_result_spec.rb +39 -0
  353. data/spec/models/content_library_item_updatesession_file_validation_error_spec.rb +45 -0
  354. data/spec/models/content_library_item_updatesession_file_validation_result_spec.rb +51 -0
  355. data/spec/models/content_library_item_updatesession_preview_info_spec.rb +51 -0
  356. data/spec/models/content_library_item_updatesession_preview_info_state_spec.rb +33 -0
  357. data/spec/models/content_library_item_updatesession_preview_warning_info_spec.rb +51 -0
  358. data/spec/models/content_library_item_updatesession_warning_behavior_spec.rb +45 -0
  359. data/spec/models/content_library_item_updatesession_warning_type_spec.rb +33 -0
  360. data/spec/models/content_library_list_result_spec.rb +39 -0
  361. data/spec/models/content_library_model_library_type_spec.rb +33 -0
  362. data/spec/models/content_library_model_spec.rb +111 -0
  363. data/spec/models/content_library_optimization_info_spec.rb +39 -0
  364. data/spec/models/content_library_publish_info_authentication_method_spec.rb +33 -0
  365. data/spec/models/content_library_publish_info_spec.rb +75 -0
  366. data/spec/models/content_library_result_spec.rb +39 -0
  367. data/spec/models/content_library_storage_backing_spec.rb +51 -0
  368. data/spec/models/content_library_storage_backing_type_spec.rb +33 -0
  369. data/spec/models/content_library_subscribed_item_sync_spec.rb +39 -0
  370. data/spec/models/content_library_subscription_info_authentication_method_spec.rb +33 -0
  371. data/spec/models/content_library_subscription_info_spec.rb +75 -0
  372. data/spec/models/content_library_update_spec.rb +39 -0
  373. data/spec/models/content_local_library_create_result_spec.rb +39 -0
  374. data/spec/models/content_local_library_create_spec.rb +45 -0
  375. data/spec/models/content_local_library_list_result_spec.rb +39 -0
  376. data/spec/models/content_local_library_result_spec.rb +39 -0
  377. data/spec/models/content_local_library_update_spec.rb +39 -0
  378. data/spec/models/content_subscribed_library_create_result_spec.rb +39 -0
  379. data/spec/models/content_subscribed_library_create_spec.rb +45 -0
  380. data/spec/models/content_subscribed_library_list_result_spec.rb +39 -0
  381. data/spec/models/content_subscribed_library_probe_result_spec.rb +51 -0
  382. data/spec/models/content_subscribed_library_probe_result_status_spec.rb +33 -0
  383. data/spec/models/content_subscribed_library_probe_spec.rb +39 -0
  384. data/spec/models/content_subscribed_library_result_spec.rb +39 -0
  385. data/spec/models/content_subscribed_library_update_spec.rb +39 -0
  386. data/spec/models/vapi_std_errors_concurrent_change_error_spec.rb +45 -0
  387. data/spec/models/vapi_std_errors_concurrent_change_spec.rb +45 -0
  388. data/spec/models/vapi_std_errors_invalid_argument_error_spec.rb +45 -0
  389. data/spec/models/vapi_std_errors_invalid_argument_spec.rb +45 -0
  390. data/spec/models/vapi_std_errors_invalid_element_configuration_error_spec.rb +45 -0
  391. data/spec/models/vapi_std_errors_invalid_element_configuration_spec.rb +45 -0
  392. data/spec/models/vapi_std_errors_invalid_element_type_error_spec.rb +45 -0
  393. data/spec/models/vapi_std_errors_invalid_element_type_spec.rb +45 -0
  394. data/spec/models/vapi_std_errors_not_allowed_in_current_state_error_spec.rb +45 -0
  395. data/spec/models/vapi_std_errors_not_allowed_in_current_state_spec.rb +45 -0
  396. data/spec/models/vapi_std_errors_not_found_error_spec.rb +45 -0
  397. data/spec/models/vapi_std_errors_not_found_spec.rb +45 -0
  398. data/spec/models/vapi_std_errors_resource_busy_error_spec.rb +45 -0
  399. data/spec/models/vapi_std_errors_resource_busy_spec.rb +45 -0
  400. data/spec/models/vapi_std_errors_resource_inaccessible_error_spec.rb +45 -0
  401. data/spec/models/vapi_std_errors_resource_inaccessible_spec.rb +45 -0
  402. data/spec/models/vapi_std_errors_unauthorized_error_spec.rb +45 -0
  403. data/spec/models/vapi_std_errors_unauthorized_spec.rb +45 -0
  404. data/spec/models/vapi_std_errors_unsupported_error_spec.rb +45 -0
  405. data/spec/models/vapi_std_errors_unsupported_spec.rb +45 -0
  406. data/spec/models/vapi_std_localizable_message_spec.rb +51 -0
  407. data/spec/spec_helper.rb +109 -0
  408. data/vsphere-automation-content.gemspec +44 -0
  409. metadata +725 -0
@@ -0,0 +1,288 @@
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 ContentLibraryItemUpdatesessionFileInfo
16
+ # The name of the file.
17
+ attr_accessor :name
18
+
19
+ attr_accessor :source_type
20
+
21
+ # The file size, in bytes as received by the server. This {@term field} is guaranteed to be set when the server has completely received the file.
22
+ attr_accessor :size
23
+
24
+ attr_accessor :checksum_info
25
+
26
+ attr_accessor :source_endpoint
27
+
28
+ attr_accessor :upload_endpoint
29
+
30
+ # The number of bytes of this file that have been received by the server.
31
+ attr_accessor :bytes_transferred
32
+
33
+ attr_accessor :status
34
+
35
+ attr_accessor :error_message
36
+
37
+ # Whether or not the file will be kept in storage upon update session completion. The flag is true for most files, and false for metadata files such as manifest and certificate file of update session with library item type OVF. Any file with {@link Info#keepInStorage} set to false will not show up in the list of files returned from {@link content.library.item.File#list} upon update session completion.
38
+ attr_accessor :keep_in_storage
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'name' => :'name',
44
+ :'source_type' => :'source_type',
45
+ :'size' => :'size',
46
+ :'checksum_info' => :'checksum_info',
47
+ :'source_endpoint' => :'source_endpoint',
48
+ :'upload_endpoint' => :'upload_endpoint',
49
+ :'bytes_transferred' => :'bytes_transferred',
50
+ :'status' => :'status',
51
+ :'error_message' => :'error_message',
52
+ :'keep_in_storage' => :'keep_in_storage'
53
+ }
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'name' => :'String',
60
+ :'source_type' => :'ContentLibraryItemUpdatesessionFileSourceType',
61
+ :'size' => :'Integer',
62
+ :'checksum_info' => :'ContentLibraryItemFileChecksumInfo',
63
+ :'source_endpoint' => :'ContentLibraryItemTransferEndpoint',
64
+ :'upload_endpoint' => :'ContentLibraryItemTransferEndpoint',
65
+ :'bytes_transferred' => :'Integer',
66
+ :'status' => :'ContentLibraryItemTransferStatus',
67
+ :'error_message' => :'VapiStdLocalizableMessage',
68
+ :'keep_in_storage' => :'BOOLEAN'
69
+ }
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ return unless attributes.is_a?(Hash)
76
+
77
+ # convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
79
+
80
+ if attributes.has_key?(:'name')
81
+ self.name = attributes[:'name']
82
+ end
83
+
84
+ if attributes.has_key?(:'source_type')
85
+ self.source_type = attributes[:'source_type']
86
+ end
87
+
88
+ if attributes.has_key?(:'size')
89
+ self.size = attributes[:'size']
90
+ end
91
+
92
+ if attributes.has_key?(:'checksum_info')
93
+ self.checksum_info = attributes[:'checksum_info']
94
+ end
95
+
96
+ if attributes.has_key?(:'source_endpoint')
97
+ self.source_endpoint = attributes[:'source_endpoint']
98
+ end
99
+
100
+ if attributes.has_key?(:'upload_endpoint')
101
+ self.upload_endpoint = attributes[:'upload_endpoint']
102
+ end
103
+
104
+ if attributes.has_key?(:'bytes_transferred')
105
+ self.bytes_transferred = attributes[:'bytes_transferred']
106
+ end
107
+
108
+ if attributes.has_key?(:'status')
109
+ self.status = attributes[:'status']
110
+ end
111
+
112
+ if attributes.has_key?(:'error_message')
113
+ self.error_message = attributes[:'error_message']
114
+ end
115
+
116
+ if attributes.has_key?(:'keep_in_storage')
117
+ self.keep_in_storage = attributes[:'keep_in_storage']
118
+ end
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ invalid_properties = Array.new
125
+ if @name.nil?
126
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
127
+ end
128
+
129
+ if @source_type.nil?
130
+ invalid_properties.push('invalid value for "source_type", source_type cannot be nil.')
131
+ end
132
+
133
+ if @bytes_transferred.nil?
134
+ invalid_properties.push('invalid value for "bytes_transferred", bytes_transferred cannot be nil.')
135
+ end
136
+
137
+ if @status.nil?
138
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
139
+ end
140
+
141
+ invalid_properties
142
+ end
143
+
144
+ # Check to see if the all the properties in the model are valid
145
+ # @return true if the model is valid
146
+ def valid?
147
+ return false if @name.nil?
148
+ return false if @source_type.nil?
149
+ return false if @bytes_transferred.nil?
150
+ return false if @status.nil?
151
+ true
152
+ end
153
+
154
+ # Checks equality by comparing each attribute.
155
+ # @param [Object] Object to be compared
156
+ def ==(o)
157
+ return true if self.equal?(o)
158
+ self.class == o.class &&
159
+ name == o.name &&
160
+ source_type == o.source_type &&
161
+ size == o.size &&
162
+ checksum_info == o.checksum_info &&
163
+ source_endpoint == o.source_endpoint &&
164
+ upload_endpoint == o.upload_endpoint &&
165
+ bytes_transferred == o.bytes_transferred &&
166
+ status == o.status &&
167
+ error_message == o.error_message &&
168
+ keep_in_storage == o.keep_in_storage
169
+ end
170
+
171
+ # @see the `==` method
172
+ # @param [Object] Object to be compared
173
+ def eql?(o)
174
+ self == o
175
+ end
176
+
177
+ # Calculates hash code according to all attributes.
178
+ # @return [Fixnum] Hash code
179
+ def hash
180
+ [name, source_type, size, checksum_info, source_endpoint, upload_endpoint, bytes_transferred, status, error_message, keep_in_storage].hash
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+ self.class.openapi_types.each_pair do |key, type|
189
+ if type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
193
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
194
+ end
195
+ elsif !attributes[self.class.attribute_map[key]].nil?
196
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
197
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
198
+ end
199
+
200
+ self
201
+ end
202
+
203
+ # Deserializes the data based on type
204
+ # @param string type Data type
205
+ # @param string value Value to be deserialized
206
+ # @return [Object] Deserialized data
207
+ def _deserialize(type, value)
208
+ case type.to_sym
209
+ when :DateTime
210
+ DateTime.parse(value)
211
+ when :Date
212
+ Date.parse(value)
213
+ when :String
214
+ value.to_s
215
+ when :Integer
216
+ value.to_i
217
+ when :Float
218
+ value.to_f
219
+ when :BOOLEAN
220
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
221
+ true
222
+ else
223
+ false
224
+ end
225
+ when :Object
226
+ # generic object (usually a Hash), return directly
227
+ value
228
+ when /\AArray<(?<inner_type>.+)>\z/
229
+ inner_type = Regexp.last_match[:inner_type]
230
+ value.map { |v| _deserialize(inner_type, v) }
231
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
232
+ k_type = Regexp.last_match[:k_type]
233
+ v_type = Regexp.last_match[:v_type]
234
+ {}.tap do |hash|
235
+ value.each do |k, v|
236
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
237
+ end
238
+ end
239
+ else # model
240
+ temp_model = VSphereAutomation::Content.const_get(type).new
241
+ temp_model.build_from_hash(value)
242
+ end
243
+ end
244
+
245
+ # Returns the string representation of the object
246
+ # @return [String] String presentation of the object
247
+ def to_s
248
+ to_hash.to_s
249
+ end
250
+
251
+ # to_body is an alias to to_hash (backward compatibility)
252
+ # @return [Hash] Returns the object in the form of hash
253
+ def to_body
254
+ to_hash
255
+ end
256
+
257
+ # Returns the object in the form of hash
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_hash
260
+ hash = {}
261
+ self.class.attribute_map.each_pair do |attr, param|
262
+ value = self.send(attr)
263
+ next if value.nil?
264
+ hash[param] = _to_hash(value)
265
+ end
266
+ hash
267
+ end
268
+
269
+ # Outputs non-array value in the form of hash
270
+ # For object, use to_hash. Otherwise, just return the value
271
+ # @param [Object] value Any valid value
272
+ # @return [Hash] Returns the value in the form of hash
273
+ def _to_hash(value)
274
+ if value.is_a?(Array)
275
+ value.compact.map { |v| _to_hash(v) }
276
+ elsif value.is_a?(Hash)
277
+ {}.tap do |hash|
278
+ value.each { |k, v| hash[k] = _to_hash(v) }
279
+ end
280
+ elsif value.respond_to? :to_hash
281
+ value.to_hash
282
+ else
283
+ value
284
+ end
285
+ end
286
+ end
287
+ end
288
+ end
@@ -0,0 +1,190 @@
1
+ =begin
2
+ # DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
3
+
4
+ # content
5
+
6
+ # VMware vSphere® Content Library empowers vSphere Admins to effectively manage VM templates, vApps, ISO images and scripts with ease.
7
+
8
+
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module VSphereAutomation
14
+ module Content
15
+ class ContentLibraryItemUpdatesessionFileListResult
16
+ attr_accessor :value
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'value' => :'value'
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.openapi_types
27
+ {
28
+ :'value' => :'Array<ContentLibraryItemUpdatesessionFileInfo>'
29
+ }
30
+ end
31
+
32
+ # Initializes the object
33
+ # @param [Hash] attributes Model attributes in the form of hash
34
+ def initialize(attributes = {})
35
+ return unless attributes.is_a?(Hash)
36
+
37
+ # convert string to symbol for hash key
38
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
39
+
40
+ if attributes.has_key?(:'value')
41
+ if (value = attributes[:'value']).is_a?(Array)
42
+ self.value = value
43
+ end
44
+ end
45
+ end
46
+
47
+ # Show invalid properties with the reasons. Usually used together with valid?
48
+ # @return Array for valid properties with the reasons
49
+ def list_invalid_properties
50
+ invalid_properties = Array.new
51
+ if @value.nil?
52
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
53
+ end
54
+
55
+ invalid_properties
56
+ end
57
+
58
+ # Check to see if the all the properties in the model are valid
59
+ # @return true if the model is valid
60
+ def valid?
61
+ return false if @value.nil?
62
+ true
63
+ end
64
+
65
+ # Checks equality by comparing each attribute.
66
+ # @param [Object] Object to be compared
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ value == o.value
71
+ end
72
+
73
+ # @see the `==` method
74
+ # @param [Object] Object to be compared
75
+ def eql?(o)
76
+ self == o
77
+ end
78
+
79
+ # Calculates hash code according to all attributes.
80
+ # @return [Fixnum] Hash code
81
+ def hash
82
+ [value].hash
83
+ end
84
+
85
+ # Builds the object from hash
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ # @return [Object] Returns the model itself
88
+ def build_from_hash(attributes)
89
+ return nil unless attributes.is_a?(Hash)
90
+ self.class.openapi_types.each_pair do |key, type|
91
+ if type =~ /\AArray<(.*)>/i
92
+ # check to ensure the input is an array given that the the attribute
93
+ # is documented as an array but the input is not
94
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
95
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
96
+ end
97
+ elsif !attributes[self.class.attribute_map[key]].nil?
98
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
99
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
100
+ end
101
+
102
+ self
103
+ end
104
+
105
+ # Deserializes the data based on type
106
+ # @param string type Data type
107
+ # @param string value Value to be deserialized
108
+ # @return [Object] Deserialized data
109
+ def _deserialize(type, value)
110
+ case type.to_sym
111
+ when :DateTime
112
+ DateTime.parse(value)
113
+ when :Date
114
+ Date.parse(value)
115
+ when :String
116
+ value.to_s
117
+ when :Integer
118
+ value.to_i
119
+ when :Float
120
+ value.to_f
121
+ when :BOOLEAN
122
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
123
+ true
124
+ else
125
+ false
126
+ end
127
+ when :Object
128
+ # generic object (usually a Hash), return directly
129
+ value
130
+ when /\AArray<(?<inner_type>.+)>\z/
131
+ inner_type = Regexp.last_match[:inner_type]
132
+ value.map { |v| _deserialize(inner_type, v) }
133
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
134
+ k_type = Regexp.last_match[:k_type]
135
+ v_type = Regexp.last_match[:v_type]
136
+ {}.tap do |hash|
137
+ value.each do |k, v|
138
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
139
+ end
140
+ end
141
+ else # model
142
+ temp_model = VSphereAutomation::Content.const_get(type).new
143
+ temp_model.build_from_hash(value)
144
+ end
145
+ end
146
+
147
+ # Returns the string representation of the object
148
+ # @return [String] String presentation of the object
149
+ def to_s
150
+ to_hash.to_s
151
+ end
152
+
153
+ # to_body is an alias to to_hash (backward compatibility)
154
+ # @return [Hash] Returns the object in the form of hash
155
+ def to_body
156
+ to_hash
157
+ end
158
+
159
+ # Returns the object in the form of hash
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_hash
162
+ hash = {}
163
+ self.class.attribute_map.each_pair do |attr, param|
164
+ value = self.send(attr)
165
+ next if value.nil?
166
+ hash[param] = _to_hash(value)
167
+ end
168
+ hash
169
+ end
170
+
171
+ # Outputs non-array value in the form of hash
172
+ # For object, use to_hash. Otherwise, just return the value
173
+ # @param [Object] value Any valid value
174
+ # @return [Hash] Returns the value in the form of hash
175
+ def _to_hash(value)
176
+ if value.is_a?(Array)
177
+ value.compact.map { |v| _to_hash(v) }
178
+ elsif value.is_a?(Hash)
179
+ {}.tap do |hash|
180
+ value.each { |k, v| hash[k] = _to_hash(v) }
181
+ end
182
+ elsif value.respond_to? :to_hash
183
+ value.to_hash
184
+ else
185
+ value
186
+ end
187
+ end
188
+ end
189
+ end
190
+ end