daily-ruby 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +17 -16
  4. data/README.md +205 -192
  5. data/daily-ruby-1.0.0.gem +0 -0
  6. data/daily-ruby.gemspec +2 -1
  7. data/docs/BatchProcessorError.md +24 -0
  8. data/docs/BatchProcessorErrorPayload.md +26 -0
  9. data/docs/BatchProcessorErrorPayloadInput.md +24 -0
  10. data/docs/BatchProcessorJobFinished.md +24 -0
  11. data/docs/BatchProcessorJobFinishedPayload.md +26 -0
  12. data/docs/BatchProcessorJobFinishedPayloadInput.md +24 -0
  13. data/docs/BatchProcessorJobFinishedPayloadOutput.md +24 -0
  14. data/docs/BatchProcessorJobFinishedPayloadOutputConcept.md +20 -0
  15. data/docs/BatchProcessorJobFinishedPayloadOutputSoap.md +20 -0
  16. data/docs/BatchProcessorJobFinishedPayloadOutputSoapS3Config.md +22 -0
  17. data/docs/BatchProcessorJobFinishedPayloadOutputSummary.md +20 -0
  18. data/docs/BatchProcessorJobFinishedPayloadOutputTranscriptionInner.md +20 -0
  19. data/docs/BuyPhoneNumberRequest.md +18 -0
  20. data/docs/DailyStreamingCustomLayoutConfig.md +1 -1
  21. data/docs/DailyStreamingCustomLayoutConfigCompositionParamsValue.md +15 -0
  22. data/docs/DialinApi.md +80 -0
  23. data/docs/DialoutProperties.md +26 -0
  24. data/docs/DialoutPropertiesCodecs.md +20 -0
  25. data/docs/DomainProperties.md +14 -4
  26. data/docs/EjectRequest.md +6 -2
  27. data/docs/GetDomainConfig200ResponseConfig.md +2 -0
  28. data/docs/GetTranscriptInfo200Response.md +1 -1
  29. data/docs/ListAPILogs200Response.md +1 -1
  30. data/docs/MeetingEnded.md +24 -0
  31. data/docs/MeetingEndedPayload.md +24 -0
  32. data/docs/MeetingParticipantsGetRes.md +0 -2
  33. data/docs/MeetingStarted.md +24 -0
  34. data/docs/MeetingStartedPayload.md +22 -0
  35. data/docs/ParticipantJoined.md +24 -0
  36. data/docs/ParticipantJoinedPayload.md +32 -0
  37. data/docs/ParticipantJoinedPayloadPermissions.md +22 -0
  38. data/docs/ParticipantLeft.md +24 -0
  39. data/docs/ParticipantLeftPayload.md +34 -0
  40. data/docs/PhoneNumbersApi.md +304 -0
  41. data/docs/PinDialinInner.md +22 -0
  42. data/docs/PinDialinInnerIvrGreeting.md +18 -0
  43. data/docs/PinlessCallUpdateRequest.md +22 -0
  44. data/docs/PinlessDialinInner.md +24 -0
  45. data/docs/PostWebhook.md +5 -1
  46. data/docs/Properties.md +3 -1
  47. data/docs/RecordingError.md +1 -1
  48. data/docs/RecordingReadyToDownload.md +1 -1
  49. data/docs/RecordingStarted.md +1 -1
  50. data/docs/RoomDialOutSendDTMFRequest.md +20 -0
  51. data/docs/RoomDialOutStopRequest.md +18 -0
  52. data/docs/RoomProperties.md +12 -2
  53. data/docs/RoomSipCallTransferRequest.md +20 -0
  54. data/docs/RoomsApi.md +376 -0
  55. data/docs/StreamingEnded.md +1 -1
  56. data/docs/StreamingError.md +1 -1
  57. data/docs/StreamingStarted.md +1 -1
  58. data/docs/StreamingUpdated.md +1 -1
  59. data/docs/TranscriptionProperties.md +4 -2
  60. data/docs/UpdateWebhook.md +5 -1
  61. data/docs/WaitingParticipantJoined.md +24 -0
  62. data/docs/WaitingParticipantJoinedPayload.md +32 -0
  63. data/docs/WaitingParticipantLeft.md +24 -0
  64. data/docs/WaitingParticipantLeftPayload.md +34 -0
  65. data/docs/Webhook.md +6 -4
  66. data/lib/daily-ruby/api/batch_rooms_api.rb +3 -3
  67. data/lib/daily-ruby/api/dialin_api.rb +86 -0
  68. data/lib/daily-ruby/api/domain_api.rb +3 -3
  69. data/lib/daily-ruby/api/logs_api.rb +4 -4
  70. data/lib/daily-ruby/api/meeting_tokens_api.rb +3 -3
  71. data/lib/daily-ruby/api/meetings_api.rb +4 -4
  72. data/lib/daily-ruby/api/phone_numbers_api.rb +281 -0
  73. data/lib/daily-ruby/api/presence_api.rb +2 -2
  74. data/lib/daily-ruby/api/recordings_api.rb +5 -5
  75. data/lib/daily-ruby/api/rooms_api.rb +370 -20
  76. data/lib/daily-ruby/api/transcript_api.rb +6 -6
  77. data/lib/daily-ruby/api/webhooks_api.rb +6 -6
  78. data/lib/daily-ruby/api_client.rb +34 -28
  79. data/lib/daily-ruby/api_error.rb +1 -1
  80. data/lib/daily-ruby/configuration.rb +11 -1
  81. data/lib/daily-ruby/models/batch_processor_error.rb +278 -0
  82. data/lib/daily-ruby/models/batch_processor_error_payload.rb +289 -0
  83. data/lib/daily-ruby/models/batch_processor_error_payload_input.rb +280 -0
  84. data/lib/daily-ruby/models/batch_processor_job_finished.rb +278 -0
  85. data/lib/daily-ruby/models/batch_processor_job_finished_payload.rb +288 -0
  86. data/lib/daily-ruby/models/batch_processor_job_finished_payload_input.rb +280 -0
  87. data/lib/daily-ruby/models/batch_processor_job_finished_payload_output.rb +245 -0
  88. data/lib/daily-ruby/models/batch_processor_job_finished_payload_output_concept.rb +259 -0
  89. data/lib/daily-ruby/models/batch_processor_job_finished_payload_output_soap.rb +259 -0
  90. data/lib/daily-ruby/models/batch_processor_job_finished_payload_output_soap_s3_config.rb +236 -0
  91. data/lib/daily-ruby/models/batch_processor_job_finished_payload_output_summary.rb +259 -0
  92. data/lib/daily-ruby/models/batch_processor_job_finished_payload_output_transcription_inner.rb +258 -0
  93. data/lib/daily-ruby/models/batch_room_create_request.rb +1 -1
  94. data/lib/daily-ruby/models/batch_room_create_request_rooms_inner.rb +1 -1
  95. data/lib/daily-ruby/models/batch_room_delete200_response.rb +1 -1
  96. data/lib/daily-ruby/models/buy_phone_number_request.rb +215 -0
  97. data/lib/daily-ruby/models/create_meeting_token200_response.rb +1 -1
  98. data/lib/daily-ruby/models/create_meeting_token_request.rb +1 -1
  99. data/lib/daily-ruby/models/create_room200_response.rb +1 -1
  100. data/lib/daily-ruby/models/create_room_request.rb +1 -1
  101. data/lib/daily-ruby/models/daily_live_streaming_options.rb +1 -1
  102. data/lib/daily-ruby/models/daily_live_streaming_options_rtmp_url.rb +1 -1
  103. data/lib/daily-ruby/models/daily_streaming_active_participant_layout_config.rb +3 -3
  104. data/lib/daily-ruby/models/daily_streaming_custom_layout_config.rb +4 -4
  105. data/lib/daily-ruby/models/daily_streaming_custom_layout_config_composition_params.rb +1 -1
  106. data/lib/daily-ruby/models/daily_streaming_custom_layout_config_composition_params_value.rb +105 -0
  107. data/lib/daily-ruby/models/daily_streaming_default_layout_config.rb +3 -3
  108. data/lib/daily-ruby/models/daily_streaming_endpoint.rb +1 -1
  109. data/lib/daily-ruby/models/daily_streaming_layout_config.rb +1 -1
  110. data/lib/daily-ruby/models/daily_streaming_options.rb +1 -1
  111. data/lib/daily-ruby/models/daily_streaming_portrait_layout_config.rb +3 -3
  112. data/lib/daily-ruby/models/daily_streaming_portrait_layout_variant.rb +3 -2
  113. data/lib/daily-ruby/models/daily_streaming_single_participant_layout_config.rb +3 -3
  114. data/lib/daily-ruby/models/delete_transcript200_response.rb +3 -3
  115. data/lib/daily-ruby/models/dialout_properties.rb +254 -0
  116. data/lib/daily-ruby/models/dialout_properties_codecs.rb +228 -0
  117. data/lib/daily-ruby/models/domain.rb +1 -1
  118. data/lib/daily-ruby/models/domain_properties.rb +74 -16
  119. data/lib/daily-ruby/models/eject200_response.rb +1 -1
  120. data/lib/daily-ruby/models/eject_request.rb +30 -6
  121. data/lib/daily-ruby/models/get_domain_config200_response.rb +1 -1
  122. data/lib/daily-ruby/models/get_domain_config200_response_config.rb +11 -2
  123. data/lib/daily-ruby/models/get_domain_config200_response_config_recordings_bucket.rb +1 -1
  124. data/lib/daily-ruby/models/get_meeting_info200_response.rb +1 -1
  125. data/lib/daily-ruby/models/get_meeting_info200_response_data_inner.rb +1 -1
  126. data/lib/daily-ruby/models/get_meeting_info200_response_data_inner_participants_inner.rb +1 -1
  127. data/lib/daily-ruby/models/get_presence200_response.rb +1 -1
  128. data/lib/daily-ruby/models/get_presence200_response_aivw_whz_hl_lhr_sd_hdw7_ew_inner.rb +1 -1
  129. data/lib/daily-ruby/models/get_recording_info200_response.rb +3 -3
  130. data/lib/daily-ruby/models/get_recording_info200_response_tracks_inner.rb +3 -3
  131. data/lib/daily-ruby/models/get_recording_link200_response.rb +1 -1
  132. data/lib/daily-ruby/models/get_transcript_info200_response.rb +4 -4
  133. data/lib/daily-ruby/models/get_transcript_info200_response_out_params.rb +2 -1
  134. data/lib/daily-ruby/models/get_transcript_link200_response.rb +1 -1
  135. data/lib/daily-ruby/models/list_api_logs200_response.rb +2 -2
  136. data/lib/daily-ruby/models/list_recordings200_response.rb +1 -1
  137. data/lib/daily-ruby/models/list_recordings200_response_data_inner.rb +1 -1
  138. data/lib/daily-ruby/models/list_rooms200_response.rb +1 -1
  139. data/lib/daily-ruby/models/list_rooms200_response_data_inner.rb +1 -1
  140. data/lib/daily-ruby/models/list_rooms200_response_data_inner_config.rb +1 -1
  141. data/lib/daily-ruby/models/list_transcript200_response.rb +1 -1
  142. data/lib/daily-ruby/models/list_transcript200_response_data_inner.rb +3 -3
  143. data/lib/daily-ruby/models/meeting_ended.rb +278 -0
  144. data/lib/daily-ruby/models/meeting_ended_payload.rb +246 -0
  145. data/lib/daily-ruby/models/meeting_participants_get_res.rb +2 -11
  146. data/lib/daily-ruby/models/meeting_participants_get_res_data_inner.rb +1 -1
  147. data/lib/daily-ruby/models/meeting_started.rb +278 -0
  148. data/lib/daily-ruby/models/meeting_started_payload.rb +236 -0
  149. data/lib/daily-ruby/models/meetings_meeting_get_res.rb +1 -1
  150. data/lib/daily-ruby/models/participant_joined.rb +278 -0
  151. data/lib/daily-ruby/models/participant_joined_payload.rb +285 -0
  152. data/lib/daily-ruby/models/participant_joined_payload_permissions.rb +240 -0
  153. data/lib/daily-ruby/models/participant_left.rb +278 -0
  154. data/lib/daily-ruby/models/participant_left_payload.rb +295 -0
  155. data/lib/daily-ruby/models/permissions.rb +1 -1
  156. data/lib/daily-ruby/models/permissions_can_admin.rb +1 -1
  157. data/lib/daily-ruby/models/permissions_can_send.rb +1 -1
  158. data/lib/daily-ruby/models/pin_dialin_inner.rb +234 -0
  159. data/lib/daily-ruby/models/pin_dialin_inner_ivr_greeting.rb +215 -0
  160. data/lib/daily-ruby/models/pinless_call_update_request.rb +235 -0
  161. data/lib/daily-ruby/models/pinless_dialin_inner.rb +245 -0
  162. data/lib/daily-ruby/models/post_webhook.rb +37 -5
  163. data/lib/daily-ruby/models/properties.rb +17 -7
  164. data/lib/daily-ruby/models/recording_error.rb +4 -4
  165. data/lib/daily-ruby/models/recording_error_payload.rb +3 -3
  166. data/lib/daily-ruby/models/recording_ready_to_download.rb +4 -4
  167. data/lib/daily-ruby/models/recording_ready_to_download_payload.rb +5 -5
  168. data/lib/daily-ruby/models/recording_started.rb +4 -4
  169. data/lib/daily-ruby/models/recording_started_payload.rb +3 -3
  170. data/lib/daily-ruby/models/recording_streaming_options.rb +3 -3
  171. data/lib/daily-ruby/models/recordings_bucket.rb +1 -1
  172. data/lib/daily-ruby/models/room_dial_out_send_dtmf_request.rb +224 -0
  173. data/lib/daily-ruby/models/room_dial_out_stop_request.rb +215 -0
  174. data/lib/daily-ruby/models/room_properties.rb +67 -9
  175. data/lib/daily-ruby/models/room_properties_streaming_endpoints_inner.rb +267 -267
  176. data/lib/daily-ruby/models/room_properties_streaming_endpoints_inner_hls_config_variants_inner.rb +1 -1
  177. data/lib/daily-ruby/models/room_sip_call_transfer_request.rb +224 -0
  178. data/lib/daily-ruby/models/rooms_room_name_get_res.rb +1 -1
  179. data/lib/daily-ruby/models/rooms_room_name_presence_get_res.rb +1 -1
  180. data/lib/daily-ruby/models/rooms_room_name_presence_get_res_data_inner.rb +1 -1
  181. data/lib/daily-ruby/models/send_app_message_request.rb +1 -1
  182. data/lib/daily-ruby/models/set_room_config_request.rb +1 -1
  183. data/lib/daily-ruby/models/set_session_data_request.rb +3 -3
  184. data/lib/daily-ruby/models/streaming_ended.rb +4 -4
  185. data/lib/daily-ruby/models/streaming_ended_payload.rb +1 -1
  186. data/lib/daily-ruby/models/streaming_error.rb +4 -4
  187. data/lib/daily-ruby/models/streaming_error_payload.rb +1 -1
  188. data/lib/daily-ruby/models/streaming_started.rb +4 -4
  189. data/lib/daily-ruby/models/streaming_started_payload.rb +1 -1
  190. data/lib/daily-ruby/models/streaming_updated.rb +4 -4
  191. data/lib/daily-ruby/models/streaming_updated_payload.rb +1 -1
  192. data/lib/daily-ruby/models/transcription_bucket.rb +1 -1
  193. data/lib/daily-ruby/models/transcription_properties.rb +16 -6
  194. data/lib/daily-ruby/models/transcription_properties_endpointing.rb +1 -1
  195. data/lib/daily-ruby/models/transcription_properties_redact.rb +1 -1
  196. data/lib/daily-ruby/models/update_permissions_request.rb +1 -1
  197. data/lib/daily-ruby/models/update_permissions_request_data_value.rb +1 -1
  198. data/lib/daily-ruby/models/update_permissions_request_data_value_can_send.rb +1 -1
  199. data/lib/daily-ruby/models/update_webhook.rb +37 -5
  200. data/lib/daily-ruby/models/validate_meeting_token200_response.rb +1 -1
  201. data/lib/daily-ruby/models/waiting_participant_joined.rb +278 -0
  202. data/lib/daily-ruby/models/waiting_participant_joined_payload.rb +285 -0
  203. data/lib/daily-ruby/models/waiting_participant_left.rb +278 -0
  204. data/lib/daily-ruby/models/waiting_participant_left_payload.rb +295 -0
  205. data/lib/daily-ruby/models/webhook.rb +32 -10
  206. data/lib/daily-ruby/version.rb +2 -2
  207. data/lib/daily-ruby.rb +39 -2
  208. data/run.sh +3 -3
  209. data/spec/api/dialin_api_spec.rb +47 -0
  210. data/spec/api/phone_numbers_api_spec.rb +87 -0
  211. data/spec/models/batch_processor_error_payload_input_spec.rb +58 -0
  212. data/spec/models/batch_processor_error_payload_spec.rb +64 -0
  213. data/spec/models/batch_processor_error_spec.rb +58 -0
  214. data/spec/models/batch_processor_job_finished_payload_input_spec.rb +58 -0
  215. data/spec/models/batch_processor_job_finished_payload_output_concept_spec.rb +46 -0
  216. data/spec/models/batch_processor_job_finished_payload_output_soap_s3_config_spec.rb +48 -0
  217. data/spec/models/batch_processor_job_finished_payload_output_soap_spec.rb +46 -0
  218. data/spec/models/batch_processor_job_finished_payload_output_spec.rb +54 -0
  219. data/spec/models/batch_processor_job_finished_payload_output_summary_spec.rb +46 -0
  220. data/spec/models/batch_processor_job_finished_payload_output_transcription_inner_spec.rb +46 -0
  221. data/spec/models/batch_processor_job_finished_payload_spec.rb +64 -0
  222. data/spec/models/batch_processor_job_finished_spec.rb +58 -0
  223. data/spec/models/buy_phone_number_request_spec.rb +36 -0
  224. data/spec/models/daily_streaming_custom_layout_config_composition_params_value_spec.rb +21 -0
  225. data/spec/models/dialout_properties_codecs_spec.rb +42 -0
  226. data/spec/models/dialout_properties_spec.rb +60 -0
  227. data/spec/models/meeting_ended_payload_spec.rb +54 -0
  228. data/spec/models/meeting_ended_spec.rb +58 -0
  229. data/spec/models/meeting_started_payload_spec.rb +48 -0
  230. data/spec/models/meeting_started_spec.rb +58 -0
  231. data/spec/models/participant_joined_payload_permissions_spec.rb +48 -0
  232. data/spec/models/participant_joined_payload_spec.rb +78 -0
  233. data/spec/models/participant_joined_spec.rb +58 -0
  234. data/spec/models/participant_left_payload_spec.rb +84 -0
  235. data/spec/models/participant_left_spec.rb +58 -0
  236. data/spec/models/pin_dialin_inner_ivr_greeting_spec.rb +36 -0
  237. data/spec/models/pin_dialin_inner_spec.rb +48 -0
  238. data/spec/models/pinless_call_update_request_spec.rb +48 -0
  239. data/spec/models/pinless_dialin_inner_spec.rb +54 -0
  240. data/spec/models/room_dial_out_send_dtmf_request_spec.rb +42 -0
  241. data/spec/models/room_dial_out_stop_request_spec.rb +36 -0
  242. data/spec/models/room_sip_call_transfer_request_spec.rb +42 -0
  243. data/spec/models/waiting_participant_joined_payload_spec.rb +78 -0
  244. data/spec/models/waiting_participant_joined_spec.rb +58 -0
  245. data/spec/models/waiting_participant_left_payload_spec.rb +84 -0
  246. data/spec/models/waiting_participant_left_spec.rb +58 -0
  247. data/spec/spec_helper.rb +1 -1
  248. metadata +170 -3
@@ -0,0 +1,234 @@
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
+ Generator version: 7.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Daily
17
+ class PinDialinInner
18
+ # Associate a purchased phone number to the dialin with PIN workflow.
19
+ attr_accessor :phone_number
20
+
21
+ # An identifier or name to associate to the workflow.
22
+ attr_accessor :name_prefix
23
+
24
+ attr_accessor :ivr_greeting
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'phone_number' => :'phone_number',
30
+ :'name_prefix' => :'name_prefix',
31
+ :'ivr_greeting' => :'ivr_greeting'
32
+ }
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'phone_number' => :'String',
44
+ :'name_prefix' => :'String',
45
+ :'ivr_greeting' => :'PinDialinInnerIvrGreeting'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Daily::PinDialinInner` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Daily::PinDialinInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'phone_number')
71
+ self.phone_number = attributes[:'phone_number']
72
+ end
73
+
74
+ if attributes.key?(:'name_prefix')
75
+ self.name_prefix = attributes[:'name_prefix']
76
+ end
77
+
78
+ if attributes.key?(:'ivr_greeting')
79
+ self.ivr_greeting = attributes[:'ivr_greeting']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ phone_number == o.phone_number &&
104
+ name_prefix == o.name_prefix &&
105
+ ivr_greeting == o.ivr_greeting
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [phone_number, name_prefix, ivr_greeting].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def self.build_from_hash(attributes)
124
+ return nil unless attributes.is_a?(Hash)
125
+ attributes = attributes.transform_keys(&:to_sym)
126
+ transformed_hash = {}
127
+ openapi_types.each_pair do |key, type|
128
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
129
+ transformed_hash["#{key}"] = nil
130
+ elsif type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[attribute_map[key]].is_a?(Array)
134
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
135
+ end
136
+ elsif !attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
138
+ end
139
+ end
140
+ new(transformed_hash)
141
+ end
142
+
143
+ # Deserializes the data based on type
144
+ # @param string type Data type
145
+ # @param string value Value to be deserialized
146
+ # @return [Object] Deserialized data
147
+ def self._deserialize(type, value)
148
+ case type.to_sym
149
+ when :Time
150
+ Time.parse(value)
151
+ when :Date
152
+ Date.parse(value)
153
+ when :String
154
+ value.to_s
155
+ when :Integer
156
+ value.to_i
157
+ when :Float
158
+ value.to_f
159
+ when :Boolean
160
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
161
+ true
162
+ else
163
+ false
164
+ end
165
+ when :Object
166
+ # generic object (usually a Hash), return directly
167
+ value
168
+ when /\AArray<(?<inner_type>.+)>\z/
169
+ inner_type = Regexp.last_match[:inner_type]
170
+ value.map { |v| _deserialize(inner_type, v) }
171
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
172
+ k_type = Regexp.last_match[:k_type]
173
+ v_type = Regexp.last_match[:v_type]
174
+ {}.tap do |hash|
175
+ value.each do |k, v|
176
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
177
+ end
178
+ end
179
+ else # model
180
+ # models (e.g. Pet) or oneOf
181
+ klass = Daily.const_get(type)
182
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
183
+ end
184
+ end
185
+
186
+ # Returns the string representation of the object
187
+ # @return [String] String presentation of the object
188
+ def to_s
189
+ to_hash.to_s
190
+ end
191
+
192
+ # to_body is an alias to to_hash (backward compatibility)
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ if value.nil?
205
+ is_nullable = self.class.openapi_nullable.include?(attr)
206
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
+ end
208
+
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end
@@ -0,0 +1,215 @@
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
+ Generator version: 7.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Daily
17
+ class PinDialinInnerIvrGreeting
18
+ # message to \"Say\" when user call the phone_number.
19
+ attr_accessor :message
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'message' => :'message'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'message' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Daily::PinDialinInnerIvrGreeting` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Daily::PinDialinInnerIvrGreeting`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'message')
62
+ self.message = attributes[:'message']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ warn '[DEPRECATED] the `valid?` method is obsolete'
78
+ true
79
+ end
80
+
81
+ # Checks equality by comparing each attribute.
82
+ # @param [Object] Object to be compared
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ message == o.message
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [message].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ attributes = attributes.transform_keys(&:to_sym)
107
+ transformed_hash = {}
108
+ openapi_types.each_pair do |key, type|
109
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
110
+ transformed_hash["#{key}"] = nil
111
+ elsif type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[attribute_map[key]].is_a?(Array)
115
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
116
+ end
117
+ elsif !attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
119
+ end
120
+ end
121
+ new(transformed_hash)
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def self._deserialize(type, value)
129
+ case type.to_sym
130
+ when :Time
131
+ Time.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ # models (e.g. Pet) or oneOf
162
+ klass = Daily.const_get(type)
163
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
164
+ end
165
+ end
166
+
167
+ # Returns the string representation of the object
168
+ # @return [String] String presentation of the object
169
+ def to_s
170
+ to_hash.to_s
171
+ end
172
+
173
+ # to_body is an alias to to_hash (backward compatibility)
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_body
176
+ to_hash
177
+ end
178
+
179
+ # Returns the object in the form of hash
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_hash
182
+ hash = {}
183
+ self.class.attribute_map.each_pair do |attr, param|
184
+ value = self.send(attr)
185
+ if value.nil?
186
+ is_nullable = self.class.openapi_nullable.include?(attr)
187
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
+ end
189
+
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+
213
+ end
214
+
215
+ end
@@ -0,0 +1,235 @@
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
+ Generator version: 7.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Daily
17
+ class PinlessCallUpdateRequest
18
+ # CallId is represented by UUID and represents the sessionId in the SIP Network.
19
+ attr_accessor :call_id
20
+
21
+ # Call Domain is represented by UUID and represents your Daily Domain on the SIP Network.
22
+ attr_accessor :call_domain
23
+
24
+ # This SIP URI is associated to the Daily Room that you want to forward the SIP Interconnect call to.
25
+ attr_accessor :sip_uri
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'call_id' => :'callId',
31
+ :'call_domain' => :'callDomain',
32
+ :'sip_uri' => :'sipUri'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'call_id' => :'String',
45
+ :'call_domain' => :'String',
46
+ :'sip_uri' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Daily::PinlessCallUpdateRequest` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Daily::PinlessCallUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'call_id')
72
+ self.call_id = attributes[:'call_id']
73
+ end
74
+
75
+ if attributes.key?(:'call_domain')
76
+ self.call_domain = attributes[:'call_domain']
77
+ end
78
+
79
+ if attributes.key?(:'sip_uri')
80
+ self.sip_uri = attributes[:'sip_uri']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
+ invalid_properties = Array.new
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ warn '[DEPRECATED] the `valid?` method is obsolete'
96
+ true
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ call_id == o.call_id &&
105
+ call_domain == o.call_domain &&
106
+ sip_uri == o.sip_uri
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Integer] Hash code
117
+ def hash
118
+ [call_id, call_domain, sip_uri].hash
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def self.build_from_hash(attributes)
125
+ return nil unless attributes.is_a?(Hash)
126
+ attributes = attributes.transform_keys(&:to_sym)
127
+ transformed_hash = {}
128
+ openapi_types.each_pair do |key, type|
129
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
130
+ transformed_hash["#{key}"] = nil
131
+ elsif type =~ /\AArray<(.*)>/i
132
+ # check to ensure the input is an array given that the attribute
133
+ # is documented as an array but the input is not
134
+ if attributes[attribute_map[key]].is_a?(Array)
135
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
136
+ end
137
+ elsif !attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
139
+ end
140
+ end
141
+ new(transformed_hash)
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def self._deserialize(type, value)
149
+ case type.to_sym
150
+ when :Time
151
+ Time.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :Boolean
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+ when :Object
167
+ # generic object (usually a Hash), return directly
168
+ value
169
+ when /\AArray<(?<inner_type>.+)>\z/
170
+ inner_type = Regexp.last_match[:inner_type]
171
+ value.map { |v| _deserialize(inner_type, v) }
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
+ k_type = Regexp.last_match[:k_type]
174
+ v_type = Regexp.last_match[:v_type]
175
+ {}.tap do |hash|
176
+ value.each do |k, v|
177
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
+ end
179
+ end
180
+ else # model
181
+ # models (e.g. Pet) or oneOf
182
+ klass = Daily.const_get(type)
183
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
184
+ end
185
+ end
186
+
187
+ # Returns the string representation of the object
188
+ # @return [String] String presentation of the object
189
+ def to_s
190
+ to_hash.to_s
191
+ end
192
+
193
+ # to_body is an alias to to_hash (backward compatibility)
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_body
196
+ to_hash
197
+ end
198
+
199
+ # Returns the object in the form of hash
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ if value.nil?
206
+ is_nullable = self.class.openapi_nullable.include?(attr)
207
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
+ end
209
+
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+
233
+ end
234
+
235
+ end