rustici_software_cloud_v2 1.0.0beta
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +7 -0
- data/LICENSE +201 -0
- data/README.md +283 -0
- data/Rakefile +8 -0
- data/docs/ActivityResultSchema.md +20 -0
- data/docs/ApplicationListSchema.md +8 -0
- data/docs/ApplicationManagementApi.md +570 -0
- data/docs/ApplicationSchema.md +9 -0
- data/docs/ApplicationToken.md +10 -0
- data/docs/AuthenticationApi.md +64 -0
- data/docs/CommentSchema.md +10 -0
- data/docs/CompletionAmountSchema.md +8 -0
- data/docs/CourseActivitySchema.md +15 -0
- data/docs/CourseApi.md +1459 -0
- data/docs/CourseListNonPagedSchema.md +8 -0
- data/docs/CourseListSchema.md +9 -0
- data/docs/CourseReferenceSchema.md +10 -0
- data/docs/CourseSchema.md +20 -0
- data/docs/CourseTagsBatchSchema.md +9 -0
- data/docs/CreateRegistrationSchema.md +17 -0
- data/docs/CredentialCreatedSchema.md +12 -0
- data/docs/CredentialListSchema.md +8 -0
- data/docs/CredentialRequestSchema.md +9 -0
- data/docs/CredentialSchema.md +12 -0
- data/docs/ImportFetchRequestSchema.md +8 -0
- data/docs/ImportJobResultSchema.md +11 -0
- data/docs/ImportResultSchema.md +11 -0
- data/docs/IntegerResultSchema.md +8 -0
- data/docs/ItemValuePairSchema.md +9 -0
- data/docs/LaunchHistoryListSchema.md +8 -0
- data/docs/LaunchHistorySchema.md +17 -0
- data/docs/LaunchLinkRequestSchema.md +17 -0
- data/docs/LaunchLinkSchema.md +8 -0
- data/docs/LearnerPreferenceSchema.md +11 -0
- data/docs/LearnerSchema.md +11 -0
- data/docs/LinkSchema.md +8 -0
- data/docs/MessageSchema.md +8 -0
- data/docs/MetadataSchema.md +14 -0
- data/docs/ObjectiveSchema.md +20 -0
- data/docs/PermissionsSchema.md +9 -0
- data/docs/PingApi.md +57 -0
- data/docs/PingSchema.md +8 -0
- data/docs/PostBackSchema.md +12 -0
- data/docs/RegistrationApi.md +1490 -0
- data/docs/RegistrationCompletion.md +7 -0
- data/docs/RegistrationListSchema.md +9 -0
- data/docs/RegistrationSchema.md +27 -0
- data/docs/RegistrationSuccess.md +7 -0
- data/docs/RegistrationTagsBatchSchema.md +9 -0
- data/docs/ResponseError.md +8 -0
- data/docs/RuntimeInteractionSchema.md +18 -0
- data/docs/RuntimeObjectiveSchema.md +16 -0
- data/docs/RuntimeSchema.md +27 -0
- data/docs/ScoreSchema.md +8 -0
- data/docs/SettingItem.md +12 -0
- data/docs/SettingListSchema.md +8 -0
- data/docs/SettingMetadata.md +15 -0
- data/docs/SettingMetadataValidValues.md +9 -0
- data/docs/SettingValidValue.md +9 -0
- data/docs/SettingsIndividualSchema.md +10 -0
- data/docs/SettingsPostSchema.md +8 -0
- data/docs/SharedDataEntrySchema.md +9 -0
- data/docs/StaticPropertiesSchema.md +13 -0
- data/docs/StringResultSchema.md +8 -0
- data/docs/TagListSchema.md +8 -0
- data/docs/TagPostSchema.md +7 -0
- data/docs/TitleSchema.md +8 -0
- data/docs/TokenRequestSchema.md +9 -0
- data/docs/XapiAccount.md +9 -0
- data/docs/XapiActivity.md +10 -0
- data/docs/XapiActivityDefinition.md +19 -0
- data/docs/XapiAgentGroup.md +14 -0
- data/docs/XapiAttachment.md +14 -0
- data/docs/XapiContext.md +16 -0
- data/docs/XapiContextActivity.md +11 -0
- data/docs/XapiInteractionComponent.md +9 -0
- data/docs/XapiResult.md +13 -0
- data/docs/XapiScore.md +11 -0
- data/docs/XapiStatement.md +20 -0
- data/docs/XapiStatementReference.md +9 -0
- data/docs/XapiStatementResult.md +9 -0
- data/docs/XapiVerb.md +9 -0
- data/git_push.sh +55 -0
- data/lib/rustici_software_cloud_v2.rb +116 -0
- data/lib/rustici_software_cloud_v2/api/application_management_api.rb +574 -0
- data/lib/rustici_software_cloud_v2/api/authentication_api.rb +87 -0
- data/lib/rustici_software_cloud_v2/api/course_api.rb +1469 -0
- data/lib/rustici_software_cloud_v2/api/ping_api.rb +69 -0
- data/lib/rustici_software_cloud_v2/api/registration_api.rb +1499 -0
- data/lib/rustici_software_cloud_v2/api_client.rb +389 -0
- data/lib/rustici_software_cloud_v2/api_error.rb +38 -0
- data/lib/rustici_software_cloud_v2/configuration.rb +237 -0
- data/lib/rustici_software_cloud_v2/models/activity_result_schema.rb +341 -0
- data/lib/rustici_software_cloud_v2/models/application_list_schema.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/application_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/application_token.rb +201 -0
- data/lib/rustici_software_cloud_v2/models/comment_schema.rb +201 -0
- data/lib/rustici_software_cloud_v2/models/completion_amount_schema.rb +184 -0
- data/lib/rustici_software_cloud_v2/models/course_activity_schema.rb +289 -0
- data/lib/rustici_software_cloud_v2/models/course_list_non_paged_schema.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/course_list_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/course_reference_schema.rb +202 -0
- data/lib/rustici_software_cloud_v2/models/course_schema.rb +328 -0
- data/lib/rustici_software_cloud_v2/models/course_tags_batch_schema.rb +204 -0
- data/lib/rustici_software_cloud_v2/models/create_registration_schema.rb +287 -0
- data/lib/rustici_software_cloud_v2/models/credential_created_schema.rb +223 -0
- data/lib/rustici_software_cloud_v2/models/credential_list_schema.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/credential_request_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/credential_schema.rb +223 -0
- data/lib/rustici_software_cloud_v2/models/import_fetch_request_schema.rb +190 -0
- data/lib/rustici_software_cloud_v2/models/import_job_result_schema.rb +244 -0
- data/lib/rustici_software_cloud_v2/models/import_result_schema.rb +215 -0
- data/lib/rustici_software_cloud_v2/models/integer_result_schema.rb +188 -0
- data/lib/rustici_software_cloud_v2/models/item_value_pair_schema.rb +192 -0
- data/lib/rustici_software_cloud_v2/models/launch_history_list_schema.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +317 -0
- data/lib/rustici_software_cloud_v2/models/launch_link_request_schema.rb +282 -0
- data/lib/rustici_software_cloud_v2/models/launch_link_schema.rb +188 -0
- data/lib/rustici_software_cloud_v2/models/learner_preference_schema.rb +210 -0
- data/lib/rustici_software_cloud_v2/models/learner_schema.rb +216 -0
- data/lib/rustici_software_cloud_v2/models/link_schema.rb +188 -0
- data/lib/rustici_software_cloud_v2/models/message_schema.rb +188 -0
- data/lib/rustici_software_cloud_v2/models/metadata_schema.rb +239 -0
- data/lib/rustici_software_cloud_v2/models/objective_schema.rb +355 -0
- data/lib/rustici_software_cloud_v2/models/permissions_schema.rb +195 -0
- data/lib/rustici_software_cloud_v2/models/ping_schema.rb +188 -0
- data/lib/rustici_software_cloud_v2/models/post_back_schema.rb +273 -0
- data/lib/rustici_software_cloud_v2/models/registration_completion.rb +31 -0
- data/lib/rustici_software_cloud_v2/models/registration_list_schema.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/registration_schema.rb +360 -0
- data/lib/rustici_software_cloud_v2/models/registration_success.rb +31 -0
- data/lib/rustici_software_cloud_v2/models/registration_tags_batch_schema.rb +204 -0
- data/lib/rustici_software_cloud_v2/models/response_error.rb +188 -0
- data/lib/rustici_software_cloud_v2/models/runtime_interaction_schema.rb +311 -0
- data/lib/rustici_software_cloud_v2/models/runtime_objective_schema.rb +305 -0
- data/lib/rustici_software_cloud_v2/models/runtime_schema.rb +398 -0
- data/lib/rustici_software_cloud_v2/models/score_schema.rb +184 -0
- data/lib/rustici_software_cloud_v2/models/setting_item.rb +256 -0
- data/lib/rustici_software_cloud_v2/models/setting_list_schema.rb +190 -0
- data/lib/rustici_software_cloud_v2/models/setting_metadata.rb +294 -0
- data/lib/rustici_software_cloud_v2/models/setting_metadata_valid_values.rb +209 -0
- data/lib/rustici_software_cloud_v2/models/setting_valid_value.rb +193 -0
- data/lib/rustici_software_cloud_v2/models/settings_individual_schema.rb +203 -0
- data/lib/rustici_software_cloud_v2/models/settings_post_schema.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/shared_data_entry_schema.rb +192 -0
- data/lib/rustici_software_cloud_v2/models/static_properties_schema.rb +228 -0
- data/lib/rustici_software_cloud_v2/models/string_result_schema.rb +188 -0
- data/lib/rustici_software_cloud_v2/models/tag_list_schema.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/tag_post_schema.rb +174 -0
- data/lib/rustici_software_cloud_v2/models/title_schema.rb +183 -0
- data/lib/rustici_software_cloud_v2/models/token_request_schema.rb +203 -0
- data/lib/rustici_software_cloud_v2/models/xapi_account.rb +203 -0
- data/lib/rustici_software_cloud_v2/models/xapi_activity.rb +209 -0
- data/lib/rustici_software_cloud_v2/models/xapi_activity_definition.rb +301 -0
- data/lib/rustici_software_cloud_v2/models/xapi_agent_group.rb +279 -0
- data/lib/rustici_software_cloud_v2/models/xapi_attachment.rb +267 -0
- data/lib/rustici_software_cloud_v2/models/xapi_context.rb +258 -0
- data/lib/rustici_software_cloud_v2/models/xapi_context_activity.rb +219 -0
- data/lib/rustici_software_cloud_v2/models/xapi_interaction_component.rb +200 -0
- data/lib/rustici_software_cloud_v2/models/xapi_result.rb +231 -0
- data/lib/rustici_software_cloud_v2/models/xapi_score.rb +211 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement.rb +294 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_reference.rb +205 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_result.rb +200 -0
- data/lib/rustici_software_cloud_v2/models/xapi_verb.rb +200 -0
- data/lib/rustici_software_cloud_v2/version.rb +15 -0
- data/rustici_software_cloud_v2.gemspec +45 -0
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/activity_result_schema_spec.rb +133 -0
- data/spec/models/application_list_schema_spec.rb +53 -0
- data/spec/models/application_schema_spec.rb +59 -0
- data/spec/models/application_token_spec.rb +65 -0
- data/spec/models/comment_schema_spec.rb +65 -0
- data/spec/models/completion_amount_schema_spec.rb +53 -0
- data/spec/models/course_activity_schema_spec.rb +99 -0
- data/spec/models/course_list_non_paged_schema_spec.rb +53 -0
- data/spec/models/course_list_schema_spec.rb +59 -0
- data/spec/models/course_reference_schema_spec.rb +65 -0
- data/spec/models/course_schema_spec.rb +129 -0
- data/spec/models/create_registration_schema_spec.rb +107 -0
- data/spec/models/credential_created_schema_spec.rb +77 -0
- data/spec/models/credential_list_schema_spec.rb +53 -0
- data/spec/models/credential_request_schema_spec.rb +59 -0
- data/spec/models/credential_schema_spec.rb +77 -0
- data/spec/models/import_fetch_request_schema_spec.rb +53 -0
- data/spec/models/import_job_result_schema_spec.rb +75 -0
- data/spec/models/import_result_schema_spec.rb +71 -0
- data/spec/models/integer_result_schema_spec.rb +53 -0
- data/spec/models/item_value_pair_schema_spec.rb +59 -0
- data/spec/models/launch_history_list_schema_spec.rb +53 -0
- data/spec/models/launch_history_schema_spec.rb +115 -0
- data/spec/models/launch_link_request_schema_spec.rb +107 -0
- data/spec/models/launch_link_schema_spec.rb +53 -0
- data/spec/models/learner_preference_schema_spec.rb +71 -0
- data/spec/models/learner_schema_spec.rb +71 -0
- data/spec/models/link_schema_spec.rb +53 -0
- data/spec/models/message_schema_spec.rb +53 -0
- data/spec/models/metadata_schema_spec.rb +89 -0
- data/spec/models/objective_schema_spec.rb +137 -0
- data/spec/models/permissions_schema_spec.rb +59 -0
- data/spec/models/ping_schema_spec.rb +53 -0
- data/spec/models/post_back_schema_spec.rb +85 -0
- data/spec/models/registration_completion_spec.rb +47 -0
- data/spec/models/registration_list_schema_spec.rb +59 -0
- data/spec/models/registration_schema_spec.rb +167 -0
- data/spec/models/registration_success_spec.rb +47 -0
- data/spec/models/response_error_spec.rb +53 -0
- data/spec/models/runtime_interaction_schema_spec.rb +117 -0
- data/spec/models/runtime_objective_schema_spec.rb +109 -0
- data/spec/models/runtime_schema_spec.rb +171 -0
- data/spec/models/score_schema_spec.rb +53 -0
- data/spec/models/setting_item_spec.rb +81 -0
- data/spec/models/setting_list_schema_spec.rb +53 -0
- data/spec/models/setting_metadata_spec.rb +99 -0
- data/spec/models/setting_metadata_valid_values_spec.rb +59 -0
- data/spec/models/settings_individual_schema_spec.rb +65 -0
- data/spec/models/settings_post_schema_spec.rb +53 -0
- data/spec/models/shared_data_entry_schema_spec.rb +59 -0
- data/spec/models/static_properties_schema_spec.rb +83 -0
- data/spec/models/string_result_schema_spec.rb +53 -0
- data/spec/models/title_schema_spec.rb +53 -0
- data/spec/models/token_request_schema_spec.rb +59 -0
- data/spec/spec_helper.rb +122 -0
- data/swagger-codegen.config +11 -0
- metadata +526 -0
@@ -0,0 +1,317 @@
|
|
1
|
+
=begin
|
2
|
+
#SCORM Cloud Rest API
|
3
|
+
|
4
|
+
#REST API used for SCORM Cloud integrations.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0 beta
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module RusticiSoftwareCloudV2
|
16
|
+
class LaunchHistorySchema
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
attr_accessor :instance
|
20
|
+
|
21
|
+
attr_accessor :score
|
22
|
+
|
23
|
+
attr_accessor :completion_status
|
24
|
+
|
25
|
+
attr_accessor :success_status
|
26
|
+
|
27
|
+
attr_accessor :history_log
|
28
|
+
|
29
|
+
attr_accessor :total_seconds_tracked
|
30
|
+
|
31
|
+
# The time of the launch in UTC
|
32
|
+
attr_accessor :launch_time
|
33
|
+
|
34
|
+
# The time of the exit in UTC
|
35
|
+
attr_accessor :exit_time
|
36
|
+
|
37
|
+
# The time of the last runtime update in UTC
|
38
|
+
attr_accessor :last_runtime_update
|
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
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
63
|
+
def self.attribute_map
|
64
|
+
{
|
65
|
+
:'id' => :'id',
|
66
|
+
:'instance' => :'instance',
|
67
|
+
:'score' => :'score',
|
68
|
+
:'completion_status' => :'completionStatus',
|
69
|
+
:'success_status' => :'successStatus',
|
70
|
+
:'history_log' => :'historyLog',
|
71
|
+
:'total_seconds_tracked' => :'totalSecondsTracked',
|
72
|
+
:'launch_time' => :'launchTime',
|
73
|
+
:'exit_time' => :'exitTime',
|
74
|
+
:'last_runtime_update' => :'lastRuntimeUpdate'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Attribute type mapping.
|
79
|
+
def self.swagger_types
|
80
|
+
{
|
81
|
+
:'id' => :'String',
|
82
|
+
:'instance' => :'Integer',
|
83
|
+
:'score' => :'ScoreSchema',
|
84
|
+
:'completion_status' => :'String',
|
85
|
+
:'success_status' => :'String',
|
86
|
+
:'history_log' => :'String',
|
87
|
+
:'total_seconds_tracked' => :'Float',
|
88
|
+
:'launch_time' => :'DateTime',
|
89
|
+
:'exit_time' => :'DateTime',
|
90
|
+
:'last_runtime_update' => :'DateTime'
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
94
|
+
# Initializes the object
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
def initialize(attributes = {})
|
97
|
+
return unless attributes.is_a?(Hash)
|
98
|
+
|
99
|
+
# convert string to symbol for hash key
|
100
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
101
|
+
|
102
|
+
if attributes.has_key?(:'id')
|
103
|
+
self.id = attributes[:'id']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'instance')
|
107
|
+
self.instance = attributes[:'instance']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.has_key?(:'score')
|
111
|
+
self.score = attributes[:'score']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.has_key?(:'completionStatus')
|
115
|
+
self.completion_status = attributes[:'completionStatus']
|
116
|
+
else
|
117
|
+
self.completion_status = 'UNKNOWN'
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.has_key?(:'successStatus')
|
121
|
+
self.success_status = attributes[:'successStatus']
|
122
|
+
else
|
123
|
+
self.success_status = 'UNKNOWN'
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.has_key?(:'historyLog')
|
127
|
+
self.history_log = attributes[:'historyLog']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.has_key?(:'totalSecondsTracked')
|
131
|
+
self.total_seconds_tracked = attributes[:'totalSecondsTracked']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.has_key?(:'launchTime')
|
135
|
+
self.launch_time = attributes[:'launchTime']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.has_key?(:'exitTime')
|
139
|
+
self.exit_time = attributes[:'exitTime']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.has_key?(:'lastRuntimeUpdate')
|
143
|
+
self.last_runtime_update = attributes[:'lastRuntimeUpdate']
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
148
|
+
# @return Array for valid properties with the reasons
|
149
|
+
def list_invalid_properties
|
150
|
+
invalid_properties = Array.new
|
151
|
+
invalid_properties
|
152
|
+
end
|
153
|
+
|
154
|
+
# Check to see if the all the properties in the model are valid
|
155
|
+
# @return true if the model is valid
|
156
|
+
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
|
+
true
|
162
|
+
end
|
163
|
+
|
164
|
+
# Custom attribute writer method checking allowed values (enum).
|
165
|
+
# @param [Object] completion_status Object to be assigned
|
166
|
+
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
|
+
@completion_status = completion_status
|
172
|
+
end
|
173
|
+
|
174
|
+
# Custom attribute writer method checking allowed values (enum).
|
175
|
+
# @param [Object] success_status Object to be assigned
|
176
|
+
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
|
+
@success_status = success_status
|
182
|
+
end
|
183
|
+
|
184
|
+
# Checks equality by comparing each attribute.
|
185
|
+
# @param [Object] Object to be compared
|
186
|
+
def ==(o)
|
187
|
+
return true if self.equal?(o)
|
188
|
+
self.class == o.class &&
|
189
|
+
id == o.id &&
|
190
|
+
instance == o.instance &&
|
191
|
+
score == o.score &&
|
192
|
+
completion_status == o.completion_status &&
|
193
|
+
success_status == o.success_status &&
|
194
|
+
history_log == o.history_log &&
|
195
|
+
total_seconds_tracked == o.total_seconds_tracked &&
|
196
|
+
launch_time == o.launch_time &&
|
197
|
+
exit_time == o.exit_time &&
|
198
|
+
last_runtime_update == o.last_runtime_update
|
199
|
+
end
|
200
|
+
|
201
|
+
# @see the `==` method
|
202
|
+
# @param [Object] Object to be compared
|
203
|
+
def eql?(o)
|
204
|
+
self == o
|
205
|
+
end
|
206
|
+
|
207
|
+
# Calculates hash code according to all attributes.
|
208
|
+
# @return [Fixnum] Hash code
|
209
|
+
def hash
|
210
|
+
[id, instance, score, completion_status, success_status, history_log, total_seconds_tracked, launch_time, exit_time, last_runtime_update].hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# Builds the object from hash
|
214
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
215
|
+
# @return [Object] Returns the model itself
|
216
|
+
def build_from_hash(attributes)
|
217
|
+
return nil unless attributes.is_a?(Hash)
|
218
|
+
self.class.swagger_types.each_pair do |key, type|
|
219
|
+
if type =~ /\AArray<(.*)>/i
|
220
|
+
# check to ensure the input is an array given that the the attribute
|
221
|
+
# is documented as an array but the input is not
|
222
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
223
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
224
|
+
end
|
225
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
226
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
227
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
228
|
+
end
|
229
|
+
|
230
|
+
self
|
231
|
+
end
|
232
|
+
|
233
|
+
# Deserializes the data based on type
|
234
|
+
# @param string type Data type
|
235
|
+
# @param string value Value to be deserialized
|
236
|
+
# @return [Object] Deserialized data
|
237
|
+
def _deserialize(type, value)
|
238
|
+
case type.to_sym
|
239
|
+
when :DateTime
|
240
|
+
DateTime.parse(value)
|
241
|
+
when :Date
|
242
|
+
Date.parse(value)
|
243
|
+
when :String
|
244
|
+
value.to_s
|
245
|
+
when :Integer
|
246
|
+
value.to_i
|
247
|
+
when :Float
|
248
|
+
value.to_f
|
249
|
+
when :BOOLEAN
|
250
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
251
|
+
true
|
252
|
+
else
|
253
|
+
false
|
254
|
+
end
|
255
|
+
when :Object
|
256
|
+
# generic object (usually a Hash), return directly
|
257
|
+
value
|
258
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
259
|
+
inner_type = Regexp.last_match[:inner_type]
|
260
|
+
value.map { |v| _deserialize(inner_type, v) }
|
261
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
262
|
+
k_type = Regexp.last_match[:k_type]
|
263
|
+
v_type = Regexp.last_match[:v_type]
|
264
|
+
{}.tap do |hash|
|
265
|
+
value.each do |k, v|
|
266
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
267
|
+
end
|
268
|
+
end
|
269
|
+
else # model
|
270
|
+
temp_model = RusticiSoftwareCloudV2.const_get(type).new
|
271
|
+
temp_model.build_from_hash(value)
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
# Returns the string representation of the object
|
276
|
+
# @return [String] String presentation of the object
|
277
|
+
def to_s
|
278
|
+
to_hash.to_s
|
279
|
+
end
|
280
|
+
|
281
|
+
# to_body is an alias to to_hash (backward compatibility)
|
282
|
+
# @return [Hash] Returns the object in the form of hash
|
283
|
+
def to_body
|
284
|
+
to_hash
|
285
|
+
end
|
286
|
+
|
287
|
+
# Returns the object in the form of hash
|
288
|
+
# @return [Hash] Returns the object in the form of hash
|
289
|
+
def to_hash
|
290
|
+
hash = {}
|
291
|
+
self.class.attribute_map.each_pair do |attr, param|
|
292
|
+
value = self.send(attr)
|
293
|
+
next if value.nil?
|
294
|
+
hash[param] = _to_hash(value)
|
295
|
+
end
|
296
|
+
hash
|
297
|
+
end
|
298
|
+
|
299
|
+
# Outputs non-array value in the form of hash
|
300
|
+
# For object, use to_hash. Otherwise, just return the value
|
301
|
+
# @param [Object] value Any valid value
|
302
|
+
# @return [Hash] Returns the value in the form of hash
|
303
|
+
def _to_hash(value)
|
304
|
+
if value.is_a?(Array)
|
305
|
+
value.compact.map { |v| _to_hash(v) }
|
306
|
+
elsif value.is_a?(Hash)
|
307
|
+
{}.tap do |hash|
|
308
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
309
|
+
end
|
310
|
+
elsif value.respond_to? :to_hash
|
311
|
+
value.to_hash
|
312
|
+
else
|
313
|
+
value
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
317
|
+
end
|
@@ -0,0 +1,282 @@
|
|
1
|
+
=begin
|
2
|
+
#SCORM Cloud Rest API
|
3
|
+
|
4
|
+
#REST API used for SCORM Cloud integrations.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0 beta
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module RusticiSoftwareCloudV2
|
16
|
+
class LaunchLinkRequestSchema
|
17
|
+
# Number of seconds from now this link will expire in. Defaults to 120s. Range 10s:300s
|
18
|
+
attr_accessor :expiry
|
19
|
+
|
20
|
+
# The URL the application should redirect to when the learner exits a course. If not specified, configured value will be used.
|
21
|
+
attr_accessor :redirect_on_exit_url
|
22
|
+
|
23
|
+
# Should this launch be tracked? If false, Engine will avoid tracking to the extent possible for the standard being used.
|
24
|
+
attr_accessor :tracking
|
25
|
+
|
26
|
+
# For SCORM, SCO identifier to override launch, overriding the normal sequencing.
|
27
|
+
attr_accessor :start_sco
|
28
|
+
|
29
|
+
# This parameter should specify a culture code. If specified, and supported, the navigation and alerts in the player will be displayed in the associated language. If not specified, the locale of the user’s browser will be used.
|
30
|
+
attr_accessor :culture
|
31
|
+
|
32
|
+
# A Url pointing to custom css for the player to use.
|
33
|
+
attr_accessor :css_url
|
34
|
+
|
35
|
+
attr_accessor :learner_tags
|
36
|
+
|
37
|
+
attr_accessor :course_tags
|
38
|
+
|
39
|
+
attr_accessor :registration_tags
|
40
|
+
|
41
|
+
attr_accessor :additionalvalues
|
42
|
+
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
+
def self.attribute_map
|
45
|
+
{
|
46
|
+
:'expiry' => :'expiry',
|
47
|
+
:'redirect_on_exit_url' => :'redirectOnExitUrl',
|
48
|
+
:'tracking' => :'tracking',
|
49
|
+
:'start_sco' => :'startSco',
|
50
|
+
:'culture' => :'culture',
|
51
|
+
:'css_url' => :'cssUrl',
|
52
|
+
:'learner_tags' => :'learnerTags',
|
53
|
+
:'course_tags' => :'courseTags',
|
54
|
+
:'registration_tags' => :'registrationTags',
|
55
|
+
:'additionalvalues' => :'additionalvalues'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
def self.swagger_types
|
61
|
+
{
|
62
|
+
:'expiry' => :'Integer',
|
63
|
+
:'redirect_on_exit_url' => :'String',
|
64
|
+
:'tracking' => :'BOOLEAN',
|
65
|
+
:'start_sco' => :'String',
|
66
|
+
:'culture' => :'String',
|
67
|
+
:'css_url' => :'String',
|
68
|
+
:'learner_tags' => :'Array<String>',
|
69
|
+
:'course_tags' => :'Array<String>',
|
70
|
+
:'registration_tags' => :'Array<String>',
|
71
|
+
:'additionalvalues' => :'Array<ItemValuePairSchema>'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
77
|
+
def initialize(attributes = {})
|
78
|
+
return unless attributes.is_a?(Hash)
|
79
|
+
|
80
|
+
# convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
82
|
+
|
83
|
+
if attributes.has_key?(:'expiry')
|
84
|
+
self.expiry = attributes[:'expiry']
|
85
|
+
else
|
86
|
+
self.expiry = 120
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'redirectOnExitUrl')
|
90
|
+
self.redirect_on_exit_url = attributes[:'redirectOnExitUrl']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'tracking')
|
94
|
+
self.tracking = attributes[:'tracking']
|
95
|
+
else
|
96
|
+
self.tracking = true
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.has_key?(:'startSco')
|
100
|
+
self.start_sco = attributes[:'startSco']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.has_key?(:'culture')
|
104
|
+
self.culture = attributes[:'culture']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.has_key?(:'cssUrl')
|
108
|
+
self.css_url = attributes[:'cssUrl']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.has_key?(:'learnerTags')
|
112
|
+
if (value = attributes[:'learnerTags']).is_a?(Array)
|
113
|
+
self.learner_tags = value
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.has_key?(:'courseTags')
|
118
|
+
if (value = attributes[:'courseTags']).is_a?(Array)
|
119
|
+
self.course_tags = value
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.has_key?(:'registrationTags')
|
124
|
+
if (value = attributes[:'registrationTags']).is_a?(Array)
|
125
|
+
self.registration_tags = value
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.has_key?(:'additionalvalues')
|
130
|
+
if (value = attributes[:'additionalvalues']).is_a?(Array)
|
131
|
+
self.additionalvalues = value
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
137
|
+
# @return Array for valid properties with the reasons
|
138
|
+
def list_invalid_properties
|
139
|
+
invalid_properties = Array.new
|
140
|
+
invalid_properties
|
141
|
+
end
|
142
|
+
|
143
|
+
# Check to see if the all the properties in the model are valid
|
144
|
+
# @return true if the model is valid
|
145
|
+
def valid?
|
146
|
+
true
|
147
|
+
end
|
148
|
+
|
149
|
+
# Checks equality by comparing each attribute.
|
150
|
+
# @param [Object] Object to be compared
|
151
|
+
def ==(o)
|
152
|
+
return true if self.equal?(o)
|
153
|
+
self.class == o.class &&
|
154
|
+
expiry == o.expiry &&
|
155
|
+
redirect_on_exit_url == o.redirect_on_exit_url &&
|
156
|
+
tracking == o.tracking &&
|
157
|
+
start_sco == o.start_sco &&
|
158
|
+
culture == o.culture &&
|
159
|
+
css_url == o.css_url &&
|
160
|
+
learner_tags == o.learner_tags &&
|
161
|
+
course_tags == o.course_tags &&
|
162
|
+
registration_tags == o.registration_tags &&
|
163
|
+
additionalvalues == o.additionalvalues
|
164
|
+
end
|
165
|
+
|
166
|
+
# @see the `==` method
|
167
|
+
# @param [Object] Object to be compared
|
168
|
+
def eql?(o)
|
169
|
+
self == o
|
170
|
+
end
|
171
|
+
|
172
|
+
# Calculates hash code according to all attributes.
|
173
|
+
# @return [Fixnum] Hash code
|
174
|
+
def hash
|
175
|
+
[expiry, redirect_on_exit_url, tracking, start_sco, culture, css_url, learner_tags, course_tags, registration_tags, additionalvalues].hash
|
176
|
+
end
|
177
|
+
|
178
|
+
# Builds the object from hash
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
180
|
+
# @return [Object] Returns the model itself
|
181
|
+
def build_from_hash(attributes)
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
183
|
+
self.class.swagger_types.each_pair do |key, type|
|
184
|
+
if type =~ /\AArray<(.*)>/i
|
185
|
+
# check to ensure the input is an array given that the the attribute
|
186
|
+
# is documented as an array but the input is not
|
187
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
188
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
189
|
+
end
|
190
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
191
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
192
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
193
|
+
end
|
194
|
+
|
195
|
+
self
|
196
|
+
end
|
197
|
+
|
198
|
+
# Deserializes the data based on type
|
199
|
+
# @param string type Data type
|
200
|
+
# @param string value Value to be deserialized
|
201
|
+
# @return [Object] Deserialized data
|
202
|
+
def _deserialize(type, value)
|
203
|
+
case type.to_sym
|
204
|
+
when :DateTime
|
205
|
+
DateTime.parse(value)
|
206
|
+
when :Date
|
207
|
+
Date.parse(value)
|
208
|
+
when :String
|
209
|
+
value.to_s
|
210
|
+
when :Integer
|
211
|
+
value.to_i
|
212
|
+
when :Float
|
213
|
+
value.to_f
|
214
|
+
when :BOOLEAN
|
215
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
216
|
+
true
|
217
|
+
else
|
218
|
+
false
|
219
|
+
end
|
220
|
+
when :Object
|
221
|
+
# generic object (usually a Hash), return directly
|
222
|
+
value
|
223
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
224
|
+
inner_type = Regexp.last_match[:inner_type]
|
225
|
+
value.map { |v| _deserialize(inner_type, v) }
|
226
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
227
|
+
k_type = Regexp.last_match[:k_type]
|
228
|
+
v_type = Regexp.last_match[:v_type]
|
229
|
+
{}.tap do |hash|
|
230
|
+
value.each do |k, v|
|
231
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
232
|
+
end
|
233
|
+
end
|
234
|
+
else # model
|
235
|
+
temp_model = RusticiSoftwareCloudV2.const_get(type).new
|
236
|
+
temp_model.build_from_hash(value)
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
# Returns the string representation of the object
|
241
|
+
# @return [String] String presentation of the object
|
242
|
+
def to_s
|
243
|
+
to_hash.to_s
|
244
|
+
end
|
245
|
+
|
246
|
+
# to_body is an alias to to_hash (backward compatibility)
|
247
|
+
# @return [Hash] Returns the object in the form of hash
|
248
|
+
def to_body
|
249
|
+
to_hash
|
250
|
+
end
|
251
|
+
|
252
|
+
# Returns the object in the form of hash
|
253
|
+
# @return [Hash] Returns the object in the form of hash
|
254
|
+
def to_hash
|
255
|
+
hash = {}
|
256
|
+
self.class.attribute_map.each_pair do |attr, param|
|
257
|
+
value = self.send(attr)
|
258
|
+
next if value.nil?
|
259
|
+
hash[param] = _to_hash(value)
|
260
|
+
end
|
261
|
+
hash
|
262
|
+
end
|
263
|
+
|
264
|
+
# Outputs non-array value in the form of hash
|
265
|
+
# For object, use to_hash. Otherwise, just return the value
|
266
|
+
# @param [Object] value Any valid value
|
267
|
+
# @return [Hash] Returns the value in the form of hash
|
268
|
+
def _to_hash(value)
|
269
|
+
if value.is_a?(Array)
|
270
|
+
value.compact.map { |v| _to_hash(v) }
|
271
|
+
elsif value.is_a?(Hash)
|
272
|
+
{}.tap do |hash|
|
273
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
274
|
+
end
|
275
|
+
elsif value.respond_to? :to_hash
|
276
|
+
value.to_hash
|
277
|
+
else
|
278
|
+
value
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
282
|
+
end
|