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
@@ -0,0 +1,234 @@
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
+ class ApplicationInfoSchema
17
+ # The application id for this application.
18
+ attr_accessor :id
19
+
20
+ # The name of this application.
21
+ attr_accessor :name
22
+
23
+ # The time the application was created in UTC
24
+ attr_accessor :create_date
25
+
26
+ # Whether the application is allowed to perform delete operations
27
+ attr_accessor :allow_delete
28
+
29
+ attr_accessor :course_count
30
+
31
+ attr_accessor :registration_count
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'id' => :'id',
37
+ :'name' => :'name',
38
+ :'create_date' => :'createDate',
39
+ :'allow_delete' => :'allowDelete',
40
+ :'course_count' => :'courseCount',
41
+ :'registration_count' => :'registrationCount'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.swagger_types
47
+ {
48
+ :'id' => :'String',
49
+ :'name' => :'String',
50
+ :'create_date' => :'DateTime',
51
+ :'allow_delete' => :'BOOLEAN',
52
+ :'course_count' => :'Integer',
53
+ :'registration_count' => :'Integer'
54
+ }
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ return unless attributes.is_a?(Hash)
61
+
62
+ # convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
64
+
65
+ if attributes.has_key?(:'id')
66
+ self.id = attributes[:'id']
67
+ end
68
+
69
+ if attributes.has_key?(:'name')
70
+ self.name = attributes[:'name']
71
+ end
72
+
73
+ if attributes.has_key?(:'createDate')
74
+ self.create_date = attributes[:'createDate']
75
+ end
76
+
77
+ if attributes.has_key?(:'allowDelete')
78
+ self.allow_delete = attributes[:'allowDelete']
79
+ end
80
+
81
+ if attributes.has_key?(:'courseCount')
82
+ self.course_count = attributes[:'courseCount']
83
+ end
84
+
85
+ if attributes.has_key?(:'registrationCount')
86
+ self.registration_count = attributes[:'registrationCount']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ true
101
+ end
102
+
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ id == o.id &&
110
+ name == o.name &&
111
+ create_date == o.create_date &&
112
+ allow_delete == o.allow_delete &&
113
+ course_count == o.course_count &&
114
+ registration_count == o.registration_count
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Fixnum] Hash code
125
+ def hash
126
+ [id, name, create_date, allow_delete, course_count, registration_count].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ self.class.swagger_types.each_pair do |key, type|
135
+ if type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :DateTime
156
+ DateTime.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :BOOLEAN
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ temp_model = RusticiSoftwareCloudV2.const_get(type).new
187
+ temp_model.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ next if value.nil?
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+
233
+ end
234
+ 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
@@ -0,0 +1,186 @@
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
+ class ApplicationRequestSchema
17
+ # The name of this application.
18
+ attr_accessor :name
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'name' => :'name'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ :'name' => :'String'
31
+ }
32
+ end
33
+
34
+ # Initializes the object
35
+ # @param [Hash] attributes Model attributes in the form of hash
36
+ def initialize(attributes = {})
37
+ return unless attributes.is_a?(Hash)
38
+
39
+ # convert string to symbol for hash key
40
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
41
+
42
+ if attributes.has_key?(:'name')
43
+ self.name = attributes[:'name']
44
+ end
45
+ end
46
+
47
+ # Show invalid properties with the reasons. Usually used together with valid?
48
+ # @return Array for valid properties with the reasons
49
+ def list_invalid_properties
50
+ invalid_properties = Array.new
51
+ invalid_properties
52
+ end
53
+
54
+ # Check to see if the all the properties in the model are valid
55
+ # @return true if the model is valid
56
+ def valid?
57
+ true
58
+ end
59
+
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ name == o.name
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [name].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+ self.class.swagger_types.each_pair do |key, type|
87
+ if type =~ /\AArray<(.*)>/i
88
+ # check to ensure the input is an array given that the attribute
89
+ # is documented as an array but the input is not
90
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
91
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
92
+ end
93
+ elsif !attributes[self.class.attribute_map[key]].nil?
94
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
95
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ end
97
+
98
+ self
99
+ end
100
+
101
+ # Deserializes the data based on type
102
+ # @param string type Data type
103
+ # @param string value Value to be deserialized
104
+ # @return [Object] Deserialized data
105
+ def _deserialize(type, value)
106
+ case type.to_sym
107
+ when :DateTime
108
+ DateTime.parse(value)
109
+ when :Date
110
+ Date.parse(value)
111
+ when :String
112
+ value.to_s
113
+ when :Integer
114
+ value.to_i
115
+ when :Float
116
+ value.to_f
117
+ when :BOOLEAN
118
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
119
+ true
120
+ else
121
+ false
122
+ end
123
+ when :Object
124
+ # generic object (usually a Hash), return directly
125
+ value
126
+ when /\AArray<(?<inner_type>.+)>\z/
127
+ inner_type = Regexp.last_match[:inner_type]
128
+ value.map { |v| _deserialize(inner_type, v) }
129
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
130
+ k_type = Regexp.last_match[:k_type]
131
+ v_type = Regexp.last_match[:v_type]
132
+ {}.tap do |hash|
133
+ value.each do |k, v|
134
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
135
+ end
136
+ end
137
+ else # model
138
+ temp_model = RusticiSoftwareCloudV2.const_get(type).new
139
+ temp_model.build_from_hash(value)
140
+ end
141
+ end
142
+
143
+ # Returns the string representation of the object
144
+ # @return [String] String presentation of the object
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_hash (backward compatibility)
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_body
152
+ to_hash
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ next if value.nil?
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ # Outputs non-array value in the form of hash
168
+ # For object, use to_hash. Otherwise, just return the value
169
+ # @param [Object] value Any valid value
170
+ # @return [Hash] Returns the value in the form of hash
171
+ def _to_hash(value)
172
+ if value.is_a?(Array)
173
+ value.compact.map { |v| _to_hash(v) }
174
+ elsif value.is_a?(Hash)
175
+ {}.tap do |hash|
176
+ value.each { |k, v| hash[k] = _to_hash(v) }
177
+ end
178
+ elsif value.respond_to? :to_hash
179
+ value.to_hash
180
+ else
181
+ value
182
+ end
183
+ end
184
+
185
+ end
186
+ end
@@ -66,6 +66,7 @@ module RusticiSoftwareCloudV2
66
66
  true
67
67
  end
68
68
 
69
+
69
70
  # Checks equality by comparing each attribute.
70
71
  # @param [Object] Object to be compared
71
72
  def ==(o)
@@ -94,7 +95,7 @@ module RusticiSoftwareCloudV2
94
95
  return nil unless attributes.is_a?(Hash)
95
96
  self.class.swagger_types.each_pair do |key, type|
96
97
  if type =~ /\AArray<(.*)>/i
97
- # check to ensure the input is an array given that the the attribute
98
+ # check to ensure the input is an array given that the attribute
98
99
  # is documented as an array but the input is not
99
100
  if attributes[self.class.attribute_map[key]].is_a?(Array)
100
101
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -190,5 +191,6 @@ module RusticiSoftwareCloudV2
190
191
  value
191
192
  end
192
193
  end
194
+
193
195
  end
194
196
  end
@@ -72,6 +72,7 @@ module RusticiSoftwareCloudV2
72
72
  true
73
73
  end
74
74
 
75
+
75
76
  # Checks equality by comparing each attribute.
76
77
  # @param [Object] Object to be compared
77
78
  def ==(o)
@@ -101,7 +102,7 @@ module RusticiSoftwareCloudV2
101
102
  return nil unless attributes.is_a?(Hash)
102
103
  self.class.swagger_types.each_pair do |key, type|
103
104
  if type =~ /\AArray<(.*)>/i
104
- # check to ensure the input is an array given that the the attribute
105
+ # check to ensure the input is an array given that the attribute
105
106
  # is documented as an array but the input is not
106
107
  if attributes[self.class.attribute_map[key]].is_a?(Array)
107
108
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -197,5 +198,6 @@ module RusticiSoftwareCloudV2
197
198
  value
198
199
  end
199
200
  end
201
+
200
202
  end
201
203
  end
@@ -0,0 +1,194 @@
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
+ class AssetFileSchema
17
+ attr_accessor :filename
18
+
19
+ attr_accessor :destination
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'filename' => :'filename',
25
+ :'destination' => :'destination'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'filename' => :'String',
33
+ :'destination' => :'String'
34
+ }
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ if attributes.has_key?(:'filename')
46
+ self.filename = attributes[:'filename']
47
+ end
48
+
49
+ if attributes.has_key?(:'destination')
50
+ self.destination = attributes[:'destination']
51
+ end
52
+ end
53
+
54
+ # Show invalid properties with the reasons. Usually used together with valid?
55
+ # @return Array for valid properties with the reasons
56
+ def list_invalid_properties
57
+ invalid_properties = Array.new
58
+ invalid_properties
59
+ end
60
+
61
+ # Check to see if the all the properties in the model are valid
62
+ # @return true if the model is valid
63
+ def valid?
64
+ true
65
+ end
66
+
67
+
68
+ # Checks equality by comparing each attribute.
69
+ # @param [Object] Object to be compared
70
+ def ==(o)
71
+ return true if self.equal?(o)
72
+ self.class == o.class &&
73
+ filename == o.filename &&
74
+ destination == o.destination
75
+ end
76
+
77
+ # @see the `==` method
78
+ # @param [Object] Object to be compared
79
+ def eql?(o)
80
+ self == o
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Fixnum] Hash code
85
+ def hash
86
+ [filename, destination].hash
87
+ end
88
+
89
+ # Builds the object from hash
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ # @return [Object] Returns the model itself
92
+ def build_from_hash(attributes)
93
+ return nil unless attributes.is_a?(Hash)
94
+ self.class.swagger_types.each_pair do |key, type|
95
+ if type =~ /\AArray<(.*)>/i
96
+ # check to ensure the input is an array given that the attribute
97
+ # is documented as an array but the input is not
98
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
99
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
100
+ end
101
+ elsif !attributes[self.class.attribute_map[key]].nil?
102
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
103
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
104
+ end
105
+
106
+ self
107
+ end
108
+
109
+ # Deserializes the data based on type
110
+ # @param string type Data type
111
+ # @param string value Value to be deserialized
112
+ # @return [Object] Deserialized data
113
+ def _deserialize(type, value)
114
+ case type.to_sym
115
+ when :DateTime
116
+ DateTime.parse(value)
117
+ when :Date
118
+ Date.parse(value)
119
+ when :String
120
+ value.to_s
121
+ when :Integer
122
+ value.to_i
123
+ when :Float
124
+ value.to_f
125
+ when :BOOLEAN
126
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
127
+ true
128
+ else
129
+ false
130
+ end
131
+ when :Object
132
+ # generic object (usually a Hash), return directly
133
+ value
134
+ when /\AArray<(?<inner_type>.+)>\z/
135
+ inner_type = Regexp.last_match[:inner_type]
136
+ value.map { |v| _deserialize(inner_type, v) }
137
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
138
+ k_type = Regexp.last_match[:k_type]
139
+ v_type = Regexp.last_match[:v_type]
140
+ {}.tap do |hash|
141
+ value.each do |k, v|
142
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
143
+ end
144
+ end
145
+ else # model
146
+ temp_model = RusticiSoftwareCloudV2.const_get(type).new
147
+ temp_model.build_from_hash(value)
148
+ end
149
+ end
150
+
151
+ # Returns the string representation of the object
152
+ # @return [String] String presentation of the object
153
+ def to_s
154
+ to_hash.to_s
155
+ end
156
+
157
+ # to_body is an alias to to_hash (backward compatibility)
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_body
160
+ to_hash
161
+ end
162
+
163
+ # Returns the object in the form of hash
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_hash
166
+ hash = {}
167
+ self.class.attribute_map.each_pair do |attr, param|
168
+ value = self.send(attr)
169
+ next if value.nil?
170
+ hash[param] = _to_hash(value)
171
+ end
172
+ hash
173
+ end
174
+
175
+ # Outputs non-array value in the form of hash
176
+ # For object, use to_hash. Otherwise, just return the value
177
+ # @param [Object] value Any valid value
178
+ # @return [Hash] Returns the value in the form of hash
179
+ def _to_hash(value)
180
+ if value.is_a?(Array)
181
+ value.compact.map { |v| _to_hash(v) }
182
+ elsif value.is_a?(Hash)
183
+ {}.tap do |hash|
184
+ value.each { |k, v| hash[k] = _to_hash(v) }
185
+ end
186
+ elsif value.respond_to? :to_hash
187
+ value.to_hash
188
+ else
189
+ value
190
+ end
191
+ end
192
+
193
+ end
194
+ end
@@ -78,6 +78,7 @@ module RusticiSoftwareCloudV2
78
78
  true
79
79
  end
80
80
 
81
+
81
82
  # Checks equality by comparing each attribute.
82
83
  # @param [Object] Object to be compared
83
84
  def ==(o)
@@ -106,7 +107,7 @@ module RusticiSoftwareCloudV2
106
107
  return nil unless attributes.is_a?(Hash)
107
108
  self.class.swagger_types.each_pair do |key, type|
108
109
  if type =~ /\AArray<(.*)>/i
109
- # check to ensure the input is an array given that the the attribute
110
+ # check to ensure the input is an array given that the attribute
110
111
  # is documented as an array but the input is not
111
112
  if attributes[self.class.attribute_map[key]].is_a?(Array)
112
113
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -202,5 +203,6 @@ module RusticiSoftwareCloudV2
202
203
  value
203
204
  end
204
205
  end
206
+
205
207
  end
206
208
  end