daily-ruby 0.0.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +13 -12
- data/README.md +203 -40
- data/daily-ruby.gemspec +4 -4
- data/docs/BatchRoomCreateRequest.md +18 -0
- data/docs/BatchRoomCreateRequestRoomsInner.md +22 -0
- data/docs/BatchRoomDelete200Response.md +18 -0
- data/docs/BatchRoomsApi.md +150 -0
- data/docs/CreateMeetingToken200Response.md +1 -1
- data/docs/CreateMeetingTokenRequest.md +18 -0
- data/docs/CreateRoom200Response.md +30 -0
- data/docs/{RoomRequest.md → CreateRoomRequest.md} +3 -3
- data/docs/DailyLiveStreamingOptions.md +40 -0
- data/docs/DailyLiveStreamingOptionsRtmpUrl.md +49 -0
- data/docs/DailyStreamingActiveParticipantLayoutConfig.md +18 -0
- data/docs/DailyStreamingCustomLayoutConfig.md +24 -0
- data/docs/DailyStreamingCustomLayoutConfigCompositionParams.md +15 -0
- data/docs/DailyStreamingDefaultLayoutConfig.md +20 -0
- data/docs/{ServerErrorResponse.md → DailyStreamingEndpoint.md} +4 -4
- data/docs/DailyStreamingLayoutConfig.md +69 -0
- data/docs/DailyStreamingOptions.md +36 -0
- data/docs/DailyStreamingPortraitLayoutConfig.md +22 -0
- data/docs/DailyStreamingPortraitLayoutVariant.md +15 -0
- data/docs/DailyStreamingSingleParticipantLayoutConfig.md +20 -0
- data/docs/DeleteTranscript200Response.md +30 -0
- data/docs/Domain.md +18 -0
- data/docs/DomainApi.md +149 -0
- data/docs/DomainProperties.md +74 -0
- data/docs/Eject200Response.md +18 -0
- data/docs/EjectRequest.md +18 -0
- data/docs/GetDomainConfig200Response.md +22 -0
- data/docs/GetDomainConfig200ResponseConfig.md +54 -0
- data/docs/GetDomainConfig200ResponseConfigRecordingsBucket.md +20 -0
- data/docs/GetMeetingInfo200Response.md +20 -0
- data/docs/GetMeetingInfo200ResponseDataInner.md +28 -0
- data/docs/GetMeetingInfo200ResponseDataInnerParticipantsInner.md +26 -0
- data/docs/GetPresence200Response.md +18 -0
- data/docs/GetPresence200ResponseAIVWWhzHlLHrSdHdw7EWInner.md +28 -0
- data/docs/GetRecordingInfo200Response.md +36 -0
- data/docs/GetRecordingInfo200ResponseTracksInner.md +22 -0
- data/docs/GetRecordingLink200Response.md +20 -0
- data/docs/GetTranscriptInfo200Response.md +32 -0
- data/docs/GetTranscriptInfo200ResponseOutParams.md +22 -0
- data/docs/GetTranscriptLink200Response.md +22 -0
- data/docs/ListAPILogs200Response.md +38 -0
- data/docs/ListRecordings200Response.md +20 -0
- data/docs/ListRecordings200ResponseDataInner.md +30 -0
- data/docs/ListRooms200Response.md +20 -0
- data/docs/ListRooms200ResponseDataInner.md +30 -0
- data/docs/ListRooms200ResponseDataInnerConfig.md +18 -0
- data/docs/ListTranscript200Response.md +20 -0
- data/docs/ListTranscript200ResponseDataInner.md +28 -0
- data/docs/LogsApi.md +177 -0
- data/docs/MeetingParticipantsGetRes.md +20 -0
- data/docs/MeetingParticipantsGetResDataInner.md +28 -0
- data/docs/MeetingTokensApi.md +88 -10
- data/docs/MeetingsApi.md +247 -0
- data/docs/MeetingsMeetingGetRes.md +28 -0
- data/docs/Permissions.md +22 -0
- data/docs/{MeetingTokenRequestPropertiesPermissionsCanSend.md → PermissionsCanAdmin.md} +4 -4
- data/docs/{MeetingTokenRequestPropertiesPermissionsCanAdmin.md → PermissionsCanSend.md} +4 -4
- data/docs/PostWebhook.md +22 -0
- data/docs/PresenceApi.md +74 -0
- data/docs/Properties.md +60 -0
- data/docs/RecordingError.md +24 -0
- data/docs/RecordingErrorPayload.md +26 -0
- data/docs/RecordingReadyToDownload.md +24 -0
- data/docs/RecordingReadyToDownloadPayload.md +34 -0
- data/docs/RecordingStarted.md +24 -0
- data/docs/RecordingStartedPayload.md +28 -0
- data/docs/RecordingStreamingOptions.md +38 -0
- data/docs/RecordingsApi.md +303 -0
- data/docs/RecordingsBucket.md +26 -0
- data/docs/RoomProperties.md +94 -0
- data/docs/RoomPropertiesStreamingEndpointsInner.md +28 -0
- data/docs/RoomPropertiesStreamingEndpointsInnerHlsConfigVariantsInner.md +26 -0
- data/docs/RoomsApi.md +1418 -0
- data/docs/RoomsRoomNameGetRes.md +30 -0
- data/docs/RoomsRoomNamePresenceGetRes.md +20 -0
- data/docs/RoomsRoomNamePresenceGetResDataInner.md +28 -0
- data/docs/SendAppMessageRequest.md +20 -0
- data/docs/SetRoomConfigRequest.md +20 -0
- data/docs/SetSessionDataRequest.md +22 -0
- data/docs/StreamingEnded.md +24 -0
- data/docs/StreamingEndedPayload.md +22 -0
- data/docs/StreamingError.md +24 -0
- data/docs/StreamingErrorPayload.md +26 -0
- data/docs/StreamingStarted.md +24 -0
- data/docs/StreamingStartedPayload.md +24 -0
- data/docs/StreamingUpdated.md +24 -0
- data/docs/StreamingUpdatedPayload.md +24 -0
- data/docs/TranscriptApi.md +305 -0
- data/docs/TranscriptionBucket.md +24 -0
- data/docs/TranscriptionProperties.md +32 -0
- data/docs/TranscriptionPropertiesEndpointing.md +49 -0
- data/docs/TranscriptionPropertiesRedact.md +51 -0
- data/docs/UpdatePermissionsRequest.md +18 -0
- data/docs/UpdatePermissionsRequestDataValue.md +22 -0
- data/docs/UpdatePermissionsRequestDataValueCanSend.md +49 -0
- data/docs/UpdateWebhook.md +22 -0
- data/docs/ValidateMeetingToken200Response.md +28 -0
- data/docs/Webhook.md +38 -0
- data/docs/WebhooksApi.md +370 -0
- data/example.rb +61 -0
- data/lib/daily-ruby/api/batch_rooms_api.rb +143 -0
- data/lib/daily-ruby/api/domain_api.rb +143 -0
- data/lib/daily-ruby/api/logs_api.rb +181 -0
- data/lib/daily-ruby/api/meeting_tokens_api.rb +78 -12
- data/lib/daily-ruby/api/meetings_api.rb +238 -0
- data/lib/daily-ruby/api/presence_api.rb +77 -0
- data/lib/daily-ruby/api/recordings_api.rb +280 -0
- data/lib/daily-ruby/api/rooms_api.rb +1302 -0
- data/lib/daily-ruby/api/transcript_api.rb +283 -0
- data/lib/daily-ruby/api/webhooks_api.rb +339 -0
- data/lib/daily-ruby/api_client.rb +4 -4
- data/lib/daily-ruby/api_error.rb +4 -4
- data/lib/daily-ruby/configuration.rb +19 -7
- data/lib/daily-ruby/models/{room_deleted_response.rb → batch_room_create_request.rb} +16 -24
- data/lib/daily-ruby/models/batch_room_create_request_rooms_inner.rb +232 -0
- data/lib/daily-ruby/models/batch_room_delete200_response.rb +214 -0
- data/lib/daily-ruby/models/create_meeting_token200_response.rb +4 -4
- data/lib/daily-ruby/models/{server_error_response.rb → create_meeting_token_request.rb} +14 -15
- data/lib/daily-ruby/models/create_room200_response.rb +270 -0
- data/lib/daily-ruby/models/create_room_request.rb +232 -0
- data/lib/daily-ruby/models/daily_live_streaming_options.rb +324 -0
- data/lib/daily-ruby/models/{meeting_token_request_properties_permissions_can_send.rb → daily_live_streaming_options_rtmp_url.rb} +6 -6
- data/lib/daily-ruby/models/{room_request.rb → daily_streaming_active_participant_layout_config.rb} +29 -41
- data/lib/daily-ruby/models/daily_streaming_custom_layout_config.rb +293 -0
- data/lib/daily-ruby/models/daily_streaming_custom_layout_config_composition_params.rb +105 -0
- data/lib/daily-ruby/models/daily_streaming_default_layout_config.rb +264 -0
- data/lib/daily-ruby/models/daily_streaming_endpoint.rb +221 -0
- data/lib/daily-ruby/models/daily_streaming_layout_config.rb +46 -0
- data/lib/daily-ruby/models/daily_streaming_options.rb +304 -0
- data/lib/daily-ruby/models/daily_streaming_portrait_layout_config.rb +273 -0
- data/lib/daily-ruby/models/daily_streaming_portrait_layout_variant.rb +40 -0
- data/lib/daily-ruby/models/daily_streaming_single_participant_layout_config.rb +271 -0
- data/lib/daily-ruby/models/delete_transcript200_response.rb +307 -0
- data/lib/daily-ruby/models/{meeting_token_request.rb → domain.rb} +8 -9
- data/lib/daily-ruby/models/domain_properties.rb +570 -0
- data/lib/daily-ruby/models/eject200_response.rb +216 -0
- data/lib/daily-ruby/models/eject_request.rb +217 -0
- data/lib/daily-ruby/models/get_domain_config200_response.rb +271 -0
- data/lib/daily-ruby/models/get_domain_config200_response_config.rb +395 -0
- data/lib/daily-ruby/models/get_domain_config200_response_config_recordings_bucket.rb +223 -0
- data/lib/daily-ruby/models/get_meeting_info200_response.rb +259 -0
- data/lib/daily-ruby/models/get_meeting_info200_response_data_inner.rb +353 -0
- data/lib/daily-ruby/models/get_meeting_info200_response_data_inner_participants_inner.rb +290 -0
- data/lib/daily-ruby/models/get_presence200_response.rb +243 -0
- data/lib/daily-ruby/models/get_presence200_response_aivw_whz_hl_lhr_sd_hdw7_ew_inner.rb +370 -0
- data/lib/daily-ruby/models/get_recording_info200_response.rb +340 -0
- data/lib/daily-ruby/models/get_recording_info200_response_tracks_inner.rb +269 -0
- data/lib/daily-ruby/models/get_recording_link200_response.rb +225 -0
- data/lib/daily-ruby/models/get_transcript_info200_response.rb +317 -0
- data/lib/daily-ruby/models/get_transcript_info200_response_out_params.rb +232 -0
- data/lib/daily-ruby/models/get_transcript_link200_response.rb +233 -0
- data/lib/daily-ruby/models/list_api_logs200_response.rb +315 -0
- data/lib/daily-ruby/models/list_recordings200_response.rb +227 -0
- data/lib/daily-ruby/models/list_recordings200_response_data_inner.rb +272 -0
- data/lib/daily-ruby/models/list_rooms200_response.rb +227 -0
- data/lib/daily-ruby/models/list_rooms200_response_data_inner.rb +270 -0
- data/lib/daily-ruby/models/list_rooms200_response_data_inner_config.rb +216 -0
- data/lib/daily-ruby/models/list_transcript200_response.rb +227 -0
- data/lib/daily-ruby/models/list_transcript200_response_data_inner.rb +298 -0
- data/lib/daily-ruby/models/meeting_participants_get_res.rb +225 -0
- data/lib/daily-ruby/models/meeting_participants_get_res_data_inner.rb +259 -0
- data/lib/daily-ruby/models/meetings_meeting_get_res.rb +259 -0
- data/lib/daily-ruby/models/permissions.rb +234 -0
- data/lib/daily-ruby/models/permissions_can_admin.rb +106 -0
- data/lib/daily-ruby/models/permissions_can_send.rb +106 -0
- data/lib/daily-ruby/models/post_webhook.rb +259 -0
- data/lib/daily-ruby/models/{meeting_token_request_properties.rb → properties.rb} +81 -29
- data/lib/daily-ruby/models/recording_error.rb +278 -0
- data/lib/daily-ruby/models/recording_error_payload.rb +290 -0
- data/lib/daily-ruby/models/recording_ready_to_download.rb +278 -0
- data/lib/daily-ruby/models/recording_ready_to_download_payload.rb +344 -0
- data/lib/daily-ruby/models/recording_started.rb +278 -0
- data/lib/daily-ruby/models/recording_started_payload.rb +299 -0
- data/lib/daily-ruby/models/recording_streaming_options.rb +350 -0
- data/lib/daily-ruby/models/recordings_bucket.rb +258 -0
- data/lib/daily-ruby/models/room_properties.rb +678 -0
- data/lib/daily-ruby/models/room_properties_streaming_endpoints_inner.rb +267 -0
- data/lib/daily-ruby/models/room_properties_streaming_endpoints_inner_hls_config_variants_inner.rb +255 -0
- data/lib/daily-ruby/models/{room_response.rb → rooms_room_name_get_res.rb} +22 -12
- data/lib/daily-ruby/models/rooms_room_name_presence_get_res.rb +225 -0
- data/lib/daily-ruby/models/rooms_room_name_presence_get_res_data_inner.rb +259 -0
- data/lib/daily-ruby/models/send_app_message_request.rb +227 -0
- data/lib/daily-ruby/models/set_room_config_request.rb +223 -0
- data/lib/daily-ruby/models/set_session_data_request.rb +273 -0
- data/lib/daily-ruby/models/streaming_ended.rb +278 -0
- data/lib/daily-ruby/models/streaming_ended_payload.rb +236 -0
- data/lib/daily-ruby/models/streaming_error.rb +278 -0
- data/lib/daily-ruby/models/streaming_error_payload.rb +256 -0
- data/lib/daily-ruby/models/streaming_started.rb +278 -0
- data/lib/daily-ruby/models/streaming_started_payload.rb +245 -0
- data/lib/daily-ruby/models/streaming_updated.rb +278 -0
- data/lib/daily-ruby/models/streaming_updated_payload.rb +245 -0
- data/lib/daily-ruby/models/transcription_bucket.rb +246 -0
- data/lib/daily-ruby/models/transcription_properties.rb +283 -0
- data/lib/daily-ruby/models/transcription_properties_endpointing.rb +106 -0
- data/lib/daily-ruby/models/transcription_properties_redact.rb +107 -0
- data/lib/daily-ruby/models/{room_not_found_response.rb → update_permissions_request.rb} +16 -24
- data/lib/daily-ruby/models/{meeting_token_request_properties_permissions.rb → update_permissions_request_data_value.rb} +13 -12
- data/lib/daily-ruby/models/{meeting_token_request_properties_permissions_can_admin.rb → update_permissions_request_data_value_can_send.rb} +5 -5
- data/lib/daily-ruby/models/update_webhook.rb +259 -0
- data/lib/daily-ruby/models/validate_meeting_token200_response.rb +265 -0
- data/lib/daily-ruby/models/webhook.rb +339 -0
- data/lib/daily-ruby/version.rb +5 -5
- data/lib/daily-ruby.rb +101 -16
- data/run.sh +1 -1
- data/spec/api/batch_rooms_api_spec.rb +58 -0
- data/spec/api/domain_api_spec.rb +58 -0
- data/spec/api/logs_api_spec.rb +70 -0
- data/spec/api/meeting_tokens_api_spec.rb +20 -7
- data/spec/api/meetings_api_spec.rb +81 -0
- data/spec/api/presence_api_spec.rb +45 -0
- data/spec/api/recordings_api_spec.rb +86 -0
- data/spec/api/rooms_api_spec.rb +278 -0
- data/spec/api/transcript_api_spec.rb +87 -0
- data/spec/api/webhooks_api_spec.rb +95 -0
- data/spec/models/batch_room_create_request_rooms_inner_spec.rb +48 -0
- data/spec/models/batch_room_create_request_spec.rb +36 -0
- data/spec/models/batch_room_delete200_response_spec.rb +36 -0
- data/spec/models/create_meeting_token200_response_spec.rb +4 -4
- data/spec/models/create_meeting_token_request_spec.rb +36 -0
- data/spec/models/create_room200_response_spec.rb +72 -0
- data/spec/models/{room_request_spec.rb → create_room_request_spec.rb} +10 -14
- data/spec/models/daily_live_streaming_options_rtmp_url_spec.rb +32 -0
- data/spec/models/daily_live_streaming_options_spec.rb +102 -0
- data/spec/models/daily_streaming_active_participant_layout_config_spec.rb +40 -0
- data/spec/models/daily_streaming_custom_layout_config_composition_params_spec.rb +21 -0
- data/spec/models/daily_streaming_custom_layout_config_spec.rb +58 -0
- data/spec/models/daily_streaming_default_layout_config_spec.rb +46 -0
- data/spec/models/daily_streaming_endpoint_spec.rb +36 -0
- data/spec/models/daily_streaming_layout_config_spec.rb +38 -0
- data/spec/models/daily_streaming_options_spec.rb +90 -0
- data/spec/models/daily_streaming_portrait_layout_config_spec.rb +52 -0
- data/spec/models/daily_streaming_portrait_layout_variant_spec.rb +30 -0
- data/spec/models/daily_streaming_single_participant_layout_config_spec.rb +46 -0
- data/spec/models/delete_transcript200_response_spec.rb +76 -0
- data/spec/models/{room_request_properties_spec.rb → domain_properties_spec.rb} +39 -49
- data/spec/models/domain_spec.rb +36 -0
- data/spec/models/eject200_response_spec.rb +36 -0
- data/spec/models/eject_request_spec.rb +36 -0
- data/spec/models/get_domain_config200_response_config_recordings_bucket_spec.rb +42 -0
- data/spec/models/get_domain_config200_response_config_spec.rb +144 -0
- data/spec/models/get_domain_config200_response_spec.rb +48 -0
- data/spec/models/get_meeting_info200_response_data_inner_participants_inner_spec.rb +60 -0
- data/spec/models/get_meeting_info200_response_data_inner_spec.rb +66 -0
- data/spec/models/get_meeting_info200_response_spec.rb +42 -0
- data/spec/models/get_presence200_response_aivw_whz_hl_lhr_sd_hdw7_ew_inner_spec.rb +66 -0
- data/spec/models/get_presence200_response_spec.rb +36 -0
- data/spec/models/get_recording_info200_response_spec.rb +94 -0
- data/spec/models/get_recording_info200_response_tracks_inner_spec.rb +52 -0
- data/spec/models/get_recording_link200_response_spec.rb +42 -0
- data/spec/models/get_transcript_info200_response_out_params_spec.rb +48 -0
- data/spec/models/get_transcript_info200_response_spec.rb +82 -0
- data/spec/models/get_transcript_link200_response_spec.rb +48 -0
- data/spec/models/list_api_logs200_response_spec.rb +96 -0
- data/spec/models/list_recordings200_response_data_inner_spec.rb +72 -0
- data/spec/models/list_recordings200_response_spec.rb +42 -0
- data/spec/models/list_rooms200_response_data_inner_config_spec.rb +36 -0
- data/spec/models/list_rooms200_response_data_inner_spec.rb +72 -0
- data/spec/models/list_rooms200_response_spec.rb +42 -0
- data/spec/models/list_transcript200_response_data_inner_spec.rb +70 -0
- data/spec/models/list_transcript200_response_spec.rb +42 -0
- data/spec/models/meeting_participants_get_res_data_inner_spec.rb +66 -0
- data/spec/models/meeting_participants_get_res_spec.rb +42 -0
- data/spec/models/meetings_meeting_get_res_spec.rb +66 -0
- data/spec/models/{meeting_token_request_properties_permissions_can_send_spec.rb → permissions_can_admin_spec.rb} +6 -6
- data/spec/models/{meeting_token_request_properties_permissions_can_admin_spec.rb → permissions_can_send_spec.rb} +6 -6
- data/spec/models/{meeting_token_request_properties_permissions_spec.rb → permissions_spec.rb} +10 -10
- data/spec/models/post_webhook_spec.rb +52 -0
- data/spec/models/{meeting_token_request_properties_spec.rb → properties_spec.rb} +27 -15
- data/spec/models/recording_error_payload_spec.rb +64 -0
- data/spec/models/recording_error_spec.rb +58 -0
- data/spec/models/recording_ready_to_download_payload_spec.rb +92 -0
- data/spec/models/recording_ready_to_download_spec.rb +58 -0
- data/spec/models/recording_started_payload_spec.rb +70 -0
- data/spec/models/recording_started_spec.rb +58 -0
- data/spec/models/recording_streaming_options_spec.rb +100 -0
- data/spec/models/recordings_bucket_spec.rb +60 -0
- data/spec/models/room_properties_spec.rb +272 -0
- data/spec/models/room_properties_streaming_endpoints_inner_hls_config_variants_inner_spec.rb +60 -0
- data/spec/models/room_properties_streaming_endpoints_inner_spec.rb +66 -0
- data/spec/models/{room_response_spec.rb → rooms_room_name_get_res_spec.rb} +16 -10
- data/spec/models/rooms_room_name_presence_get_res_data_inner_spec.rb +66 -0
- data/spec/models/rooms_room_name_presence_get_res_spec.rb +42 -0
- data/spec/models/send_app_message_request_spec.rb +42 -0
- data/spec/models/set_room_config_request_spec.rb +42 -0
- data/spec/models/set_session_data_request_spec.rb +52 -0
- data/spec/models/streaming_ended_payload_spec.rb +48 -0
- data/spec/models/streaming_ended_spec.rb +58 -0
- data/spec/models/streaming_error_payload_spec.rb +60 -0
- data/spec/models/streaming_error_spec.rb +58 -0
- data/spec/models/streaming_started_payload_spec.rb +54 -0
- data/spec/models/streaming_started_spec.rb +58 -0
- data/spec/models/streaming_updated_payload_spec.rb +54 -0
- data/spec/models/streaming_updated_spec.rb +58 -0
- data/spec/models/transcription_bucket_spec.rb +54 -0
- data/spec/models/transcription_properties_endpointing_spec.rb +32 -0
- data/spec/models/transcription_properties_redact_spec.rb +32 -0
- data/spec/models/transcription_properties_spec.rb +78 -0
- data/spec/models/update_permissions_request_data_value_can_send_spec.rb +32 -0
- data/spec/models/update_permissions_request_data_value_spec.rb +48 -0
- data/spec/models/update_permissions_request_spec.rb +36 -0
- data/spec/models/update_webhook_spec.rb +52 -0
- data/spec/models/validate_meeting_token200_response_spec.rb +66 -0
- data/spec/models/webhook_spec.rb +100 -0
- data/spec/spec_helper.rb +4 -4
- metadata +391 -52
- data/daily.yaml +0 -422
- data/docs/MeetingTokenRequest.md +0 -18
- data/docs/MeetingTokenRequestProperties.md +0 -56
- data/docs/MeetingTokenRequestPropertiesPermissions.md +0 -22
- data/docs/RoomApi.md +0 -227
- data/docs/RoomDeletedResponse.md +0 -20
- data/docs/RoomNotFoundResponse.md +0 -20
- data/docs/RoomRequestProperties.md +0 -76
- data/docs/RoomResponse.md +0 -28
- data/lib/daily-ruby/api/room_api.rb +0 -218
- data/lib/daily-ruby/models/room_request_properties.rb +0 -521
- data/script.rb +0 -35
- data/spec/api/room_api_spec.rb +0 -74
- data/spec/models/meeting_token_request_spec.rb +0 -36
- data/spec/models/room_deleted_response_spec.rb +0 -42
- data/spec/models/room_not_found_response_spec.rb +0 -42
- data/spec/models/server_error_response_spec.rb +0 -36
@@ -0,0 +1,107 @@
|
|
1
|
+
=begin
|
2
|
+
#Daily API
|
3
|
+
|
4
|
+
#The Daily REST API offers the ability to manage the following: - Overall Domain Configuration - Individual Room creation and config management - Meeting token creation and validation - Recording and compositing management - Meeting analytics - Logs and metrics - Real-time presence Please reach out to help@daily.co if we can help with anything
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.1.1
|
7
|
+
Contact: help@daily.co
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.3.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Daily
|
17
|
+
# See Deepgram's documentation for [`redact`](https://developers.deepgram.com/docs/redaction)
|
18
|
+
module TranscriptionPropertiesRedact
|
19
|
+
class << self
|
20
|
+
# List of class defined in oneOf (OpenAPI v3)
|
21
|
+
def openapi_one_of
|
22
|
+
[
|
23
|
+
:'Array<Boolean>',
|
24
|
+
:'Array<String>',
|
25
|
+
:'Boolean'
|
26
|
+
]
|
27
|
+
end
|
28
|
+
|
29
|
+
# Builds the object
|
30
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
31
|
+
# @return [Object] Returns the model or the data itself
|
32
|
+
def build(data)
|
33
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
34
|
+
# Note:
|
35
|
+
# - We do not attempt to check whether exactly one item matches.
|
36
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
37
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
38
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
39
|
+
# - TODO: logging when debugging is set.
|
40
|
+
openapi_one_of.each do |klass|
|
41
|
+
begin
|
42
|
+
next if klass == :AnyType # "nullable: true"
|
43
|
+
typed_data = find_and_cast_into_type(klass, data)
|
44
|
+
return typed_data if typed_data
|
45
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
openapi_one_of.include?(:AnyType) ? data : nil
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
SchemaMismatchError = Class.new(StandardError)
|
55
|
+
|
56
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
57
|
+
def find_and_cast_into_type(klass, data)
|
58
|
+
return if data.nil?
|
59
|
+
|
60
|
+
case klass.to_s
|
61
|
+
when 'Boolean'
|
62
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
63
|
+
when 'Float'
|
64
|
+
return data if data.instance_of?(Float)
|
65
|
+
when 'Integer'
|
66
|
+
return data if data.instance_of?(Integer)
|
67
|
+
when 'Time'
|
68
|
+
return Time.parse(data)
|
69
|
+
when 'Date'
|
70
|
+
return Date.parse(data)
|
71
|
+
when 'String'
|
72
|
+
return data if data.instance_of?(String)
|
73
|
+
when 'Object' # "type: object"
|
74
|
+
return data if data.instance_of?(Hash)
|
75
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
76
|
+
if data.instance_of?(Array)
|
77
|
+
sub_type = Regexp.last_match[:sub_type]
|
78
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
79
|
+
end
|
80
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
81
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
82
|
+
sub_type = Regexp.last_match[:sub_type]
|
83
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
84
|
+
end
|
85
|
+
else # model
|
86
|
+
const = Daily.const_get(klass)
|
87
|
+
if const
|
88
|
+
if const.respond_to?(:openapi_one_of) # nested oneOf model
|
89
|
+
model = const.build(data)
|
90
|
+
return model if model
|
91
|
+
else
|
92
|
+
# raise if data contains keys that are not known to the model
|
93
|
+
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
94
|
+
model = const.build_from_hash(data)
|
95
|
+
return model if model
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
raise # if no match by now, raise
|
101
|
+
rescue
|
102
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
=begin
|
2
|
-
#Daily
|
2
|
+
#Daily API
|
3
3
|
|
4
|
-
#The
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 0.0.0
|
4
|
+
#The Daily REST API offers the ability to manage the following: - Overall Domain Configuration - Individual Room creation and config management - Meeting token creation and validation - Recording and compositing management - Meeting analytics - Logs and metrics - Real-time presence Please reach out to help@daily.co if we can help with anything
|
7
5
|
|
6
|
+
The version of the OpenAPI document: 1.1.1
|
7
|
+
Contact: help@daily.co
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.3.0
|
10
10
|
|
@@ -14,17 +14,13 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Daily
|
17
|
-
|
18
|
-
|
19
|
-
attr_accessor :error
|
20
|
-
|
21
|
-
attr_accessor :info
|
17
|
+
class UpdatePermissionsRequest
|
18
|
+
attr_accessor :data
|
22
19
|
|
23
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
21
|
def self.attribute_map
|
25
22
|
{
|
26
|
-
:'
|
27
|
-
:'info' => :'info'
|
23
|
+
:'data' => :'data'
|
28
24
|
}
|
29
25
|
end
|
30
26
|
|
@@ -36,8 +32,7 @@ module Daily
|
|
36
32
|
# Attribute type mapping.
|
37
33
|
def self.openapi_types
|
38
34
|
{
|
39
|
-
:'
|
40
|
-
:'info' => :'String'
|
35
|
+
:'data' => :'Hash<String, UpdatePermissionsRequestDataValue>'
|
41
36
|
}
|
42
37
|
end
|
43
38
|
|
@@ -51,23 +46,21 @@ module Daily
|
|
51
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
52
47
|
def initialize(attributes = {})
|
53
48
|
if (!attributes.is_a?(Hash))
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Daily::
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Daily::UpdatePermissionsRequest` initialize method"
|
55
50
|
end
|
56
51
|
|
57
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Daily::
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Daily::UpdatePermissionsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
56
|
end
|
62
57
|
h[k.to_sym] = v
|
63
58
|
}
|
64
59
|
|
65
|
-
if attributes.key?(:'
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
if attributes.key?(:'info')
|
70
|
-
self.info = attributes[:'info']
|
60
|
+
if attributes.key?(:'data')
|
61
|
+
if (value = attributes[:'data']).is_a?(Hash)
|
62
|
+
self.data = value
|
63
|
+
end
|
71
64
|
end
|
72
65
|
end
|
73
66
|
|
@@ -91,8 +84,7 @@ module Daily
|
|
91
84
|
def ==(o)
|
92
85
|
return true if self.equal?(o)
|
93
86
|
self.class == o.class &&
|
94
|
-
|
95
|
-
info == o.info
|
87
|
+
data == o.data
|
96
88
|
end
|
97
89
|
|
98
90
|
# @see the `==` method
|
@@ -104,7 +96,7 @@ module Daily
|
|
104
96
|
# Calculates hash code according to all attributes.
|
105
97
|
# @return [Integer] Hash code
|
106
98
|
def hash
|
107
|
-
[
|
99
|
+
[data].hash
|
108
100
|
end
|
109
101
|
|
110
102
|
# Builds the object from hash
|
@@ -1,10 +1,10 @@
|
|
1
1
|
=begin
|
2
|
-
#Daily
|
2
|
+
#Daily API
|
3
3
|
|
4
|
-
#The
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 0.0.0
|
4
|
+
#The Daily REST API offers the ability to manage the following: - Overall Domain Configuration - Individual Room creation and config management - Meeting token creation and validation - Recording and compositing management - Meeting analytics - Logs and metrics - Real-time presence Please reach out to help@daily.co if we can help with anything
|
7
5
|
|
6
|
+
The version of the OpenAPI document: 1.1.1
|
7
|
+
Contact: help@daily.co
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.3.0
|
10
10
|
|
@@ -14,7 +14,8 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Daily
|
17
|
-
|
17
|
+
# Permissions to modify for a given participant id or '*'.
|
18
|
+
class UpdatePermissionsRequestDataValue
|
18
19
|
attr_accessor :has_presence
|
19
20
|
|
20
21
|
attr_accessor :can_send
|
@@ -24,9 +25,9 @@ module Daily
|
|
24
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
26
|
def self.attribute_map
|
26
27
|
{
|
27
|
-
:'has_presence' => :'
|
28
|
-
:'can_send' => :'
|
29
|
-
:'can_admin' => :'
|
28
|
+
:'has_presence' => :'hasPresence',
|
29
|
+
:'can_send' => :'canSend',
|
30
|
+
:'can_admin' => :'canAdmin'
|
30
31
|
}
|
31
32
|
end
|
32
33
|
|
@@ -39,8 +40,8 @@ module Daily
|
|
39
40
|
def self.openapi_types
|
40
41
|
{
|
41
42
|
:'has_presence' => :'Boolean',
|
42
|
-
:'can_send' => :'
|
43
|
-
:'can_admin' => :'
|
43
|
+
:'can_send' => :'UpdatePermissionsRequestDataValueCanSend',
|
44
|
+
:'can_admin' => :'UpdatePermissionsRequestDataValueCanSend'
|
44
45
|
}
|
45
46
|
end
|
46
47
|
|
@@ -54,13 +55,13 @@ module Daily
|
|
54
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
55
56
|
def initialize(attributes = {})
|
56
57
|
if (!attributes.is_a?(Hash))
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Daily::
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Daily::UpdatePermissionsRequestDataValue` initialize method"
|
58
59
|
end
|
59
60
|
|
60
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
61
62
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
63
|
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Daily::
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Daily::UpdatePermissionsRequestDataValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
65
|
end
|
65
66
|
h[k.to_sym] = v
|
66
67
|
}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
=begin
|
2
|
-
#Daily
|
2
|
+
#Daily API
|
3
3
|
|
4
|
-
#The
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 0.0.0
|
4
|
+
#The Daily REST API offers the ability to manage the following: - Overall Domain Configuration - Individual Room creation and config management - Meeting token creation and validation - Recording and compositing management - Meeting analytics - Logs and metrics - Real-time presence Please reach out to help@daily.co if we can help with anything
|
7
5
|
|
6
|
+
The version of the OpenAPI document: 1.1.1
|
7
|
+
Contact: help@daily.co
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.3.0
|
10
10
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Daily
|
17
|
-
module
|
17
|
+
module UpdatePermissionsRequestDataValueCanSend
|
18
18
|
class << self
|
19
19
|
# List of class defined in oneOf (OpenAPI v3)
|
20
20
|
def openapi_one_of
|
@@ -0,0 +1,259 @@
|
|
1
|
+
=begin
|
2
|
+
#Daily API
|
3
|
+
|
4
|
+
#The Daily REST API offers the ability to manage the following: - Overall Domain Configuration - Individual Room creation and config management - Meeting token creation and validation - Recording and compositing management - Meeting analytics - Logs and metrics - Real-time presence Please reach out to help@daily.co if we can help with anything
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.1.1
|
7
|
+
Contact: help@daily.co
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.3.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Daily
|
17
|
+
class UpdateWebhook
|
18
|
+
# The webhook server endpoint that was provided.
|
19
|
+
attr_accessor :url
|
20
|
+
|
21
|
+
# The basic auth credentials that will be used to POST to the webhook URL.
|
22
|
+
attr_accessor :basic_auth
|
23
|
+
|
24
|
+
# The set of event types this webhook is subscribed to.
|
25
|
+
attr_accessor :event_types
|
26
|
+
|
27
|
+
class EnumAttributeValidator
|
28
|
+
attr_reader :datatype
|
29
|
+
attr_reader :allowable_values
|
30
|
+
|
31
|
+
def initialize(datatype, allowable_values)
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
33
|
+
case datatype.to_s
|
34
|
+
when /Integer/i
|
35
|
+
value.to_i
|
36
|
+
when /Float/i
|
37
|
+
value.to_f
|
38
|
+
else
|
39
|
+
value
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def valid?(value)
|
45
|
+
!value || allowable_values.include?(value)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
50
|
+
def self.attribute_map
|
51
|
+
{
|
52
|
+
:'url' => :'url',
|
53
|
+
:'basic_auth' => :'basicAuth',
|
54
|
+
:'event_types' => :'eventTypes'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Returns all the JSON keys this model knows about
|
59
|
+
def self.acceptable_attributes
|
60
|
+
attribute_map.values
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.openapi_types
|
65
|
+
{
|
66
|
+
:'url' => :'String',
|
67
|
+
:'basic_auth' => :'String',
|
68
|
+
:'event_types' => :'Array<String>'
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
# List of attributes with nullable: true
|
73
|
+
def self.openapi_nullable
|
74
|
+
Set.new([
|
75
|
+
])
|
76
|
+
end
|
77
|
+
|
78
|
+
# Initializes the object
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
80
|
+
def initialize(attributes = {})
|
81
|
+
if (!attributes.is_a?(Hash))
|
82
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Daily::UpdateWebhook` initialize method"
|
83
|
+
end
|
84
|
+
|
85
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
87
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Daily::UpdateWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
89
|
+
end
|
90
|
+
h[k.to_sym] = v
|
91
|
+
}
|
92
|
+
|
93
|
+
if attributes.key?(:'url')
|
94
|
+
self.url = attributes[:'url']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'basic_auth')
|
98
|
+
self.basic_auth = attributes[:'basic_auth']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'event_types')
|
102
|
+
if (value = attributes[:'event_types']).is_a?(Array)
|
103
|
+
self.event_types = value
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
109
|
+
# @return Array for valid properties with the reasons
|
110
|
+
def list_invalid_properties
|
111
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
112
|
+
invalid_properties = Array.new
|
113
|
+
invalid_properties
|
114
|
+
end
|
115
|
+
|
116
|
+
# Check to see if the all the properties in the model are valid
|
117
|
+
# @return true if the model is valid
|
118
|
+
def valid?
|
119
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
120
|
+
true
|
121
|
+
end
|
122
|
+
|
123
|
+
# Checks equality by comparing each attribute.
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def ==(o)
|
126
|
+
return true if self.equal?(o)
|
127
|
+
self.class == o.class &&
|
128
|
+
url == o.url &&
|
129
|
+
basic_auth == o.basic_auth &&
|
130
|
+
event_types == o.event_types
|
131
|
+
end
|
132
|
+
|
133
|
+
# @see the `==` method
|
134
|
+
# @param [Object] Object to be compared
|
135
|
+
def eql?(o)
|
136
|
+
self == o
|
137
|
+
end
|
138
|
+
|
139
|
+
# Calculates hash code according to all attributes.
|
140
|
+
# @return [Integer] Hash code
|
141
|
+
def hash
|
142
|
+
[url, basic_auth, event_types].hash
|
143
|
+
end
|
144
|
+
|
145
|
+
# Builds the object from hash
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
+
# @return [Object] Returns the model itself
|
148
|
+
def self.build_from_hash(attributes)
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
156
|
+
# check to ensure the input is an array given that the attribute
|
157
|
+
# is documented as an array but the input is not
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
160
|
+
end
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
|
+
end
|
164
|
+
end
|
165
|
+
new(transformed_hash)
|
166
|
+
end
|
167
|
+
|
168
|
+
# Deserializes the data based on type
|
169
|
+
# @param string type Data type
|
170
|
+
# @param string value Value to be deserialized
|
171
|
+
# @return [Object] Deserialized data
|
172
|
+
def self._deserialize(type, value)
|
173
|
+
case type.to_sym
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
176
|
+
when :Date
|
177
|
+
Date.parse(value)
|
178
|
+
when :String
|
179
|
+
value.to_s
|
180
|
+
when :Integer
|
181
|
+
value.to_i
|
182
|
+
when :Float
|
183
|
+
value.to_f
|
184
|
+
when :Boolean
|
185
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
186
|
+
true
|
187
|
+
else
|
188
|
+
false
|
189
|
+
end
|
190
|
+
when :Object
|
191
|
+
# generic object (usually a Hash), return directly
|
192
|
+
value
|
193
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
194
|
+
inner_type = Regexp.last_match[:inner_type]
|
195
|
+
value.map { |v| _deserialize(inner_type, v) }
|
196
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
197
|
+
k_type = Regexp.last_match[:k_type]
|
198
|
+
v_type = Regexp.last_match[:v_type]
|
199
|
+
{}.tap do |hash|
|
200
|
+
value.each do |k, v|
|
201
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
else # model
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = Daily.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
if value.nil?
|
230
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
231
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
232
|
+
end
|
233
|
+
|
234
|
+
hash[param] = _to_hash(value)
|
235
|
+
end
|
236
|
+
hash
|
237
|
+
end
|
238
|
+
|
239
|
+
# Outputs non-array value in the form of hash
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
241
|
+
# @param [Object] value Any valid value
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
243
|
+
def _to_hash(value)
|
244
|
+
if value.is_a?(Array)
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
246
|
+
elsif value.is_a?(Hash)
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
249
|
+
end
|
250
|
+
elsif value.respond_to? :to_hash
|
251
|
+
value.to_hash
|
252
|
+
else
|
253
|
+
value
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
end
|