vsphere-automation-cis 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 +81 -0
- data/README.md +173 -0
- data/Rakefile +10 -0
- data/docs/CisSessionCreateResult.md +8 -0
- data/docs/CisSessionInfo.md +10 -0
- data/docs/CisSessionResult.md +8 -0
- data/docs/CisTaggingCategoryAddToUsedBy.md +8 -0
- data/docs/CisTaggingCategoryCreate.md +8 -0
- data/docs/CisTaggingCategoryCreateResult.md +8 -0
- data/docs/CisTaggingCategoryCreateSpec.md +12 -0
- data/docs/CisTaggingCategoryListResult.md +8 -0
- data/docs/CisTaggingCategoryListUsedCategories.md +8 -0
- data/docs/CisTaggingCategoryListUsedCategoriesResult.md +8 -0
- data/docs/CisTaggingCategoryModel.md +13 -0
- data/docs/CisTaggingCategoryModelCardinality.md +7 -0
- data/docs/CisTaggingCategoryRemoveFromUsedBy.md +8 -0
- data/docs/CisTaggingCategoryResult.md +8 -0
- data/docs/CisTaggingCategoryUpdate.md +8 -0
- data/docs/CisTaggingCategoryUpdateSpec.md +11 -0
- data/docs/CisTaggingTagAddToUsedBy.md +8 -0
- data/docs/CisTaggingTagAssociationAttach.md +8 -0
- data/docs/CisTaggingTagAssociationAttachMultipleTagsToObject.md +9 -0
- data/docs/CisTaggingTagAssociationAttachMultipleTagsToObjectResult.md +8 -0
- data/docs/CisTaggingTagAssociationAttachTagToMultipleObjects.md +8 -0
- data/docs/CisTaggingTagAssociationAttachTagToMultipleObjectsResult.md +8 -0
- data/docs/CisTaggingTagAssociationBatchResult.md +9 -0
- data/docs/CisTaggingTagAssociationDetach.md +8 -0
- data/docs/CisTaggingTagAssociationDetachMultipleTagsFromObject.md +9 -0
- data/docs/CisTaggingTagAssociationDetachMultipleTagsFromObjectResult.md +8 -0
- data/docs/CisTaggingTagAssociationDetachTagFromMultipleObjects.md +8 -0
- data/docs/CisTaggingTagAssociationDetachTagFromMultipleObjectsResult.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachableTags.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachableTagsResult.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedObjectsOnTags.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedObjectsOnTagsResult.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedObjectsResult.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedTags.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedTagsOnObjects.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedTagsOnObjectsResult.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedTagsResult.md +8 -0
- data/docs/CisTaggingTagAssociationObjectToTags.md +9 -0
- data/docs/CisTaggingTagAssociationTagToObjects.md +9 -0
- data/docs/CisTaggingTagCreate.md +8 -0
- data/docs/CisTaggingTagCreateResult.md +8 -0
- data/docs/CisTaggingTagCreateSpec.md +11 -0
- data/docs/CisTaggingTagListResult.md +8 -0
- data/docs/CisTaggingTagListTagsForCategoryResult.md +8 -0
- data/docs/CisTaggingTagListUsedTags.md +8 -0
- data/docs/CisTaggingTagListUsedTagsResult.md +8 -0
- data/docs/CisTaggingTagModel.md +12 -0
- data/docs/CisTaggingTagRemoveFromUsedBy.md +8 -0
- data/docs/CisTaggingTagResult.md +8 -0
- data/docs/CisTaggingTagUpdate.md +8 -0
- data/docs/CisTaggingTagUpdateSpec.md +9 -0
- data/docs/CisTaskInfo.md +19 -0
- data/docs/CisTaskProgress.md +10 -0
- data/docs/CisTaskStatus.md +7 -0
- data/docs/CisTasksFilterSpec.md +12 -0
- data/docs/CisTasksGetSpec.md +9 -0
- data/docs/CisTasksListResult.md +8 -0
- data/docs/CisTasksListResultValue.md +9 -0
- data/docs/CisTasksResult.md +8 -0
- data/docs/FilterSpecTargets.md +9 -0
- data/docs/SessionApi.md +131 -0
- data/docs/TaggingCategoryApi.md +401 -0
- data/docs/TaggingTagApi.md +445 -0
- data/docs/TaggingTagAssociationApi.md +498 -0
- data/docs/TasksApi.md +159 -0
- data/docs/VapiStdDynamicID.md +9 -0
- data/docs/VapiStdErrorsAlreadyExists.md +9 -0
- data/docs/VapiStdErrorsAlreadyExistsError.md +9 -0
- data/docs/VapiStdErrorsError.md +9 -0
- data/docs/VapiStdErrorsErrorError.md +9 -0
- data/docs/VapiStdErrorsInvalidArgument.md +9 -0
- data/docs/VapiStdErrorsInvalidArgumentError.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/VapiStdErrorsResourceInaccessible.md +9 -0
- data/docs/VapiStdErrorsResourceInaccessibleError.md +9 -0
- data/docs/VapiStdErrorsServiceUnavailable.md +9 -0
- data/docs/VapiStdErrorsServiceUnavailableError.md +9 -0
- data/docs/VapiStdErrorsUnauthenticated.md +9 -0
- data/docs/VapiStdErrorsUnauthenticatedError.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-cis.rb +124 -0
- data/lib/vsphere-automation-cis/api/session_api.rb +172 -0
- data/lib/vsphere-automation-cis/api/tagging_category_api.rb +511 -0
- data/lib/vsphere-automation-cis/api/tagging_tag_api.rb +567 -0
- data/lib/vsphere-automation-cis/api/tagging_tag_association_api.rb +654 -0
- data/lib/vsphere-automation-cis/api/tasks_api.rb +212 -0
- data/lib/vsphere-automation-cis/api_client.rb +386 -0
- data/lib/vsphere-automation-cis/api_error.rb +36 -0
- data/lib/vsphere-automation-cis/configuration.rb +200 -0
- data/lib/vsphere-automation-cis/models/cis_session_create_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_session_info.rb +219 -0
- data/lib/vsphere-automation-cis/models/cis_session_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_add_to_used_by.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_create.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_create_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_create_spec.rb +245 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_list_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_list_used_categories.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_list_used_categories_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_model.rb +267 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_model_cardinality.rb +30 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_remove_from_used_by.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_update.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_update_spec.rb +215 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_add_to_used_by.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_multiple_tags_to_object.rb +205 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_multiple_tags_to_object_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_tag_to_multiple_objects.rb +191 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_tag_to_multiple_objects_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_batch_result.rb +206 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_multiple_tags_from_object.rb +205 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_multiple_tags_from_object_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_tag_from_multiple_objects.rb +191 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_tag_from_multiple_objects_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attachable_tags.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attachable_tags_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_objects_on_tags.rb +191 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_objects_on_tags_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_objects_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags_on_objects.rb +191 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags_on_objects_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_object_to_tags.rb +205 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_tag_to_objects.rb +206 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_create.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_create_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_create_spec.rb +229 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_tags_for_category_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_used_tags.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_used_tags_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_model.rb +251 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_remove_from_used_by.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_update.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_update_spec.rb +194 -0
- data/lib/vsphere-automation-cis/models/cis_task_info.rb +315 -0
- data/lib/vsphere-automation-cis/models/cis_task_progress.rb +218 -0
- data/lib/vsphere-automation-cis/models/cis_task_status.rb +33 -0
- data/lib/vsphere-automation-cis/models/cis_tasks_filter_spec.rb +234 -0
- data/lib/vsphere-automation-cis/models/cis_tasks_get_spec.rb +194 -0
- data/lib/vsphere-automation-cis/models/cis_tasks_list_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tasks_list_result_value.rb +192 -0
- data/lib/vsphere-automation-cis/models/cis_tasks_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/filter_spec_targets.rb +204 -0
- data/lib/vsphere-automation-cis/models/vapi_std_dynamic_id.rb +204 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_already_exists.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_already_exists_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_error.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_error_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_invalid_argument.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_invalid_argument_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_allowed_in_current_state.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_allowed_in_current_state_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_found.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_found_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_resource_inaccessible.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_resource_inaccessible_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_service_unavailable.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_service_unavailable_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthenticated.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthenticated_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthorized.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthorized_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unsupported.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unsupported_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_localizable_message.rb +221 -0
- data/lib/vsphere-automation-cis/version.rb +15 -0
- data/spec/api/session_api_spec.rb +64 -0
- data/spec/api/tagging_category_api_spec.rb +134 -0
- data/spec/api/tagging_tag_api_spec.rb +145 -0
- data/spec/api/tagging_tag_association_api_spec.rb +158 -0
- data/spec/api/tasks_api_spec.rb +74 -0
- data/spec/api_client_spec.rb +224 -0
- data/spec/configuration_spec.rb +40 -0
- data/spec/models/cis_session_create_result_spec.rb +39 -0
- data/spec/models/cis_session_info_spec.rb +51 -0
- data/spec/models/cis_session_result_spec.rb +39 -0
- data/spec/models/cis_tagging_category_add_to_used_by_spec.rb +39 -0
- data/spec/models/cis_tagging_category_create_result_spec.rb +39 -0
- data/spec/models/cis_tagging_category_create_spec.rb +39 -0
- data/spec/models/cis_tagging_category_create_spec_spec.rb +63 -0
- data/spec/models/cis_tagging_category_list_result_spec.rb +39 -0
- data/spec/models/cis_tagging_category_list_used_categories_result_spec.rb +39 -0
- data/spec/models/cis_tagging_category_list_used_categories_spec.rb +39 -0
- data/spec/models/cis_tagging_category_model_cardinality_spec.rb +33 -0
- data/spec/models/cis_tagging_category_model_spec.rb +69 -0
- data/spec/models/cis_tagging_category_remove_from_used_by_spec.rb +39 -0
- data/spec/models/cis_tagging_category_result_spec.rb +39 -0
- data/spec/models/cis_tagging_category_update_spec.rb +39 -0
- data/spec/models/cis_tagging_category_update_spec_spec.rb +57 -0
- data/spec/models/cis_tagging_tag_add_to_used_by_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_attach_multiple_tags_to_object_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_attach_multiple_tags_to_object_spec.rb +45 -0
- data/spec/models/cis_tagging_tag_association_attach_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_attach_tag_to_multiple_objects_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_attach_tag_to_multiple_objects_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_batch_result_spec.rb +45 -0
- data/spec/models/cis_tagging_tag_association_detach_multiple_tags_from_object_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_detach_multiple_tags_from_object_spec.rb +45 -0
- data/spec/models/cis_tagging_tag_association_detach_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_detach_tag_from_multiple_objects_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_detach_tag_from_multiple_objects_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attachable_tags_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attachable_tags_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_objects_on_tags_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_objects_on_tags_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_objects_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_tags_on_objects_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_tags_on_objects_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_tags_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_tags_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_object_to_tags_spec.rb +45 -0
- data/spec/models/cis_tagging_tag_association_tag_to_objects_spec.rb +45 -0
- data/spec/models/cis_tagging_tag_create_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_create_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_create_spec_spec.rb +57 -0
- data/spec/models/cis_tagging_tag_list_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_list_tags_for_category_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_list_used_tags_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_list_used_tags_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_model_spec.rb +63 -0
- data/spec/models/cis_tagging_tag_remove_from_used_by_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_update_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_update_spec_spec.rb +45 -0
- data/spec/models/cis_task_info_spec.rb +105 -0
- data/spec/models/cis_task_progress_spec.rb +51 -0
- data/spec/models/cis_task_status_spec.rb +33 -0
- data/spec/models/cis_tasks_filter_spec_spec.rb +63 -0
- data/spec/models/cis_tasks_get_spec_spec.rb +45 -0
- data/spec/models/cis_tasks_list_result_spec.rb +39 -0
- data/spec/models/cis_tasks_list_result_value_spec.rb +45 -0
- data/spec/models/cis_tasks_result_spec.rb +39 -0
- data/spec/models/filter_spec_targets_spec.rb +45 -0
- data/spec/models/vapi_std_dynamic_id_spec.rb +45 -0
- data/spec/models/vapi_std_errors_already_exists_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_already_exists_spec.rb +45 -0
- data/spec/models/vapi_std_errors_error_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_error_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_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_inaccessible_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_resource_inaccessible_spec.rb +45 -0
- data/spec/models/vapi_std_errors_service_unavailable_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_service_unavailable_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unauthenticated_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unauthenticated_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-cis.gemspec +43 -0
- metadata +535 -0
@@ -0,0 +1,188 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# cis
|
5
|
+
|
6
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
module VSphereAutomation
|
14
|
+
module CIS
|
15
|
+
class CisTaggingTagCreate
|
16
|
+
attr_accessor :create_spec
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'create_spec' => :'create_spec'
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.openapi_types
|
27
|
+
{
|
28
|
+
:'create_spec' => :'CisTaggingTagCreateSpec'
|
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?(:'create_spec')
|
41
|
+
self.create_spec = attributes[:'create_spec']
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
46
|
+
# @return Array for valid properties with the reasons
|
47
|
+
def list_invalid_properties
|
48
|
+
invalid_properties = Array.new
|
49
|
+
if @create_spec.nil?
|
50
|
+
invalid_properties.push('invalid value for "create_spec", create_spec cannot be nil.')
|
51
|
+
end
|
52
|
+
|
53
|
+
invalid_properties
|
54
|
+
end
|
55
|
+
|
56
|
+
# Check to see if the all the properties in the model are valid
|
57
|
+
# @return true if the model is valid
|
58
|
+
def valid?
|
59
|
+
return false if @create_spec.nil?
|
60
|
+
true
|
61
|
+
end
|
62
|
+
|
63
|
+
# Checks equality by comparing each attribute.
|
64
|
+
# @param [Object] Object to be compared
|
65
|
+
def ==(o)
|
66
|
+
return true if self.equal?(o)
|
67
|
+
self.class == o.class &&
|
68
|
+
create_spec == o.create_spec
|
69
|
+
end
|
70
|
+
|
71
|
+
# @see the `==` method
|
72
|
+
# @param [Object] Object to be compared
|
73
|
+
def eql?(o)
|
74
|
+
self == o
|
75
|
+
end
|
76
|
+
|
77
|
+
# Calculates hash code according to all attributes.
|
78
|
+
# @return [Fixnum] Hash code
|
79
|
+
def hash
|
80
|
+
[create_spec].hash
|
81
|
+
end
|
82
|
+
|
83
|
+
# Builds the object from hash
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
85
|
+
# @return [Object] Returns the model itself
|
86
|
+
def build_from_hash(attributes)
|
87
|
+
return nil unless attributes.is_a?(Hash)
|
88
|
+
self.class.openapi_types.each_pair do |key, type|
|
89
|
+
if type =~ /\AArray<(.*)>/i
|
90
|
+
# check to ensure the input is an array given that the the attribute
|
91
|
+
# is documented as an array but the input is not
|
92
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
93
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
94
|
+
end
|
95
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
96
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
97
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
98
|
+
end
|
99
|
+
|
100
|
+
self
|
101
|
+
end
|
102
|
+
|
103
|
+
# Deserializes the data based on type
|
104
|
+
# @param string type Data type
|
105
|
+
# @param string value Value to be deserialized
|
106
|
+
# @return [Object] Deserialized data
|
107
|
+
def _deserialize(type, value)
|
108
|
+
case type.to_sym
|
109
|
+
when :DateTime
|
110
|
+
DateTime.parse(value)
|
111
|
+
when :Date
|
112
|
+
Date.parse(value)
|
113
|
+
when :String
|
114
|
+
value.to_s
|
115
|
+
when :Integer
|
116
|
+
value.to_i
|
117
|
+
when :Float
|
118
|
+
value.to_f
|
119
|
+
when :BOOLEAN
|
120
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
121
|
+
true
|
122
|
+
else
|
123
|
+
false
|
124
|
+
end
|
125
|
+
when :Object
|
126
|
+
# generic object (usually a Hash), return directly
|
127
|
+
value
|
128
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
129
|
+
inner_type = Regexp.last_match[:inner_type]
|
130
|
+
value.map { |v| _deserialize(inner_type, v) }
|
131
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
132
|
+
k_type = Regexp.last_match[:k_type]
|
133
|
+
v_type = Regexp.last_match[:v_type]
|
134
|
+
{}.tap do |hash|
|
135
|
+
value.each do |k, v|
|
136
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
else # model
|
140
|
+
temp_model = VSphereAutomation::CIS.const_get(type).new
|
141
|
+
temp_model.build_from_hash(value)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Returns the string representation of the object
|
146
|
+
# @return [String] String presentation of the object
|
147
|
+
def to_s
|
148
|
+
to_hash.to_s
|
149
|
+
end
|
150
|
+
|
151
|
+
# to_body is an alias to to_hash (backward compatibility)
|
152
|
+
# @return [Hash] Returns the object in the form of hash
|
153
|
+
def to_body
|
154
|
+
to_hash
|
155
|
+
end
|
156
|
+
|
157
|
+
# Returns the object in the form of hash
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
159
|
+
def to_hash
|
160
|
+
hash = {}
|
161
|
+
self.class.attribute_map.each_pair do |attr, param|
|
162
|
+
value = self.send(attr)
|
163
|
+
next if value.nil?
|
164
|
+
hash[param] = _to_hash(value)
|
165
|
+
end
|
166
|
+
hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Outputs non-array value in the form of hash
|
170
|
+
# For object, use to_hash. Otherwise, just return the value
|
171
|
+
# @param [Object] value Any valid value
|
172
|
+
# @return [Hash] Returns the value in the form of hash
|
173
|
+
def _to_hash(value)
|
174
|
+
if value.is_a?(Array)
|
175
|
+
value.compact.map { |v| _to_hash(v) }
|
176
|
+
elsif value.is_a?(Hash)
|
177
|
+
{}.tap do |hash|
|
178
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
179
|
+
end
|
180
|
+
elsif value.respond_to? :to_hash
|
181
|
+
value.to_hash
|
182
|
+
else
|
183
|
+
value
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
@@ -0,0 +1,188 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# cis
|
5
|
+
|
6
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
module VSphereAutomation
|
14
|
+
module CIS
|
15
|
+
class CisTaggingTagCreateResult
|
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' => :'String'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Initializes the object
|
33
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
34
|
+
def initialize(attributes = {})
|
35
|
+
return unless attributes.is_a?(Hash)
|
36
|
+
|
37
|
+
# convert string to symbol for hash key
|
38
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
39
|
+
|
40
|
+
if attributes.has_key?(:'value')
|
41
|
+
self.value = attributes[:'value']
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
46
|
+
# @return Array for valid properties with the reasons
|
47
|
+
def list_invalid_properties
|
48
|
+
invalid_properties = Array.new
|
49
|
+
if @value.nil?
|
50
|
+
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
51
|
+
end
|
52
|
+
|
53
|
+
invalid_properties
|
54
|
+
end
|
55
|
+
|
56
|
+
# Check to see if the all the properties in the model are valid
|
57
|
+
# @return true if the model is valid
|
58
|
+
def valid?
|
59
|
+
return false if @value.nil?
|
60
|
+
true
|
61
|
+
end
|
62
|
+
|
63
|
+
# Checks equality by comparing each attribute.
|
64
|
+
# @param [Object] Object to be compared
|
65
|
+
def ==(o)
|
66
|
+
return true if self.equal?(o)
|
67
|
+
self.class == o.class &&
|
68
|
+
value == o.value
|
69
|
+
end
|
70
|
+
|
71
|
+
# @see the `==` method
|
72
|
+
# @param [Object] Object to be compared
|
73
|
+
def eql?(o)
|
74
|
+
self == o
|
75
|
+
end
|
76
|
+
|
77
|
+
# Calculates hash code according to all attributes.
|
78
|
+
# @return [Fixnum] Hash code
|
79
|
+
def hash
|
80
|
+
[value].hash
|
81
|
+
end
|
82
|
+
|
83
|
+
# Builds the object from hash
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
85
|
+
# @return [Object] Returns the model itself
|
86
|
+
def build_from_hash(attributes)
|
87
|
+
return nil unless attributes.is_a?(Hash)
|
88
|
+
self.class.openapi_types.each_pair do |key, type|
|
89
|
+
if type =~ /\AArray<(.*)>/i
|
90
|
+
# check to ensure the input is an array given that the the attribute
|
91
|
+
# is documented as an array but the input is not
|
92
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
93
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
94
|
+
end
|
95
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
96
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
97
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
98
|
+
end
|
99
|
+
|
100
|
+
self
|
101
|
+
end
|
102
|
+
|
103
|
+
# Deserializes the data based on type
|
104
|
+
# @param string type Data type
|
105
|
+
# @param string value Value to be deserialized
|
106
|
+
# @return [Object] Deserialized data
|
107
|
+
def _deserialize(type, value)
|
108
|
+
case type.to_sym
|
109
|
+
when :DateTime
|
110
|
+
DateTime.parse(value)
|
111
|
+
when :Date
|
112
|
+
Date.parse(value)
|
113
|
+
when :String
|
114
|
+
value.to_s
|
115
|
+
when :Integer
|
116
|
+
value.to_i
|
117
|
+
when :Float
|
118
|
+
value.to_f
|
119
|
+
when :BOOLEAN
|
120
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
121
|
+
true
|
122
|
+
else
|
123
|
+
false
|
124
|
+
end
|
125
|
+
when :Object
|
126
|
+
# generic object (usually a Hash), return directly
|
127
|
+
value
|
128
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
129
|
+
inner_type = Regexp.last_match[:inner_type]
|
130
|
+
value.map { |v| _deserialize(inner_type, v) }
|
131
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
132
|
+
k_type = Regexp.last_match[:k_type]
|
133
|
+
v_type = Regexp.last_match[:v_type]
|
134
|
+
{}.tap do |hash|
|
135
|
+
value.each do |k, v|
|
136
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
else # model
|
140
|
+
temp_model = VSphereAutomation::CIS.const_get(type).new
|
141
|
+
temp_model.build_from_hash(value)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Returns the string representation of the object
|
146
|
+
# @return [String] String presentation of the object
|
147
|
+
def to_s
|
148
|
+
to_hash.to_s
|
149
|
+
end
|
150
|
+
|
151
|
+
# to_body is an alias to to_hash (backward compatibility)
|
152
|
+
# @return [Hash] Returns the object in the form of hash
|
153
|
+
def to_body
|
154
|
+
to_hash
|
155
|
+
end
|
156
|
+
|
157
|
+
# Returns the object in the form of hash
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
159
|
+
def to_hash
|
160
|
+
hash = {}
|
161
|
+
self.class.attribute_map.each_pair do |attr, param|
|
162
|
+
value = self.send(attr)
|
163
|
+
next if value.nil?
|
164
|
+
hash[param] = _to_hash(value)
|
165
|
+
end
|
166
|
+
hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Outputs non-array value in the form of hash
|
170
|
+
# For object, use to_hash. Otherwise, just return the value
|
171
|
+
# @param [Object] value Any valid value
|
172
|
+
# @return [Hash] Returns the value in the form of hash
|
173
|
+
def _to_hash(value)
|
174
|
+
if value.is_a?(Array)
|
175
|
+
value.compact.map { |v| _to_hash(v) }
|
176
|
+
elsif value.is_a?(Hash)
|
177
|
+
{}.tap do |hash|
|
178
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
179
|
+
end
|
180
|
+
elsif value.respond_to? :to_hash
|
181
|
+
value.to_hash
|
182
|
+
else
|
183
|
+
value
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# cis
|
5
|
+
|
6
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
module VSphereAutomation
|
14
|
+
module CIS
|
15
|
+
class CisTaggingTagCreateSpec
|
16
|
+
# The display name of the tag. The name must be unique within its category.
|
17
|
+
attr_accessor :name
|
18
|
+
|
19
|
+
# The description of the tag.
|
20
|
+
attr_accessor :description
|
21
|
+
|
22
|
+
# The unique identifier of the parent category in which this tag will be created.
|
23
|
+
attr_accessor :category_id
|
24
|
+
|
25
|
+
# The identifier of the tag. If specified, tag will be created with the specified identifier. This has to be of the tag ManagedObject Id format urn:vmomi:InventoryServiceTag:<id>:GLOBAL The <id> cannot contain special character ':'
|
26
|
+
attr_accessor :tag_id
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'name' => :'name',
|
32
|
+
:'description' => :'description',
|
33
|
+
:'category_id' => :'category_id',
|
34
|
+
:'tag_id' => :'tag_id'
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'name' => :'String',
|
42
|
+
:'description' => :'String',
|
43
|
+
:'category_id' => :'String',
|
44
|
+
:'tag_id' => :'String'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
50
|
+
def initialize(attributes = {})
|
51
|
+
return unless attributes.is_a?(Hash)
|
52
|
+
|
53
|
+
# convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
55
|
+
|
56
|
+
if attributes.has_key?(:'name')
|
57
|
+
self.name = attributes[:'name']
|
58
|
+
end
|
59
|
+
|
60
|
+
if attributes.has_key?(:'description')
|
61
|
+
self.description = attributes[:'description']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.has_key?(:'category_id')
|
65
|
+
self.category_id = attributes[:'category_id']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'tag_id')
|
69
|
+
self.tag_id = attributes[:'tag_id']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properties with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
invalid_properties = Array.new
|
77
|
+
if @name.nil?
|
78
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
79
|
+
end
|
80
|
+
|
81
|
+
if @description.nil?
|
82
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
83
|
+
end
|
84
|
+
|
85
|
+
if @category_id.nil?
|
86
|
+
invalid_properties.push('invalid value for "category_id", category_id cannot be nil.')
|
87
|
+
end
|
88
|
+
|
89
|
+
invalid_properties
|
90
|
+
end
|
91
|
+
|
92
|
+
# Check to see if the all the properties in the model are valid
|
93
|
+
# @return true if the model is valid
|
94
|
+
def valid?
|
95
|
+
return false if @name.nil?
|
96
|
+
return false if @description.nil?
|
97
|
+
return false if @category_id.nil?
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
# Checks equality by comparing each attribute.
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def ==(o)
|
104
|
+
return true if self.equal?(o)
|
105
|
+
self.class == o.class &&
|
106
|
+
name == o.name &&
|
107
|
+
description == o.description &&
|
108
|
+
category_id == o.category_id &&
|
109
|
+
tag_id == o.tag_id
|
110
|
+
end
|
111
|
+
|
112
|
+
# @see the `==` method
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def eql?(o)
|
115
|
+
self == o
|
116
|
+
end
|
117
|
+
|
118
|
+
# Calculates hash code according to all attributes.
|
119
|
+
# @return [Fixnum] Hash code
|
120
|
+
def hash
|
121
|
+
[name, description, category_id, tag_id].hash
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def build_from_hash(attributes)
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
129
|
+
self.class.openapi_types.each_pair do |key, type|
|
130
|
+
if type =~ /\AArray<(.*)>/i
|
131
|
+
# check to ensure the input is an array given that the the attribute
|
132
|
+
# is documented as an array but the input is not
|
133
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
134
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
135
|
+
end
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
138
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
139
|
+
end
|
140
|
+
|
141
|
+
self
|
142
|
+
end
|
143
|
+
|
144
|
+
# Deserializes the data based on type
|
145
|
+
# @param string type Data type
|
146
|
+
# @param string value Value to be deserialized
|
147
|
+
# @return [Object] Deserialized data
|
148
|
+
def _deserialize(type, value)
|
149
|
+
case type.to_sym
|
150
|
+
when :DateTime
|
151
|
+
DateTime.parse(value)
|
152
|
+
when :Date
|
153
|
+
Date.parse(value)
|
154
|
+
when :String
|
155
|
+
value.to_s
|
156
|
+
when :Integer
|
157
|
+
value.to_i
|
158
|
+
when :Float
|
159
|
+
value.to_f
|
160
|
+
when :BOOLEAN
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
162
|
+
true
|
163
|
+
else
|
164
|
+
false
|
165
|
+
end
|
166
|
+
when :Object
|
167
|
+
# generic object (usually a Hash), return directly
|
168
|
+
value
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each do |k, v|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
else # model
|
181
|
+
temp_model = VSphereAutomation::CIS.const_get(type).new
|
182
|
+
temp_model.build_from_hash(value)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the string representation of the object
|
187
|
+
# @return [String] String presentation of the object
|
188
|
+
def to_s
|
189
|
+
to_hash.to_s
|
190
|
+
end
|
191
|
+
|
192
|
+
# to_body is an alias to to_hash (backward compatibility)
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_body
|
195
|
+
to_hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the object in the form of hash
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_hash
|
201
|
+
hash = {}
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
203
|
+
value = self.send(attr)
|
204
|
+
next if value.nil?
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|