api-sdk-rb 1.11.66 → 1.11.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +192 -9
- data/docs/AdapterConnection.md +7 -1
- data/docs/BrandColor.md +22 -0
- data/docs/BrandFont.md +24 -0
- data/docs/BrandKitApi.md +593 -0
- data/docs/BrandKitAssetView.md +42 -0
- data/docs/BrandKitFigmaSource.md +26 -0
- data/docs/BrandKitTokens.md +24 -0
- data/docs/BrandKitTokensFonts.md +24 -0
- data/docs/BrandKitView.md +36 -0
- data/docs/BrandKitViewOwner.md +20 -0
- data/docs/BrandKitViewResponse.md +22 -0
- data/docs/BrandSpacing.md +32 -0
- data/docs/Composition.md +5 -1
- data/docs/CompositionLastEditedBy.md +20 -0
- data/docs/CompositionsApi.md +217 -135
- data/docs/ConfirmAdapterConnectionRequest.md +18 -0
- data/docs/CreateWidget201ResponseData.md +2 -4
- data/docs/CreateWorkspaceWorkflowFromPreset201Response.md +22 -0
- data/docs/CreateWorkspaceWorkflowFromPresetRequest.md +20 -0
- data/docs/CreateWorkspaceWorkflowRequest.md +22 -0
- data/docs/DeleteWorkspaceWorkflow200Response.md +22 -0
- data/docs/GetPublicCompositionEmbed200Response.md +7 -1
- data/docs/GetPublicCompositionEmbed200ResponseAdapters.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.md +18 -0
- data/docs/GetPublicCompositionEmbed200ResponseEntries.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseMedia.md +18 -0
- data/docs/GetPublicWorkflow200Response.md +22 -0
- data/docs/GetWorkspaceWorkflowStats200Response.md +22 -0
- data/docs/GetWorkspaceWorkflowVersion200Response.md +22 -0
- data/docs/ListPartnerWorkflowPresets200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowCompositionOptions200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowPresets200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowVersions200Response.md +22 -0
- data/docs/ListWorkspaceWorkflows200Response.md +22 -0
- data/docs/ManagedUsersApi.md +1 -1
- data/docs/NewComposition.md +1 -1
- data/docs/NewEditorSession.md +1 -1
- data/docs/OfferWorkflowPresetRequest.md +24 -0
- data/docs/OfferedWorkflowPreset.md +40 -0
- data/docs/OfferedWorkflowPresetList.md +18 -0
- data/docs/OfferedWorkflowPresetWidget.md +22 -0
- data/docs/PartnerApi.md +3360 -538
- data/docs/PartnerCustomization.md +2 -2
- data/docs/PartnerNotification.md +1 -1
- data/docs/PartnersApi.md +294 -2
- data/docs/PatchBrandKitAssetRequest.md +24 -0
- data/docs/PatchBrandKitRequest.md +28 -0
- data/docs/PatchBrandKitRequestFonts.md +24 -0
- data/docs/PatchBrandKitRequestSpacing.md +32 -0
- data/docs/PostBrandKitIconRequest.md +20 -0
- data/docs/PublicEmbedApi.md +270 -4
- data/docs/PublicWorkflow.md +36 -0
- data/docs/PublicWorkflowEventsAccepted.md +22 -0
- data/docs/PublicWorkflowEventsRequest.md +24 -0
- data/docs/PublicWorkflowEventsRequestEventsInner.md +22 -0
- data/docs/PublicWorkflowEventsRequestHeightsInner.md +20 -0
- data/docs/PublicWorkflowTranslation.md +20 -0
- data/docs/PublishWorkspaceWorkflow200Response.md +22 -0
- data/docs/PublishWorkspaceWorkflowRequest.md +18 -0
- data/docs/PutBrandKitRequest.md +22 -0
- data/docs/RemovePartnerWorkflowPreset200Response.md +22 -0
- data/docs/ReportPublicWorkflowEvents200Response.md +22 -0
- data/docs/SaveWorkspaceWorkflow200Response.md +22 -0
- data/docs/SaveWorkspaceWorkflowRequest.md +24 -0
- data/docs/SetAdapterConnectionRequest.md +1 -1
- data/docs/SetPartnerWorkflowPreset200Response.md +22 -0
- data/docs/UpdateComposition.md +1 -1
- data/docs/UsersApi.md +77 -1
- data/docs/Widget.md +2 -4
- data/docs/Workflow.md +50 -0
- data/docs/WorkflowCompositionAction.md +24 -0
- data/docs/WorkflowCompositionField.md +24 -0
- data/docs/WorkflowCompositionOption.md +30 -0
- data/docs/WorkflowCompositionOptionActions.md +22 -0
- data/docs/WorkflowCompositionOptionInputs.md +24 -0
- data/docs/WorkflowCompositionOptions.md +24 -0
- data/docs/WorkflowConditionCase.md +24 -0
- data/docs/WorkflowConditionTest.md +22 -0
- data/docs/WorkflowCounter.md +20 -0
- data/docs/WorkflowDetail.md +60 -0
- data/docs/WorkflowDetailAllOfLastEditedBy.md +20 -0
- data/docs/WorkflowEdge.md +24 -0
- data/docs/WorkflowFieldReference.md +22 -0
- data/docs/WorkflowGraph.md +22 -0
- data/docs/WorkflowIssue.md +28 -0
- data/docs/WorkflowList.md +24 -0
- data/docs/WorkflowNode.md +30 -0
- data/docs/WorkflowNodePosition.md +20 -0
- data/docs/WorkflowPresetChoice.md +26 -0
- data/docs/WorkflowPresetChoices.md +18 -0
- data/docs/WorkflowPresetRemoval.md +18 -0
- data/docs/WorkflowPresetWidget.md +20 -0
- data/docs/WorkflowPublishResult.md +22 -0
- data/docs/WorkflowRemoved.md +18 -0
- data/docs/WorkflowSchedule.md +24 -0
- data/docs/WorkflowStats.md +32 -0
- data/docs/WorkflowStatus.md +15 -0
- data/docs/WorkflowTrigger.md +28 -0
- data/docs/WorkflowTriggerValuesInner.md +20 -0
- data/docs/WorkflowVersion.md +28 -0
- data/docs/WorkflowVersionDetail.md +32 -0
- data/docs/WorkflowVersionList.md +18 -0
- data/docs/WorkflowVersionPublishedBy.md +20 -0
- data/docs/WorkflowsApi.md +1743 -0
- data/docs/WorkspacesApi.md +1527 -0
- data/lib/api-sdk-rb/api/brand_kit_api.rb +581 -0
- data/lib/api-sdk-rb/api/compositions_api.rb +237 -138
- data/lib/api-sdk-rb/api/managed_users_api.rb +2 -2
- data/lib/api-sdk-rb/api/partner_api.rb +3907 -809
- data/lib/api-sdk-rb/api/partners_api.rb +320 -4
- data/lib/api-sdk-rb/api/public_embed_api.rb +283 -6
- data/lib/api-sdk-rb/api/users_api.rb +96 -2
- data/lib/api-sdk-rb/api/workflows_api.rb +1997 -0
- data/lib/api-sdk-rb/api/workspaces_api.rb +1775 -0
- data/lib/api-sdk-rb/configuration.rb +50 -2
- data/lib/api-sdk-rb/models/adapter_connection.rb +48 -5
- data/lib/api-sdk-rb/models/brand_color.rb +329 -0
- data/lib/api-sdk-rb/models/brand_font.rb +357 -0
- data/lib/api-sdk-rb/models/brand_kit_asset_view.rb +409 -0
- data/lib/api-sdk-rb/models/brand_kit_figma_source.rb +277 -0
- data/lib/api-sdk-rb/models/brand_kit_tokens.rb +304 -0
- data/lib/api-sdk-rb/models/brand_kit_tokens_fonts.rb +241 -0
- data/lib/api-sdk-rb/models/brand_kit_view.rb +344 -0
- data/lib/api-sdk-rb/models/brand_kit_view_owner.rb +267 -0
- data/lib/api-sdk-rb/models/brand_kit_view_response.rb +247 -0
- data/lib/api-sdk-rb/models/brand_spacing.rb +557 -0
- data/lib/api-sdk-rb/models/composition.rb +26 -5
- data/lib/api-sdk-rb/models/composition_last_edited_by.rb +242 -0
- data/lib/api-sdk-rb/models/confirm_adapter_connection_request.rb +241 -0
- data/lib/api-sdk-rb/models/create_widget201_response_data.rb +9 -20
- data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset201_response.rb +246 -0
- data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset_request.rb +278 -0
- data/lib/api-sdk-rb/models/create_workspace_workflow_request.rb +271 -0
- data/lib/api-sdk-rb/models/delete_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response.rb +29 -2
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters.rb +225 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters_captcha.rb +216 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_entries.rb +224 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_media.rb +216 -0
- data/lib/api-sdk-rb/models/get_public_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_workspace_workflow_stats200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_workspace_workflow_version200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_partner_workflow_presets200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflow_composition_options200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflow_presets200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflow_versions200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflows200_response.rb +246 -0
- data/lib/api-sdk-rb/models/new_composition.rb +1 -1
- data/lib/api-sdk-rb/models/new_editor_session.rb +1 -1
- data/lib/api-sdk-rb/models/offer_workflow_preset_request.rb +322 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset.rb +423 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset_list.rb +223 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset_widget.rb +251 -0
- data/lib/api-sdk-rb/models/partner_notification.rb +1 -1
- data/lib/api-sdk-rb/models/partner_notification_event_type.rb +5 -1
- data/lib/api-sdk-rb/models/patch_brand_kit_asset_request.rb +289 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +332 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request_fonts.rb +242 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request_spacing.rb +502 -0
- data/lib/api-sdk-rb/models/post_brand_kit_icon_request.rb +237 -0
- data/lib/api-sdk-rb/models/public_workflow.rb +351 -0
- data/lib/api-sdk-rb/models/public_workflow_events_accepted.rb +242 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request.rb +301 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +332 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request_heights_inner.rb +267 -0
- data/lib/api-sdk-rb/models/public_workflow_translation.rb +242 -0
- data/lib/api-sdk-rb/models/publish_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/publish_workspace_workflow_request.rb +240 -0
- data/lib/api-sdk-rb/models/put_brand_kit_request.rb +239 -0
- data/lib/api-sdk-rb/models/remove_partner_workflow_preset200_response.rb +246 -0
- data/lib/api-sdk-rb/models/report_public_workflow_events200_response.rb +246 -0
- data/lib/api-sdk-rb/models/save_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/save_workspace_workflow_request.rb +296 -0
- data/lib/api-sdk-rb/models/set_adapter_connection_request.rb +1 -1
- data/lib/api-sdk-rb/models/set_partner_workflow_preset200_response.rb +246 -0
- data/lib/api-sdk-rb/models/update_composition.rb +1 -1
- data/lib/api-sdk-rb/models/widget.rb +9 -20
- data/lib/api-sdk-rb/models/workflow.rb +509 -0
- data/lib/api-sdk-rb/models/workflow_composition_action.rb +266 -0
- data/lib/api-sdk-rb/models/workflow_composition_field.rb +303 -0
- data/lib/api-sdk-rb/models/workflow_composition_option.rb +316 -0
- data/lib/api-sdk-rb/models/workflow_composition_option_actions.rb +284 -0
- data/lib/api-sdk-rb/models/workflow_composition_option_inputs.rb +304 -0
- data/lib/api-sdk-rb/models/workflow_composition_options.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_condition_case.rb +322 -0
- data/lib/api-sdk-rb/models/workflow_condition_test.rb +284 -0
- data/lib/api-sdk-rb/models/workflow_counter.rb +238 -0
- data/lib/api-sdk-rb/models/workflow_detail.rb +580 -0
- data/lib/api-sdk-rb/models/workflow_detail_all_of_last_edited_by.rb +242 -0
- data/lib/api-sdk-rb/models/workflow_edge.rb +292 -0
- data/lib/api-sdk-rb/models/workflow_field_reference.rb +300 -0
- data/lib/api-sdk-rb/models/workflow_graph.rb +330 -0
- data/lib/api-sdk-rb/models/workflow_issue.rb +309 -0
- data/lib/api-sdk-rb/models/workflow_list.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_node.rb +343 -0
- data/lib/api-sdk-rb/models/workflow_node_position.rb +238 -0
- data/lib/api-sdk-rb/models/workflow_preset_choice.rb +288 -0
- data/lib/api-sdk-rb/models/workflow_preset_choices.rb +224 -0
- data/lib/api-sdk-rb/models/workflow_preset_removal.rb +222 -0
- data/lib/api-sdk-rb/models/workflow_preset_widget.rb +234 -0
- data/lib/api-sdk-rb/models/workflow_publish_result.rb +256 -0
- data/lib/api-sdk-rb/models/workflow_removed.rb +221 -0
- data/lib/api-sdk-rb/models/workflow_schedule.rb +298 -0
- data/lib/api-sdk-rb/models/workflow_stats.rb +335 -0
- data/lib/api-sdk-rb/models/workflow_status.rb +42 -0
- data/lib/api-sdk-rb/models/workflow_trigger.rb +303 -0
- data/lib/api-sdk-rb/models/workflow_trigger_values_inner.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_version.rb +316 -0
- data/lib/api-sdk-rb/models/workflow_version_detail.rb +354 -0
- data/lib/api-sdk-rb/models/workflow_version_list.rb +224 -0
- data/lib/api-sdk-rb/models/workflow_version_published_by.rb +225 -0
- data/lib/api-sdk-rb/version.rb +1 -1
- data/lib/api-sdk-rb.rb +88 -0
- data/spec/api/brand_kit_api_spec.rb +136 -0
- data/spec/api/compositions_api_spec.rb +86 -69
- data/spec/api/managed_users_api_spec.rb +1 -1
- data/spec/api/partner_api_spec.rb +624 -82
- data/spec/api/partners_api_spec.rb +56 -2
- data/spec/api/public_embed_api_spec.rb +54 -3
- data/spec/api/users_api_spec.rb +16 -1
- data/spec/api/workflows_api_spec.rb +378 -0
- data/spec/api/workspaces_api_spec.rb +339 -0
- data/spec/models/adapter_connection_spec.rb +18 -0
- data/spec/models/brand_color_spec.rb +52 -0
- data/spec/models/brand_font_spec.rb +62 -0
- data/spec/models/brand_kit_asset_view_spec.rb +120 -0
- data/spec/models/brand_kit_figma_source_spec.rb +60 -0
- data/spec/models/brand_kit_tokens_fonts_spec.rb +54 -0
- data/spec/models/brand_kit_tokens_spec.rb +54 -0
- data/spec/models/brand_kit_view_owner_spec.rb +46 -0
- data/spec/models/brand_kit_view_response_spec.rb +48 -0
- data/spec/models/brand_kit_view_spec.rb +90 -0
- data/spec/models/brand_spacing_spec.rb +78 -0
- data/spec/models/composition_last_edited_by_spec.rb +42 -0
- data/spec/models/composition_spec.rb +12 -0
- data/spec/models/confirm_adapter_connection_request_spec.rb +36 -0
- data/spec/models/create_widget201_response_data_spec.rb +1 -7
- data/spec/models/create_workspace_workflow_from_preset201_response_spec.rb +48 -0
- data/spec/models/create_workspace_workflow_from_preset_request_spec.rb +42 -0
- data/spec/models/create_workspace_workflow_request_spec.rb +48 -0
- data/spec/models/delete_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/editor_session_spec.rb +1 -1
- data/spec/models/get_public_composition_embed200_response_adapters_captcha_spec.rb +36 -0
- data/spec/models/get_public_composition_embed200_response_adapters_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_entries_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_media_spec.rb +36 -0
- data/spec/models/get_public_composition_embed200_response_spec.rb +18 -0
- data/spec/models/get_public_workflow200_response_spec.rb +48 -0
- data/spec/models/get_workspace_workflow_stats200_response_spec.rb +48 -0
- data/spec/models/get_workspace_workflow_version200_response_spec.rb +48 -0
- data/spec/models/list_partner_workflow_presets200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflow_composition_options200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflow_presets200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflow_versions200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflows200_response_spec.rb +48 -0
- data/spec/models/new_editor_session_spec.rb +1 -1
- data/spec/models/offer_workflow_preset_request_spec.rb +54 -0
- data/spec/models/offered_workflow_preset_list_spec.rb +36 -0
- data/spec/models/offered_workflow_preset_spec.rb +106 -0
- data/spec/models/offered_workflow_preset_widget_spec.rb +48 -0
- data/spec/models/patch_brand_kit_asset_request_spec.rb +62 -0
- data/spec/models/patch_brand_kit_request_fonts_spec.rb +54 -0
- data/spec/models/patch_brand_kit_request_spacing_spec.rb +78 -0
- data/spec/models/patch_brand_kit_request_spec.rb +66 -0
- data/spec/models/post_brand_kit_icon_request_spec.rb +42 -0
- data/spec/models/public_workflow_events_accepted_spec.rb +48 -0
- data/spec/models/public_workflow_events_request_events_inner_spec.rb +52 -0
- data/spec/models/public_workflow_events_request_heights_inner_spec.rb +42 -0
- data/spec/models/public_workflow_events_request_spec.rb +54 -0
- data/spec/models/public_workflow_spec.rb +94 -0
- data/spec/models/public_workflow_translation_spec.rb +42 -0
- data/spec/models/publish_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/publish_workspace_workflow_request_spec.rb +36 -0
- data/spec/models/put_brand_kit_request_spec.rb +48 -0
- data/spec/models/remove_partner_workflow_preset200_response_spec.rb +48 -0
- data/spec/models/report_public_workflow_events200_response_spec.rb +48 -0
- data/spec/models/save_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/save_workspace_workflow_request_spec.rb +54 -0
- data/spec/models/set_partner_workflow_preset200_response_spec.rb +48 -0
- data/spec/models/widget_spec.rb +1 -7
- data/spec/models/workflow_composition_action_spec.rb +54 -0
- data/spec/models/workflow_composition_field_spec.rb +58 -0
- data/spec/models/workflow_composition_option_actions_spec.rb +52 -0
- data/spec/models/workflow_composition_option_inputs_spec.rb +58 -0
- data/spec/models/workflow_composition_option_spec.rb +72 -0
- data/spec/models/workflow_composition_options_spec.rb +54 -0
- data/spec/models/workflow_condition_case_spec.rb +58 -0
- data/spec/models/workflow_condition_test_spec.rb +52 -0
- data/spec/models/workflow_counter_spec.rb +42 -0
- data/spec/models/workflow_detail_all_of_last_edited_by_spec.rb +42 -0
- data/spec/models/workflow_detail_spec.rb +162 -0
- data/spec/models/workflow_edge_spec.rb +54 -0
- data/spec/models/workflow_field_reference_spec.rb +56 -0
- data/spec/models/workflow_graph_spec.rb +52 -0
- data/spec/models/workflow_issue_spec.rb +70 -0
- data/spec/models/workflow_list_spec.rb +54 -0
- data/spec/models/workflow_node_position_spec.rb +42 -0
- data/spec/models/workflow_node_spec.rb +76 -0
- data/spec/models/workflow_preset_choice_spec.rb +60 -0
- data/spec/models/workflow_preset_choices_spec.rb +36 -0
- data/spec/models/workflow_preset_removal_spec.rb +36 -0
- data/spec/models/workflow_preset_widget_spec.rb +42 -0
- data/spec/models/workflow_publish_result_spec.rb +48 -0
- data/spec/models/workflow_removed_spec.rb +36 -0
- data/spec/models/workflow_schedule_spec.rb +62 -0
- data/spec/models/workflow_spec.rb +132 -0
- data/spec/models/workflow_stats_spec.rb +78 -0
- data/spec/models/workflow_status_spec.rb +30 -0
- data/spec/models/workflow_trigger_spec.rb +70 -0
- data/spec/models/workflow_trigger_values_inner_spec.rb +46 -0
- data/spec/models/workflow_version_detail_spec.rb +78 -0
- data/spec/models/workflow_version_list_spec.rb +36 -0
- data/spec/models/workflow_version_published_by_spec.rb +42 -0
- data/spec/models/workflow_version_spec.rb +66 -0
- metadata +364 -12
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Widgetic API Gateway
|
|
3
|
+
|
|
4
|
+
#API documentation for the Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ApiSdkRb
|
|
17
|
+
# A workflow you offer as a place to start, and what became of it. People start from it with their own copy of every widget it chains, a composition of their own on each copy, and a draft workflow wired like its live version.
|
|
18
|
+
class OfferedWorkflowPreset
|
|
19
|
+
# The name your code and the picker use for the starting point.
|
|
20
|
+
attr_accessor :key
|
|
21
|
+
|
|
22
|
+
# The workflow it is made from. What people get is its live version as it is when they start.
|
|
23
|
+
attr_accessor :workflow_id
|
|
24
|
+
|
|
25
|
+
# What the picker shows. Null means show the workflow's name.
|
|
26
|
+
attr_accessor :title
|
|
27
|
+
|
|
28
|
+
attr_accessor :description
|
|
29
|
+
|
|
30
|
+
# The list is ordered by this, smallest first, then by key.
|
|
31
|
+
attr_accessor :position
|
|
32
|
+
|
|
33
|
+
# Whether people can start from it now. A starting point that is not available is not shown to anyone, and says why.
|
|
34
|
+
attr_accessor :available
|
|
35
|
+
|
|
36
|
+
# Why it is not available. `workflow_missing`: the workflow was deleted. `workflow_not_own`: it is no longer a workflow of your own. `workflow_archived`: unarchive it. `workflow_not_published`: it has no live version. `workflow_empty`: it shows no composition. `composition_not_own`: a block shows a composition made for a customer or a team. `too_many_widgets`: it chains more than 10 widgets. `widget_not_preset`: a widget it chains is no longer offered as a preset.
|
|
37
|
+
attr_accessor :unavailable_reason
|
|
38
|
+
|
|
39
|
+
# The workflow's name. Null when the workflow is gone.
|
|
40
|
+
attr_accessor :workflow_name
|
|
41
|
+
|
|
42
|
+
# How many blocks its live version has. Null when it is not available.
|
|
43
|
+
attr_accessor :block_count
|
|
44
|
+
|
|
45
|
+
# The widgets it chains, once each, in the order they first appear. Empty when it is not available.
|
|
46
|
+
attr_accessor :widgets
|
|
47
|
+
|
|
48
|
+
attr_accessor :created_at
|
|
49
|
+
|
|
50
|
+
attr_accessor :updated_at
|
|
51
|
+
|
|
52
|
+
class EnumAttributeValidator
|
|
53
|
+
attr_reader :datatype
|
|
54
|
+
attr_reader :allowable_values
|
|
55
|
+
|
|
56
|
+
def initialize(datatype, allowable_values)
|
|
57
|
+
@allowable_values = allowable_values.map do |value|
|
|
58
|
+
case datatype.to_s
|
|
59
|
+
when /Integer/i
|
|
60
|
+
value.to_i
|
|
61
|
+
when /Float/i
|
|
62
|
+
value.to_f
|
|
63
|
+
else
|
|
64
|
+
value
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def valid?(value)
|
|
70
|
+
!value || allowable_values.include?(value)
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
75
|
+
def self.attribute_map
|
|
76
|
+
{
|
|
77
|
+
:'key' => :'key',
|
|
78
|
+
:'workflow_id' => :'workflowId',
|
|
79
|
+
:'title' => :'title',
|
|
80
|
+
:'description' => :'description',
|
|
81
|
+
:'position' => :'position',
|
|
82
|
+
:'available' => :'available',
|
|
83
|
+
:'unavailable_reason' => :'unavailableReason',
|
|
84
|
+
:'workflow_name' => :'workflowName',
|
|
85
|
+
:'block_count' => :'blockCount',
|
|
86
|
+
:'widgets' => :'widgets',
|
|
87
|
+
:'created_at' => :'createdAt',
|
|
88
|
+
:'updated_at' => :'updatedAt'
|
|
89
|
+
}
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Returns all the JSON keys this model knows about
|
|
93
|
+
def self.acceptable_attributes
|
|
94
|
+
attribute_map.values
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Attribute type mapping.
|
|
98
|
+
def self.openapi_types
|
|
99
|
+
{
|
|
100
|
+
:'key' => :'String',
|
|
101
|
+
:'workflow_id' => :'String',
|
|
102
|
+
:'title' => :'String',
|
|
103
|
+
:'description' => :'String',
|
|
104
|
+
:'position' => :'Integer',
|
|
105
|
+
:'available' => :'Boolean',
|
|
106
|
+
:'unavailable_reason' => :'String',
|
|
107
|
+
:'workflow_name' => :'String',
|
|
108
|
+
:'block_count' => :'Integer',
|
|
109
|
+
:'widgets' => :'Array<OfferedWorkflowPresetWidget>',
|
|
110
|
+
:'created_at' => :'Time',
|
|
111
|
+
:'updated_at' => :'Time'
|
|
112
|
+
}
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# List of attributes with nullable: true
|
|
116
|
+
def self.openapi_nullable
|
|
117
|
+
Set.new([
|
|
118
|
+
:'title',
|
|
119
|
+
:'description',
|
|
120
|
+
:'unavailable_reason',
|
|
121
|
+
:'workflow_name',
|
|
122
|
+
:'block_count',
|
|
123
|
+
])
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Initializes the object
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
def initialize(attributes = {})
|
|
129
|
+
if (!attributes.is_a?(Hash))
|
|
130
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::OfferedWorkflowPreset` initialize method"
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
134
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
135
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
136
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::OfferedWorkflowPreset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
137
|
+
end
|
|
138
|
+
h[k.to_sym] = v
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'key')
|
|
142
|
+
self.key = attributes[:'key']
|
|
143
|
+
else
|
|
144
|
+
self.key = nil
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'workflow_id')
|
|
148
|
+
self.workflow_id = attributes[:'workflow_id']
|
|
149
|
+
else
|
|
150
|
+
self.workflow_id = nil
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'title')
|
|
154
|
+
self.title = attributes[:'title']
|
|
155
|
+
else
|
|
156
|
+
self.title = nil
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'description')
|
|
160
|
+
self.description = attributes[:'description']
|
|
161
|
+
else
|
|
162
|
+
self.description = nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'position')
|
|
166
|
+
self.position = attributes[:'position']
|
|
167
|
+
else
|
|
168
|
+
self.position = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'available')
|
|
172
|
+
self.available = attributes[:'available']
|
|
173
|
+
else
|
|
174
|
+
self.available = nil
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'unavailable_reason')
|
|
178
|
+
self.unavailable_reason = attributes[:'unavailable_reason']
|
|
179
|
+
else
|
|
180
|
+
self.unavailable_reason = nil
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'workflow_name')
|
|
184
|
+
self.workflow_name = attributes[:'workflow_name']
|
|
185
|
+
else
|
|
186
|
+
self.workflow_name = nil
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'block_count')
|
|
190
|
+
self.block_count = attributes[:'block_count']
|
|
191
|
+
else
|
|
192
|
+
self.block_count = nil
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'widgets')
|
|
196
|
+
if (value = attributes[:'widgets']).is_a?(Array)
|
|
197
|
+
self.widgets = value
|
|
198
|
+
end
|
|
199
|
+
else
|
|
200
|
+
self.widgets = nil
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'created_at')
|
|
204
|
+
self.created_at = attributes[:'created_at']
|
|
205
|
+
else
|
|
206
|
+
self.created_at = nil
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if attributes.key?(:'updated_at')
|
|
210
|
+
self.updated_at = attributes[:'updated_at']
|
|
211
|
+
else
|
|
212
|
+
self.updated_at = nil
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
217
|
+
# @return Array for valid properties with the reasons
|
|
218
|
+
def list_invalid_properties
|
|
219
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
220
|
+
invalid_properties = Array.new
|
|
221
|
+
if @key.nil?
|
|
222
|
+
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if @workflow_id.nil?
|
|
226
|
+
invalid_properties.push('invalid value for "workflow_id", workflow_id cannot be nil.')
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if @position.nil?
|
|
230
|
+
invalid_properties.push('invalid value for "position", position cannot be nil.')
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if @available.nil?
|
|
234
|
+
invalid_properties.push('invalid value for "available", available cannot be nil.')
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if @widgets.nil?
|
|
238
|
+
invalid_properties.push('invalid value for "widgets", widgets cannot be nil.')
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if @created_at.nil?
|
|
242
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
if @updated_at.nil?
|
|
246
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
invalid_properties
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Check to see if the all the properties in the model are valid
|
|
253
|
+
# @return true if the model is valid
|
|
254
|
+
def valid?
|
|
255
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
256
|
+
return false if @key.nil?
|
|
257
|
+
return false if @workflow_id.nil?
|
|
258
|
+
return false if @position.nil?
|
|
259
|
+
return false if @available.nil?
|
|
260
|
+
unavailable_reason_validator = EnumAttributeValidator.new('String', ["workflow_missing", "workflow_not_own", "workflow_archived", "workflow_not_published", "workflow_empty", "composition_not_own", "too_many_widgets", "widget_not_preset"])
|
|
261
|
+
return false unless unavailable_reason_validator.valid?(@unavailable_reason)
|
|
262
|
+
return false if @widgets.nil?
|
|
263
|
+
return false if @created_at.nil?
|
|
264
|
+
return false if @updated_at.nil?
|
|
265
|
+
true
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
269
|
+
# @param [Object] unavailable_reason Object to be assigned
|
|
270
|
+
def unavailable_reason=(unavailable_reason)
|
|
271
|
+
validator = EnumAttributeValidator.new('String', ["workflow_missing", "workflow_not_own", "workflow_archived", "workflow_not_published", "workflow_empty", "composition_not_own", "too_many_widgets", "widget_not_preset"])
|
|
272
|
+
unless validator.valid?(unavailable_reason)
|
|
273
|
+
fail ArgumentError, "invalid value for \"unavailable_reason\", must be one of #{validator.allowable_values}."
|
|
274
|
+
end
|
|
275
|
+
@unavailable_reason = unavailable_reason
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Checks equality by comparing each attribute.
|
|
279
|
+
# @param [Object] Object to be compared
|
|
280
|
+
def ==(o)
|
|
281
|
+
return true if self.equal?(o)
|
|
282
|
+
self.class == o.class &&
|
|
283
|
+
key == o.key &&
|
|
284
|
+
workflow_id == o.workflow_id &&
|
|
285
|
+
title == o.title &&
|
|
286
|
+
description == o.description &&
|
|
287
|
+
position == o.position &&
|
|
288
|
+
available == o.available &&
|
|
289
|
+
unavailable_reason == o.unavailable_reason &&
|
|
290
|
+
workflow_name == o.workflow_name &&
|
|
291
|
+
block_count == o.block_count &&
|
|
292
|
+
widgets == o.widgets &&
|
|
293
|
+
created_at == o.created_at &&
|
|
294
|
+
updated_at == o.updated_at
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# @see the `==` method
|
|
298
|
+
# @param [Object] Object to be compared
|
|
299
|
+
def eql?(o)
|
|
300
|
+
self == o
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Calculates hash code according to all attributes.
|
|
304
|
+
# @return [Integer] Hash code
|
|
305
|
+
def hash
|
|
306
|
+
[key, workflow_id, title, description, position, available, unavailable_reason, workflow_name, block_count, widgets, created_at, updated_at].hash
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Builds the object from hash
|
|
310
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
311
|
+
# @return [Object] Returns the model itself
|
|
312
|
+
def self.build_from_hash(attributes)
|
|
313
|
+
return nil unless attributes.is_a?(Hash)
|
|
314
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
315
|
+
transformed_hash = {}
|
|
316
|
+
openapi_types.each_pair do |key, type|
|
|
317
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
318
|
+
transformed_hash["#{key}"] = nil
|
|
319
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
320
|
+
# check to ensure the input is an array given that the attribute
|
|
321
|
+
# is documented as an array but the input is not
|
|
322
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
323
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
324
|
+
end
|
|
325
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
326
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
327
|
+
end
|
|
328
|
+
end
|
|
329
|
+
new(transformed_hash)
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
# Deserializes the data based on type
|
|
333
|
+
# @param string type Data type
|
|
334
|
+
# @param string value Value to be deserialized
|
|
335
|
+
# @return [Object] Deserialized data
|
|
336
|
+
def self._deserialize(type, value)
|
|
337
|
+
case type.to_sym
|
|
338
|
+
when :Time
|
|
339
|
+
Time.parse(value)
|
|
340
|
+
when :Date
|
|
341
|
+
Date.parse(value)
|
|
342
|
+
when :String
|
|
343
|
+
value.to_s
|
|
344
|
+
when :Integer
|
|
345
|
+
value.to_i
|
|
346
|
+
when :Float
|
|
347
|
+
value.to_f
|
|
348
|
+
when :Boolean
|
|
349
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
350
|
+
true
|
|
351
|
+
else
|
|
352
|
+
false
|
|
353
|
+
end
|
|
354
|
+
when :Object
|
|
355
|
+
# generic object (usually a Hash), return directly
|
|
356
|
+
value
|
|
357
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
358
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
359
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
360
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
361
|
+
k_type = Regexp.last_match[:k_type]
|
|
362
|
+
v_type = Regexp.last_match[:v_type]
|
|
363
|
+
{}.tap do |hash|
|
|
364
|
+
value.each do |k, v|
|
|
365
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
366
|
+
end
|
|
367
|
+
end
|
|
368
|
+
else # model
|
|
369
|
+
# models (e.g. Pet) or oneOf
|
|
370
|
+
klass = ApiSdkRb.const_get(type)
|
|
371
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
372
|
+
end
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Returns the string representation of the object
|
|
376
|
+
# @return [String] String presentation of the object
|
|
377
|
+
def to_s
|
|
378
|
+
to_hash.to_s
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
382
|
+
# @return [Hash] Returns the object in the form of hash
|
|
383
|
+
def to_body
|
|
384
|
+
to_hash
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# Returns the object in the form of hash
|
|
388
|
+
# @return [Hash] Returns the object in the form of hash
|
|
389
|
+
def to_hash
|
|
390
|
+
hash = {}
|
|
391
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
392
|
+
value = self.send(attr)
|
|
393
|
+
if value.nil?
|
|
394
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
395
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
hash[param] = _to_hash(value)
|
|
399
|
+
end
|
|
400
|
+
hash
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# Outputs non-array value in the form of hash
|
|
404
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
405
|
+
# @param [Object] value Any valid value
|
|
406
|
+
# @return [Hash] Returns the value in the form of hash
|
|
407
|
+
def _to_hash(value)
|
|
408
|
+
if value.is_a?(Array)
|
|
409
|
+
value.compact.map { |v| _to_hash(v) }
|
|
410
|
+
elsif value.is_a?(Hash)
|
|
411
|
+
{}.tap do |hash|
|
|
412
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
413
|
+
end
|
|
414
|
+
elsif value.respond_to? :to_hash
|
|
415
|
+
value.to_hash
|
|
416
|
+
else
|
|
417
|
+
value
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
end
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Widgetic API Gateway
|
|
3
|
+
|
|
4
|
+
#API documentation for the Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ApiSdkRb
|
|
17
|
+
class OfferedWorkflowPresetList
|
|
18
|
+
attr_accessor :items
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'items' => :'items'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns all the JSON keys this model knows about
|
|
28
|
+
def self.acceptable_attributes
|
|
29
|
+
attribute_map.values
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Attribute type mapping.
|
|
33
|
+
def self.openapi_types
|
|
34
|
+
{
|
|
35
|
+
:'items' => :'Array<OfferedWorkflowPreset>'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# List of attributes with nullable: true
|
|
40
|
+
def self.openapi_nullable
|
|
41
|
+
Set.new([
|
|
42
|
+
])
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Initializes the object
|
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
|
+
def initialize(attributes = {})
|
|
48
|
+
if (!attributes.is_a?(Hash))
|
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::OfferedWorkflowPresetList` initialize method"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::OfferedWorkflowPresetList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
56
|
+
end
|
|
57
|
+
h[k.to_sym] = v
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if attributes.key?(:'items')
|
|
61
|
+
if (value = attributes[:'items']).is_a?(Array)
|
|
62
|
+
self.items = value
|
|
63
|
+
end
|
|
64
|
+
else
|
|
65
|
+
self.items = nil
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
70
|
+
# @return Array for valid properties with the reasons
|
|
71
|
+
def list_invalid_properties
|
|
72
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
73
|
+
invalid_properties = Array.new
|
|
74
|
+
if @items.nil?
|
|
75
|
+
invalid_properties.push('invalid value for "items", items cannot be nil.')
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
invalid_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
def valid?
|
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
85
|
+
return false if @items.nil?
|
|
86
|
+
true
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Checks equality by comparing each attribute.
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def ==(o)
|
|
92
|
+
return true if self.equal?(o)
|
|
93
|
+
self.class == o.class &&
|
|
94
|
+
items == o.items
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[items].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
return nil unless attributes.is_a?(Hash)
|
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
115
|
+
transformed_hash = {}
|
|
116
|
+
openapi_types.each_pair do |key, type|
|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
118
|
+
transformed_hash["#{key}"] = nil
|
|
119
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
120
|
+
# check to ensure the input is an array given that the attribute
|
|
121
|
+
# is documented as an array but the input is not
|
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
124
|
+
end
|
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
new(transformed_hash)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Deserializes the data based on type
|
|
133
|
+
# @param string type Data type
|
|
134
|
+
# @param string value Value to be deserialized
|
|
135
|
+
# @return [Object] Deserialized data
|
|
136
|
+
def self._deserialize(type, value)
|
|
137
|
+
case type.to_sym
|
|
138
|
+
when :Time
|
|
139
|
+
Time.parse(value)
|
|
140
|
+
when :Date
|
|
141
|
+
Date.parse(value)
|
|
142
|
+
when :String
|
|
143
|
+
value.to_s
|
|
144
|
+
when :Integer
|
|
145
|
+
value.to_i
|
|
146
|
+
when :Float
|
|
147
|
+
value.to_f
|
|
148
|
+
when :Boolean
|
|
149
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
150
|
+
true
|
|
151
|
+
else
|
|
152
|
+
false
|
|
153
|
+
end
|
|
154
|
+
when :Object
|
|
155
|
+
# generic object (usually a Hash), return directly
|
|
156
|
+
value
|
|
157
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
158
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
159
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
160
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
161
|
+
k_type = Regexp.last_match[:k_type]
|
|
162
|
+
v_type = Regexp.last_match[:v_type]
|
|
163
|
+
{}.tap do |hash|
|
|
164
|
+
value.each do |k, v|
|
|
165
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
else # model
|
|
169
|
+
# models (e.g. Pet) or oneOf
|
|
170
|
+
klass = ApiSdkRb.const_get(type)
|
|
171
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Returns the string representation of the object
|
|
176
|
+
# @return [String] String presentation of the object
|
|
177
|
+
def to_s
|
|
178
|
+
to_hash.to_s
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
|
183
|
+
def to_body
|
|
184
|
+
to_hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Returns the object in the form of hash
|
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
|
189
|
+
def to_hash
|
|
190
|
+
hash = {}
|
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
192
|
+
value = self.send(attr)
|
|
193
|
+
if value.nil?
|
|
194
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
hash[param] = _to_hash(value)
|
|
199
|
+
end
|
|
200
|
+
hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Outputs non-array value in the form of hash
|
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
205
|
+
# @param [Object] value Any valid value
|
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
|
207
|
+
def _to_hash(value)
|
|
208
|
+
if value.is_a?(Array)
|
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
|
210
|
+
elsif value.is_a?(Hash)
|
|
211
|
+
{}.tap do |hash|
|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
213
|
+
end
|
|
214
|
+
elsif value.respond_to? :to_hash
|
|
215
|
+
value.to_hash
|
|
216
|
+
else
|
|
217
|
+
value
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
end
|