bombbomb 2.0.21454 → 2.0.22196
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +35 -14
- data/bombbomb.gemspec +1 -1
- data/docs/AutomationsApi.md +115 -0
- data/docs/EmailsApi.md +246 -0
- data/docs/JerichoConfiguration.md +5 -1
- data/docs/PromptBotBot.md +18 -0
- data/docs/PromptsApi.md +384 -3
- data/docs/SignUploadRequest.md +9 -0
- data/docs/SignUploadResponse.md +9 -0
- data/docs/VideoEmailPrompt.md +9 -2
- data/docs/VideoPublicRepresentation.md +18 -0
- data/docs/VideoRecorderMethodResponse.md +15 -0
- data/docs/VideosApi.md +175 -0
- data/lib/bombbomb.rb +9 -1
- data/lib/bombbomb/api/automations_api.rb +150 -0
- data/lib/bombbomb/api/curriculum_api.rb +1 -1
- data/lib/bombbomb/api/emails_api.rb +293 -0
- data/lib/bombbomb/api/prompts_api.rb +439 -5
- data/lib/bombbomb/api/teams_api.rb +1 -1
- data/lib/bombbomb/api/utilities_api.rb +1 -1
- data/lib/bombbomb/api/videos_api.rb +221 -0
- data/lib/bombbomb/api/webhooks_api.rb +1 -1
- data/lib/bombbomb/api_client.rb +1 -1
- data/lib/bombbomb/api_error.rb +1 -1
- data/lib/bombbomb/configuration.rb +1 -1
- data/lib/bombbomb/models/bb_web_hook.rb +1 -1
- data/lib/bombbomb/models/curriculum.rb +1 -1
- data/lib/bombbomb/models/curriculum_user_progress.rb +1 -1
- data/lib/bombbomb/models/curriculum_with_progress.rb +1 -1
- data/lib/bombbomb/models/inline_response_200.rb +1 -1
- data/lib/bombbomb/models/inline_response_200_items.rb +1 -1
- data/lib/bombbomb/models/jericho_configuration.rb +43 -3
- data/lib/bombbomb/models/jericho_performance.rb +1 -1
- data/lib/bombbomb/models/o_auth_client.rb +1 -1
- data/lib/bombbomb/models/prompt_bot_bot.rb +300 -0
- data/lib/bombbomb/models/sign_upload_request.rb +210 -0
- data/lib/bombbomb/models/sign_upload_response.rb +210 -0
- data/lib/bombbomb/models/string.rb +1 -1
- data/lib/bombbomb/models/team_public_representation.rb +1 -1
- data/lib/bombbomb/models/video_email_prompt.rb +79 -9
- data/lib/bombbomb/models/video_public_representation.rb +302 -0
- data/lib/bombbomb/models/video_recorder_method_response.rb +270 -0
- data/lib/bombbomb/version.rb +2 -2
- data/spec/api/automations_api_spec.rb +71 -0
- data/spec/api/emails_api_spec.rb +104 -0
- data/spec/api/videos_api_spec.rb +86 -0
- data/spec/models/prompt_bot_bot_spec.rb +113 -0
- data/spec/models/sign_upload_request_spec.rb +59 -0
- data/spec/models/sign_upload_response_spec.rb +59 -0
- data/spec/models/video_public_representation_spec.rb +113 -0
- data/spec/models/video_recorder_method_response_spec.rb +95 -0
- metadata +34 -2
@@ -0,0 +1,210 @@
|
|
1
|
+
=begin
|
2
|
+
#BombBomb
|
3
|
+
|
4
|
+
#We make it easy to build relationships using simple videos.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.22196
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'date'
|
25
|
+
|
26
|
+
module BombBomb
|
27
|
+
# The SignUploadResponse class
|
28
|
+
class SignUploadResponse
|
29
|
+
# Base64 encoded policy.
|
30
|
+
attr_accessor :policy
|
31
|
+
|
32
|
+
# Signature for policy.
|
33
|
+
attr_accessor :signature
|
34
|
+
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'policy' => :'policy',
|
40
|
+
:'signature' => :'signature'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.swagger_types
|
46
|
+
{
|
47
|
+
:'policy' => :'String',
|
48
|
+
:'signature' => :'String'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
return unless attributes.is_a?(Hash)
|
56
|
+
|
57
|
+
# convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
59
|
+
|
60
|
+
if attributes.has_key?(:'policy')
|
61
|
+
self.policy = attributes[:'policy']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.has_key?(:'signature')
|
65
|
+
self.signature = attributes[:'signature']
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
71
|
+
# @return Array for valid properies with the reasons
|
72
|
+
def list_invalid_properties
|
73
|
+
invalid_properties = Array.new
|
74
|
+
return invalid_properties
|
75
|
+
end
|
76
|
+
|
77
|
+
# Check to see if the all the properties in the model are valid
|
78
|
+
# @return true if the model is valid
|
79
|
+
def valid?
|
80
|
+
return true
|
81
|
+
end
|
82
|
+
|
83
|
+
# Checks equality by comparing each attribute.
|
84
|
+
# @param [Object] Object to be compared
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
policy == o.policy &&
|
89
|
+
signature == o.signature
|
90
|
+
end
|
91
|
+
|
92
|
+
# @see the `==` method
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def eql?(o)
|
95
|
+
self == o
|
96
|
+
end
|
97
|
+
|
98
|
+
# Calculates hash code according to all attributes.
|
99
|
+
# @return [Fixnum] Hash code
|
100
|
+
def hash
|
101
|
+
[policy, signature].hash
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def build_from_hash(attributes)
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
109
|
+
self.class.swagger_types.each_pair do |key, type|
|
110
|
+
if type =~ /^Array<(.*)>/i
|
111
|
+
# check to ensure the input is an array given that the the attribute
|
112
|
+
# is documented as an array but the input is not
|
113
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
114
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
115
|
+
end
|
116
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
117
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
118
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
119
|
+
end
|
120
|
+
|
121
|
+
self
|
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 _deserialize(type, value)
|
129
|
+
case type.to_sym
|
130
|
+
when :DateTime
|
131
|
+
DateTime.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 =~ /^(true|t|yes|y|1)$/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
|
+
temp_model = BombBomb.const_get(type).new
|
162
|
+
temp_model.build_from_hash(value)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
# Returns the string representation of the object
|
167
|
+
# @return [String] String presentation of the object
|
168
|
+
def to_s
|
169
|
+
to_hash.to_s
|
170
|
+
end
|
171
|
+
|
172
|
+
# to_body is an alias to to_hash (backward compatibility)
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
174
|
+
def to_body
|
175
|
+
to_hash
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the object in the form of hash
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_hash
|
181
|
+
hash = {}
|
182
|
+
self.class.attribute_map.each_pair do |attr, param|
|
183
|
+
value = self.send(attr)
|
184
|
+
next if value.nil?
|
185
|
+
hash[param] = _to_hash(value)
|
186
|
+
end
|
187
|
+
hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Outputs non-array value in the form of hash
|
191
|
+
# For object, use to_hash. Otherwise, just return the value
|
192
|
+
# @param [Object] value Any valid value
|
193
|
+
# @return [Hash] Returns the value in the form of hash
|
194
|
+
def _to_hash(value)
|
195
|
+
if value.is_a?(Array)
|
196
|
+
value.compact.map{ |v| _to_hash(v) }
|
197
|
+
elsif value.is_a?(Hash)
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
200
|
+
end
|
201
|
+
elsif value.respond_to? :to_hash
|
202
|
+
value.to_hash
|
203
|
+
else
|
204
|
+
value
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
end
|
209
|
+
|
210
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#We make it easy to build relationships using simple videos.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.0.
|
6
|
+
OpenAPI spec version: 2.0.22196
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -41,6 +41,9 @@ module BombBomb
|
|
41
41
|
# The HTML content of the final email
|
42
42
|
attr_accessor :email_content
|
43
43
|
|
44
|
+
# The URL of a thumbnail image for this prompt
|
45
|
+
attr_accessor :thumbnail_url
|
46
|
+
|
44
47
|
# Email addresses to send the final email to, can be mixed with listIds.
|
45
48
|
attr_accessor :to_email_addresses
|
46
49
|
|
@@ -53,9 +56,15 @@ module BombBomb
|
|
53
56
|
# The prompt's subject line
|
54
57
|
attr_accessor :prompt_subject
|
55
58
|
|
56
|
-
# The
|
59
|
+
# The suggested script of the prompt.
|
57
60
|
attr_accessor :prompt_html
|
58
61
|
|
62
|
+
# A paragraph intro statement about the purpose of the email you're recording a video for.
|
63
|
+
attr_accessor :prompt_intro
|
64
|
+
|
65
|
+
# An example or explanatory video to help the user understand what to say.
|
66
|
+
attr_accessor :example_video_id
|
67
|
+
|
59
68
|
# Whether to send the email if no video is recorded. If set to require a video, and none is added before the videoDueDate, the prompt is cancelled.
|
60
69
|
attr_accessor :send_without_video
|
61
70
|
|
@@ -74,11 +83,23 @@ module BombBomb
|
|
74
83
|
# The job sent by the prompt Read Only.
|
75
84
|
attr_accessor :job_id
|
76
85
|
|
86
|
+
# The bot that created the prompt.
|
87
|
+
attr_accessor :prompt_bot_id
|
88
|
+
|
89
|
+
# The client group campaign that created the prompt.
|
90
|
+
attr_accessor :client_group_id
|
91
|
+
|
77
92
|
# The status of the prompt: created = 0, sent = 10, recorded = 20, job_created = 30, timed_out = 40, declined = 50 Read Only
|
78
93
|
attr_accessor :status
|
79
94
|
|
80
95
|
# Controls whether a user template is applied to the message as it is sent
|
81
|
-
attr_accessor :
|
96
|
+
attr_accessor :apply_template
|
97
|
+
|
98
|
+
# When the email was first sent out
|
99
|
+
attr_accessor :created_date
|
100
|
+
|
101
|
+
# When the user was last notified about a prompt email waiting for a video
|
102
|
+
attr_accessor :last_notified
|
82
103
|
|
83
104
|
|
84
105
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -89,19 +110,26 @@ module BombBomb
|
|
89
110
|
:'template_id' => :'templateId',
|
90
111
|
:'email_subject_line' => :'emailSubjectLine',
|
91
112
|
:'email_content' => :'emailContent',
|
113
|
+
:'thumbnail_url' => :'thumbnailUrl',
|
92
114
|
:'to_email_addresses' => :'toEmailAddresses',
|
93
115
|
:'to_lists' => :'toLists',
|
94
116
|
:'jericho_id' => :'jerichoId',
|
95
117
|
:'prompt_subject' => :'promptSubject',
|
96
118
|
:'prompt_html' => :'promptHtml',
|
119
|
+
:'prompt_intro' => :'promptIntro',
|
120
|
+
:'example_video_id' => :'exampleVideoId',
|
97
121
|
:'send_without_video' => :'sendWithoutVideo',
|
98
122
|
:'video_due_date' => :'videoDueDate',
|
99
123
|
:'scheduled_send_date' => :'scheduledSendDate',
|
100
124
|
:'video_id' => :'videoId',
|
101
125
|
:'email_id' => :'emailId',
|
102
126
|
:'job_id' => :'jobId',
|
127
|
+
:'prompt_bot_id' => :'promptBotId',
|
128
|
+
:'client_group_id' => :'clientGroupId',
|
103
129
|
:'status' => :'status',
|
104
|
-
:'
|
130
|
+
:'apply_template' => :'applyTemplate',
|
131
|
+
:'created_date' => :'createdDate',
|
132
|
+
:'last_notified' => :'lastNotified'
|
105
133
|
}
|
106
134
|
end
|
107
135
|
|
@@ -113,19 +141,26 @@ module BombBomb
|
|
113
141
|
:'template_id' => :'String',
|
114
142
|
:'email_subject_line' => :'String',
|
115
143
|
:'email_content' => :'String',
|
144
|
+
:'thumbnail_url' => :'String',
|
116
145
|
:'to_email_addresses' => :'Array<String>',
|
117
146
|
:'to_lists' => :'Array<String>',
|
118
147
|
:'jericho_id' => :'String',
|
119
148
|
:'prompt_subject' => :'String',
|
120
149
|
:'prompt_html' => :'String',
|
150
|
+
:'prompt_intro' => :'String',
|
151
|
+
:'example_video_id' => :'String',
|
121
152
|
:'send_without_video' => :'BOOLEAN',
|
122
153
|
:'video_due_date' => :'DateTime',
|
123
154
|
:'scheduled_send_date' => :'DateTime',
|
124
155
|
:'video_id' => :'String',
|
125
156
|
:'email_id' => :'String',
|
126
157
|
:'job_id' => :'String',
|
158
|
+
:'prompt_bot_id' => :'String',
|
159
|
+
:'client_group_id' => :'String',
|
127
160
|
:'status' => :'Integer',
|
128
|
-
:'
|
161
|
+
:'apply_template' => :'BOOLEAN',
|
162
|
+
:'created_date' => :'DateTime',
|
163
|
+
:'last_notified' => :'DateTime'
|
129
164
|
}
|
130
165
|
end
|
131
166
|
|
@@ -157,6 +192,10 @@ module BombBomb
|
|
157
192
|
self.email_content = attributes[:'emailContent']
|
158
193
|
end
|
159
194
|
|
195
|
+
if attributes.has_key?(:'thumbnailUrl')
|
196
|
+
self.thumbnail_url = attributes[:'thumbnailUrl']
|
197
|
+
end
|
198
|
+
|
160
199
|
if attributes.has_key?(:'toEmailAddresses')
|
161
200
|
if (value = attributes[:'toEmailAddresses']).is_a?(Array)
|
162
201
|
self.to_email_addresses = value
|
@@ -181,6 +220,14 @@ module BombBomb
|
|
181
220
|
self.prompt_html = attributes[:'promptHtml']
|
182
221
|
end
|
183
222
|
|
223
|
+
if attributes.has_key?(:'promptIntro')
|
224
|
+
self.prompt_intro = attributes[:'promptIntro']
|
225
|
+
end
|
226
|
+
|
227
|
+
if attributes.has_key?(:'exampleVideoId')
|
228
|
+
self.example_video_id = attributes[:'exampleVideoId']
|
229
|
+
end
|
230
|
+
|
184
231
|
if attributes.has_key?(:'sendWithoutVideo')
|
185
232
|
self.send_without_video = attributes[:'sendWithoutVideo']
|
186
233
|
end
|
@@ -205,12 +252,28 @@ module BombBomb
|
|
205
252
|
self.job_id = attributes[:'jobId']
|
206
253
|
end
|
207
254
|
|
255
|
+
if attributes.has_key?(:'promptBotId')
|
256
|
+
self.prompt_bot_id = attributes[:'promptBotId']
|
257
|
+
end
|
258
|
+
|
259
|
+
if attributes.has_key?(:'clientGroupId')
|
260
|
+
self.client_group_id = attributes[:'clientGroupId']
|
261
|
+
end
|
262
|
+
|
208
263
|
if attributes.has_key?(:'status')
|
209
264
|
self.status = attributes[:'status']
|
210
265
|
end
|
211
266
|
|
212
|
-
if attributes.has_key?(:'
|
213
|
-
self.
|
267
|
+
if attributes.has_key?(:'applyTemplate')
|
268
|
+
self.apply_template = attributes[:'applyTemplate']
|
269
|
+
end
|
270
|
+
|
271
|
+
if attributes.has_key?(:'createdDate')
|
272
|
+
self.created_date = attributes[:'createdDate']
|
273
|
+
end
|
274
|
+
|
275
|
+
if attributes.has_key?(:'lastNotified')
|
276
|
+
self.last_notified = attributes[:'lastNotified']
|
214
277
|
end
|
215
278
|
|
216
279
|
end
|
@@ -243,19 +306,26 @@ module BombBomb
|
|
243
306
|
template_id == o.template_id &&
|
244
307
|
email_subject_line == o.email_subject_line &&
|
245
308
|
email_content == o.email_content &&
|
309
|
+
thumbnail_url == o.thumbnail_url &&
|
246
310
|
to_email_addresses == o.to_email_addresses &&
|
247
311
|
to_lists == o.to_lists &&
|
248
312
|
jericho_id == o.jericho_id &&
|
249
313
|
prompt_subject == o.prompt_subject &&
|
250
314
|
prompt_html == o.prompt_html &&
|
315
|
+
prompt_intro == o.prompt_intro &&
|
316
|
+
example_video_id == o.example_video_id &&
|
251
317
|
send_without_video == o.send_without_video &&
|
252
318
|
video_due_date == o.video_due_date &&
|
253
319
|
scheduled_send_date == o.scheduled_send_date &&
|
254
320
|
video_id == o.video_id &&
|
255
321
|
email_id == o.email_id &&
|
256
322
|
job_id == o.job_id &&
|
323
|
+
prompt_bot_id == o.prompt_bot_id &&
|
324
|
+
client_group_id == o.client_group_id &&
|
257
325
|
status == o.status &&
|
258
|
-
|
326
|
+
apply_template == o.apply_template &&
|
327
|
+
created_date == o.created_date &&
|
328
|
+
last_notified == o.last_notified
|
259
329
|
end
|
260
330
|
|
261
331
|
# @see the `==` method
|
@@ -267,7 +337,7 @@ module BombBomb
|
|
267
337
|
# Calculates hash code according to all attributes.
|
268
338
|
# @return [Fixnum] Hash code
|
269
339
|
def hash
|
270
|
-
[id, user_id, template_id, email_subject_line, email_content, to_email_addresses, to_lists, jericho_id, prompt_subject, prompt_html, send_without_video, video_due_date, scheduled_send_date, video_id, email_id, job_id, status,
|
340
|
+
[id, user_id, template_id, email_subject_line, email_content, thumbnail_url, to_email_addresses, to_lists, jericho_id, prompt_subject, prompt_html, prompt_intro, example_video_id, send_without_video, video_due_date, scheduled_send_date, video_id, email_id, job_id, prompt_bot_id, client_group_id, status, apply_template, created_date, last_notified].hash
|
271
341
|
end
|
272
342
|
|
273
343
|
# Builds the object from hash
|
@@ -0,0 +1,302 @@
|
|
1
|
+
=begin
|
2
|
+
#BombBomb
|
3
|
+
|
4
|
+
#We make it easy to build relationships using simple videos.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.22196
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'date'
|
25
|
+
|
26
|
+
module BombBomb
|
27
|
+
# The VideoPublicRepresentation class
|
28
|
+
class VideoPublicRepresentation
|
29
|
+
# The id of the video
|
30
|
+
attr_accessor :id
|
31
|
+
|
32
|
+
# The is of the owning user
|
33
|
+
attr_accessor :user_id
|
34
|
+
|
35
|
+
# The status of the video
|
36
|
+
attr_accessor :status
|
37
|
+
|
38
|
+
# The name of the video
|
39
|
+
attr_accessor :name
|
40
|
+
|
41
|
+
# A description of the video
|
42
|
+
attr_accessor :description
|
43
|
+
|
44
|
+
# The url of the thumbnail for the video
|
45
|
+
attr_accessor :thumb_url
|
46
|
+
|
47
|
+
# Urls to different formats of the video
|
48
|
+
attr_accessor :video_urls
|
49
|
+
|
50
|
+
# The url to use to link to the video
|
51
|
+
attr_accessor :short_url
|
52
|
+
|
53
|
+
# The height of the video in pixels
|
54
|
+
attr_accessor :height
|
55
|
+
|
56
|
+
# The width of the video in pixels
|
57
|
+
attr_accessor :width
|
58
|
+
|
59
|
+
# The date the video was uploaded
|
60
|
+
attr_accessor :upload_date
|
61
|
+
|
62
|
+
|
63
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
64
|
+
def self.attribute_map
|
65
|
+
{
|
66
|
+
:'id' => :'id',
|
67
|
+
:'user_id' => :'userId',
|
68
|
+
:'status' => :'status',
|
69
|
+
:'name' => :'name',
|
70
|
+
:'description' => :'description',
|
71
|
+
:'thumb_url' => :'thumbUrl',
|
72
|
+
:'video_urls' => :'videoUrls',
|
73
|
+
:'short_url' => :'shortUrl',
|
74
|
+
:'height' => :'height',
|
75
|
+
:'width' => :'width',
|
76
|
+
:'upload_date' => :'uploadDate'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# Attribute type mapping.
|
81
|
+
def self.swagger_types
|
82
|
+
{
|
83
|
+
:'id' => :'String',
|
84
|
+
:'user_id' => :'String',
|
85
|
+
:'status' => :'String',
|
86
|
+
:'name' => :'String',
|
87
|
+
:'description' => :'String',
|
88
|
+
:'thumb_url' => :'String',
|
89
|
+
:'video_urls' => :'Array<String>',
|
90
|
+
:'short_url' => :'String',
|
91
|
+
:'height' => :'Integer',
|
92
|
+
:'width' => :'Integer',
|
93
|
+
:'upload_date' => :'String'
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
# Initializes the object
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
def initialize(attributes = {})
|
100
|
+
return unless attributes.is_a?(Hash)
|
101
|
+
|
102
|
+
# convert string to symbol for hash key
|
103
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
104
|
+
|
105
|
+
if attributes.has_key?(:'id')
|
106
|
+
self.id = attributes[:'id']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'userId')
|
110
|
+
self.user_id = attributes[:'userId']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'status')
|
114
|
+
self.status = attributes[:'status']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.has_key?(:'name')
|
118
|
+
self.name = attributes[:'name']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.has_key?(:'description')
|
122
|
+
self.description = attributes[:'description']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.has_key?(:'thumbUrl')
|
126
|
+
self.thumb_url = attributes[:'thumbUrl']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.has_key?(:'videoUrls')
|
130
|
+
if (value = attributes[:'videoUrls']).is_a?(Array)
|
131
|
+
self.video_urls = value
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.has_key?(:'shortUrl')
|
136
|
+
self.short_url = attributes[:'shortUrl']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.has_key?(:'height')
|
140
|
+
self.height = attributes[:'height']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.has_key?(:'width')
|
144
|
+
self.width = attributes[:'width']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.has_key?(:'uploadDate')
|
148
|
+
self.upload_date = attributes[:'uploadDate']
|
149
|
+
end
|
150
|
+
|
151
|
+
end
|
152
|
+
|
153
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
154
|
+
# @return Array for valid properies with the reasons
|
155
|
+
def list_invalid_properties
|
156
|
+
invalid_properties = Array.new
|
157
|
+
return invalid_properties
|
158
|
+
end
|
159
|
+
|
160
|
+
# Check to see if the all the properties in the model are valid
|
161
|
+
# @return true if the model is valid
|
162
|
+
def valid?
|
163
|
+
return true
|
164
|
+
end
|
165
|
+
|
166
|
+
# Checks equality by comparing each attribute.
|
167
|
+
# @param [Object] Object to be compared
|
168
|
+
def ==(o)
|
169
|
+
return true if self.equal?(o)
|
170
|
+
self.class == o.class &&
|
171
|
+
id == o.id &&
|
172
|
+
user_id == o.user_id &&
|
173
|
+
status == o.status &&
|
174
|
+
name == o.name &&
|
175
|
+
description == o.description &&
|
176
|
+
thumb_url == o.thumb_url &&
|
177
|
+
video_urls == o.video_urls &&
|
178
|
+
short_url == o.short_url &&
|
179
|
+
height == o.height &&
|
180
|
+
width == o.width &&
|
181
|
+
upload_date == o.upload_date
|
182
|
+
end
|
183
|
+
|
184
|
+
# @see the `==` method
|
185
|
+
# @param [Object] Object to be compared
|
186
|
+
def eql?(o)
|
187
|
+
self == o
|
188
|
+
end
|
189
|
+
|
190
|
+
# Calculates hash code according to all attributes.
|
191
|
+
# @return [Fixnum] Hash code
|
192
|
+
def hash
|
193
|
+
[id, user_id, status, name, description, thumb_url, video_urls, short_url, height, width, upload_date].hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Builds the object from hash
|
197
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
198
|
+
# @return [Object] Returns the model itself
|
199
|
+
def build_from_hash(attributes)
|
200
|
+
return nil unless attributes.is_a?(Hash)
|
201
|
+
self.class.swagger_types.each_pair do |key, type|
|
202
|
+
if type =~ /^Array<(.*)>/i
|
203
|
+
# check to ensure the input is an array given that the the attribute
|
204
|
+
# is documented as an array but the input is not
|
205
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
206
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
207
|
+
end
|
208
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
209
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
210
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
211
|
+
end
|
212
|
+
|
213
|
+
self
|
214
|
+
end
|
215
|
+
|
216
|
+
# Deserializes the data based on type
|
217
|
+
# @param string type Data type
|
218
|
+
# @param string value Value to be deserialized
|
219
|
+
# @return [Object] Deserialized data
|
220
|
+
def _deserialize(type, value)
|
221
|
+
case type.to_sym
|
222
|
+
when :DateTime
|
223
|
+
DateTime.parse(value)
|
224
|
+
when :Date
|
225
|
+
Date.parse(value)
|
226
|
+
when :String
|
227
|
+
value.to_s
|
228
|
+
when :Integer
|
229
|
+
value.to_i
|
230
|
+
when :Float
|
231
|
+
value.to_f
|
232
|
+
when :BOOLEAN
|
233
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
234
|
+
true
|
235
|
+
else
|
236
|
+
false
|
237
|
+
end
|
238
|
+
when :Object
|
239
|
+
# generic object (usually a Hash), return directly
|
240
|
+
value
|
241
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
242
|
+
inner_type = Regexp.last_match[:inner_type]
|
243
|
+
value.map { |v| _deserialize(inner_type, v) }
|
244
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
245
|
+
k_type = Regexp.last_match[:k_type]
|
246
|
+
v_type = Regexp.last_match[:v_type]
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each do |k, v|
|
249
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
250
|
+
end
|
251
|
+
end
|
252
|
+
else # model
|
253
|
+
temp_model = BombBomb.const_get(type).new
|
254
|
+
temp_model.build_from_hash(value)
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
# Returns the string representation of the object
|
259
|
+
# @return [String] String presentation of the object
|
260
|
+
def to_s
|
261
|
+
to_hash.to_s
|
262
|
+
end
|
263
|
+
|
264
|
+
# to_body is an alias to to_hash (backward compatibility)
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
266
|
+
def to_body
|
267
|
+
to_hash
|
268
|
+
end
|
269
|
+
|
270
|
+
# Returns the object in the form of hash
|
271
|
+
# @return [Hash] Returns the object in the form of hash
|
272
|
+
def to_hash
|
273
|
+
hash = {}
|
274
|
+
self.class.attribute_map.each_pair do |attr, param|
|
275
|
+
value = self.send(attr)
|
276
|
+
next if value.nil?
|
277
|
+
hash[param] = _to_hash(value)
|
278
|
+
end
|
279
|
+
hash
|
280
|
+
end
|
281
|
+
|
282
|
+
# Outputs non-array value in the form of hash
|
283
|
+
# For object, use to_hash. Otherwise, just return the value
|
284
|
+
# @param [Object] value Any valid value
|
285
|
+
# @return [Hash] Returns the value in the form of hash
|
286
|
+
def _to_hash(value)
|
287
|
+
if value.is_a?(Array)
|
288
|
+
value.compact.map{ |v| _to_hash(v) }
|
289
|
+
elsif value.is_a?(Hash)
|
290
|
+
{}.tap do |hash|
|
291
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
292
|
+
end
|
293
|
+
elsif value.respond_to? :to_hash
|
294
|
+
value.to_hash
|
295
|
+
else
|
296
|
+
value
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
end
|
301
|
+
|
302
|
+
end
|