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,305 @@
|
|
|
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 RetrieveParams
|
|
18
|
+
# The query to search with when retrieving document chunks.
|
|
19
|
+
attr_accessor :query
|
|
20
|
+
|
|
21
|
+
# The maximum number of chunks to return. Defaults to 8.
|
|
22
|
+
attr_accessor :top_k
|
|
23
|
+
|
|
24
|
+
attr_accessor :filter
|
|
25
|
+
|
|
26
|
+
# Reranks the chunks for semantic relevancy post cosine similarity. Will be slower but returns a subset of highly relevant chunks. Best for reducing hallucinations and improving accuracy for LLM generation.
|
|
27
|
+
attr_accessor :rerank
|
|
28
|
+
|
|
29
|
+
# Maximum number of chunks to retrieve per document. Use this to increase the number of documents the final chunks are retrieved from. This feature is in beta and may change in the future.
|
|
30
|
+
attr_accessor :max_chunks_per_document
|
|
31
|
+
|
|
32
|
+
# The partition to scope a retrieval to. If omitted, the retrieval will be scoped to the default partition, which includes any documents that have not been created in a partition.
|
|
33
|
+
attr_accessor :partition
|
|
34
|
+
|
|
35
|
+
# Enables recency bias which will favor more recent documents vs older documents. https://docs.ragie.ai/docs/retrievals-recency-bias
|
|
36
|
+
attr_accessor :recency_bias
|
|
37
|
+
|
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
|
+
def self.attribute_map
|
|
40
|
+
{
|
|
41
|
+
:'query' => :'query',
|
|
42
|
+
:'top_k' => :'top_k',
|
|
43
|
+
:'filter' => :'filter',
|
|
44
|
+
:'rerank' => :'rerank',
|
|
45
|
+
:'max_chunks_per_document' => :'max_chunks_per_document',
|
|
46
|
+
:'partition' => :'partition',
|
|
47
|
+
:'recency_bias' => :'recency_bias'
|
|
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
|
+
:'query' => :'String',
|
|
65
|
+
:'top_k' => :'Integer',
|
|
66
|
+
:'filter' => :'Hash<String, Object>',
|
|
67
|
+
:'rerank' => :'Boolean',
|
|
68
|
+
:'max_chunks_per_document' => :'Integer',
|
|
69
|
+
:'partition' => :'String',
|
|
70
|
+
:'recency_bias' => :'Boolean'
|
|
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::RetrieveParams` 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::RetrieveParams`. 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?(:'query')
|
|
97
|
+
self.query = attributes[:'query']
|
|
98
|
+
else
|
|
99
|
+
self.query = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'top_k')
|
|
103
|
+
self.top_k = attributes[:'top_k']
|
|
104
|
+
else
|
|
105
|
+
self.top_k = 8
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'filter')
|
|
109
|
+
if (value = attributes[:'filter']).is_a?(Hash)
|
|
110
|
+
self.filter = value
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'rerank')
|
|
115
|
+
self.rerank = attributes[:'rerank']
|
|
116
|
+
else
|
|
117
|
+
self.rerank = false
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'max_chunks_per_document')
|
|
121
|
+
self.max_chunks_per_document = attributes[:'max_chunks_per_document']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'partition')
|
|
125
|
+
self.partition = attributes[:'partition']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'recency_bias')
|
|
129
|
+
self.recency_bias = attributes[:'recency_bias']
|
|
130
|
+
else
|
|
131
|
+
self.recency_bias = false
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
136
|
+
# @return Array for valid properties with the reasons
|
|
137
|
+
def list_invalid_properties
|
|
138
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
139
|
+
invalid_properties = Array.new
|
|
140
|
+
if @query.nil?
|
|
141
|
+
invalid_properties.push('invalid value for "query", query cannot be nil.')
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
invalid_properties
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Check to see if the all the properties in the model are valid
|
|
148
|
+
# @return true if the model is valid
|
|
149
|
+
def valid?
|
|
150
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
151
|
+
return false if @query.nil?
|
|
152
|
+
true
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] query Value to be assigned
|
|
157
|
+
def query=(query)
|
|
158
|
+
if query.nil?
|
|
159
|
+
fail ArgumentError, 'query cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@query = query
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Checks equality by comparing each attribute.
|
|
166
|
+
# @param [Object] Object to be compared
|
|
167
|
+
def ==(o)
|
|
168
|
+
return true if self.equal?(o)
|
|
169
|
+
self.class == o.class &&
|
|
170
|
+
query == o.query &&
|
|
171
|
+
top_k == o.top_k &&
|
|
172
|
+
filter == o.filter &&
|
|
173
|
+
rerank == o.rerank &&
|
|
174
|
+
max_chunks_per_document == o.max_chunks_per_document &&
|
|
175
|
+
partition == o.partition &&
|
|
176
|
+
recency_bias == o.recency_bias
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# @see the `==` method
|
|
180
|
+
# @param [Object] Object to be compared
|
|
181
|
+
def eql?(o)
|
|
182
|
+
self == o
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Calculates hash code according to all attributes.
|
|
186
|
+
# @return [Integer] Hash code
|
|
187
|
+
def hash
|
|
188
|
+
[query, top_k, filter, rerank, max_chunks_per_document, partition, recency_bias].hash
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Builds the object from hash
|
|
192
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
193
|
+
# @return [Object] Returns the model itself
|
|
194
|
+
def self.build_from_hash(attributes)
|
|
195
|
+
return nil unless attributes.is_a?(Hash)
|
|
196
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
197
|
+
transformed_hash = {}
|
|
198
|
+
openapi_types.each_pair do |key, type|
|
|
199
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
200
|
+
transformed_hash["#{key}"] = nil
|
|
201
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
202
|
+
# check to ensure the input is an array given that the attribute
|
|
203
|
+
# is documented as an array but the input is not
|
|
204
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
205
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
206
|
+
end
|
|
207
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
208
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
new(transformed_hash)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Deserializes the data based on type
|
|
215
|
+
# @param string type Data type
|
|
216
|
+
# @param string value Value to be deserialized
|
|
217
|
+
# @return [Object] Deserialized data
|
|
218
|
+
def self._deserialize(type, value)
|
|
219
|
+
case type.to_sym
|
|
220
|
+
when :Time
|
|
221
|
+
Time.parse(value)
|
|
222
|
+
when :Date
|
|
223
|
+
Date.parse(value)
|
|
224
|
+
when :String
|
|
225
|
+
value.to_s
|
|
226
|
+
when :Integer
|
|
227
|
+
value.to_i
|
|
228
|
+
when :Float
|
|
229
|
+
value.to_f
|
|
230
|
+
when :Boolean
|
|
231
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
232
|
+
true
|
|
233
|
+
else
|
|
234
|
+
false
|
|
235
|
+
end
|
|
236
|
+
when :Object
|
|
237
|
+
# generic object (usually a Hash), return directly
|
|
238
|
+
value
|
|
239
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
240
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
241
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
242
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
243
|
+
k_type = Regexp.last_match[:k_type]
|
|
244
|
+
v_type = Regexp.last_match[:v_type]
|
|
245
|
+
{}.tap do |hash|
|
|
246
|
+
value.each do |k, v|
|
|
247
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
else # model
|
|
251
|
+
# models (e.g. Pet) or oneOf
|
|
252
|
+
klass = RagieRubySdk.const_get(type)
|
|
253
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Returns the string representation of the object
|
|
258
|
+
# @return [String] String presentation of the object
|
|
259
|
+
def to_s
|
|
260
|
+
to_hash.to_s
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
264
|
+
# @return [Hash] Returns the object in the form of hash
|
|
265
|
+
def to_body
|
|
266
|
+
to_hash
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Returns the object in the form of hash
|
|
270
|
+
# @return [Hash] Returns the object in the form of hash
|
|
271
|
+
def to_hash
|
|
272
|
+
hash = {}
|
|
273
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
274
|
+
value = self.send(attr)
|
|
275
|
+
if value.nil?
|
|
276
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
277
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
hash[param] = _to_hash(value)
|
|
281
|
+
end
|
|
282
|
+
hash
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Outputs non-array value in the form of hash
|
|
286
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
287
|
+
# @param [Object] value Any valid value
|
|
288
|
+
# @return [Hash] Returns the value in the form of hash
|
|
289
|
+
def _to_hash(value)
|
|
290
|
+
if value.is_a?(Array)
|
|
291
|
+
value.compact.map { |v| _to_hash(v) }
|
|
292
|
+
elsif value.is_a?(Hash)
|
|
293
|
+
{}.tap do |hash|
|
|
294
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
295
|
+
end
|
|
296
|
+
elsif value.respond_to? :to_hash
|
|
297
|
+
value.to_hash
|
|
298
|
+
else
|
|
299
|
+
value
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
end
|
|
@@ -0,0 +1,299 @@
|
|
|
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 S3CompatibleCredentials
|
|
18
|
+
attr_accessor :access_key_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :secret_access_key
|
|
21
|
+
|
|
22
|
+
attr_accessor :region
|
|
23
|
+
|
|
24
|
+
attr_accessor :endpoint
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'access_key_id' => :'access_key_id',
|
|
30
|
+
:'secret_access_key' => :'secret_access_key',
|
|
31
|
+
:'region' => :'region',
|
|
32
|
+
:'endpoint' => :'endpoint'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'access_key_id' => :'String',
|
|
50
|
+
:'secret_access_key' => :'String',
|
|
51
|
+
:'region' => :'String',
|
|
52
|
+
:'endpoint' => :'String'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
:'endpoint'
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::S3CompatibleCredentials` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::S3CompatibleCredentials`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
75
|
+
end
|
|
76
|
+
h[k.to_sym] = v
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'access_key_id')
|
|
80
|
+
self.access_key_id = attributes[:'access_key_id']
|
|
81
|
+
else
|
|
82
|
+
self.access_key_id = nil
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'secret_access_key')
|
|
86
|
+
self.secret_access_key = attributes[:'secret_access_key']
|
|
87
|
+
else
|
|
88
|
+
self.secret_access_key = nil
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'region')
|
|
92
|
+
self.region = attributes[:'region']
|
|
93
|
+
else
|
|
94
|
+
self.region = nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'endpoint')
|
|
98
|
+
self.endpoint = attributes[:'endpoint']
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
103
|
+
# @return Array for valid properties with the reasons
|
|
104
|
+
def list_invalid_properties
|
|
105
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
106
|
+
invalid_properties = Array.new
|
|
107
|
+
if @access_key_id.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "access_key_id", access_key_id cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if @secret_access_key.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "secret_access_key", secret_access_key cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if @region.nil?
|
|
116
|
+
invalid_properties.push('invalid value for "region", region cannot be nil.')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
invalid_properties
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Check to see if the all the properties in the model are valid
|
|
123
|
+
# @return true if the model is valid
|
|
124
|
+
def valid?
|
|
125
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
126
|
+
return false if @access_key_id.nil?
|
|
127
|
+
return false if @secret_access_key.nil?
|
|
128
|
+
return false if @region.nil?
|
|
129
|
+
true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Custom attribute writer method with validation
|
|
133
|
+
# @param [Object] access_key_id Value to be assigned
|
|
134
|
+
def access_key_id=(access_key_id)
|
|
135
|
+
if access_key_id.nil?
|
|
136
|
+
fail ArgumentError, 'access_key_id cannot be nil'
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
@access_key_id = access_key_id
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Custom attribute writer method with validation
|
|
143
|
+
# @param [Object] secret_access_key Value to be assigned
|
|
144
|
+
def secret_access_key=(secret_access_key)
|
|
145
|
+
if secret_access_key.nil?
|
|
146
|
+
fail ArgumentError, 'secret_access_key cannot be nil'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
@secret_access_key = secret_access_key
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Custom attribute writer method with validation
|
|
153
|
+
# @param [Object] region Value to be assigned
|
|
154
|
+
def region=(region)
|
|
155
|
+
if region.nil?
|
|
156
|
+
fail ArgumentError, 'region cannot be nil'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
@region = region
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Checks equality by comparing each attribute.
|
|
163
|
+
# @param [Object] Object to be compared
|
|
164
|
+
def ==(o)
|
|
165
|
+
return true if self.equal?(o)
|
|
166
|
+
self.class == o.class &&
|
|
167
|
+
access_key_id == o.access_key_id &&
|
|
168
|
+
secret_access_key == o.secret_access_key &&
|
|
169
|
+
region == o.region &&
|
|
170
|
+
endpoint == o.endpoint
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# @see the `==` method
|
|
174
|
+
# @param [Object] Object to be compared
|
|
175
|
+
def eql?(o)
|
|
176
|
+
self == o
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Calculates hash code according to all attributes.
|
|
180
|
+
# @return [Integer] Hash code
|
|
181
|
+
def hash
|
|
182
|
+
[access_key_id, secret_access_key, region, endpoint].hash
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Builds the object from hash
|
|
186
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
187
|
+
# @return [Object] Returns the model itself
|
|
188
|
+
def self.build_from_hash(attributes)
|
|
189
|
+
return nil unless attributes.is_a?(Hash)
|
|
190
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
191
|
+
transformed_hash = {}
|
|
192
|
+
openapi_types.each_pair do |key, type|
|
|
193
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
194
|
+
transformed_hash["#{key}"] = nil
|
|
195
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
196
|
+
# check to ensure the input is an array given that the attribute
|
|
197
|
+
# is documented as an array but the input is not
|
|
198
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
199
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
200
|
+
end
|
|
201
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
202
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
new(transformed_hash)
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Deserializes the data based on type
|
|
209
|
+
# @param string type Data type
|
|
210
|
+
# @param string value Value to be deserialized
|
|
211
|
+
# @return [Object] Deserialized data
|
|
212
|
+
def self._deserialize(type, value)
|
|
213
|
+
case type.to_sym
|
|
214
|
+
when :Time
|
|
215
|
+
Time.parse(value)
|
|
216
|
+
when :Date
|
|
217
|
+
Date.parse(value)
|
|
218
|
+
when :String
|
|
219
|
+
value.to_s
|
|
220
|
+
when :Integer
|
|
221
|
+
value.to_i
|
|
222
|
+
when :Float
|
|
223
|
+
value.to_f
|
|
224
|
+
when :Boolean
|
|
225
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
226
|
+
true
|
|
227
|
+
else
|
|
228
|
+
false
|
|
229
|
+
end
|
|
230
|
+
when :Object
|
|
231
|
+
# generic object (usually a Hash), return directly
|
|
232
|
+
value
|
|
233
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
234
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
235
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
236
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
237
|
+
k_type = Regexp.last_match[:k_type]
|
|
238
|
+
v_type = Regexp.last_match[:v_type]
|
|
239
|
+
{}.tap do |hash|
|
|
240
|
+
value.each do |k, v|
|
|
241
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
else # model
|
|
245
|
+
# models (e.g. Pet) or oneOf
|
|
246
|
+
klass = RagieRubySdk.const_get(type)
|
|
247
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Returns the string representation of the object
|
|
252
|
+
# @return [String] String presentation of the object
|
|
253
|
+
def to_s
|
|
254
|
+
to_hash.to_s
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
258
|
+
# @return [Hash] Returns the object in the form of hash
|
|
259
|
+
def to_body
|
|
260
|
+
to_hash
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Returns the object in the form of hash
|
|
264
|
+
# @return [Hash] Returns the object in the form of hash
|
|
265
|
+
def to_hash
|
|
266
|
+
hash = {}
|
|
267
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
268
|
+
value = self.send(attr)
|
|
269
|
+
if value.nil?
|
|
270
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
271
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
hash[param] = _to_hash(value)
|
|
275
|
+
end
|
|
276
|
+
hash
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Outputs non-array value in the form of hash
|
|
280
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
281
|
+
# @param [Object] value Any valid value
|
|
282
|
+
# @return [Hash] Returns the value in the form of hash
|
|
283
|
+
def _to_hash(value)
|
|
284
|
+
if value.is_a?(Array)
|
|
285
|
+
value.compact.map { |v| _to_hash(v) }
|
|
286
|
+
elsif value.is_a?(Hash)
|
|
287
|
+
{}.tap do |hash|
|
|
288
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
289
|
+
end
|
|
290
|
+
elsif value.respond_to? :to_hash
|
|
291
|
+
value.to_hash
|
|
292
|
+
else
|
|
293
|
+
value
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
end
|