rustici_software_cloud_v2 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,228 @@
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 PublicInvitationUpdateSchema
17
+ # If true, then new registrations can be created for this invitation.
18
+ attr_accessor :allow_launch
19
+
20
+ # If true, then new registrations can be created for this invitation.
21
+ attr_accessor :allow_new_registrations
22
+
23
+ # Specifies a URL for which to post activity and status data in real time as the course is completed
24
+ attr_accessor :post_back
25
+
26
+ # The ISO 8601 TimeStamp (defaults to UTC) after which this invitation will expire and can no longer be launched. An empty value will represent no expiration date.
27
+ attr_accessor :expiration_date
28
+
29
+ # Integer value that limits the amount of registrations a public invitation can generate.
30
+ attr_accessor :registration_cap
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'allow_launch' => :'allowLaunch',
36
+ :'allow_new_registrations' => :'allowNewRegistrations',
37
+ :'post_back' => :'postBack',
38
+ :'expiration_date' => :'expirationDate',
39
+ :'registration_cap' => :'registrationCap'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ :'allow_launch' => :'BOOLEAN',
47
+ :'allow_new_registrations' => :'BOOLEAN',
48
+ :'post_back' => :'PostBackSchema',
49
+ :'expiration_date' => :'DateTime',
50
+ :'registration_cap' => :'Integer'
51
+ }
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ return unless attributes.is_a?(Hash)
58
+
59
+ # convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
61
+
62
+ if attributes.has_key?(:'allowLaunch')
63
+ self.allow_launch = attributes[:'allowLaunch']
64
+ end
65
+
66
+ if attributes.has_key?(:'allowNewRegistrations')
67
+ self.allow_new_registrations = attributes[:'allowNewRegistrations']
68
+ end
69
+
70
+ if attributes.has_key?(:'postBack')
71
+ self.post_back = attributes[:'postBack']
72
+ end
73
+
74
+ if attributes.has_key?(:'expirationDate')
75
+ self.expiration_date = attributes[:'expirationDate']
76
+ end
77
+
78
+ if attributes.has_key?(:'registrationCap')
79
+ self.registration_cap = attributes[:'registrationCap']
80
+ else
81
+ self.registration_cap = 0
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ true
96
+ end
97
+
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ allow_launch == o.allow_launch &&
105
+ allow_new_registrations == o.allow_new_registrations &&
106
+ post_back == o.post_back &&
107
+ expiration_date == o.expiration_date &&
108
+ registration_cap == o.registration_cap
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Fixnum] Hash code
119
+ def hash
120
+ [allow_launch, allow_new_registrations, post_back, expiration_date, registration_cap].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ self.class.swagger_types.each_pair do |key, type|
129
+ if type =~ /\AArray<(.*)>/i
130
+ # check to ensure the input is an array given that the attribute
131
+ # is documented as an array but the input is not
132
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
133
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
134
+ end
135
+ elsif !attributes[self.class.attribute_map[key]].nil?
136
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
137
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
138
+ end
139
+
140
+ self
141
+ end
142
+
143
+ # Deserializes the data based on type
144
+ # @param string type Data type
145
+ # @param string value Value to be deserialized
146
+ # @return [Object] Deserialized data
147
+ def _deserialize(type, value)
148
+ case type.to_sym
149
+ when :DateTime
150
+ DateTime.parse(value)
151
+ when :Date
152
+ Date.parse(value)
153
+ when :String
154
+ value.to_s
155
+ when :Integer
156
+ value.to_i
157
+ when :Float
158
+ value.to_f
159
+ when :BOOLEAN
160
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
161
+ true
162
+ else
163
+ false
164
+ end
165
+ when :Object
166
+ # generic object (usually a Hash), return directly
167
+ value
168
+ when /\AArray<(?<inner_type>.+)>\z/
169
+ inner_type = Regexp.last_match[:inner_type]
170
+ value.map { |v| _deserialize(inner_type, v) }
171
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
172
+ k_type = Regexp.last_match[:k_type]
173
+ v_type = Regexp.last_match[:v_type]
174
+ {}.tap do |hash|
175
+ value.each do |k, v|
176
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
177
+ end
178
+ end
179
+ else # model
180
+ temp_model = RusticiSoftwareCloudV2.const_get(type).new
181
+ temp_model.build_from_hash(value)
182
+ end
183
+ end
184
+
185
+ # Returns the string representation of the object
186
+ # @return [String] String presentation of the object
187
+ def to_s
188
+ to_hash.to_s
189
+ end
190
+
191
+ # to_body is an alias to to_hash (backward compatibility)
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_body
194
+ to_hash
195
+ end
196
+
197
+ # Returns the object in the form of hash
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_hash
200
+ hash = {}
201
+ self.class.attribute_map.each_pair do |attr, param|
202
+ value = self.send(attr)
203
+ next if value.nil?
204
+ hash[param] = _to_hash(value)
205
+ end
206
+ hash
207
+ end
208
+
209
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to? :to_hash
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end
226
+
227
+ end
228
+ end
@@ -16,6 +16,7 @@ module RusticiSoftwareCloudV2
16
16
  class RegistrationListSchema
17
17
  attr_accessor :registrations
18
18
 
19
+ # Token for getting the next set of results, from the prior set of results.
19
20
  attr_accessor :more
20
21
 
21
22
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -71,6 +72,7 @@ module RusticiSoftwareCloudV2
71
72
  true
72
73
  end
73
74
 
75
+
74
76
  # Checks equality by comparing each attribute.
75
77
  # @param [Object] Object to be compared
76
78
  def ==(o)
@@ -99,7 +101,7 @@ module RusticiSoftwareCloudV2
99
101
  return nil unless attributes.is_a?(Hash)
100
102
  self.class.swagger_types.each_pair do |key, type|
101
103
  if type =~ /\AArray<(.*)>/i
102
- # check to ensure the input is an array given that the the attribute
104
+ # check to ensure the input is an array given that the attribute
103
105
  # is documented as an array but the input is not
104
106
  if attributes[self.class.attribute_map[key]].is_a?(Array)
105
107
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -195,5 +197,6 @@ module RusticiSoftwareCloudV2
195
197
  value
196
198
  end
197
199
  end
200
+
198
201
  end
199
202
  end
@@ -224,6 +224,7 @@ module RusticiSoftwareCloudV2
224
224
  true
225
225
  end
226
226
 
227
+
227
228
  # Checks equality by comparing each attribute.
228
229
  # @param [Object] Object to be compared
229
230
  def ==(o)
@@ -271,7 +272,7 @@ module RusticiSoftwareCloudV2
271
272
  return nil unless attributes.is_a?(Hash)
272
273
  self.class.swagger_types.each_pair do |key, type|
273
274
  if type =~ /\AArray<(.*)>/i
274
- # check to ensure the input is an array given that the the attribute
275
+ # check to ensure the input is an array given that the attribute
275
276
  # is documented as an array but the input is not
276
277
  if attributes[self.class.attribute_map[key]].is_a?(Array)
277
278
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -367,5 +368,6 @@ module RusticiSoftwareCloudV2
367
368
  value
368
369
  end
369
370
  end
371
+
370
372
  end
371
373
  end
@@ -120,6 +120,7 @@ module RusticiSoftwareCloudV2
120
120
  true
121
121
  end
122
122
 
123
+
123
124
  # Checks equality by comparing each attribute.
124
125
  # @param [Object] Object to be compared
125
126
  def ==(o)
@@ -155,7 +156,7 @@ module RusticiSoftwareCloudV2
155
156
  return nil unless attributes.is_a?(Hash)
156
157
  self.class.swagger_types.each_pair do |key, type|
157
158
  if type =~ /\AArray<(.*)>/i
158
- # check to ensure the input is an array given that the the attribute
159
+ # check to ensure the input is an array given that the attribute
159
160
  # is documented as an array but the input is not
160
161
  if attributes[self.class.attribute_map[key]].is_a?(Array)
161
162
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -251,5 +252,6 @@ module RusticiSoftwareCloudV2
251
252
  value
252
253
  end
253
254
  end
255
+
254
256
  end
255
257
  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
@@ -64,6 +64,7 @@ module RusticiSoftwareCloudV2
64
64
  true
65
65
  end
66
66
 
67
+
67
68
  # Checks equality by comparing each attribute.
68
69
  # @param [Object] Object to be compared
69
70
  def ==(o)
@@ -92,7 +93,7 @@ module RusticiSoftwareCloudV2
92
93
  return nil unless attributes.is_a?(Hash)
93
94
  self.class.swagger_types.each_pair do |key, type|
94
95
  if type =~ /\AArray<(.*)>/i
95
- # check to ensure the input is an array given that the the attribute
96
+ # check to ensure the input is an array given that the attribute
96
97
  # is documented as an array but the input is not
97
98
  if attributes[self.class.attribute_map[key]].is_a?(Array)
98
99
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -188,5 +189,6 @@ module RusticiSoftwareCloudV2
188
189
  value
189
190
  end
190
191
  end
192
+
191
193
  end
192
194
  end
@@ -56,6 +56,7 @@ module RusticiSoftwareCloudV2
56
56
  true
57
57
  end
58
58
 
59
+
59
60
  # Checks equality by comparing each attribute.
60
61
  # @param [Object] Object to be compared
61
62
  def ==(o)
@@ -83,7 +84,7 @@ module RusticiSoftwareCloudV2
83
84
  return nil unless attributes.is_a?(Hash)
84
85
  self.class.swagger_types.each_pair do |key, type|
85
86
  if type =~ /\AArray<(.*)>/i
86
- # check to ensure the input is an array given that the the attribute
87
+ # check to ensure the input is an array given that the attribute
87
88
  # is documented as an array but the input is not
88
89
  if attributes[self.class.attribute_map[key]].is_a?(Array)
89
90
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -179,5 +180,6 @@ module RusticiSoftwareCloudV2
179
180
  value
180
181
  end
181
182
  end
183
+
182
184
  end
183
185
  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
@@ -36,28 +36,6 @@ module RusticiSoftwareCloudV2
36
36
 
37
37
  attr_accessor :description
38
38
 
39
- class EnumAttributeValidator
40
- attr_reader :datatype
41
- attr_reader :allowable_values
42
-
43
- def initialize(datatype, allowable_values)
44
- @allowable_values = allowable_values.map do |value|
45
- case datatype.to_s
46
- when /Integer/i
47
- value.to_i
48
- when /Float/i
49
- value.to_f
50
- else
51
- value
52
- end
53
- end
54
- end
55
-
56
- def valid?(value)
57
- !value || allowable_values.include?(value)
58
- end
59
- end
60
-
61
39
  # Attribute mapping from ruby-style variable name to JSON key.
62
40
  def self.attribute_map
63
41
  {
@@ -159,18 +137,15 @@ module RusticiSoftwareCloudV2
159
137
  # Check to see if the all the properties in the model are valid
160
138
  # @return true if the model is valid
161
139
  def valid?
162
- type_validator = EnumAttributeValidator.new('String', ['TrueFalse', 'Choice', 'FillIn', 'LongFillIn', 'Likert', 'Matching', 'Performance', 'Sequencing', 'Numeric', 'Other'])
163
- return false unless type_validator.valid?(@type)
164
140
  true
165
141
  end
166
142
 
167
143
  # Custom attribute writer method checking allowed values (enum).
144
+ #
145
+ # allowable_values = ['TrueFalse', 'Choice', 'FillIn', 'LongFillIn', 'Likert', 'Matching', 'Performance', 'Sequencing', 'Numeric', 'Other']
146
+ #
168
147
  # @param [Object] type Object to be assigned
169
148
  def type=(type)
170
- validator = EnumAttributeValidator.new('String', ['TrueFalse', 'Choice', 'FillIn', 'LongFillIn', 'Likert', 'Matching', 'Performance', 'Sequencing', 'Numeric', 'Other'])
171
- unless validator.valid?(type)
172
- fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
173
- end
174
149
  @type = type
175
150
  end
176
151
 
@@ -211,7 +186,7 @@ module RusticiSoftwareCloudV2
211
186
  return nil unless attributes.is_a?(Hash)
212
187
  self.class.swagger_types.each_pair do |key, type|
213
188
  if type =~ /\AArray<(.*)>/i
214
- # check to ensure the input is an array given that the the attribute
189
+ # check to ensure the input is an array given that the attribute
215
190
  # is documented as an array but the input is not
216
191
  if attributes[self.class.attribute_map[key]].is_a?(Array)
217
192
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -307,5 +282,6 @@ module RusticiSoftwareCloudV2
307
282
  value
308
283
  end
309
284
  end
285
+
310
286
  end
311
287
  end
@@ -32,28 +32,6 @@ module RusticiSoftwareCloudV2
32
32
 
33
33
  attr_accessor :description
34
34
 
35
- class EnumAttributeValidator
36
- attr_reader :datatype
37
- attr_reader :allowable_values
38
-
39
- def initialize(datatype, allowable_values)
40
- @allowable_values = allowable_values.map do |value|
41
- case datatype.to_s
42
- when /Integer/i
43
- value.to_i
44
- when /Float/i
45
- value.to_f
46
- else
47
- value
48
- end
49
- end
50
- end
51
-
52
- def valid?(value)
53
- !value || allowable_values.include?(value)
54
- end
55
- end
56
-
57
35
  # Attribute mapping from ruby-style variable name to JSON key.
58
36
  def self.attribute_map
59
37
  {
@@ -143,30 +121,23 @@ module RusticiSoftwareCloudV2
143
121
  # Check to see if the all the properties in the model are valid
144
122
  # @return true if the model is valid
145
123
  def valid?
146
- runtime_objective_success_status_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
147
- return false unless runtime_objective_success_status_validator.valid?(@runtime_objective_success_status)
148
- runtime_objective_completion_status_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'COMPLETED', 'INCOMPLETE', 'NOT_ATTEMPTED', 'BROWSED'])
149
- return false unless runtime_objective_completion_status_validator.valid?(@runtime_objective_completion_status)
150
124
  true
151
125
  end
152
126
 
153
127
  # Custom attribute writer method checking allowed values (enum).
128
+ #
129
+ # allowable_values = ['UNKNOWN', 'PASSED', 'FAILED']
130
+ #
154
131
  # @param [Object] runtime_objective_success_status Object to be assigned
155
132
  def runtime_objective_success_status=(runtime_objective_success_status)
156
- validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
157
- unless validator.valid?(runtime_objective_success_status)
158
- fail ArgumentError, 'invalid value for "runtime_objective_success_status", must be one of #{validator.allowable_values}.'
159
- end
160
133
  @runtime_objective_success_status = runtime_objective_success_status
161
134
  end
162
-
163
135
  # Custom attribute writer method checking allowed values (enum).
136
+ #
137
+ # allowable_values = ['UNKNOWN', 'COMPLETED', 'INCOMPLETE', 'NOT_ATTEMPTED', 'BROWSED']
138
+ #
164
139
  # @param [Object] runtime_objective_completion_status Object to be assigned
165
140
  def runtime_objective_completion_status=(runtime_objective_completion_status)
166
- validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'COMPLETED', 'INCOMPLETE', 'NOT_ATTEMPTED', 'BROWSED'])
167
- unless validator.valid?(runtime_objective_completion_status)
168
- fail ArgumentError, 'invalid value for "runtime_objective_completion_status", must be one of #{validator.allowable_values}.'
169
- end
170
141
  @runtime_objective_completion_status = runtime_objective_completion_status
171
142
  end
172
143
 
@@ -205,7 +176,7 @@ module RusticiSoftwareCloudV2
205
176
  return nil unless attributes.is_a?(Hash)
206
177
  self.class.swagger_types.each_pair do |key, type|
207
178
  if type =~ /\AArray<(.*)>/i
208
- # check to ensure the input is an array given that the the attribute
179
+ # check to ensure the input is an array given that the attribute
209
180
  # is documented as an array but the input is not
210
181
  if attributes[self.class.attribute_map[key]].is_a?(Array)
211
182
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -301,5 +272,6 @@ module RusticiSoftwareCloudV2
301
272
  value
302
273
  end
303
274
  end
275
+
304
276
  end
305
277
  end
@@ -54,28 +54,6 @@ module RusticiSoftwareCloudV2
54
54
 
55
55
  attr_accessor :runtime_objectives
56
56
 
57
- class EnumAttributeValidator
58
- attr_reader :datatype
59
- attr_reader :allowable_values
60
-
61
- def initialize(datatype, allowable_values)
62
- @allowable_values = allowable_values.map do |value|
63
- case datatype.to_s
64
- when /Integer/i
65
- value.to_i
66
- when /Float/i
67
- value.to_f
68
- else
69
- value
70
- end
71
- end
72
- end
73
-
74
- def valid?(value)
75
- !value || allowable_values.include?(value)
76
- end
77
- end
78
-
79
57
  # Attribute mapping from ruby-style variable name to JSON key.
80
58
  def self.attribute_map
81
59
  {
@@ -237,18 +215,15 @@ module RusticiSoftwareCloudV2
237
215
  # Check to see if the all the properties in the model are valid
238
216
  # @return true if the model is valid
239
217
  def valid?
240
- runtime_success_status_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
241
- return false unless runtime_success_status_validator.valid?(@runtime_success_status)
242
218
  true
243
219
  end
244
220
 
245
221
  # Custom attribute writer method checking allowed values (enum).
222
+ #
223
+ # allowable_values = ['UNKNOWN', 'PASSED', 'FAILED']
224
+ #
246
225
  # @param [Object] runtime_success_status Object to be assigned
247
226
  def runtime_success_status=(runtime_success_status)
248
- validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
249
- unless validator.valid?(runtime_success_status)
250
- fail ArgumentError, 'invalid value for "runtime_success_status", must be one of #{validator.allowable_values}.'
251
- end
252
227
  @runtime_success_status = runtime_success_status
253
228
  end
254
229
 
@@ -298,7 +273,7 @@ module RusticiSoftwareCloudV2
298
273
  return nil unless attributes.is_a?(Hash)
299
274
  self.class.swagger_types.each_pair do |key, type|
300
275
  if type =~ /\AArray<(.*)>/i
301
- # check to ensure the input is an array given that the the attribute
276
+ # check to ensure the input is an array given that the attribute
302
277
  # is documented as an array but the input is not
303
278
  if attributes[self.class.attribute_map[key]].is_a?(Array)
304
279
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -394,5 +369,6 @@ module RusticiSoftwareCloudV2
394
369
  value
395
370
  end
396
371
  end
372
+
397
373
  end
398
374
  end
@@ -57,6 +57,7 @@ module RusticiSoftwareCloudV2
57
57
  true
58
58
  end
59
59
 
60
+
60
61
  # Checks equality by comparing each attribute.
61
62
  # @param [Object] Object to be compared
62
63
  def ==(o)
@@ -84,7 +85,7 @@ module RusticiSoftwareCloudV2
84
85
  return nil unless attributes.is_a?(Hash)
85
86
  self.class.swagger_types.each_pair do |key, type|
86
87
  if type =~ /\AArray<(.*)>/i
87
- # check to ensure the input is an array given that the the attribute
88
+ # check to ensure the input is an array given that the attribute
88
89
  # is documented as an array but the input is not
89
90
  if attributes[self.class.attribute_map[key]].is_a?(Array)
90
91
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -180,5 +181,6 @@ module RusticiSoftwareCloudV2
180
181
  value
181
182
  end
182
183
  end
184
+
183
185
  end
184
186
  end