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,190 @@
|
|
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 CisTaggingTagListUsedTagsResult
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'value' => :'value'
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.openapi_types
|
27
|
+
{
|
28
|
+
:'value' => :'Array<String>'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Initializes the object
|
33
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
34
|
+
def initialize(attributes = {})
|
35
|
+
return unless attributes.is_a?(Hash)
|
36
|
+
|
37
|
+
# convert string to symbol for hash key
|
38
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
39
|
+
|
40
|
+
if attributes.has_key?(:'value')
|
41
|
+
if (value = attributes[:'value']).is_a?(Array)
|
42
|
+
self.value = value
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
48
|
+
# @return Array for valid properties with the reasons
|
49
|
+
def list_invalid_properties
|
50
|
+
invalid_properties = Array.new
|
51
|
+
if @value.nil?
|
52
|
+
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
53
|
+
end
|
54
|
+
|
55
|
+
invalid_properties
|
56
|
+
end
|
57
|
+
|
58
|
+
# Check to see if the all the properties in the model are valid
|
59
|
+
# @return true if the model is valid
|
60
|
+
def valid?
|
61
|
+
return false if @value.nil?
|
62
|
+
true
|
63
|
+
end
|
64
|
+
|
65
|
+
# Checks equality by comparing each attribute.
|
66
|
+
# @param [Object] Object to be compared
|
67
|
+
def ==(o)
|
68
|
+
return true if self.equal?(o)
|
69
|
+
self.class == o.class &&
|
70
|
+
value == o.value
|
71
|
+
end
|
72
|
+
|
73
|
+
# @see the `==` method
|
74
|
+
# @param [Object] Object to be compared
|
75
|
+
def eql?(o)
|
76
|
+
self == o
|
77
|
+
end
|
78
|
+
|
79
|
+
# Calculates hash code according to all attributes.
|
80
|
+
# @return [Fixnum] Hash code
|
81
|
+
def hash
|
82
|
+
[value].hash
|
83
|
+
end
|
84
|
+
|
85
|
+
# Builds the object from hash
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
87
|
+
# @return [Object] Returns the model itself
|
88
|
+
def build_from_hash(attributes)
|
89
|
+
return nil unless attributes.is_a?(Hash)
|
90
|
+
self.class.openapi_types.each_pair do |key, type|
|
91
|
+
if type =~ /\AArray<(.*)>/i
|
92
|
+
# check to ensure the input is an array given that the the attribute
|
93
|
+
# is documented as an array but the input is not
|
94
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
95
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
96
|
+
end
|
97
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
98
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
99
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
100
|
+
end
|
101
|
+
|
102
|
+
self
|
103
|
+
end
|
104
|
+
|
105
|
+
# Deserializes the data based on type
|
106
|
+
# @param string type Data type
|
107
|
+
# @param string value Value to be deserialized
|
108
|
+
# @return [Object] Deserialized data
|
109
|
+
def _deserialize(type, value)
|
110
|
+
case type.to_sym
|
111
|
+
when :DateTime
|
112
|
+
DateTime.parse(value)
|
113
|
+
when :Date
|
114
|
+
Date.parse(value)
|
115
|
+
when :String
|
116
|
+
value.to_s
|
117
|
+
when :Integer
|
118
|
+
value.to_i
|
119
|
+
when :Float
|
120
|
+
value.to_f
|
121
|
+
when :BOOLEAN
|
122
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
123
|
+
true
|
124
|
+
else
|
125
|
+
false
|
126
|
+
end
|
127
|
+
when :Object
|
128
|
+
# generic object (usually a Hash), return directly
|
129
|
+
value
|
130
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
131
|
+
inner_type = Regexp.last_match[:inner_type]
|
132
|
+
value.map { |v| _deserialize(inner_type, v) }
|
133
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
134
|
+
k_type = Regexp.last_match[:k_type]
|
135
|
+
v_type = Regexp.last_match[:v_type]
|
136
|
+
{}.tap do |hash|
|
137
|
+
value.each do |k, v|
|
138
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
else # model
|
142
|
+
temp_model = VSphereAutomation::CIS.const_get(type).new
|
143
|
+
temp_model.build_from_hash(value)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Returns the string representation of the object
|
148
|
+
# @return [String] String presentation of the object
|
149
|
+
def to_s
|
150
|
+
to_hash.to_s
|
151
|
+
end
|
152
|
+
|
153
|
+
# to_body is an alias to to_hash (backward compatibility)
|
154
|
+
# @return [Hash] Returns the object in the form of hash
|
155
|
+
def to_body
|
156
|
+
to_hash
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the object in the form of hash
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
161
|
+
def to_hash
|
162
|
+
hash = {}
|
163
|
+
self.class.attribute_map.each_pair do |attr, param|
|
164
|
+
value = self.send(attr)
|
165
|
+
next if value.nil?
|
166
|
+
hash[param] = _to_hash(value)
|
167
|
+
end
|
168
|
+
hash
|
169
|
+
end
|
170
|
+
|
171
|
+
# Outputs non-array value in the form of hash
|
172
|
+
# For object, use to_hash. Otherwise, just return the value
|
173
|
+
# @param [Object] value Any valid value
|
174
|
+
# @return [Hash] Returns the value in the form of hash
|
175
|
+
def _to_hash(value)
|
176
|
+
if value.is_a?(Array)
|
177
|
+
value.compact.map { |v| _to_hash(v) }
|
178
|
+
elsif value.is_a?(Hash)
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
181
|
+
end
|
182
|
+
elsif value.respond_to? :to_hash
|
183
|
+
value.to_hash
|
184
|
+
else
|
185
|
+
value
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
@@ -0,0 +1,251 @@
|
|
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 CisTaggingTagModel
|
16
|
+
# The unique identifier of the tag.
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# The identifier of the parent category in which this tag will be created.
|
20
|
+
attr_accessor :category_id
|
21
|
+
|
22
|
+
# The display name of the tag.
|
23
|
+
attr_accessor :name
|
24
|
+
|
25
|
+
# The description of the tag.
|
26
|
+
attr_accessor :description
|
27
|
+
|
28
|
+
# The {@term set} of users that can use this tag. To add users to this, you need to have the edit privilege on the tag. Similarly, to unsubscribe from this tag, you need the edit privilege on the tag. You should not modify other users subscription from this {@term set}.
|
29
|
+
attr_accessor :used_by
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'id' => :'id',
|
35
|
+
:'category_id' => :'category_id',
|
36
|
+
:'name' => :'name',
|
37
|
+
:'description' => :'description',
|
38
|
+
:'used_by' => :'used_by'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'id' => :'String',
|
46
|
+
:'category_id' => :'String',
|
47
|
+
:'name' => :'String',
|
48
|
+
:'description' => :'String',
|
49
|
+
:'used_by' => :'Array<String>'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
return unless attributes.is_a?(Hash)
|
57
|
+
|
58
|
+
# convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
60
|
+
|
61
|
+
if attributes.has_key?(:'id')
|
62
|
+
self.id = attributes[:'id']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'category_id')
|
66
|
+
self.category_id = attributes[:'category_id']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'name')
|
70
|
+
self.name = attributes[:'name']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'description')
|
74
|
+
self.description = attributes[:'description']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'used_by')
|
78
|
+
if (value = attributes[:'used_by']).is_a?(Array)
|
79
|
+
self.used_by = value
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
85
|
+
# @return Array for valid properties with the reasons
|
86
|
+
def list_invalid_properties
|
87
|
+
invalid_properties = Array.new
|
88
|
+
if @id.nil?
|
89
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
90
|
+
end
|
91
|
+
|
92
|
+
if @category_id.nil?
|
93
|
+
invalid_properties.push('invalid value for "category_id", category_id cannot be nil.')
|
94
|
+
end
|
95
|
+
|
96
|
+
if @name.nil?
|
97
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
98
|
+
end
|
99
|
+
|
100
|
+
if @description.nil?
|
101
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
102
|
+
end
|
103
|
+
|
104
|
+
if @used_by.nil?
|
105
|
+
invalid_properties.push('invalid value for "used_by", used_by cannot be nil.')
|
106
|
+
end
|
107
|
+
|
108
|
+
invalid_properties
|
109
|
+
end
|
110
|
+
|
111
|
+
# Check to see if the all the properties in the model are valid
|
112
|
+
# @return true if the model is valid
|
113
|
+
def valid?
|
114
|
+
return false if @id.nil?
|
115
|
+
return false if @category_id.nil?
|
116
|
+
return false if @name.nil?
|
117
|
+
return false if @description.nil?
|
118
|
+
return false if @used_by.nil?
|
119
|
+
true
|
120
|
+
end
|
121
|
+
|
122
|
+
# Checks equality by comparing each attribute.
|
123
|
+
# @param [Object] Object to be compared
|
124
|
+
def ==(o)
|
125
|
+
return true if self.equal?(o)
|
126
|
+
self.class == o.class &&
|
127
|
+
id == o.id &&
|
128
|
+
category_id == o.category_id &&
|
129
|
+
name == o.name &&
|
130
|
+
description == o.description &&
|
131
|
+
used_by == o.used_by
|
132
|
+
end
|
133
|
+
|
134
|
+
# @see the `==` method
|
135
|
+
# @param [Object] Object to be compared
|
136
|
+
def eql?(o)
|
137
|
+
self == o
|
138
|
+
end
|
139
|
+
|
140
|
+
# Calculates hash code according to all attributes.
|
141
|
+
# @return [Fixnum] Hash code
|
142
|
+
def hash
|
143
|
+
[id, category_id, name, description, used_by].hash
|
144
|
+
end
|
145
|
+
|
146
|
+
# Builds the object from hash
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
148
|
+
# @return [Object] Returns the model itself
|
149
|
+
def build_from_hash(attributes)
|
150
|
+
return nil unless attributes.is_a?(Hash)
|
151
|
+
self.class.openapi_types.each_pair do |key, type|
|
152
|
+
if type =~ /\AArray<(.*)>/i
|
153
|
+
# check to ensure the input is an array given that the the attribute
|
154
|
+
# is documented as an array but the input is not
|
155
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
156
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
157
|
+
end
|
158
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
159
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
160
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
161
|
+
end
|
162
|
+
|
163
|
+
self
|
164
|
+
end
|
165
|
+
|
166
|
+
# Deserializes the data based on type
|
167
|
+
# @param string type Data type
|
168
|
+
# @param string value Value to be deserialized
|
169
|
+
# @return [Object] Deserialized data
|
170
|
+
def _deserialize(type, value)
|
171
|
+
case type.to_sym
|
172
|
+
when :DateTime
|
173
|
+
DateTime.parse(value)
|
174
|
+
when :Date
|
175
|
+
Date.parse(value)
|
176
|
+
when :String
|
177
|
+
value.to_s
|
178
|
+
when :Integer
|
179
|
+
value.to_i
|
180
|
+
when :Float
|
181
|
+
value.to_f
|
182
|
+
when :BOOLEAN
|
183
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
184
|
+
true
|
185
|
+
else
|
186
|
+
false
|
187
|
+
end
|
188
|
+
when :Object
|
189
|
+
# generic object (usually a Hash), return directly
|
190
|
+
value
|
191
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
192
|
+
inner_type = Regexp.last_match[:inner_type]
|
193
|
+
value.map { |v| _deserialize(inner_type, v) }
|
194
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
195
|
+
k_type = Regexp.last_match[:k_type]
|
196
|
+
v_type = Regexp.last_match[:v_type]
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each do |k, v|
|
199
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
else # model
|
203
|
+
temp_model = VSphereAutomation::CIS.const_get(type).new
|
204
|
+
temp_model.build_from_hash(value)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the string representation of the object
|
209
|
+
# @return [String] String presentation of the object
|
210
|
+
def to_s
|
211
|
+
to_hash.to_s
|
212
|
+
end
|
213
|
+
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_body
|
217
|
+
to_hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the object in the form of hash
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_hash
|
223
|
+
hash = {}
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
225
|
+
value = self.send(attr)
|
226
|
+
next if value.nil?
|
227
|
+
hash[param] = _to_hash(value)
|
228
|
+
end
|
229
|
+
hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Outputs non-array value in the form of hash
|
233
|
+
# For object, use to_hash. Otherwise, just return the value
|
234
|
+
# @param [Object] value Any valid value
|
235
|
+
# @return [Hash] Returns the value in the form of hash
|
236
|
+
def _to_hash(value)
|
237
|
+
if value.is_a?(Array)
|
238
|
+
value.compact.map { |v| _to_hash(v) }
|
239
|
+
elsif value.is_a?(Hash)
|
240
|
+
{}.tap do |hash|
|
241
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
242
|
+
end
|
243
|
+
elsif value.respond_to? :to_hash
|
244
|
+
value.to_hash
|
245
|
+
else
|
246
|
+
value
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
@@ -0,0 +1,189 @@
|
|
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 CisTaggingTagRemoveFromUsedBy
|
16
|
+
# The name of the user to be removed from the {@link TagModel#usedBy} {@term set}.
|
17
|
+
attr_accessor :used_by_entity
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'used_by_entity' => :'used_by_entity'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'used_by_entity' => :'String'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the object
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return unless attributes.is_a?(Hash)
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
40
|
+
|
41
|
+
if attributes.has_key?(:'used_by_entity')
|
42
|
+
self.used_by_entity = attributes[:'used_by_entity']
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
47
|
+
# @return Array for valid properties with the reasons
|
48
|
+
def list_invalid_properties
|
49
|
+
invalid_properties = Array.new
|
50
|
+
if @used_by_entity.nil?
|
51
|
+
invalid_properties.push('invalid value for "used_by_entity", used_by_entity cannot be nil.')
|
52
|
+
end
|
53
|
+
|
54
|
+
invalid_properties
|
55
|
+
end
|
56
|
+
|
57
|
+
# Check to see if the all the properties in the model are valid
|
58
|
+
# @return true if the model is valid
|
59
|
+
def valid?
|
60
|
+
return false if @used_by_entity.nil?
|
61
|
+
true
|
62
|
+
end
|
63
|
+
|
64
|
+
# Checks equality by comparing each attribute.
|
65
|
+
# @param [Object] Object to be compared
|
66
|
+
def ==(o)
|
67
|
+
return true if self.equal?(o)
|
68
|
+
self.class == o.class &&
|
69
|
+
used_by_entity == o.used_by_entity
|
70
|
+
end
|
71
|
+
|
72
|
+
# @see the `==` method
|
73
|
+
# @param [Object] Object to be compared
|
74
|
+
def eql?(o)
|
75
|
+
self == o
|
76
|
+
end
|
77
|
+
|
78
|
+
# Calculates hash code according to all attributes.
|
79
|
+
# @return [Fixnum] Hash code
|
80
|
+
def hash
|
81
|
+
[used_by_entity].hash
|
82
|
+
end
|
83
|
+
|
84
|
+
# Builds the object from hash
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
86
|
+
# @return [Object] Returns the model itself
|
87
|
+
def build_from_hash(attributes)
|
88
|
+
return nil unless attributes.is_a?(Hash)
|
89
|
+
self.class.openapi_types.each_pair do |key, type|
|
90
|
+
if type =~ /\AArray<(.*)>/i
|
91
|
+
# check to ensure the input is an array given that the the attribute
|
92
|
+
# is documented as an array but the input is not
|
93
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
94
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
95
|
+
end
|
96
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
97
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
98
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
99
|
+
end
|
100
|
+
|
101
|
+
self
|
102
|
+
end
|
103
|
+
|
104
|
+
# Deserializes the data based on type
|
105
|
+
# @param string type Data type
|
106
|
+
# @param string value Value to be deserialized
|
107
|
+
# @return [Object] Deserialized data
|
108
|
+
def _deserialize(type, value)
|
109
|
+
case type.to_sym
|
110
|
+
when :DateTime
|
111
|
+
DateTime.parse(value)
|
112
|
+
when :Date
|
113
|
+
Date.parse(value)
|
114
|
+
when :String
|
115
|
+
value.to_s
|
116
|
+
when :Integer
|
117
|
+
value.to_i
|
118
|
+
when :Float
|
119
|
+
value.to_f
|
120
|
+
when :BOOLEAN
|
121
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
122
|
+
true
|
123
|
+
else
|
124
|
+
false
|
125
|
+
end
|
126
|
+
when :Object
|
127
|
+
# generic object (usually a Hash), return directly
|
128
|
+
value
|
129
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
130
|
+
inner_type = Regexp.last_match[:inner_type]
|
131
|
+
value.map { |v| _deserialize(inner_type, v) }
|
132
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
133
|
+
k_type = Regexp.last_match[:k_type]
|
134
|
+
v_type = Regexp.last_match[:v_type]
|
135
|
+
{}.tap do |hash|
|
136
|
+
value.each do |k, v|
|
137
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
else # model
|
141
|
+
temp_model = VSphereAutomation::CIS.const_get(type).new
|
142
|
+
temp_model.build_from_hash(value)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# Returns the string representation of the object
|
147
|
+
# @return [String] String presentation of the object
|
148
|
+
def to_s
|
149
|
+
to_hash.to_s
|
150
|
+
end
|
151
|
+
|
152
|
+
# to_body is an alias to to_hash (backward compatibility)
|
153
|
+
# @return [Hash] Returns the object in the form of hash
|
154
|
+
def to_body
|
155
|
+
to_hash
|
156
|
+
end
|
157
|
+
|
158
|
+
# Returns the object in the form of hash
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
160
|
+
def to_hash
|
161
|
+
hash = {}
|
162
|
+
self.class.attribute_map.each_pair do |attr, param|
|
163
|
+
value = self.send(attr)
|
164
|
+
next if value.nil?
|
165
|
+
hash[param] = _to_hash(value)
|
166
|
+
end
|
167
|
+
hash
|
168
|
+
end
|
169
|
+
|
170
|
+
# Outputs non-array value in the form of hash
|
171
|
+
# For object, use to_hash. Otherwise, just return the value
|
172
|
+
# @param [Object] value Any valid value
|
173
|
+
# @return [Hash] Returns the value in the form of hash
|
174
|
+
def _to_hash(value)
|
175
|
+
if value.is_a?(Array)
|
176
|
+
value.compact.map { |v| _to_hash(v) }
|
177
|
+
elsif value.is_a?(Hash)
|
178
|
+
{}.tap do |hash|
|
179
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
180
|
+
end
|
181
|
+
elsif value.respond_to? :to_hash
|
182
|
+
value.to_hash
|
183
|
+
else
|
184
|
+
value
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|