ragie_ruby_sdk 1.0.1
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 +7 -0
- data/Gemfile +9 -0
- data/README.md +291 -0
- data/Rakefile +10 -0
- data/docs/AccessTokenCredentials.md +18 -0
- data/docs/AsyncDocumentMetadataUpdate.md +18 -0
- data/docs/AudioModalityData.md +20 -0
- data/docs/AuthenticatorConfluenceConnection.md +22 -0
- data/docs/AuthenticatorDropboxConnection.md +24 -0
- data/docs/AuthenticatorGmailConnection.md +24 -0
- data/docs/AuthenticatorGoogleDriveConnection.md +24 -0
- data/docs/AuthenticatorHubspotConnection.md +26 -0
- data/docs/AuthenticatorJiraConnection.md +20 -0
- data/docs/AuthenticatorList.md +20 -0
- data/docs/AuthenticatorNotionConnection.md +26 -0
- data/docs/AuthenticatorOnedriveConnection.md +24 -0
- data/docs/AuthenticatorSalesforceConnection.md +24 -0
- data/docs/AuthenticatorSharepointConnection.md +24 -0
- data/docs/AuthenticatorSlackConnection.md +24 -0
- data/docs/AuthenticatorsApi.md +293 -0
- data/docs/BackblazeCredentials.md +24 -0
- data/docs/BaseGetAuthenticator.md +22 -0
- data/docs/BetaApi.md +363 -0
- data/docs/Body.md +22 -0
- data/docs/BodyCreateDocument.md +28 -0
- data/docs/BodyUpdateDocumentFile.md +20 -0
- data/docs/BucketData.md +22 -0
- data/docs/ConfluenceData.md +24 -0
- data/docs/Connection.md +44 -0
- data/docs/Connection1.md +106 -0
- data/docs/Connection2.md +91 -0
- data/docs/ConnectionBase.md +22 -0
- data/docs/ConnectionLimitExceededWebhook.md +22 -0
- data/docs/ConnectionLimitExceededWebhookPayload.md +24 -0
- data/docs/ConnectionLimitParams.md +18 -0
- data/docs/ConnectionList.md +20 -0
- data/docs/ConnectionStats.md +20 -0
- data/docs/ConnectionSyncFinishedWebhook.md +22 -0
- data/docs/ConnectionSyncFinishedWebhookPayload.md +24 -0
- data/docs/ConnectionSyncProgressWebhook.md +22 -0
- data/docs/ConnectionSyncProgressWebhookPayload.md +42 -0
- data/docs/ConnectionSyncStartedWebhook.md +22 -0
- data/docs/ConnectionSyncStartedWebhookPayload.md +32 -0
- data/docs/ConnectionsApi.md +790 -0
- data/docs/ConnectorSource.md +15 -0
- data/docs/ConnectorSourceTypeInfo.md +24 -0
- data/docs/CreateAuthenticatorConnection.md +28 -0
- data/docs/CreateDocumentFromUrlParams.md +28 -0
- data/docs/CreateDocumentRawParams.md +26 -0
- data/docs/CreateGoogleAuthenticator.md +28 -0
- data/docs/CreateInstructionParams.md +30 -0
- data/docs/CreatePartitionParams.md +42 -0
- data/docs/Data.md +15 -0
- data/docs/DefaultApi.md +77 -0
- data/docs/DeleteConnectionPayload.md +18 -0
- data/docs/Document.md +36 -0
- data/docs/DocumentChunk.md +26 -0
- data/docs/DocumentChunkDetail.md +28 -0
- data/docs/DocumentChunkDetailModalityData.md +79 -0
- data/docs/DocumentChunkList.md +20 -0
- data/docs/DocumentDelete.md +18 -0
- data/docs/DocumentDeleteWebhook.md +22 -0
- data/docs/DocumentDeleteWebhookPayload.md +30 -0
- data/docs/DocumentFileUpdate.md +18 -0
- data/docs/DocumentGet.md +38 -0
- data/docs/DocumentList.md +20 -0
- data/docs/DocumentMetadataUpdate.md +18 -0
- data/docs/DocumentRawUpdate.md +18 -0
- data/docs/DocumentSummary.md +20 -0
- data/docs/DocumentUpdateWebhook.md +22 -0
- data/docs/DocumentUpdateWebhookPayload.md +34 -0
- data/docs/DocumentUrlUpdate.md +18 -0
- data/docs/DocumentWithContent.md +38 -0
- data/docs/DocumentsApi.md +1221 -0
- data/docs/EnterpriseApi.md +363 -0
- data/docs/EntitiesApi.md +436 -0
- data/docs/Entity.md +30 -0
- data/docs/EntityExtractedWebhook.md +22 -0
- data/docs/EntityExtractedWebhookPayload.md +34 -0
- data/docs/EntityList.md +20 -0
- data/docs/ErrorMessage.md +18 -0
- data/docs/FolderData.md +20 -0
- data/docs/FreshdeskCredentials.md +20 -0
- data/docs/FreshdeskData.md +20 -0
- data/docs/GmailData.md +18 -0
- data/docs/GoogleFolderData.md +22 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HubspotData.md +30 -0
- data/docs/Instruction.md +36 -0
- data/docs/IntercomCredentials.md +22 -0
- data/docs/IntercomData.md +28 -0
- data/docs/Link.md +20 -0
- data/docs/ListConnectorSourceTypeInfo.md +18 -0
- data/docs/MediaModeParam.md +22 -0
- data/docs/MediaType.md +15 -0
- data/docs/MetadataValue.md +15 -0
- data/docs/MetadataValue1.md +53 -0
- data/docs/Mode.md +22 -0
- data/docs/Mode1.md +22 -0
- data/docs/Mode2.md +49 -0
- data/docs/Mode2OneOf.md +22 -0
- data/docs/OAuthCredentials.md +26 -0
- data/docs/OAuthRefreshTokenCredentials.md +18 -0
- data/docs/OAuthUrlCreate.md +34 -0
- data/docs/OAuthUrlResponse.md +18 -0
- data/docs/OnedriveData.md +22 -0
- data/docs/Pagination.md +20 -0
- data/docs/Partition.md +24 -0
- data/docs/PartitionDetail.md +26 -0
- data/docs/PartitionLimitExceededWebhook.md +22 -0
- data/docs/PartitionLimitExceededWebhookPayload.md +20 -0
- data/docs/PartitionLimitParams.md +40 -0
- data/docs/PartitionLimitResetWebhook.md +22 -0
- data/docs/PartitionLimitResetWebhookPayload.md +18 -0
- data/docs/PartitionLimits.md +40 -0
- data/docs/PartitionList.md +20 -0
- data/docs/PartitionStats.md +42 -0
- data/docs/PartitionStrategy.md +22 -0
- data/docs/PartitionsApi.md +363 -0
- data/docs/PatchDocumentMetadataParams.md +20 -0
- data/docs/Payload.md +84 -0
- data/docs/PublicBackblazeConnection.md +22 -0
- data/docs/PublicCreateConnection.md +28 -0
- data/docs/PublicFreshdeskConnection.md +24 -0
- data/docs/PublicGCSConnection.md +22 -0
- data/docs/PublicIntercomConnection.md +22 -0
- data/docs/PublicS3CompatibleConnection.md +22 -0
- data/docs/PublicZendeskConnection.md +22 -0
- data/docs/ResponseOK.md +18 -0
- data/docs/ResponsePatchdocumentmetadata.md +20 -0
- data/docs/Retrieval.md +18 -0
- data/docs/RetrievalsApi.md +75 -0
- data/docs/RetrieveParams.md +30 -0
- data/docs/S3CompatibleCredentials.md +24 -0
- data/docs/ScoredChunk.md +34 -0
- data/docs/SetConnectionEnabledPayload.md +20 -0
- data/docs/SharepointData.md +20 -0
- data/docs/SharepointFileData.md +22 -0
- data/docs/SharepointSiteData.md +20 -0
- data/docs/SlackData.md +20 -0
- data/docs/Source.md +15 -0
- data/docs/Status.md +15 -0
- data/docs/UpdateDocumentFromUrlParams.md +20 -0
- data/docs/UpdateDocumentRawParams.md +18 -0
- data/docs/UpdateInstructionParams.md +18 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/VideoModalityData.md +20 -0
- data/docs/WordTimestamp.md +24 -0
- data/docs/ZendeskCredentials.md +22 -0
- data/docs/ZendeskData.md +18 -0
- data/git_push.sh +57 -0
- data/lib/ragie_ruby_sdk/api/authenticators_api.rb +298 -0
- data/lib/ragie_ruby_sdk/api/beta_api.rb +366 -0
- data/lib/ragie_ruby_sdk/api/connections_api.rb +777 -0
- data/lib/ragie_ruby_sdk/api/default_api.rb +90 -0
- data/lib/ragie_ruby_sdk/api/documents_api.rb +1206 -0
- data/lib/ragie_ruby_sdk/api/enterprise_api.rb +366 -0
- data/lib/ragie_ruby_sdk/api/entities_api.rb +438 -0
- data/lib/ragie_ruby_sdk/api/partitions_api.rb +361 -0
- data/lib/ragie_ruby_sdk/api/retrievals_api.rb +88 -0
- data/lib/ragie_ruby_sdk/api_client.rb +393 -0
- data/lib/ragie_ruby_sdk/api_error.rb +58 -0
- data/lib/ragie_ruby_sdk/configuration.rb +308 -0
- data/lib/ragie_ruby_sdk/models/access_token_credentials.rb +237 -0
- data/lib/ragie_ruby_sdk/models/async_document_metadata_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/audio_modality_data.rb +267 -0
- data/lib/ragie_ruby_sdk/models/authenticator_confluence_connection.rb +315 -0
- data/lib/ragie_ruby_sdk/models/authenticator_dropbox_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_gmail_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_google_drive_connection.rb +342 -0
- data/lib/ragie_ruby_sdk/models/authenticator_hubspot_connection.rb +365 -0
- data/lib/ragie_ruby_sdk/models/authenticator_jira_connection.rb +287 -0
- data/lib/ragie_ruby_sdk/models/authenticator_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/authenticator_notion_connection.rb +366 -0
- data/lib/ragie_ruby_sdk/models/authenticator_onedrive_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_salesforce_connection.rb +341 -0
- data/lib/ragie_ruby_sdk/models/authenticator_sharepoint_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_slack_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/backblaze_credentials.rb +315 -0
- data/lib/ragie_ruby_sdk/models/base_get_authenticator.rb +290 -0
- data/lib/ragie_ruby_sdk/models/body.rb +111 -0
- data/lib/ragie_ruby_sdk/models/body_create_document.rb +292 -0
- data/lib/ragie_ruby_sdk/models/body_update_document_file.rb +250 -0
- data/lib/ragie_ruby_sdk/models/bucket_data.rb +258 -0
- data/lib/ragie_ruby_sdk/models/confluence_data.rb +315 -0
- data/lib/ragie_ruby_sdk/models/connection.rb +521 -0
- data/lib/ragie_ruby_sdk/models/connection1.rb +73 -0
- data/lib/ragie_ruby_sdk/models/connection2.rb +63 -0
- data/lib/ragie_ruby_sdk/models/connection_base.rb +274 -0
- data/lib/ragie_ruby_sdk/models/connection_limit_exceeded_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_limit_exceeded_webhook_payload.rb +327 -0
- data/lib/ragie_ruby_sdk/models/connection_limit_params.rb +236 -0
- data/lib/ragie_ruby_sdk/models/connection_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/connection_stats.rb +263 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_finished_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_finished_webhook_payload.rb +317 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_progress_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_progress_webhook_payload.rb +551 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_started_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_started_webhook_payload.rb +421 -0
- data/lib/ragie_ruby_sdk/models/connector_source.rb +55 -0
- data/lib/ragie_ruby_sdk/models/connector_source_type_info.rb +337 -0
- data/lib/ragie_ruby_sdk/models/create_authenticator_connection.rb +307 -0
- data/lib/ragie_ruby_sdk/models/create_document_from_url_params.rb +306 -0
- data/lib/ragie_ruby_sdk/models/create_document_raw_params.rb +279 -0
- data/lib/ragie_ruby_sdk/models/create_google_authenticator.rb +360 -0
- data/lib/ragie_ruby_sdk/models/create_instruction_params.rb +373 -0
- data/lib/ragie_ruby_sdk/models/create_partition_params.rb +537 -0
- data/lib/ragie_ruby_sdk/models/data.rb +105 -0
- data/lib/ragie_ruby_sdk/models/delete_connection_payload.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document.rb +425 -0
- data/lib/ragie_ruby_sdk/models/document_chunk.rb +313 -0
- data/lib/ragie_ruby_sdk/models/document_chunk_detail.rb +323 -0
- data/lib/ragie_ruby_sdk/models/document_chunk_detail_modality_data.rb +55 -0
- data/lib/ragie_ruby_sdk/models/document_chunk_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/document_delete.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_delete_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/document_delete_webhook_payload.rb +353 -0
- data/lib/ragie_ruby_sdk/models/document_file_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_get.rb +453 -0
- data/lib/ragie_ruby_sdk/models/document_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/document_metadata_update.rb +240 -0
- data/lib/ragie_ruby_sdk/models/document_raw_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_summary.rb +263 -0
- data/lib/ragie_ruby_sdk/models/document_update_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/document_update_webhook_payload.rb +391 -0
- data/lib/ragie_ruby_sdk/models/document_url_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_with_content.rb +451 -0
- data/lib/ragie_ruby_sdk/models/entity.rb +381 -0
- data/lib/ragie_ruby_sdk/models/entity_extracted_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/entity_extracted_webhook_payload.rb +421 -0
- data/lib/ragie_ruby_sdk/models/entity_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/error_message.rb +237 -0
- data/lib/ragie_ruby_sdk/models/folder_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/freshdesk_credentials.rb +263 -0
- data/lib/ragie_ruby_sdk/models/freshdesk_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/gmail_data.rb +221 -0
- data/lib/ragie_ruby_sdk/models/google_folder_data.rb +289 -0
- data/lib/ragie_ruby_sdk/models/http_validation_error.rb +222 -0
- data/lib/ragie_ruby_sdk/models/hubspot_data.rb +393 -0
- data/lib/ragie_ruby_sdk/models/instruction.rb +451 -0
- data/lib/ragie_ruby_sdk/models/intercom_credentials.rb +290 -0
- data/lib/ragie_ruby_sdk/models/intercom_data.rb +367 -0
- data/lib/ragie_ruby_sdk/models/link.rb +263 -0
- data/lib/ragie_ruby_sdk/models/list_connector_source_type_info.rb +239 -0
- data/lib/ragie_ruby_sdk/models/media_mode_param.rb +287 -0
- data/lib/ragie_ruby_sdk/models/media_type.rb +104 -0
- data/lib/ragie_ruby_sdk/models/metadata_value.rb +106 -0
- data/lib/ragie_ruby_sdk/models/metadata_value1.rb +107 -0
- data/lib/ragie_ruby_sdk/models/mode.rb +105 -0
- data/lib/ragie_ruby_sdk/models/mode1.rb +104 -0
- data/lib/ragie_ruby_sdk/models/mode2.rb +106 -0
- data/lib/ragie_ruby_sdk/models/mode2_one_of.rb +287 -0
- data/lib/ragie_ruby_sdk/models/o_auth_credentials.rb +350 -0
- data/lib/ragie_ruby_sdk/models/o_auth_refresh_token_credentials.rb +237 -0
- data/lib/ragie_ruby_sdk/models/o_auth_url_create.rb +370 -0
- data/lib/ragie_ruby_sdk/models/o_auth_url_response.rb +237 -0
- data/lib/ragie_ruby_sdk/models/onedrive_data.rb +289 -0
- data/lib/ragie_ruby_sdk/models/pagination.rb +247 -0
- data/lib/ragie_ruby_sdk/models/partition.rb +299 -0
- data/lib/ragie_ruby_sdk/models/partition_detail.rb +325 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_exceeded_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_exceeded_webhook_payload.rb +287 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_params.rb +511 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_reset_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_reset_webhook_payload.rb +237 -0
- data/lib/ragie_ruby_sdk/models/partition_limits.rb +511 -0
- data/lib/ragie_ruby_sdk/models/partition_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/partition_stats.rb +562 -0
- data/lib/ragie_ruby_sdk/models/partition_strategy.rb +104 -0
- data/lib/ragie_ruby_sdk/models/patch_document_metadata_params.rb +252 -0
- data/lib/ragie_ruby_sdk/models/payload.rb +60 -0
- data/lib/ragie_ruby_sdk/models/public_backblaze_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/public_create_connection.rb +307 -0
- data/lib/ragie_ruby_sdk/models/public_freshdesk_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/public_gcs_connection.rb +315 -0
- data/lib/ragie_ruby_sdk/models/public_intercom_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/public_s3_compatible_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/public_zendesk_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/response_ok.rb +222 -0
- data/lib/ragie_ruby_sdk/models/response_patchdocumentmetadata.rb +104 -0
- data/lib/ragie_ruby_sdk/models/retrieval.rb +239 -0
- data/lib/ragie_ruby_sdk/models/retrieve_params.rb +305 -0
- data/lib/ragie_ruby_sdk/models/s3_compatible_credentials.rb +299 -0
- data/lib/ragie_ruby_sdk/models/scored_chunk.rb +434 -0
- data/lib/ragie_ruby_sdk/models/set_connection_enabled_payload.rb +281 -0
- data/lib/ragie_ruby_sdk/models/sharepoint_data.rb +265 -0
- data/lib/ragie_ruby_sdk/models/sharepoint_file_data.rb +313 -0
- data/lib/ragie_ruby_sdk/models/sharepoint_site_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/slack_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/source.rb +105 -0
- data/lib/ragie_ruby_sdk/models/status.rb +103 -0
- data/lib/ragie_ruby_sdk/models/update_document_from_url_params.rb +247 -0
- data/lib/ragie_ruby_sdk/models/update_document_raw_params.rb +237 -0
- data/lib/ragie_ruby_sdk/models/update_instruction_params.rb +238 -0
- data/lib/ragie_ruby_sdk/models/validation_error.rb +291 -0
- data/lib/ragie_ruby_sdk/models/validation_error_loc_inner.rb +104 -0
- data/lib/ragie_ruby_sdk/models/video_modality_data.rb +267 -0
- data/lib/ragie_ruby_sdk/models/word_timestamp.rb +315 -0
- data/lib/ragie_ruby_sdk/models/zendesk_credentials.rb +289 -0
- data/lib/ragie_ruby_sdk/models/zendesk_data.rb +237 -0
- data/lib/ragie_ruby_sdk/version.rb +15 -0
- data/lib/ragie_ruby_sdk.rb +185 -0
- data/ragie_ruby_sdk.gemspec +39 -0
- data/spec/api/authenticators_api_spec.rb +85 -0
- data/spec/api/beta_api_spec.rb +97 -0
- data/spec/api/connections_api_spec.rb +173 -0
- data/spec/api/default_api_spec.rb +47 -0
- data/spec/api/documents_api_spec.rb +260 -0
- data/spec/api/enterprise_api_spec.rb +97 -0
- data/spec/api/entities_api_spec.rb +110 -0
- data/spec/api/partitions_api_spec.rb +97 -0
- data/spec/api/retrievals_api_spec.rb +46 -0
- data/spec/models/access_token_credentials_spec.rb +36 -0
- data/spec/models/async_document_metadata_update_spec.rb +36 -0
- data/spec/models/audio_modality_data_spec.rb +46 -0
- data/spec/models/authenticator_confluence_connection_spec.rb +52 -0
- data/spec/models/authenticator_dropbox_connection_spec.rb +58 -0
- data/spec/models/authenticator_gmail_connection_spec.rb +58 -0
- data/spec/models/authenticator_google_drive_connection_spec.rb +58 -0
- data/spec/models/authenticator_hubspot_connection_spec.rb +64 -0
- data/spec/models/authenticator_jira_connection_spec.rb +46 -0
- data/spec/models/authenticator_list_spec.rb +42 -0
- data/spec/models/authenticator_notion_connection_spec.rb +64 -0
- data/spec/models/authenticator_onedrive_connection_spec.rb +58 -0
- data/spec/models/authenticator_salesforce_connection_spec.rb +58 -0
- data/spec/models/authenticator_sharepoint_connection_spec.rb +58 -0
- data/spec/models/authenticator_slack_connection_spec.rb +58 -0
- data/spec/models/backblaze_credentials_spec.rb +54 -0
- data/spec/models/base_get_authenticator_spec.rb +48 -0
- data/spec/models/body_create_document_spec.rb +66 -0
- data/spec/models/body_spec.rb +21 -0
- data/spec/models/body_update_document_file_spec.rb +42 -0
- data/spec/models/bucket_data_spec.rb +48 -0
- data/spec/models/confluence_data_spec.rb +54 -0
- data/spec/models/connection1_spec.rb +44 -0
- data/spec/models/connection2_spec.rb +44 -0
- data/spec/models/connection_base_spec.rb +48 -0
- data/spec/models/connection_limit_exceeded_webhook_payload_spec.rb +58 -0
- data/spec/models/connection_limit_exceeded_webhook_spec.rb +52 -0
- data/spec/models/connection_limit_params_spec.rb +36 -0
- data/spec/models/connection_list_spec.rb +42 -0
- data/spec/models/connection_spec.rb +118 -0
- data/spec/models/connection_stats_spec.rb +42 -0
- data/spec/models/connection_sync_finished_webhook_payload_spec.rb +54 -0
- data/spec/models/connection_sync_finished_webhook_spec.rb +52 -0
- data/spec/models/connection_sync_progress_webhook_payload_spec.rb +108 -0
- data/spec/models/connection_sync_progress_webhook_spec.rb +52 -0
- data/spec/models/connection_sync_started_webhook_payload_spec.rb +78 -0
- data/spec/models/connection_sync_started_webhook_spec.rb +52 -0
- data/spec/models/connector_source_spec.rb +30 -0
- data/spec/models/connector_source_type_info_spec.rb +54 -0
- data/spec/models/create_authenticator_connection_spec.rb +66 -0
- data/spec/models/create_document_from_url_params_spec.rb +66 -0
- data/spec/models/create_document_raw_params_spec.rb +60 -0
- data/spec/models/create_google_authenticator_spec.rb +70 -0
- data/spec/models/create_instruction_params_spec.rb +76 -0
- data/spec/models/create_partition_params_spec.rb +108 -0
- data/spec/models/data_spec.rb +21 -0
- data/spec/models/delete_connection_payload_spec.rb +36 -0
- data/spec/models/document_chunk_detail_modality_data_spec.rb +44 -0
- data/spec/models/document_chunk_detail_spec.rb +66 -0
- data/spec/models/document_chunk_list_spec.rb +42 -0
- data/spec/models/document_chunk_spec.rb +60 -0
- data/spec/models/document_delete_spec.rb +36 -0
- data/spec/models/document_delete_webhook_payload_spec.rb +72 -0
- data/spec/models/document_delete_webhook_spec.rb +52 -0
- data/spec/models/document_file_update_spec.rb +36 -0
- data/spec/models/document_get_spec.rb +96 -0
- data/spec/models/document_list_spec.rb +42 -0
- data/spec/models/document_metadata_update_spec.rb +36 -0
- data/spec/models/document_raw_update_spec.rb +36 -0
- data/spec/models/document_spec.rb +90 -0
- data/spec/models/document_summary_spec.rb +42 -0
- data/spec/models/document_update_webhook_payload_spec.rb +84 -0
- data/spec/models/document_update_webhook_spec.rb +52 -0
- data/spec/models/document_url_update_spec.rb +36 -0
- data/spec/models/document_with_content_spec.rb +96 -0
- data/spec/models/entity_extracted_webhook_payload_spec.rb +84 -0
- data/spec/models/entity_extracted_webhook_spec.rb +52 -0
- data/spec/models/entity_list_spec.rb +42 -0
- data/spec/models/entity_spec.rb +72 -0
- data/spec/models/error_message_spec.rb +36 -0
- data/spec/models/folder_data_spec.rb +42 -0
- data/spec/models/freshdesk_credentials_spec.rb +42 -0
- data/spec/models/freshdesk_data_spec.rb +42 -0
- data/spec/models/gmail_data_spec.rb +36 -0
- data/spec/models/google_folder_data_spec.rb +48 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/hubspot_data_spec.rb +72 -0
- data/spec/models/instruction_spec.rb +94 -0
- data/spec/models/intercom_credentials_spec.rb +48 -0
- data/spec/models/intercom_data_spec.rb +66 -0
- data/spec/models/link_spec.rb +42 -0
- data/spec/models/list_connector_source_type_info_spec.rb +36 -0
- data/spec/models/media_mode_param_spec.rb +56 -0
- data/spec/models/media_type_spec.rb +21 -0
- data/spec/models/metadata_value1_spec.rb +32 -0
- data/spec/models/metadata_value_spec.rb +21 -0
- data/spec/models/mode1_spec.rb +21 -0
- data/spec/models/mode2_one_of_spec.rb +56 -0
- data/spec/models/mode2_spec.rb +32 -0
- data/spec/models/mode_spec.rb +21 -0
- data/spec/models/o_auth_credentials_spec.rb +64 -0
- data/spec/models/o_auth_refresh_token_credentials_spec.rb +36 -0
- data/spec/models/o_auth_url_create_spec.rb +88 -0
- data/spec/models/o_auth_url_response_spec.rb +36 -0
- data/spec/models/onedrive_data_spec.rb +48 -0
- data/spec/models/pagination_spec.rb +42 -0
- data/spec/models/partition_detail_spec.rb +60 -0
- data/spec/models/partition_limit_exceeded_webhook_payload_spec.rb +46 -0
- data/spec/models/partition_limit_exceeded_webhook_spec.rb +52 -0
- data/spec/models/partition_limit_params_spec.rb +102 -0
- data/spec/models/partition_limit_reset_webhook_payload_spec.rb +36 -0
- data/spec/models/partition_limit_reset_webhook_spec.rb +52 -0
- data/spec/models/partition_limits_spec.rb +102 -0
- data/spec/models/partition_list_spec.rb +42 -0
- data/spec/models/partition_spec.rb +54 -0
- data/spec/models/partition_stats_spec.rb +108 -0
- data/spec/models/partition_strategy_spec.rb +21 -0
- data/spec/models/patch_document_metadata_params_spec.rb +42 -0
- data/spec/models/payload_spec.rb +44 -0
- data/spec/models/public_backblaze_connection_spec.rb +52 -0
- data/spec/models/public_create_connection_spec.rb +66 -0
- data/spec/models/public_freshdesk_connection_spec.rb +58 -0
- data/spec/models/public_gcs_connection_spec.rb +52 -0
- data/spec/models/public_intercom_connection_spec.rb +52 -0
- data/spec/models/public_s3_compatible_connection_spec.rb +52 -0
- data/spec/models/public_zendesk_connection_spec.rb +52 -0
- data/spec/models/response_ok_spec.rb +36 -0
- data/spec/models/response_patchdocumentmetadata_spec.rb +21 -0
- data/spec/models/retrieval_spec.rb +36 -0
- data/spec/models/retrieve_params_spec.rb +72 -0
- data/spec/models/s3_compatible_credentials_spec.rb +54 -0
- data/spec/models/scored_chunk_spec.rb +84 -0
- data/spec/models/set_connection_enabled_payload_spec.rb +46 -0
- data/spec/models/sharepoint_data_spec.rb +42 -0
- data/spec/models/sharepoint_file_data_spec.rb +52 -0
- data/spec/models/sharepoint_site_data_spec.rb +42 -0
- data/spec/models/slack_data_spec.rb +42 -0
- data/spec/models/source_spec.rb +21 -0
- data/spec/models/status_spec.rb +21 -0
- data/spec/models/update_document_from_url_params_spec.rb +42 -0
- data/spec/models/update_document_raw_params_spec.rb +36 -0
- data/spec/models/update_instruction_params_spec.rb +36 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/video_modality_data_spec.rb +46 -0
- data/spec/models/word_timestamp_spec.rb +54 -0
- data/spec/models/zendesk_credentials_spec.rb +48 -0
- data/spec/models/zendesk_data_spec.rb +36 -0
- data/spec/spec_helper.rb +111 -0
- metadata +680 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Ragie API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module RagieRubySdk
|
|
17
|
+
class EntityExtractedWebhookPayload
|
|
18
|
+
attr_accessor :entity_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :document_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :instruction_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :document_metadata
|
|
25
|
+
|
|
26
|
+
attr_accessor :document_external_id
|
|
27
|
+
|
|
28
|
+
attr_accessor :document_name
|
|
29
|
+
|
|
30
|
+
attr_accessor :partition
|
|
31
|
+
|
|
32
|
+
attr_accessor :sync_id
|
|
33
|
+
|
|
34
|
+
attr_accessor :data
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'entity_id' => :'entity_id',
|
|
40
|
+
:'document_id' => :'document_id',
|
|
41
|
+
:'instruction_id' => :'instruction_id',
|
|
42
|
+
:'document_metadata' => :'document_metadata',
|
|
43
|
+
:'document_external_id' => :'document_external_id',
|
|
44
|
+
:'document_name' => :'document_name',
|
|
45
|
+
:'partition' => :'partition',
|
|
46
|
+
:'sync_id' => :'sync_id',
|
|
47
|
+
:'data' => :'data'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns attribute mapping this model knows about
|
|
52
|
+
def self.acceptable_attribute_map
|
|
53
|
+
attribute_map
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns all the JSON keys this model knows about
|
|
57
|
+
def self.acceptable_attributes
|
|
58
|
+
acceptable_attribute_map.values
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
def self.openapi_types
|
|
63
|
+
{
|
|
64
|
+
:'entity_id' => :'String',
|
|
65
|
+
:'document_id' => :'String',
|
|
66
|
+
:'instruction_id' => :'String',
|
|
67
|
+
:'document_metadata' => :'Hash<String, Object>',
|
|
68
|
+
:'document_external_id' => :'String',
|
|
69
|
+
:'document_name' => :'String',
|
|
70
|
+
:'partition' => :'String',
|
|
71
|
+
:'sync_id' => :'String',
|
|
72
|
+
:'data' => :'Hash<String, Object>'
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# List of attributes with nullable: true
|
|
77
|
+
def self.openapi_nullable
|
|
78
|
+
Set.new([
|
|
79
|
+
:'document_external_id',
|
|
80
|
+
:'sync_id',
|
|
81
|
+
])
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Initializes the object
|
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
86
|
+
def initialize(attributes = {})
|
|
87
|
+
if (!attributes.is_a?(Hash))
|
|
88
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::EntityExtractedWebhookPayload` initialize method"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
92
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
93
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
94
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
95
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::EntityExtractedWebhookPayload`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
96
|
+
end
|
|
97
|
+
h[k.to_sym] = v
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'entity_id')
|
|
101
|
+
self.entity_id = attributes[:'entity_id']
|
|
102
|
+
else
|
|
103
|
+
self.entity_id = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'document_id')
|
|
107
|
+
self.document_id = attributes[:'document_id']
|
|
108
|
+
else
|
|
109
|
+
self.document_id = nil
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'instruction_id')
|
|
113
|
+
self.instruction_id = attributes[:'instruction_id']
|
|
114
|
+
else
|
|
115
|
+
self.instruction_id = nil
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'document_metadata')
|
|
119
|
+
if (value = attributes[:'document_metadata']).is_a?(Hash)
|
|
120
|
+
self.document_metadata = value
|
|
121
|
+
end
|
|
122
|
+
else
|
|
123
|
+
self.document_metadata = nil
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'document_external_id')
|
|
127
|
+
self.document_external_id = attributes[:'document_external_id']
|
|
128
|
+
else
|
|
129
|
+
self.document_external_id = nil
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'document_name')
|
|
133
|
+
self.document_name = attributes[:'document_name']
|
|
134
|
+
else
|
|
135
|
+
self.document_name = nil
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'partition')
|
|
139
|
+
self.partition = attributes[:'partition']
|
|
140
|
+
else
|
|
141
|
+
self.partition = nil
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'sync_id')
|
|
145
|
+
self.sync_id = attributes[:'sync_id']
|
|
146
|
+
else
|
|
147
|
+
self.sync_id = nil
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'data')
|
|
151
|
+
if (value = attributes[:'data']).is_a?(Hash)
|
|
152
|
+
self.data = value
|
|
153
|
+
end
|
|
154
|
+
else
|
|
155
|
+
self.data = nil
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
160
|
+
# @return Array for valid properties with the reasons
|
|
161
|
+
def list_invalid_properties
|
|
162
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
163
|
+
invalid_properties = Array.new
|
|
164
|
+
if @entity_id.nil?
|
|
165
|
+
invalid_properties.push('invalid value for "entity_id", entity_id cannot be nil.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if @document_id.nil?
|
|
169
|
+
invalid_properties.push('invalid value for "document_id", document_id cannot be nil.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if @instruction_id.nil?
|
|
173
|
+
invalid_properties.push('invalid value for "instruction_id", instruction_id cannot be nil.')
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if @document_metadata.nil?
|
|
177
|
+
invalid_properties.push('invalid value for "document_metadata", document_metadata cannot be nil.')
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if @document_name.nil?
|
|
181
|
+
invalid_properties.push('invalid value for "document_name", document_name cannot be nil.')
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if @partition.nil?
|
|
185
|
+
invalid_properties.push('invalid value for "partition", partition cannot be nil.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if @data.nil?
|
|
189
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
invalid_properties
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Check to see if the all the properties in the model are valid
|
|
196
|
+
# @return true if the model is valid
|
|
197
|
+
def valid?
|
|
198
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
199
|
+
return false if @entity_id.nil?
|
|
200
|
+
return false if @document_id.nil?
|
|
201
|
+
return false if @instruction_id.nil?
|
|
202
|
+
return false if @document_metadata.nil?
|
|
203
|
+
return false if @document_name.nil?
|
|
204
|
+
return false if @partition.nil?
|
|
205
|
+
return false if @data.nil?
|
|
206
|
+
true
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Custom attribute writer method with validation
|
|
210
|
+
# @param [Object] entity_id Value to be assigned
|
|
211
|
+
def entity_id=(entity_id)
|
|
212
|
+
if entity_id.nil?
|
|
213
|
+
fail ArgumentError, 'entity_id cannot be nil'
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
@entity_id = entity_id
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Custom attribute writer method with validation
|
|
220
|
+
# @param [Object] document_id Value to be assigned
|
|
221
|
+
def document_id=(document_id)
|
|
222
|
+
if document_id.nil?
|
|
223
|
+
fail ArgumentError, 'document_id cannot be nil'
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
@document_id = document_id
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Custom attribute writer method with validation
|
|
230
|
+
# @param [Object] instruction_id Value to be assigned
|
|
231
|
+
def instruction_id=(instruction_id)
|
|
232
|
+
if instruction_id.nil?
|
|
233
|
+
fail ArgumentError, 'instruction_id cannot be nil'
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
@instruction_id = instruction_id
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Custom attribute writer method with validation
|
|
240
|
+
# @param [Object] document_metadata Value to be assigned
|
|
241
|
+
def document_metadata=(document_metadata)
|
|
242
|
+
if document_metadata.nil?
|
|
243
|
+
fail ArgumentError, 'document_metadata cannot be nil'
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
@document_metadata = document_metadata
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Custom attribute writer method with validation
|
|
250
|
+
# @param [Object] document_name Value to be assigned
|
|
251
|
+
def document_name=(document_name)
|
|
252
|
+
if document_name.nil?
|
|
253
|
+
fail ArgumentError, 'document_name cannot be nil'
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
@document_name = document_name
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Custom attribute writer method with validation
|
|
260
|
+
# @param [Object] partition Value to be assigned
|
|
261
|
+
def partition=(partition)
|
|
262
|
+
if partition.nil?
|
|
263
|
+
fail ArgumentError, 'partition cannot be nil'
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
@partition = partition
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Custom attribute writer method with validation
|
|
270
|
+
# @param [Object] data Value to be assigned
|
|
271
|
+
def data=(data)
|
|
272
|
+
if data.nil?
|
|
273
|
+
fail ArgumentError, 'data cannot be nil'
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
@data = data
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Checks equality by comparing each attribute.
|
|
280
|
+
# @param [Object] Object to be compared
|
|
281
|
+
def ==(o)
|
|
282
|
+
return true if self.equal?(o)
|
|
283
|
+
self.class == o.class &&
|
|
284
|
+
entity_id == o.entity_id &&
|
|
285
|
+
document_id == o.document_id &&
|
|
286
|
+
instruction_id == o.instruction_id &&
|
|
287
|
+
document_metadata == o.document_metadata &&
|
|
288
|
+
document_external_id == o.document_external_id &&
|
|
289
|
+
document_name == o.document_name &&
|
|
290
|
+
partition == o.partition &&
|
|
291
|
+
sync_id == o.sync_id &&
|
|
292
|
+
data == o.data
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# @see the `==` method
|
|
296
|
+
# @param [Object] Object to be compared
|
|
297
|
+
def eql?(o)
|
|
298
|
+
self == o
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Calculates hash code according to all attributes.
|
|
302
|
+
# @return [Integer] Hash code
|
|
303
|
+
def hash
|
|
304
|
+
[entity_id, document_id, instruction_id, document_metadata, document_external_id, document_name, partition, sync_id, data].hash
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Builds the object from hash
|
|
308
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
309
|
+
# @return [Object] Returns the model itself
|
|
310
|
+
def self.build_from_hash(attributes)
|
|
311
|
+
return nil unless attributes.is_a?(Hash)
|
|
312
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
313
|
+
transformed_hash = {}
|
|
314
|
+
openapi_types.each_pair do |key, type|
|
|
315
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
316
|
+
transformed_hash["#{key}"] = nil
|
|
317
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
318
|
+
# check to ensure the input is an array given that the attribute
|
|
319
|
+
# is documented as an array but the input is not
|
|
320
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
321
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
322
|
+
end
|
|
323
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
324
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
new(transformed_hash)
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Deserializes the data based on type
|
|
331
|
+
# @param string type Data type
|
|
332
|
+
# @param string value Value to be deserialized
|
|
333
|
+
# @return [Object] Deserialized data
|
|
334
|
+
def self._deserialize(type, value)
|
|
335
|
+
case type.to_sym
|
|
336
|
+
when :Time
|
|
337
|
+
Time.parse(value)
|
|
338
|
+
when :Date
|
|
339
|
+
Date.parse(value)
|
|
340
|
+
when :String
|
|
341
|
+
value.to_s
|
|
342
|
+
when :Integer
|
|
343
|
+
value.to_i
|
|
344
|
+
when :Float
|
|
345
|
+
value.to_f
|
|
346
|
+
when :Boolean
|
|
347
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
348
|
+
true
|
|
349
|
+
else
|
|
350
|
+
false
|
|
351
|
+
end
|
|
352
|
+
when :Object
|
|
353
|
+
# generic object (usually a Hash), return directly
|
|
354
|
+
value
|
|
355
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
356
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
357
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
358
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
359
|
+
k_type = Regexp.last_match[:k_type]
|
|
360
|
+
v_type = Regexp.last_match[:v_type]
|
|
361
|
+
{}.tap do |hash|
|
|
362
|
+
value.each do |k, v|
|
|
363
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
364
|
+
end
|
|
365
|
+
end
|
|
366
|
+
else # model
|
|
367
|
+
# models (e.g. Pet) or oneOf
|
|
368
|
+
klass = RagieRubySdk.const_get(type)
|
|
369
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
370
|
+
end
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# Returns the string representation of the object
|
|
374
|
+
# @return [String] String presentation of the object
|
|
375
|
+
def to_s
|
|
376
|
+
to_hash.to_s
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
380
|
+
# @return [Hash] Returns the object in the form of hash
|
|
381
|
+
def to_body
|
|
382
|
+
to_hash
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Returns the object in the form of hash
|
|
386
|
+
# @return [Hash] Returns the object in the form of hash
|
|
387
|
+
def to_hash
|
|
388
|
+
hash = {}
|
|
389
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
390
|
+
value = self.send(attr)
|
|
391
|
+
if value.nil?
|
|
392
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
393
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
hash[param] = _to_hash(value)
|
|
397
|
+
end
|
|
398
|
+
hash
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# Outputs non-array value in the form of hash
|
|
402
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
403
|
+
# @param [Object] value Any valid value
|
|
404
|
+
# @return [Hash] Returns the value in the form of hash
|
|
405
|
+
def _to_hash(value)
|
|
406
|
+
if value.is_a?(Array)
|
|
407
|
+
value.compact.map { |v| _to_hash(v) }
|
|
408
|
+
elsif value.is_a?(Hash)
|
|
409
|
+
{}.tap do |hash|
|
|
410
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
411
|
+
end
|
|
412
|
+
elsif value.respond_to? :to_hash
|
|
413
|
+
value.to_hash
|
|
414
|
+
else
|
|
415
|
+
value
|
|
416
|
+
end
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
end
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Ragie API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module RagieRubySdk
|
|
17
|
+
class EntityList
|
|
18
|
+
attr_accessor :pagination
|
|
19
|
+
|
|
20
|
+
attr_accessor :entities
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'pagination' => :'pagination',
|
|
26
|
+
:'entities' => :'entities'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'pagination' => :'Pagination',
|
|
44
|
+
:'entities' => :'Array<Entity>'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::EntityList` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::EntityList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'pagination')
|
|
71
|
+
self.pagination = attributes[:'pagination']
|
|
72
|
+
else
|
|
73
|
+
self.pagination = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'entities')
|
|
77
|
+
if (value = attributes[:'entities']).is_a?(Array)
|
|
78
|
+
self.entities = value
|
|
79
|
+
end
|
|
80
|
+
else
|
|
81
|
+
self.entities = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @pagination.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @entities.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "entities", entities cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @pagination.nil?
|
|
106
|
+
return false if @entities.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] pagination Value to be assigned
|
|
112
|
+
def pagination=(pagination)
|
|
113
|
+
if pagination.nil?
|
|
114
|
+
fail ArgumentError, 'pagination cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@pagination = pagination
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] entities Value to be assigned
|
|
122
|
+
def entities=(entities)
|
|
123
|
+
if entities.nil?
|
|
124
|
+
fail ArgumentError, 'entities cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@entities = entities
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
pagination == o.pagination &&
|
|
136
|
+
entities == o.entities
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[pagination, entities].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Deserializes the data based on type
|
|
175
|
+
# @param string type Data type
|
|
176
|
+
# @param string value Value to be deserialized
|
|
177
|
+
# @return [Object] Deserialized data
|
|
178
|
+
def self._deserialize(type, value)
|
|
179
|
+
case type.to_sym
|
|
180
|
+
when :Time
|
|
181
|
+
Time.parse(value)
|
|
182
|
+
when :Date
|
|
183
|
+
Date.parse(value)
|
|
184
|
+
when :String
|
|
185
|
+
value.to_s
|
|
186
|
+
when :Integer
|
|
187
|
+
value.to_i
|
|
188
|
+
when :Float
|
|
189
|
+
value.to_f
|
|
190
|
+
when :Boolean
|
|
191
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
192
|
+
true
|
|
193
|
+
else
|
|
194
|
+
false
|
|
195
|
+
end
|
|
196
|
+
when :Object
|
|
197
|
+
# generic object (usually a Hash), return directly
|
|
198
|
+
value
|
|
199
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
200
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
201
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
202
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
203
|
+
k_type = Regexp.last_match[:k_type]
|
|
204
|
+
v_type = Regexp.last_match[:v_type]
|
|
205
|
+
{}.tap do |hash|
|
|
206
|
+
value.each do |k, v|
|
|
207
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
else # model
|
|
211
|
+
# models (e.g. Pet) or oneOf
|
|
212
|
+
klass = RagieRubySdk.const_get(type)
|
|
213
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Returns the string representation of the object
|
|
218
|
+
# @return [String] String presentation of the object
|
|
219
|
+
def to_s
|
|
220
|
+
to_hash.to_s
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
|
225
|
+
def to_body
|
|
226
|
+
to_hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Returns the object in the form of hash
|
|
230
|
+
# @return [Hash] Returns the object in the form of hash
|
|
231
|
+
def to_hash
|
|
232
|
+
hash = {}
|
|
233
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
234
|
+
value = self.send(attr)
|
|
235
|
+
if value.nil?
|
|
236
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
237
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
hash[param] = _to_hash(value)
|
|
241
|
+
end
|
|
242
|
+
hash
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Outputs non-array value in the form of hash
|
|
246
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
247
|
+
# @param [Object] value Any valid value
|
|
248
|
+
# @return [Hash] Returns the value in the form of hash
|
|
249
|
+
def _to_hash(value)
|
|
250
|
+
if value.is_a?(Array)
|
|
251
|
+
value.compact.map { |v| _to_hash(v) }
|
|
252
|
+
elsif value.is_a?(Hash)
|
|
253
|
+
{}.tap do |hash|
|
|
254
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
255
|
+
end
|
|
256
|
+
elsif value.respond_to? :to_hash
|
|
257
|
+
value.to_hash
|
|
258
|
+
else
|
|
259
|
+
value
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
end
|