rustici_software_cloud_v2 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +355 -356
  4. data/lib/rustici_software_cloud_v2/api/about_api.rb +4 -4
  5. data/lib/rustici_software_cloud_v2/api/application_management_api.rb +190 -62
  6. data/lib/rustici_software_cloud_v2/api/authentication_api.rb +9 -17
  7. data/lib/rustici_software_cloud_v2/api/course_api.rb +903 -196
  8. data/lib/rustici_software_cloud_v2/api/dispatch_api.rb +458 -268
  9. data/lib/rustici_software_cloud_v2/api/invitations_api.rb +212 -170
  10. data/lib/rustici_software_cloud_v2/api/learner_api.rb +48 -48
  11. data/lib/rustici_software_cloud_v2/api/ping_api.rb +2 -0
  12. data/lib/rustici_software_cloud_v2/api/registration_api.rb +255 -269
  13. data/lib/rustici_software_cloud_v2/api/reporting_api.rb +19 -23
  14. data/lib/rustici_software_cloud_v2/api/xapi_api.rb +81 -66
  15. data/lib/rustici_software_cloud_v2/api/zoomi_api.rb +124 -55
  16. data/lib/rustici_software_cloud_v2/api_client.rb +2 -2
  17. data/lib/rustici_software_cloud_v2/configuration.rb +3 -3
  18. data/lib/rustici_software_cloud_v2/models/about_schema.rb +3 -1
  19. data/lib/rustici_software_cloud_v2/models/activity_result_schema.rb +8 -36
  20. data/lib/rustici_software_cloud_v2/models/application_info_schema.rb +234 -0
  21. data/lib/rustici_software_cloud_v2/models/application_list_schema.rb +3 -1
  22. data/lib/rustici_software_cloud_v2/models/application_request_schema.rb +186 -0
  23. data/lib/rustici_software_cloud_v2/models/application_schema.rb +3 -1
  24. data/lib/rustici_software_cloud_v2/models/application_token.rb +3 -1
  25. data/lib/rustici_software_cloud_v2/models/asset_file_schema.rb +194 -0
  26. data/lib/rustici_software_cloud_v2/models/batch_tags_schema.rb +3 -1
  27. data/lib/rustici_software_cloud_v2/models/comment_schema.rb +3 -1
  28. data/lib/rustici_software_cloud_v2/models/completion_amount_schema.rb +3 -1
  29. data/lib/rustici_software_cloud_v2/models/course_activity_schema.rb +5 -29
  30. data/lib/rustici_software_cloud_v2/models/course_list_non_paged_schema.rb +3 -1
  31. data/lib/rustici_software_cloud_v2/models/course_list_schema.rb +4 -1
  32. data/lib/rustici_software_cloud_v2/models/course_reference_schema.rb +3 -1
  33. data/lib/rustici_software_cloud_v2/models/course_schema.rb +5 -29
  34. data/lib/rustici_software_cloud_v2/models/create_dispatch_id_schema.rb +2 -19
  35. data/lib/rustici_software_cloud_v2/models/create_dispatch_list_schema.rb +3 -1
  36. data/lib/rustici_software_cloud_v2/models/create_dispatch_schema.rb +4 -2
  37. data/lib/rustici_software_cloud_v2/models/create_private_invitation_schema.rb +4 -2
  38. data/lib/rustici_software_cloud_v2/models/create_public_invitation_schema.rb +4 -2
  39. data/lib/rustici_software_cloud_v2/models/create_registration_schema.rb +3 -1
  40. data/lib/rustici_software_cloud_v2/models/credential_created_schema.rb +3 -1
  41. data/lib/rustici_software_cloud_v2/models/credential_list_schema.rb +3 -1
  42. data/lib/rustici_software_cloud_v2/models/credential_request_schema.rb +3 -1
  43. data/lib/rustici_software_cloud_v2/models/credential_schema.rb +3 -1
  44. data/lib/rustici_software_cloud_v2/models/destination_id_schema.rb +3 -1
  45. data/lib/rustici_software_cloud_v2/models/destination_list_schema.rb +4 -2
  46. data/lib/rustici_software_cloud_v2/models/destination_schema.rb +3 -1
  47. data/lib/rustici_software_cloud_v2/models/dispatch_id_schema.rb +3 -1
  48. data/lib/rustici_software_cloud_v2/models/dispatch_list_schema.rb +4 -1
  49. data/lib/rustici_software_cloud_v2/models/dispatch_lti_info_schema.rb +221 -0
  50. data/lib/rustici_software_cloud_v2/models/dispatch_registration_count_schema.rb +3 -1
  51. data/lib/rustici_software_cloud_v2/models/dispatch_schema.rb +43 -3
  52. data/lib/rustici_software_cloud_v2/models/enabled_schema.rb +3 -1
  53. data/lib/rustici_software_cloud_v2/models/file_list_item_schema.rb +205 -0
  54. data/lib/rustici_software_cloud_v2/models/file_list_schema.rb +187 -0
  55. data/lib/rustici_software_cloud_v2/models/import_asset_request_schema.rb +207 -0
  56. data/lib/rustici_software_cloud_v2/models/import_fetch_request_schema.rb +29 -6
  57. data/lib/rustici_software_cloud_v2/models/import_job_result_schema.rb +5 -29
  58. data/lib/rustici_software_cloud_v2/models/import_media_file_reference_request_schema.rb +216 -0
  59. data/lib/rustici_software_cloud_v2/models/import_request_schema.rb +195 -0
  60. data/lib/rustici_software_cloud_v2/models/import_result_schema.rb +3 -1
  61. data/lib/rustici_software_cloud_v2/models/integer_result_schema.rb +3 -1
  62. data/lib/rustici_software_cloud_v2/models/invitation_email_schema.rb +3 -1
  63. data/lib/rustici_software_cloud_v2/models/invitation_job_status_schema.rb +5 -29
  64. data/lib/rustici_software_cloud_v2/models/invitation_summary_list.rb +4 -1
  65. data/lib/rustici_software_cloud_v2/models/invitation_summary_schema.rb +3 -1
  66. data/lib/rustici_software_cloud_v2/models/item_value_pair_schema.rb +3 -1
  67. data/lib/rustici_software_cloud_v2/models/launch_auth_options_schema.rb +3 -1
  68. data/lib/rustici_software_cloud_v2/models/launch_auth_schema.rb +5 -29
  69. data/lib/rustici_software_cloud_v2/models/launch_history_list_schema.rb +3 -1
  70. data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +8 -36
  71. data/lib/rustici_software_cloud_v2/models/launch_link_request_schema.rb +5 -3
  72. data/lib/rustici_software_cloud_v2/models/launch_link_schema.rb +3 -1
  73. data/lib/rustici_software_cloud_v2/models/learner_preference_schema.rb +3 -1
  74. data/lib/rustici_software_cloud_v2/models/learner_schema.rb +3 -1
  75. data/lib/rustici_software_cloud_v2/models/media_file_metadata_schema.rb +213 -0
  76. data/lib/rustici_software_cloud_v2/models/message_schema.rb +3 -1
  77. data/lib/rustici_software_cloud_v2/models/metadata_schema.rb +10 -8
  78. data/lib/rustici_software_cloud_v2/models/objective_schema.rb +11 -43
  79. data/lib/rustici_software_cloud_v2/models/permissions_schema.rb +3 -1
  80. data/lib/rustici_software_cloud_v2/models/ping_schema.rb +3 -1
  81. data/lib/rustici_software_cloud_v2/models/post_back_schema.rb +8 -36
  82. data/lib/rustici_software_cloud_v2/models/private_invitation_list.rb +4 -1
  83. data/lib/rustici_software_cloud_v2/models/private_invitation_schema.rb +5 -3
  84. data/lib/rustici_software_cloud_v2/models/private_invitation_update_schema.rb +215 -0
  85. data/lib/rustici_software_cloud_v2/models/public_invitation_list.rb +4 -1
  86. data/lib/rustici_software_cloud_v2/models/public_invitation_schema.rb +6 -4
  87. data/lib/rustici_software_cloud_v2/models/public_invitation_update_schema.rb +228 -0
  88. data/lib/rustici_software_cloud_v2/models/registration_list_schema.rb +4 -1
  89. data/lib/rustici_software_cloud_v2/models/registration_schema.rb +3 -1
  90. data/lib/rustici_software_cloud_v2/models/reportage_account_info_schema.rb +3 -1
  91. data/lib/rustici_software_cloud_v2/models/reportage_account_info_usage_schema.rb +3 -1
  92. data/lib/rustici_software_cloud_v2/models/reportage_auth_token_schema.rb +3 -1
  93. data/lib/rustici_software_cloud_v2/models/reportage_link_schema.rb +3 -1
  94. data/lib/rustici_software_cloud_v2/models/response_error.rb +3 -1
  95. data/lib/rustici_software_cloud_v2/models/runtime_interaction_schema.rb +5 -29
  96. data/lib/rustici_software_cloud_v2/models/runtime_objective_schema.rb +8 -36
  97. data/lib/rustici_software_cloud_v2/models/runtime_schema.rb +5 -29
  98. data/lib/rustici_software_cloud_v2/models/score_schema.rb +3 -1
  99. data/lib/rustici_software_cloud_v2/models/setting_item.rb +5 -29
  100. data/lib/rustici_software_cloud_v2/models/setting_list_schema.rb +3 -1
  101. data/lib/rustici_software_cloud_v2/models/setting_metadata.rb +5 -29
  102. data/lib/rustici_software_cloud_v2/models/setting_valid_value.rb +3 -1
  103. data/lib/rustici_software_cloud_v2/models/settings_individual_schema.rb +3 -1
  104. data/lib/rustici_software_cloud_v2/models/settings_post_schema.rb +3 -1
  105. data/lib/rustici_software_cloud_v2/models/shared_data_entry_schema.rb +3 -1
  106. data/lib/rustici_software_cloud_v2/models/static_properties_schema.rb +3 -1
  107. data/lib/rustici_software_cloud_v2/models/string_result_schema.rb +3 -1
  108. data/lib/rustici_software_cloud_v2/models/tag_list_schema.rb +3 -1
  109. data/lib/rustici_software_cloud_v2/models/title_schema.rb +3 -1
  110. data/lib/rustici_software_cloud_v2/models/token_request_schema.rb +3 -1
  111. data/lib/rustici_software_cloud_v2/models/update_application_schema.rb +196 -0
  112. data/lib/rustici_software_cloud_v2/models/update_dispatch_schema.rb +15 -3
  113. data/lib/rustici_software_cloud_v2/models/user_invitation_list.rb +4 -1
  114. data/lib/rustici_software_cloud_v2/models/user_invitation_schema.rb +3 -1
  115. data/lib/rustici_software_cloud_v2/models/user_invitation_schema_registration_report.rb +3 -1
  116. data/lib/rustici_software_cloud_v2/models/xapi_account.rb +3 -1
  117. data/lib/rustici_software_cloud_v2/models/xapi_activity.rb +3 -1
  118. data/lib/rustici_software_cloud_v2/models/xapi_activity_definition.rb +3 -1
  119. data/lib/rustici_software_cloud_v2/models/xapi_agent_group.rb +5 -29
  120. data/lib/rustici_software_cloud_v2/models/xapi_attachment.rb +3 -1
  121. data/lib/rustici_software_cloud_v2/models/xapi_context.rb +3 -1
  122. data/lib/rustici_software_cloud_v2/models/xapi_context_activity.rb +3 -1
  123. data/lib/rustici_software_cloud_v2/models/xapi_credential_auth_type_schema.rb +5 -29
  124. data/lib/rustici_software_cloud_v2/models/xapi_credential_permissions_level_schema.rb +5 -29
  125. data/lib/rustici_software_cloud_v2/models/xapi_credential_post_schema.rb +3 -1
  126. data/lib/rustici_software_cloud_v2/models/xapi_credential_put_schema.rb +3 -1
  127. data/lib/rustici_software_cloud_v2/models/xapi_credential_schema.rb +3 -1
  128. data/lib/rustici_software_cloud_v2/models/xapi_credentials_list_schema.rb +4 -1
  129. data/lib/rustici_software_cloud_v2/models/xapi_endpoint_schema.rb +3 -1
  130. data/lib/rustici_software_cloud_v2/models/xapi_interaction_component.rb +3 -1
  131. data/lib/rustici_software_cloud_v2/models/xapi_result.rb +3 -1
  132. data/lib/rustici_software_cloud_v2/models/xapi_score.rb +3 -1
  133. data/lib/rustici_software_cloud_v2/models/xapi_statement.rb +3 -1
  134. data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_list_schema.rb +3 -1
  135. data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_post_schema.rb +3 -1
  136. data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_put_schema.rb +3 -1
  137. data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_schema.rb +3 -1
  138. data/lib/rustici_software_cloud_v2/models/xapi_statement_reference.rb +3 -1
  139. data/lib/rustici_software_cloud_v2/models/xapi_statement_result.rb +3 -1
  140. data/lib/rustici_software_cloud_v2/models/xapi_verb.rb +3 -1
  141. data/lib/rustici_software_cloud_v2/models/zoomi_company_id.rb +3 -1
  142. data/lib/rustici_software_cloud_v2/models/zoomi_course_options_schema.rb +13 -1
  143. data/lib/rustici_software_cloud_v2/version.rb +1 -1
  144. data/lib/rustici_software_cloud_v2.rb +13 -0
  145. data/rustici_software_cloud_v2.gemspec +2 -1
  146. data/spec/api_client_spec.rb +17 -0
  147. metadata +35 -2
@@ -18,28 +18,6 @@ module RusticiSoftwareCloudV2
18
18
 
19
19
  attr_accessor :options
20
20
 
21
- class EnumAttributeValidator
22
- attr_reader :datatype
23
- attr_reader :allowable_values
24
-
25
- def initialize(datatype, allowable_values)
26
- @allowable_values = allowable_values.map do |value|
27
- case datatype.to_s
28
- when /Integer/i
29
- value.to_i
30
- when /Float/i
31
- value.to_f
32
- else
33
- value
34
- end
35
- end
36
- end
37
-
38
- def valid?(value)
39
- !value || allowable_values.include?(value)
40
- end
41
- end
42
-
43
21
  # Attribute mapping from ruby-style variable name to JSON key.
44
22
  def self.attribute_map
45
23
  {
@@ -85,18 +63,15 @@ module RusticiSoftwareCloudV2
85
63
  # Check to see if the all the properties in the model are valid
86
64
  # @return true if the model is valid
87
65
  def valid?
88
- type_validator = EnumAttributeValidator.new('String', ['cookies', 'vault'])
89
- return false unless type_validator.valid?(@type)
90
66
  true
91
67
  end
92
68
 
93
69
  # Custom attribute writer method checking allowed values (enum).
70
+ #
71
+ # allowable_values = ['cookies', 'vault']
72
+ #
94
73
  # @param [Object] type Object to be assigned
95
74
  def type=(type)
96
- validator = EnumAttributeValidator.new('String', ['cookies', 'vault'])
97
- unless validator.valid?(type)
98
- fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
99
- end
100
75
  @type = type
101
76
  end
102
77
 
@@ -128,7 +103,7 @@ module RusticiSoftwareCloudV2
128
103
  return nil unless attributes.is_a?(Hash)
129
104
  self.class.swagger_types.each_pair do |key, type|
130
105
  if type =~ /\AArray<(.*)>/i
131
- # check to ensure the input is an array given that the the attribute
106
+ # check to ensure the input is an array given that the attribute
132
107
  # is documented as an array but the input is not
133
108
  if attributes[self.class.attribute_map[key]].is_a?(Array)
134
109
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -224,5 +199,6 @@ module RusticiSoftwareCloudV2
224
199
  value
225
200
  end
226
201
  end
202
+
227
203
  end
228
204
  end
@@ -58,6 +58,7 @@ module RusticiSoftwareCloudV2
58
58
  true
59
59
  end
60
60
 
61
+
61
62
  # Checks equality by comparing each attribute.
62
63
  # @param [Object] Object to be compared
63
64
  def ==(o)
@@ -85,7 +86,7 @@ module RusticiSoftwareCloudV2
85
86
  return nil unless attributes.is_a?(Hash)
86
87
  self.class.swagger_types.each_pair do |key, type|
87
88
  if type =~ /\AArray<(.*)>/i
88
- # check to ensure the input is an array given that the the attribute
89
+ # check to ensure the input is an array given that the attribute
89
90
  # is documented as an array but the input is not
90
91
  if attributes[self.class.attribute_map[key]].is_a?(Array)
91
92
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -181,5 +182,6 @@ module RusticiSoftwareCloudV2
181
182
  value
182
183
  end
183
184
  end
185
+
184
186
  end
185
187
  end
@@ -37,28 +37,6 @@ module RusticiSoftwareCloudV2
37
37
  # The time of the last runtime update in UTC
38
38
  attr_accessor :last_runtime_update
39
39
 
40
- class EnumAttributeValidator
41
- attr_reader :datatype
42
- attr_reader :allowable_values
43
-
44
- def initialize(datatype, allowable_values)
45
- @allowable_values = allowable_values.map do |value|
46
- case datatype.to_s
47
- when /Integer/i
48
- value.to_i
49
- when /Float/i
50
- value.to_f
51
- else
52
- value
53
- end
54
- end
55
- end
56
-
57
- def valid?(value)
58
- !value || allowable_values.include?(value)
59
- end
60
- end
61
-
62
40
  # Attribute mapping from ruby-style variable name to JSON key.
63
41
  def self.attribute_map
64
42
  {
@@ -154,30 +132,23 @@ module RusticiSoftwareCloudV2
154
132
  # Check to see if the all the properties in the model are valid
155
133
  # @return true if the model is valid
156
134
  def valid?
157
- completion_status_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'COMPLETED', 'INCOMPLETE'])
158
- return false unless completion_status_validator.valid?(@completion_status)
159
- success_status_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
160
- return false unless success_status_validator.valid?(@success_status)
161
135
  true
162
136
  end
163
137
 
164
138
  # Custom attribute writer method checking allowed values (enum).
139
+ #
140
+ # allowable_values = ['UNKNOWN', 'COMPLETED', 'INCOMPLETE']
141
+ #
165
142
  # @param [Object] completion_status Object to be assigned
166
143
  def completion_status=(completion_status)
167
- validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'COMPLETED', 'INCOMPLETE'])
168
- unless validator.valid?(completion_status)
169
- fail ArgumentError, 'invalid value for "completion_status", must be one of #{validator.allowable_values}.'
170
- end
171
144
  @completion_status = completion_status
172
145
  end
173
-
174
146
  # Custom attribute writer method checking allowed values (enum).
147
+ #
148
+ # allowable_values = ['UNKNOWN', 'PASSED', 'FAILED']
149
+ #
175
150
  # @param [Object] success_status Object to be assigned
176
151
  def success_status=(success_status)
177
- validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
178
- unless validator.valid?(success_status)
179
- fail ArgumentError, 'invalid value for "success_status", must be one of #{validator.allowable_values}.'
180
- end
181
152
  @success_status = success_status
182
153
  end
183
154
 
@@ -217,7 +188,7 @@ module RusticiSoftwareCloudV2
217
188
  return nil unless attributes.is_a?(Hash)
218
189
  self.class.swagger_types.each_pair do |key, type|
219
190
  if type =~ /\AArray<(.*)>/i
220
- # check to ensure the input is an array given that the the attribute
191
+ # check to ensure the input is an array given that the attribute
221
192
  # is documented as an array but the input is not
222
193
  if attributes[self.class.attribute_map[key]].is_a?(Array)
223
194
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -313,5 +284,6 @@ module RusticiSoftwareCloudV2
313
284
  value
314
285
  end
315
286
  end
287
+
316
288
  end
317
289
  end
@@ -17,10 +17,10 @@ module RusticiSoftwareCloudV2
17
17
  # Number of seconds from now this link will expire in. Defaults to 120s. Range 10s:300s
18
18
  attr_accessor :expiry
19
19
 
20
- # The URL the application should redirect to when the learner exits a course. If not specified, configured value will be used.
20
+ # The URL the application should redirect to when the learner exits a course. Alternatively one of the following keywords can be used to redirect to: - `closer` - A page that automatically tries to close the browser tab/window - `blank` - A blank page - `message` - A page with a message about the course being complete If an empty string is specified, the configured setting will be used (default www.scorm.com). If an invalid url is specified, the Message.html page will be loaded.
21
21
  attr_accessor :redirect_on_exit_url
22
22
 
23
- # Should this launch be tracked? If false, Engine will avoid tracking to the extent possible for the standard being used.
23
+ # Should this launch be tracked? If false, SCORM Cloud will avoid tracking to the extent possible for the standard being used.
24
24
  attr_accessor :tracking
25
25
 
26
26
  # For SCORM, SCO identifier to override launch, overriding the normal sequencing.
@@ -159,6 +159,7 @@ module RusticiSoftwareCloudV2
159
159
  true
160
160
  end
161
161
 
162
+
162
163
  # Checks equality by comparing each attribute.
163
164
  # @param [Object] Object to be compared
164
165
  def ==(o)
@@ -196,7 +197,7 @@ module RusticiSoftwareCloudV2
196
197
  return nil unless attributes.is_a?(Hash)
197
198
  self.class.swagger_types.each_pair do |key, type|
198
199
  if type =~ /\AArray<(.*)>/i
199
- # check to ensure the input is an array given that the the attribute
200
+ # check to ensure the input is an array given that the attribute
200
201
  # is documented as an array but the input is not
201
202
  if attributes[self.class.attribute_map[key]].is_a?(Array)
202
203
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -292,5 +293,6 @@ module RusticiSoftwareCloudV2
292
293
  value
293
294
  end
294
295
  end
296
+
295
297
  end
296
298
  end
@@ -61,6 +61,7 @@ module RusticiSoftwareCloudV2
61
61
  true
62
62
  end
63
63
 
64
+
64
65
  # Checks equality by comparing each attribute.
65
66
  # @param [Object] Object to be compared
66
67
  def ==(o)
@@ -88,7 +89,7 @@ module RusticiSoftwareCloudV2
88
89
  return nil unless attributes.is_a?(Hash)
89
90
  self.class.swagger_types.each_pair do |key, type|
90
91
  if type =~ /\AArray<(.*)>/i
91
- # check to ensure the input is an array given that the the attribute
92
+ # check to ensure the input is an array given that the attribute
92
93
  # is documented as an array but the input is not
93
94
  if attributes[self.class.attribute_map[key]].is_a?(Array)
94
95
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -184,5 +185,6 @@ module RusticiSoftwareCloudV2
184
185
  value
185
186
  end
186
187
  end
188
+
187
189
  end
188
190
  end
@@ -80,6 +80,7 @@ module RusticiSoftwareCloudV2
80
80
  true
81
81
  end
82
82
 
83
+
83
84
  # Checks equality by comparing each attribute.
84
85
  # @param [Object] Object to be compared
85
86
  def ==(o)
@@ -110,7 +111,7 @@ module RusticiSoftwareCloudV2
110
111
  return nil unless attributes.is_a?(Hash)
111
112
  self.class.swagger_types.each_pair do |key, type|
112
113
  if type =~ /\AArray<(.*)>/i
113
- # check to ensure the input is an array given that the the attribute
114
+ # check to ensure the input is an array given that the attribute
114
115
  # is documented as an array but the input is not
115
116
  if attributes[self.class.attribute_map[key]].is_a?(Array)
116
117
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -206,5 +207,6 @@ module RusticiSoftwareCloudV2
206
207
  value
207
208
  end
208
209
  end
210
+
209
211
  end
210
212
  end
@@ -86,6 +86,7 @@ module RusticiSoftwareCloudV2
86
86
  true
87
87
  end
88
88
 
89
+
89
90
  # Checks equality by comparing each attribute.
90
91
  # @param [Object] Object to be compared
91
92
  def ==(o)
@@ -116,7 +117,7 @@ module RusticiSoftwareCloudV2
116
117
  return nil unless attributes.is_a?(Hash)
117
118
  self.class.swagger_types.each_pair do |key, type|
118
119
  if type =~ /\AArray<(.*)>/i
119
- # check to ensure the input is an array given that the the attribute
120
+ # check to ensure the input is an array given that the attribute
120
121
  # is documented as an array but the input is not
121
122
  if attributes[self.class.attribute_map[key]].is_a?(Array)
122
123
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -212,5 +213,6 @@ module RusticiSoftwareCloudV2
212
213
  value
213
214
  end
214
215
  end
216
+
215
217
  end
216
218
  end
@@ -0,0 +1,213 @@
1
+ =begin
2
+ #SCORM Cloud Rest API
3
+
4
+ #REST API used for SCORM Cloud integrations.
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.12
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module RusticiSoftwareCloudV2
16
+ # Metadata used to set various properties of a media file course
17
+ class MediaFileMetadataSchema
18
+ attr_accessor :title
19
+
20
+ attr_accessor :description
21
+
22
+ attr_accessor :content_language
23
+
24
+ attr_accessor :estimated_duration
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'title' => :'title',
30
+ :'description' => :'description',
31
+ :'content_language' => :'contentLanguage',
32
+ :'estimated_duration' => :'estimatedDuration'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.swagger_types
38
+ {
39
+ :'title' => :'String',
40
+ :'description' => :'String',
41
+ :'content_language' => :'String',
42
+ :'estimated_duration' => :'Integer'
43
+ }
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ return unless attributes.is_a?(Hash)
50
+
51
+ # convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
53
+
54
+ if attributes.has_key?(:'title')
55
+ self.title = attributes[:'title']
56
+ end
57
+
58
+ if attributes.has_key?(:'description')
59
+ self.description = attributes[:'description']
60
+ end
61
+
62
+ if attributes.has_key?(:'contentLanguage')
63
+ self.content_language = attributes[:'contentLanguage']
64
+ end
65
+
66
+ if attributes.has_key?(:'estimatedDuration')
67
+ self.estimated_duration = attributes[:'estimatedDuration']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ invalid_properties = Array.new
75
+ invalid_properties
76
+ end
77
+
78
+ # Check to see if the all the properties in the model are valid
79
+ # @return true if the model is valid
80
+ def valid?
81
+ true
82
+ end
83
+
84
+
85
+ # Checks equality by comparing each attribute.
86
+ # @param [Object] Object to be compared
87
+ def ==(o)
88
+ return true if self.equal?(o)
89
+ self.class == o.class &&
90
+ title == o.title &&
91
+ description == o.description &&
92
+ content_language == o.content_language &&
93
+ estimated_duration == o.estimated_duration
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Fixnum] Hash code
104
+ def hash
105
+ [title, description, content_language, estimated_duration].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ self.class.swagger_types.each_pair do |key, type|
114
+ if type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :DateTime
135
+ DateTime.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :BOOLEAN
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ temp_model = RusticiSoftwareCloudV2.const_get(type).new
166
+ temp_model.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ next if value.nil?
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ # Outputs non-array value in the form of hash
195
+ # For object, use to_hash. Otherwise, just return the value
196
+ # @param [Object] value Any valid value
197
+ # @return [Hash] Returns the value in the form of hash
198
+ def _to_hash(value)
199
+ if value.is_a?(Array)
200
+ value.compact.map { |v| _to_hash(v) }
201
+ elsif value.is_a?(Hash)
202
+ {}.tap do |hash|
203
+ value.each { |k, v| hash[k] = _to_hash(v) }
204
+ end
205
+ elsif value.respond_to? :to_hash
206
+ value.to_hash
207
+ else
208
+ value
209
+ end
210
+ end
211
+
212
+ end
213
+ end
@@ -61,6 +61,7 @@ module RusticiSoftwareCloudV2
61
61
  true
62
62
  end
63
63
 
64
+
64
65
  # Checks equality by comparing each attribute.
65
66
  # @param [Object] Object to be compared
66
67
  def ==(o)
@@ -88,7 +89,7 @@ module RusticiSoftwareCloudV2
88
89
  return nil unless attributes.is_a?(Hash)
89
90
  self.class.swagger_types.each_pair do |key, type|
90
91
  if type =~ /\AArray<(.*)>/i
91
- # check to ensure the input is an array given that the the attribute
92
+ # check to ensure the input is an array given that the attribute
92
93
  # is documented as an array but the input is not
93
94
  if attributes[self.class.attribute_map[key]].is_a?(Array)
94
95
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -184,5 +185,6 @@ module RusticiSoftwareCloudV2
184
185
  value
185
186
  end
186
187
  end
188
+
187
189
  end
188
190
  end
@@ -24,7 +24,7 @@ module RusticiSoftwareCloudV2
24
24
 
25
25
  attr_accessor :duration
26
26
 
27
- attr_accessor :typicaltime
27
+ attr_accessor :typical_time
28
28
 
29
29
  attr_accessor :keywords
30
30
 
@@ -36,7 +36,7 @@ module RusticiSoftwareCloudV2
36
36
  :'description' => :'description',
37
37
  :'description_language' => :'descriptionLanguage',
38
38
  :'duration' => :'duration',
39
- :'typicaltime' => :'typicaltime',
39
+ :'typical_time' => :'typicalTime',
40
40
  :'keywords' => :'keywords'
41
41
  }
42
42
  end
@@ -49,7 +49,7 @@ module RusticiSoftwareCloudV2
49
49
  :'description' => :'String',
50
50
  :'description_language' => :'String',
51
51
  :'duration' => :'String',
52
- :'typicaltime' => :'String',
52
+ :'typical_time' => :'String',
53
53
  :'keywords' => :'Array<String>'
54
54
  }
55
55
  end
@@ -82,8 +82,8 @@ module RusticiSoftwareCloudV2
82
82
  self.duration = attributes[:'duration']
83
83
  end
84
84
 
85
- if attributes.has_key?(:'typicaltime')
86
- self.typicaltime = attributes[:'typicaltime']
85
+ if attributes.has_key?(:'typicalTime')
86
+ self.typical_time = attributes[:'typicalTime']
87
87
  end
88
88
 
89
89
  if attributes.has_key?(:'keywords')
@@ -106,6 +106,7 @@ module RusticiSoftwareCloudV2
106
106
  true
107
107
  end
108
108
 
109
+
109
110
  # Checks equality by comparing each attribute.
110
111
  # @param [Object] Object to be compared
111
112
  def ==(o)
@@ -116,7 +117,7 @@ module RusticiSoftwareCloudV2
116
117
  description == o.description &&
117
118
  description_language == o.description_language &&
118
119
  duration == o.duration &&
119
- typicaltime == o.typicaltime &&
120
+ typical_time == o.typical_time &&
120
121
  keywords == o.keywords
121
122
  end
122
123
 
@@ -129,7 +130,7 @@ module RusticiSoftwareCloudV2
129
130
  # Calculates hash code according to all attributes.
130
131
  # @return [Fixnum] Hash code
131
132
  def hash
132
- [title, title_language, description, description_language, duration, typicaltime, keywords].hash
133
+ [title, title_language, description, description_language, duration, typical_time, keywords].hash
133
134
  end
134
135
 
135
136
  # Builds the object from hash
@@ -139,7 +140,7 @@ module RusticiSoftwareCloudV2
139
140
  return nil unless attributes.is_a?(Hash)
140
141
  self.class.swagger_types.each_pair do |key, type|
141
142
  if type =~ /\AArray<(.*)>/i
142
- # check to ensure the input is an array given that the the attribute
143
+ # check to ensure the input is an array given that the attribute
143
144
  # is documented as an array but the input is not
144
145
  if attributes[self.class.attribute_map[key]].is_a?(Array)
145
146
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -235,5 +236,6 @@ module RusticiSoftwareCloudV2
235
236
  value
236
237
  end
237
238
  end
239
+
238
240
  end
239
241
  end
@@ -40,28 +40,6 @@ module RusticiSoftwareCloudV2
40
40
 
41
41
  attr_accessor :previous_objective_success
42
42
 
43
- class EnumAttributeValidator
44
- attr_reader :datatype
45
- attr_reader :allowable_values
46
-
47
- def initialize(datatype, allowable_values)
48
- @allowable_values = allowable_values.map do |value|
49
- case datatype.to_s
50
- when /Integer/i
51
- value.to_i
52
- when /Float/i
53
- value.to_f
54
- else
55
- value
56
- end
57
- end
58
- end
59
-
60
- def valid?(value)
61
- !value || allowable_values.include?(value)
62
- end
63
- end
64
-
65
43
  # Attribute mapping from ruby-style variable name to JSON key.
66
44
  def self.attribute_map
67
45
  {
@@ -177,42 +155,31 @@ module RusticiSoftwareCloudV2
177
155
  # Check to see if the all the properties in the model are valid
178
156
  # @return true if the model is valid
179
157
  def valid?
180
- objective_completion_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'COMPLETED', 'INCOMPLETE'])
181
- return false unless objective_completion_validator.valid?(@objective_completion)
182
- objective_success_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
183
- return false unless objective_success_validator.valid?(@objective_success)
184
- previous_objective_success_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
185
- return false unless previous_objective_success_validator.valid?(@previous_objective_success)
186
158
  true
187
159
  end
188
160
 
189
161
  # Custom attribute writer method checking allowed values (enum).
162
+ #
163
+ # allowable_values = ['UNKNOWN', 'COMPLETED', 'INCOMPLETE']
164
+ #
190
165
  # @param [Object] objective_completion Object to be assigned
191
166
  def objective_completion=(objective_completion)
192
- validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'COMPLETED', 'INCOMPLETE'])
193
- unless validator.valid?(objective_completion)
194
- fail ArgumentError, 'invalid value for "objective_completion", must be one of #{validator.allowable_values}.'
195
- end
196
167
  @objective_completion = objective_completion
197
168
  end
198
-
199
169
  # Custom attribute writer method checking allowed values (enum).
170
+ #
171
+ # allowable_values = ['UNKNOWN', 'PASSED', 'FAILED']
172
+ #
200
173
  # @param [Object] objective_success Object to be assigned
201
174
  def objective_success=(objective_success)
202
- validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
203
- unless validator.valid?(objective_success)
204
- fail ArgumentError, 'invalid value for "objective_success", must be one of #{validator.allowable_values}.'
205
- end
206
175
  @objective_success = objective_success
207
176
  end
208
-
209
177
  # Custom attribute writer method checking allowed values (enum).
178
+ #
179
+ # allowable_values = ['UNKNOWN', 'PASSED', 'FAILED']
180
+ #
210
181
  # @param [Object] previous_objective_success Object to be assigned
211
182
  def previous_objective_success=(previous_objective_success)
212
- validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
213
- unless validator.valid?(previous_objective_success)
214
- fail ArgumentError, 'invalid value for "previous_objective_success", must be one of #{validator.allowable_values}.'
215
- end
216
183
  @previous_objective_success = previous_objective_success
217
184
  end
218
185
 
@@ -255,7 +222,7 @@ module RusticiSoftwareCloudV2
255
222
  return nil unless attributes.is_a?(Hash)
256
223
  self.class.swagger_types.each_pair do |key, type|
257
224
  if type =~ /\AArray<(.*)>/i
258
- # check to ensure the input is an array given that the the attribute
225
+ # check to ensure the input is an array given that the attribute
259
226
  # is documented as an array but the input is not
260
227
  if attributes[self.class.attribute_map[key]].is_a?(Array)
261
228
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -351,5 +318,6 @@ module RusticiSoftwareCloudV2
351
318
  value
352
319
  end
353
320
  end
321
+
354
322
  end
355
323
  end