freeclimb 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +82 -0
- data/README.md +238 -0
- data/Rakefile +10 -0
- data/docs/AccountRequest.md +21 -0
- data/docs/AccountResult.md +37 -0
- data/docs/AccountResultAllOf.md +29 -0
- data/docs/ApplicationList.md +31 -0
- data/docs/ApplicationListAllOf.md +17 -0
- data/docs/ApplicationRequest.md +31 -0
- data/docs/ApplicationResult.md +41 -0
- data/docs/ApplicationResultAllOf.md +33 -0
- data/docs/AvailableNumber.md +27 -0
- data/docs/AvailableNumberList.md +31 -0
- data/docs/AvailableNumberListAllOf.md +17 -0
- data/docs/BuyIncomingNumberRequest.md +23 -0
- data/docs/CallList.md +31 -0
- data/docs/CallListAllOf.md +17 -0
- data/docs/CallResult.md +53 -0
- data/docs/CallResultAllOf.md +45 -0
- data/docs/ConferenceList.md +31 -0
- data/docs/ConferenceListAllOf.md +17 -0
- data/docs/ConferenceParticipantList.md +31 -0
- data/docs/ConferenceParticipantListAllOf.md +17 -0
- data/docs/ConferenceParticipantResult.md +35 -0
- data/docs/ConferenceParticipantResultAllOf.md +27 -0
- data/docs/ConferenceResult.md +43 -0
- data/docs/ConferenceResultAllOf.md +35 -0
- data/docs/CreateConferenceRequest.md +27 -0
- data/docs/DefaultApi.md +2504 -0
- data/docs/DequeueMemberRequest.md +17 -0
- data/docs/FilterLogsRequest.md +19 -0
- data/docs/IncomingNumberList.md +31 -0
- data/docs/IncomingNumberListAllOf.md +17 -0
- data/docs/IncomingNumberRequest.md +21 -0
- data/docs/IncomingNumberResult.md +41 -0
- data/docs/IncomingNumberResultAllOf.md +33 -0
- data/docs/LogList.md +31 -0
- data/docs/LogListAllOf.md +17 -0
- data/docs/LogResult.md +29 -0
- data/docs/MakeCallRequest.md +33 -0
- data/docs/MessageRequest.md +35 -0
- data/docs/MessageRequestAllOf.md +27 -0
- data/docs/MessageResult.md +39 -0
- data/docs/MessageResultAllOf.md +31 -0
- data/docs/MessagesList.md +31 -0
- data/docs/MessagesListAllOf.md +17 -0
- data/docs/MutableResourceModel.md +23 -0
- data/docs/PaginationModel.md +29 -0
- data/docs/Percl.md +697 -0
- data/docs/QueueList.md +31 -0
- data/docs/QueueListAllOf.md +17 -0
- data/docs/QueueMember.md +25 -0
- data/docs/QueueMemberList.md +31 -0
- data/docs/QueueMemberListAllOf.md +17 -0
- data/docs/QueueRequest.md +21 -0
- data/docs/QueueResult.md +37 -0
- data/docs/QueueResultAllOf.md +29 -0
- data/docs/RecordingList.md +31 -0
- data/docs/RecordingListAllOf.md +17 -0
- data/docs/RecordingResult.md +33 -0
- data/docs/RecordingResultAllOf.md +25 -0
- data/docs/UpdateCallRequest.md +19 -0
- data/docs/UpdateConferenceParticipantRequest.md +21 -0
- data/docs/UpdateConferenceRequest.md +23 -0
- data/freeclimb.gemspec +39 -0
- data/git_push.sh +58 -0
- data/lib/freeclimb.rb +99 -0
- data/lib/freeclimb/api/default_api.rb +2845 -0
- data/lib/freeclimb/api_client.rb +386 -0
- data/lib/freeclimb/api_error.rb +57 -0
- data/lib/freeclimb/configuration.rb +248 -0
- data/lib/freeclimb/models/account_request.rb +227 -0
- data/lib/freeclimb/models/account_result.rb +349 -0
- data/lib/freeclimb/models/account_result_all_of.rb +301 -0
- data/lib/freeclimb/models/application_list.rb +286 -0
- data/lib/freeclimb/models/application_list_all_of.rb +208 -0
- data/lib/freeclimb/models/application_request.rb +277 -0
- data/lib/freeclimb/models/application_result.rb +335 -0
- data/lib/freeclimb/models/application_result_all_of.rb +287 -0
- data/lib/freeclimb/models/available_number.rb +257 -0
- data/lib/freeclimb/models/available_number_list.rb +286 -0
- data/lib/freeclimb/models/available_number_list_all_of.rb +208 -0
- data/lib/freeclimb/models/buy_incoming_number_request.rb +242 -0
- data/lib/freeclimb/models/call_list.rb +286 -0
- data/lib/freeclimb/models/call_list_all_of.rb +208 -0
- data/lib/freeclimb/models/call_result.rb +429 -0
- data/lib/freeclimb/models/call_result_all_of.rb +381 -0
- data/lib/freeclimb/models/conference_list.rb +286 -0
- data/lib/freeclimb/models/conference_list_all_of.rb +208 -0
- data/lib/freeclimb/models/conference_participant_list.rb +286 -0
- data/lib/freeclimb/models/conference_participant_list_all_of.rb +208 -0
- data/lib/freeclimb/models/conference_participant_result.rb +305 -0
- data/lib/freeclimb/models/conference_participant_result_all_of.rb +257 -0
- data/lib/freeclimb/models/conference_result.rb +391 -0
- data/lib/freeclimb/models/conference_result_all_of.rb +343 -0
- data/lib/freeclimb/models/create_conference_request.rb +293 -0
- data/lib/freeclimb/models/dequeue_member_request.rb +207 -0
- data/lib/freeclimb/models/filter_logs_request.rb +222 -0
- data/lib/freeclimb/models/incoming_number_list.rb +286 -0
- data/lib/freeclimb/models/incoming_number_list_all_of.rb +208 -0
- data/lib/freeclimb/models/incoming_number_request.rb +227 -0
- data/lib/freeclimb/models/incoming_number_result.rb +335 -0
- data/lib/freeclimb/models/incoming_number_result_all_of.rb +287 -0
- data/lib/freeclimb/models/log_list.rb +286 -0
- data/lib/freeclimb/models/log_list_all_of.rb +208 -0
- data/lib/freeclimb/models/log_result.rb +301 -0
- data/lib/freeclimb/models/make_call_request.rb +302 -0
- data/lib/freeclimb/models/message_request.rb +320 -0
- data/lib/freeclimb/models/message_request_all_of.rb +272 -0
- data/lib/freeclimb/models/message_result.rb +359 -0
- data/lib/freeclimb/models/message_result_all_of.rb +311 -0
- data/lib/freeclimb/models/messages_list.rb +287 -0
- data/lib/freeclimb/models/messages_list_all_of.rb +209 -0
- data/lib/freeclimb/models/mutable_resource_model.rb +237 -0
- data/lib/freeclimb/models/pagination_model.rb +267 -0
- data/lib/freeclimb/models/queue_list.rb +286 -0
- data/lib/freeclimb/models/queue_list_all_of.rb +208 -0
- data/lib/freeclimb/models/queue_member.rb +247 -0
- data/lib/freeclimb/models/queue_member_list.rb +286 -0
- data/lib/freeclimb/models/queue_member_list_all_of.rb +208 -0
- data/lib/freeclimb/models/queue_request.rb +227 -0
- data/lib/freeclimb/models/queue_result.rb +315 -0
- data/lib/freeclimb/models/queue_result_all_of.rb +267 -0
- data/lib/freeclimb/models/recording_list.rb +286 -0
- data/lib/freeclimb/models/recording_list_all_of.rb +208 -0
- data/lib/freeclimb/models/recording_result.rb +295 -0
- data/lib/freeclimb/models/recording_result_all_of.rb +247 -0
- data/lib/freeclimb/models/update_call_request.rb +256 -0
- data/lib/freeclimb/models/update_conference_participant_request.rb +227 -0
- data/lib/freeclimb/models/update_conference_request.rb +273 -0
- data/lib/freeclimb/version.rb +15 -0
- data/lib/percl/calls.rb +43 -0
- data/lib/percl/conference_participants.rb +40 -0
- data/lib/percl/conferences.rb +21 -0
- data/lib/percl/ivr.rb +63 -0
- data/lib/percl/jsonable.rb +23 -0
- data/lib/percl/percl.rb +29 -0
- data/lib/percl/queue_members.rb +15 -0
- data/lib/percl/recordings.rb +15 -0
- data/lib/percl/sms.rb +11 -0
- data/spec/api/default_api_spec.rb +1151 -0
- data/spec/api/web_mocks.rb +473 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +34 -0
- data/spec/models/account_request_spec.rb +33 -0
- data/spec/models/account_result_spec.rb +33 -0
- data/spec/models/application_list_spec.rb +33 -0
- data/spec/models/application_request_spec.rb +33 -0
- data/spec/models/application_result_spec.rb +33 -0
- data/spec/models/available_number_list_spec.rb +34 -0
- data/spec/models/available_number_spec.rb +33 -0
- data/spec/models/buy_incoming_number_request_spec.rb +33 -0
- data/spec/models/call_list_spec.rb +34 -0
- data/spec/models/call_result_spec.rb +34 -0
- data/spec/models/conference_list_spec.rb +33 -0
- data/spec/models/conference_participant_list_spec.rb +33 -0
- data/spec/models/conference_participant_result_spec.rb +33 -0
- data/spec/models/conference_result_spec.rb +34 -0
- data/spec/models/create_conference_request_spec.rb +34 -0
- data/spec/models/dequeue_member_request_spec.rb +34 -0
- data/spec/models/filter_logs_request_spec.rb +33 -0
- data/spec/models/incoming_number_list_spec.rb +34 -0
- data/spec/models/incoming_number_request_spec.rb +33 -0
- data/spec/models/incoming_number_result_spec.rb +34 -0
- data/spec/models/log_list_spec.rb +33 -0
- data/spec/models/log_result_spec.rb +33 -0
- data/spec/models/make_call_request_spec.rb +33 -0
- data/spec/models/message_request_spec.rb +34 -0
- data/spec/models/message_result_spec.rb +33 -0
- data/spec/models/messages_list_spec.rb +33 -0
- data/spec/models/mutable_resource_model_spec.rb +34 -0
- data/spec/models/pagination_model_spec.rb +33 -0
- data/spec/models/queue_list_spec.rb +34 -0
- data/spec/models/queue_member_list_spec.rb +33 -0
- data/spec/models/queue_member_spec.rb +34 -0
- data/spec/models/queue_request_spec.rb +34 -0
- data/spec/models/queue_result_spec.rb +33 -0
- data/spec/models/recording_list_spec.rb +33 -0
- data/spec/models/recording_result_spec.rb +33 -0
- data/spec/models/update_call_request_spec.rb +33 -0
- data/spec/models/update_conference_participant_request_spec.rb +33 -0
- data/spec/models/update_conference_request_spec.rb +33 -0
- data/spec/percl/calls_spec.rb +111 -0
- data/spec/percl/conference_participant_spec.rb +96 -0
- data/spec/percl/conference_spec.rb +46 -0
- data/spec/percl/ivr_spec.rb +155 -0
- data/spec/percl/jsonable_spec.rb +28 -0
- data/spec/percl/percl_spec.rb +31 -0
- data/spec/percl/queue_members_spec.rb +35 -0
- data/spec/percl/recordings_spec.rb +32 -0
- data/spec/percl/sms_spec.rb +29 -0
- data/spec/spec_helper.rb +114 -0
- metadata +355 -0
@@ -0,0 +1,305 @@
|
|
1
|
+
=begin
|
2
|
+
#FreeClimb API
|
3
|
+
|
4
|
+
#FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Freeclimb
|
16
|
+
class ConferenceParticipantResult
|
17
|
+
# The URI for this resource, relative to /apiserver.
|
18
|
+
attr_accessor :uri
|
19
|
+
|
20
|
+
# The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).
|
21
|
+
attr_accessor :date_created
|
22
|
+
|
23
|
+
# The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).
|
24
|
+
attr_accessor :date_updated
|
25
|
+
|
26
|
+
# Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.
|
27
|
+
attr_accessor :revision
|
28
|
+
|
29
|
+
# ID of the account that created this participant.
|
30
|
+
attr_accessor :account_id
|
31
|
+
|
32
|
+
# ID of the conference this participant is in.
|
33
|
+
attr_accessor :conference_id
|
34
|
+
|
35
|
+
# ID of the Call associated with this Participant.
|
36
|
+
attr_accessor :call_id
|
37
|
+
|
38
|
+
# True if this Participant has talk privileges in the Conference. False otherwise.
|
39
|
+
attr_accessor :talk
|
40
|
+
|
41
|
+
# True if this Participant has listen privileges in the Conference. False otherwise.
|
42
|
+
attr_accessor :listen
|
43
|
+
|
44
|
+
# True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise.
|
45
|
+
attr_accessor :start_conf_on_enter
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'uri' => :'uri',
|
51
|
+
:'date_created' => :'dateCreated',
|
52
|
+
:'date_updated' => :'dateUpdated',
|
53
|
+
:'revision' => :'revision',
|
54
|
+
:'account_id' => :'accountId',
|
55
|
+
:'conference_id' => :'conferenceId',
|
56
|
+
:'call_id' => :'callId',
|
57
|
+
:'talk' => :'talk',
|
58
|
+
:'listen' => :'listen',
|
59
|
+
:'start_conf_on_enter' => :'startConfOnEnter'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.openapi_types
|
65
|
+
{
|
66
|
+
:'uri' => :'String',
|
67
|
+
:'date_created' => :'String',
|
68
|
+
:'date_updated' => :'String',
|
69
|
+
:'revision' => :'Integer',
|
70
|
+
:'account_id' => :'String',
|
71
|
+
:'conference_id' => :'String',
|
72
|
+
:'call_id' => :'String',
|
73
|
+
:'talk' => :'Boolean',
|
74
|
+
:'listen' => :'Boolean',
|
75
|
+
:'start_conf_on_enter' => :'Boolean'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# List of attributes with nullable: true
|
80
|
+
def self.openapi_nullable
|
81
|
+
Set.new([
|
82
|
+
])
|
83
|
+
end
|
84
|
+
|
85
|
+
# List of class defined in allOf (OpenAPI v3)
|
86
|
+
def self.openapi_all_of
|
87
|
+
[
|
88
|
+
:'ConferenceParticipantResultAllOf',
|
89
|
+
:'MutableResourceModel'
|
90
|
+
]
|
91
|
+
end
|
92
|
+
|
93
|
+
# Initializes the object
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
+
def initialize(attributes = {})
|
96
|
+
if (!attributes.is_a?(Hash))
|
97
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ConferenceParticipantResult` initialize method"
|
98
|
+
end
|
99
|
+
|
100
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
101
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
102
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
103
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ConferenceParticipantResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
104
|
+
end
|
105
|
+
h[k.to_sym] = v
|
106
|
+
}
|
107
|
+
|
108
|
+
if attributes.key?(:'uri')
|
109
|
+
self.uri = attributes[:'uri']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'date_created')
|
113
|
+
self.date_created = attributes[:'date_created']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'date_updated')
|
117
|
+
self.date_updated = attributes[:'date_updated']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'revision')
|
121
|
+
self.revision = attributes[:'revision']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'account_id')
|
125
|
+
self.account_id = attributes[:'account_id']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'conference_id')
|
129
|
+
self.conference_id = attributes[:'conference_id']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'call_id')
|
133
|
+
self.call_id = attributes[:'call_id']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'talk')
|
137
|
+
self.talk = attributes[:'talk']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'listen')
|
141
|
+
self.listen = attributes[:'listen']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'start_conf_on_enter')
|
145
|
+
self.start_conf_on_enter = attributes[:'start_conf_on_enter']
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
150
|
+
# @return Array for valid properties with the reasons
|
151
|
+
def list_invalid_properties
|
152
|
+
invalid_properties = Array.new
|
153
|
+
invalid_properties
|
154
|
+
end
|
155
|
+
|
156
|
+
# Check to see if the all the properties in the model are valid
|
157
|
+
# @return true if the model is valid
|
158
|
+
def valid?
|
159
|
+
true
|
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
|
+
uri == o.uri &&
|
168
|
+
date_created == o.date_created &&
|
169
|
+
date_updated == o.date_updated &&
|
170
|
+
revision == o.revision &&
|
171
|
+
account_id == o.account_id &&
|
172
|
+
conference_id == o.conference_id &&
|
173
|
+
call_id == o.call_id &&
|
174
|
+
talk == o.talk &&
|
175
|
+
listen == o.listen &&
|
176
|
+
start_conf_on_enter == o.start_conf_on_enter
|
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
|
+
[uri, date_created, date_updated, revision, account_id, conference_id, call_id, talk, listen, start_conf_on_enter].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
|
+
new.build_from_hash(attributes)
|
196
|
+
end
|
197
|
+
|
198
|
+
# Builds the object from hash
|
199
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
200
|
+
# @return [Object] Returns the model itself
|
201
|
+
def build_from_hash(attributes)
|
202
|
+
return nil unless attributes.is_a?(Hash)
|
203
|
+
self.class.openapi_types.each_pair do |key, type|
|
204
|
+
if type =~ /\AArray<(.*)>/i
|
205
|
+
# check to ensure the input is an array given that the attribute
|
206
|
+
# is documented as an array but the input is not
|
207
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
208
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
209
|
+
end
|
210
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
211
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
212
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
213
|
+
end
|
214
|
+
|
215
|
+
self
|
216
|
+
end
|
217
|
+
|
218
|
+
# Deserializes the data based on type
|
219
|
+
# @param string type Data type
|
220
|
+
# @param string value Value to be deserialized
|
221
|
+
# @return [Object] Deserialized data
|
222
|
+
def _deserialize(type, value)
|
223
|
+
case type.to_sym
|
224
|
+
when :DateTime
|
225
|
+
DateTime.parse(value)
|
226
|
+
when :Date
|
227
|
+
Date.parse(value)
|
228
|
+
when :String
|
229
|
+
value.to_s
|
230
|
+
when :Integer
|
231
|
+
value.to_i
|
232
|
+
when :Float
|
233
|
+
value.to_f
|
234
|
+
when :Boolean
|
235
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
236
|
+
true
|
237
|
+
else
|
238
|
+
false
|
239
|
+
end
|
240
|
+
when :Object
|
241
|
+
# generic object (usually a Hash), return directly
|
242
|
+
value
|
243
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
244
|
+
inner_type = Regexp.last_match[:inner_type]
|
245
|
+
value.map { |v| _deserialize(inner_type, v) }
|
246
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
247
|
+
k_type = Regexp.last_match[:k_type]
|
248
|
+
v_type = Regexp.last_match[:v_type]
|
249
|
+
{}.tap do |hash|
|
250
|
+
value.each do |k, v|
|
251
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
252
|
+
end
|
253
|
+
end
|
254
|
+
else # model
|
255
|
+
Freeclimb.const_get(type).build_from_hash(value)
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
# Returns the string representation of the object
|
260
|
+
# @return [String] String presentation of the object
|
261
|
+
def to_s
|
262
|
+
to_hash.to_s
|
263
|
+
end
|
264
|
+
|
265
|
+
# to_body is an alias to to_hash (backward compatibility)
|
266
|
+
# @return [Hash] Returns the object in the form of hash
|
267
|
+
def to_body
|
268
|
+
to_hash
|
269
|
+
end
|
270
|
+
|
271
|
+
# Returns the object in the form of hash
|
272
|
+
# @return [Hash] Returns the object in the form of hash
|
273
|
+
def to_hash
|
274
|
+
hash = {}
|
275
|
+
self.class.attribute_map.each_pair do |attr, param|
|
276
|
+
value = self.send(attr)
|
277
|
+
if value.nil?
|
278
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
279
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
280
|
+
end
|
281
|
+
|
282
|
+
hash[param] = _to_hash(value)
|
283
|
+
end
|
284
|
+
hash
|
285
|
+
end
|
286
|
+
|
287
|
+
# Outputs non-array value in the form of hash
|
288
|
+
# For object, use to_hash. Otherwise, just return the value
|
289
|
+
# @param [Object] value Any valid value
|
290
|
+
# @return [Hash] Returns the value in the form of hash
|
291
|
+
def _to_hash(value)
|
292
|
+
if value.is_a?(Array)
|
293
|
+
value.compact.map { |v| _to_hash(v) }
|
294
|
+
elsif value.is_a?(Hash)
|
295
|
+
{}.tap do |hash|
|
296
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
297
|
+
end
|
298
|
+
elsif value.respond_to? :to_hash
|
299
|
+
value.to_hash
|
300
|
+
else
|
301
|
+
value
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|
@@ -0,0 +1,257 @@
|
|
1
|
+
=begin
|
2
|
+
#FreeClimb API
|
3
|
+
|
4
|
+
#FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Freeclimb
|
16
|
+
class ConferenceParticipantResultAllOf
|
17
|
+
# ID of the account that created this participant.
|
18
|
+
attr_accessor :account_id
|
19
|
+
|
20
|
+
# ID of the conference this participant is in.
|
21
|
+
attr_accessor :conference_id
|
22
|
+
|
23
|
+
# ID of the Call associated with this Participant.
|
24
|
+
attr_accessor :call_id
|
25
|
+
|
26
|
+
# True if this Participant has talk privileges in the Conference. False otherwise.
|
27
|
+
attr_accessor :talk
|
28
|
+
|
29
|
+
# True if this Participant has listen privileges in the Conference. False otherwise.
|
30
|
+
attr_accessor :listen
|
31
|
+
|
32
|
+
# True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise.
|
33
|
+
attr_accessor :start_conf_on_enter
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'account_id' => :'accountId',
|
39
|
+
:'conference_id' => :'conferenceId',
|
40
|
+
:'call_id' => :'callId',
|
41
|
+
:'talk' => :'talk',
|
42
|
+
:'listen' => :'listen',
|
43
|
+
:'start_conf_on_enter' => :'startConfOnEnter'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.openapi_types
|
49
|
+
{
|
50
|
+
:'account_id' => :'String',
|
51
|
+
:'conference_id' => :'String',
|
52
|
+
:'call_id' => :'String',
|
53
|
+
:'talk' => :'Boolean',
|
54
|
+
:'listen' => :'Boolean',
|
55
|
+
:'start_conf_on_enter' => :'Boolean'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# List of attributes with nullable: true
|
60
|
+
def self.openapi_nullable
|
61
|
+
Set.new([
|
62
|
+
])
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
+
def initialize(attributes = {})
|
68
|
+
if (!attributes.is_a?(Hash))
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ConferenceParticipantResultAllOf` initialize method"
|
70
|
+
end
|
71
|
+
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
74
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ConferenceParticipantResultAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
76
|
+
end
|
77
|
+
h[k.to_sym] = v
|
78
|
+
}
|
79
|
+
|
80
|
+
if attributes.key?(:'account_id')
|
81
|
+
self.account_id = attributes[:'account_id']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'conference_id')
|
85
|
+
self.conference_id = attributes[:'conference_id']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'call_id')
|
89
|
+
self.call_id = attributes[:'call_id']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'talk')
|
93
|
+
self.talk = attributes[:'talk']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'listen')
|
97
|
+
self.listen = attributes[:'listen']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.key?(:'start_conf_on_enter')
|
101
|
+
self.start_conf_on_enter = attributes[:'start_conf_on_enter']
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
106
|
+
# @return Array for valid properties with the reasons
|
107
|
+
def list_invalid_properties
|
108
|
+
invalid_properties = Array.new
|
109
|
+
invalid_properties
|
110
|
+
end
|
111
|
+
|
112
|
+
# Check to see if the all the properties in the model are valid
|
113
|
+
# @return true if the model is valid
|
114
|
+
def valid?
|
115
|
+
true
|
116
|
+
end
|
117
|
+
|
118
|
+
# Checks equality by comparing each attribute.
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def ==(o)
|
121
|
+
return true if self.equal?(o)
|
122
|
+
self.class == o.class &&
|
123
|
+
account_id == o.account_id &&
|
124
|
+
conference_id == o.conference_id &&
|
125
|
+
call_id == o.call_id &&
|
126
|
+
talk == o.talk &&
|
127
|
+
listen == o.listen &&
|
128
|
+
start_conf_on_enter == o.start_conf_on_enter
|
129
|
+
end
|
130
|
+
|
131
|
+
# @see the `==` method
|
132
|
+
# @param [Object] Object to be compared
|
133
|
+
def eql?(o)
|
134
|
+
self == o
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Integer] Hash code
|
139
|
+
def hash
|
140
|
+
[account_id, conference_id, call_id, talk, listen, start_conf_on_enter].hash
|
141
|
+
end
|
142
|
+
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def self.build_from_hash(attributes)
|
147
|
+
new.build_from_hash(attributes)
|
148
|
+
end
|
149
|
+
|
150
|
+
# Builds the object from hash
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
152
|
+
# @return [Object] Returns the model itself
|
153
|
+
def build_from_hash(attributes)
|
154
|
+
return nil unless attributes.is_a?(Hash)
|
155
|
+
self.class.openapi_types.each_pair do |key, type|
|
156
|
+
if type =~ /\AArray<(.*)>/i
|
157
|
+
# check to ensure the input is an array given that the attribute
|
158
|
+
# is documented as an array but the input is not
|
159
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
160
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
161
|
+
end
|
162
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
163
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
164
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
165
|
+
end
|
166
|
+
|
167
|
+
self
|
168
|
+
end
|
169
|
+
|
170
|
+
# Deserializes the data based on type
|
171
|
+
# @param string type Data type
|
172
|
+
# @param string value Value to be deserialized
|
173
|
+
# @return [Object] Deserialized data
|
174
|
+
def _deserialize(type, value)
|
175
|
+
case type.to_sym
|
176
|
+
when :DateTime
|
177
|
+
DateTime.parse(value)
|
178
|
+
when :Date
|
179
|
+
Date.parse(value)
|
180
|
+
when :String
|
181
|
+
value.to_s
|
182
|
+
when :Integer
|
183
|
+
value.to_i
|
184
|
+
when :Float
|
185
|
+
value.to_f
|
186
|
+
when :Boolean
|
187
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
188
|
+
true
|
189
|
+
else
|
190
|
+
false
|
191
|
+
end
|
192
|
+
when :Object
|
193
|
+
# generic object (usually a Hash), return directly
|
194
|
+
value
|
195
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
196
|
+
inner_type = Regexp.last_match[:inner_type]
|
197
|
+
value.map { |v| _deserialize(inner_type, v) }
|
198
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
199
|
+
k_type = Regexp.last_match[:k_type]
|
200
|
+
v_type = Regexp.last_match[:v_type]
|
201
|
+
{}.tap do |hash|
|
202
|
+
value.each do |k, v|
|
203
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
else # model
|
207
|
+
Freeclimb.const_get(type).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
|
+
end
|
257
|
+
end
|