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,274 @@
|
|
|
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 ConnectionBase
|
|
18
|
+
attr_accessor :partition_strategy
|
|
19
|
+
|
|
20
|
+
# Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`.
|
|
21
|
+
attr_accessor :metadata
|
|
22
|
+
|
|
23
|
+
attr_accessor :page_limit
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'partition_strategy' => :'partition_strategy',
|
|
29
|
+
:'metadata' => :'metadata',
|
|
30
|
+
:'page_limit' => :'page_limit'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'partition_strategy' => :'PartitionStrategy',
|
|
48
|
+
:'metadata' => :'Hash<String, MetadataValue>',
|
|
49
|
+
:'page_limit' => :'Integer'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
:'page_limit'
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
62
|
+
def initialize(attributes = {})
|
|
63
|
+
if (!attributes.is_a?(Hash))
|
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::ConnectionBase` initialize method"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
68
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::ConnectionBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'partition_strategy')
|
|
77
|
+
self.partition_strategy = attributes[:'partition_strategy']
|
|
78
|
+
else
|
|
79
|
+
self.partition_strategy = nil
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'metadata')
|
|
83
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
84
|
+
self.metadata = value
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'page_limit')
|
|
89
|
+
self.page_limit = attributes[:'page_limit']
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
94
|
+
# @return Array for valid properties with the reasons
|
|
95
|
+
def list_invalid_properties
|
|
96
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
97
|
+
invalid_properties = Array.new
|
|
98
|
+
if @partition_strategy.nil?
|
|
99
|
+
invalid_properties.push('invalid value for "partition_strategy", partition_strategy cannot be nil.')
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if !@page_limit.nil? && @page_limit < 1
|
|
103
|
+
invalid_properties.push('invalid value for "page_limit", must be greater than or equal to 1.')
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
invalid_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check to see if the all the properties in the model are valid
|
|
110
|
+
# @return true if the model is valid
|
|
111
|
+
def valid?
|
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
+
return false if @partition_strategy.nil?
|
|
114
|
+
return false if !@page_limit.nil? && @page_limit < 1
|
|
115
|
+
true
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] partition_strategy Value to be assigned
|
|
120
|
+
def partition_strategy=(partition_strategy)
|
|
121
|
+
if partition_strategy.nil?
|
|
122
|
+
fail ArgumentError, 'partition_strategy cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@partition_strategy = partition_strategy
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method with validation
|
|
129
|
+
# @param [Object] page_limit Value to be assigned
|
|
130
|
+
def page_limit=(page_limit)
|
|
131
|
+
if !page_limit.nil? && page_limit < 1
|
|
132
|
+
fail ArgumentError, 'invalid value for "page_limit", must be greater than or equal to 1.'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
@page_limit = page_limit
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Checks equality by comparing each attribute.
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def ==(o)
|
|
141
|
+
return true if self.equal?(o)
|
|
142
|
+
self.class == o.class &&
|
|
143
|
+
partition_strategy == o.partition_strategy &&
|
|
144
|
+
metadata == o.metadata &&
|
|
145
|
+
page_limit == o.page_limit
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# @see the `==` method
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def eql?(o)
|
|
151
|
+
self == o
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Calculates hash code according to all attributes.
|
|
155
|
+
# @return [Integer] Hash code
|
|
156
|
+
def hash
|
|
157
|
+
[partition_strategy, metadata, page_limit].hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Builds the object from hash
|
|
161
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
162
|
+
# @return [Object] Returns the model itself
|
|
163
|
+
def self.build_from_hash(attributes)
|
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
|
165
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
166
|
+
transformed_hash = {}
|
|
167
|
+
openapi_types.each_pair do |key, type|
|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = nil
|
|
170
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
171
|
+
# check to ensure the input is an array given that the attribute
|
|
172
|
+
# is documented as an array but the input is not
|
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
175
|
+
end
|
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
new(transformed_hash)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Deserializes the data based on type
|
|
184
|
+
# @param string type Data type
|
|
185
|
+
# @param string value Value to be deserialized
|
|
186
|
+
# @return [Object] Deserialized data
|
|
187
|
+
def self._deserialize(type, value)
|
|
188
|
+
case type.to_sym
|
|
189
|
+
when :Time
|
|
190
|
+
Time.parse(value)
|
|
191
|
+
when :Date
|
|
192
|
+
Date.parse(value)
|
|
193
|
+
when :String
|
|
194
|
+
value.to_s
|
|
195
|
+
when :Integer
|
|
196
|
+
value.to_i
|
|
197
|
+
when :Float
|
|
198
|
+
value.to_f
|
|
199
|
+
when :Boolean
|
|
200
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
201
|
+
true
|
|
202
|
+
else
|
|
203
|
+
false
|
|
204
|
+
end
|
|
205
|
+
when :Object
|
|
206
|
+
# generic object (usually a Hash), return directly
|
|
207
|
+
value
|
|
208
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
209
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
210
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
211
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
212
|
+
k_type = Regexp.last_match[:k_type]
|
|
213
|
+
v_type = Regexp.last_match[:v_type]
|
|
214
|
+
{}.tap do |hash|
|
|
215
|
+
value.each do |k, v|
|
|
216
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
else # model
|
|
220
|
+
# models (e.g. Pet) or oneOf
|
|
221
|
+
klass = RagieRubySdk.const_get(type)
|
|
222
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Returns the string representation of the object
|
|
227
|
+
# @return [String] String presentation of the object
|
|
228
|
+
def to_s
|
|
229
|
+
to_hash.to_s
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
|
234
|
+
def to_body
|
|
235
|
+
to_hash
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Returns the object in the form of hash
|
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
|
240
|
+
def to_hash
|
|
241
|
+
hash = {}
|
|
242
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
243
|
+
value = self.send(attr)
|
|
244
|
+
if value.nil?
|
|
245
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
246
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
hash[param] = _to_hash(value)
|
|
250
|
+
end
|
|
251
|
+
hash
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Outputs non-array value in the form of hash
|
|
255
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
256
|
+
# @param [Object] value Any valid value
|
|
257
|
+
# @return [Hash] Returns the value in the form of hash
|
|
258
|
+
def _to_hash(value)
|
|
259
|
+
if value.is_a?(Array)
|
|
260
|
+
value.compact.map { |v| _to_hash(v) }
|
|
261
|
+
elsif value.is_a?(Hash)
|
|
262
|
+
{}.tap do |hash|
|
|
263
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
264
|
+
end
|
|
265
|
+
elsif value.respond_to? :to_hash
|
|
266
|
+
value.to_hash
|
|
267
|
+
else
|
|
268
|
+
value
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
end
|
|
@@ -0,0 +1,313 @@
|
|
|
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 ConnectionLimitExceededWebhook
|
|
18
|
+
attr_accessor :nonce
|
|
19
|
+
|
|
20
|
+
attr_accessor :type
|
|
21
|
+
|
|
22
|
+
attr_accessor :payload
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'nonce' => :'nonce',
|
|
50
|
+
:'type' => :'type',
|
|
51
|
+
:'payload' => :'payload'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'nonce' => :'String',
|
|
69
|
+
:'type' => :'String',
|
|
70
|
+
:'payload' => :'ConnectionLimitExceededWebhookPayload'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List of attributes with nullable: true
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
if (!attributes.is_a?(Hash))
|
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::ConnectionLimitExceededWebhook` initialize method"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
88
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::ConnectionLimitExceededWebhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'nonce')
|
|
97
|
+
self.nonce = attributes[:'nonce']
|
|
98
|
+
else
|
|
99
|
+
self.nonce = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'type')
|
|
103
|
+
self.type = attributes[:'type']
|
|
104
|
+
else
|
|
105
|
+
self.type = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'payload')
|
|
109
|
+
self.payload = attributes[:'payload']
|
|
110
|
+
else
|
|
111
|
+
self.payload = nil
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
116
|
+
# @return Array for valid properties with the reasons
|
|
117
|
+
def list_invalid_properties
|
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
119
|
+
invalid_properties = Array.new
|
|
120
|
+
if @nonce.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "nonce", nonce cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @type.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @payload.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "payload", payload cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
return false if @nonce.nil?
|
|
140
|
+
return false if @type.nil?
|
|
141
|
+
type_validator = EnumAttributeValidator.new('String', ["connection_limit_exceeded"])
|
|
142
|
+
return false unless type_validator.valid?(@type)
|
|
143
|
+
return false if @payload.nil?
|
|
144
|
+
true
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Custom attribute writer method with validation
|
|
148
|
+
# @param [Object] nonce Value to be assigned
|
|
149
|
+
def nonce=(nonce)
|
|
150
|
+
if nonce.nil?
|
|
151
|
+
fail ArgumentError, 'nonce cannot be nil'
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
@nonce = nonce
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
158
|
+
# @param [Object] type Object to be assigned
|
|
159
|
+
def type=(type)
|
|
160
|
+
validator = EnumAttributeValidator.new('String', ["connection_limit_exceeded"])
|
|
161
|
+
unless validator.valid?(type)
|
|
162
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
163
|
+
end
|
|
164
|
+
@type = type
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Custom attribute writer method with validation
|
|
168
|
+
# @param [Object] payload Value to be assigned
|
|
169
|
+
def payload=(payload)
|
|
170
|
+
if payload.nil?
|
|
171
|
+
fail ArgumentError, 'payload cannot be nil'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
@payload = payload
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Checks equality by comparing each attribute.
|
|
178
|
+
# @param [Object] Object to be compared
|
|
179
|
+
def ==(o)
|
|
180
|
+
return true if self.equal?(o)
|
|
181
|
+
self.class == o.class &&
|
|
182
|
+
nonce == o.nonce &&
|
|
183
|
+
type == o.type &&
|
|
184
|
+
payload == o.payload
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# @see the `==` method
|
|
188
|
+
# @param [Object] Object to be compared
|
|
189
|
+
def eql?(o)
|
|
190
|
+
self == o
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Calculates hash code according to all attributes.
|
|
194
|
+
# @return [Integer] Hash code
|
|
195
|
+
def hash
|
|
196
|
+
[nonce, type, payload].hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Builds the object from hash
|
|
200
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
201
|
+
# @return [Object] Returns the model itself
|
|
202
|
+
def self.build_from_hash(attributes)
|
|
203
|
+
return nil unless attributes.is_a?(Hash)
|
|
204
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
205
|
+
transformed_hash = {}
|
|
206
|
+
openapi_types.each_pair do |key, type|
|
|
207
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
208
|
+
transformed_hash["#{key}"] = nil
|
|
209
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
210
|
+
# check to ensure the input is an array given that the attribute
|
|
211
|
+
# is documented as an array but the input is not
|
|
212
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
213
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
214
|
+
end
|
|
215
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
216
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
new(transformed_hash)
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Deserializes the data based on type
|
|
223
|
+
# @param string type Data type
|
|
224
|
+
# @param string value Value to be deserialized
|
|
225
|
+
# @return [Object] Deserialized data
|
|
226
|
+
def self._deserialize(type, value)
|
|
227
|
+
case type.to_sym
|
|
228
|
+
when :Time
|
|
229
|
+
Time.parse(value)
|
|
230
|
+
when :Date
|
|
231
|
+
Date.parse(value)
|
|
232
|
+
when :String
|
|
233
|
+
value.to_s
|
|
234
|
+
when :Integer
|
|
235
|
+
value.to_i
|
|
236
|
+
when :Float
|
|
237
|
+
value.to_f
|
|
238
|
+
when :Boolean
|
|
239
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
240
|
+
true
|
|
241
|
+
else
|
|
242
|
+
false
|
|
243
|
+
end
|
|
244
|
+
when :Object
|
|
245
|
+
# generic object (usually a Hash), return directly
|
|
246
|
+
value
|
|
247
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
248
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
249
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
250
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
251
|
+
k_type = Regexp.last_match[:k_type]
|
|
252
|
+
v_type = Regexp.last_match[:v_type]
|
|
253
|
+
{}.tap do |hash|
|
|
254
|
+
value.each do |k, v|
|
|
255
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
else # model
|
|
259
|
+
# models (e.g. Pet) or oneOf
|
|
260
|
+
klass = RagieRubySdk.const_get(type)
|
|
261
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Returns the string representation of the object
|
|
266
|
+
# @return [String] String presentation of the object
|
|
267
|
+
def to_s
|
|
268
|
+
to_hash.to_s
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
272
|
+
# @return [Hash] Returns the object in the form of hash
|
|
273
|
+
def to_body
|
|
274
|
+
to_hash
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Returns the object in the form of hash
|
|
278
|
+
# @return [Hash] Returns the object in the form of hash
|
|
279
|
+
def to_hash
|
|
280
|
+
hash = {}
|
|
281
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
282
|
+
value = self.send(attr)
|
|
283
|
+
if value.nil?
|
|
284
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
285
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
hash[param] = _to_hash(value)
|
|
289
|
+
end
|
|
290
|
+
hash
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Outputs non-array value in the form of hash
|
|
294
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
295
|
+
# @param [Object] value Any valid value
|
|
296
|
+
# @return [Hash] Returns the value in the form of hash
|
|
297
|
+
def _to_hash(value)
|
|
298
|
+
if value.is_a?(Array)
|
|
299
|
+
value.compact.map { |v| _to_hash(v) }
|
|
300
|
+
elsif value.is_a?(Hash)
|
|
301
|
+
{}.tap do |hash|
|
|
302
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
303
|
+
end
|
|
304
|
+
elsif value.respond_to? :to_hash
|
|
305
|
+
value.to_hash
|
|
306
|
+
else
|
|
307
|
+
value
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
end
|