rustici_software_cloud_v2 1.0.0beta → 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.
- checksums.yaml +7 -0
- data/Gemfile +1 -1
- data/README.md +354 -243
- data/lib/rustici_software_cloud_v2/api/about_api.rb +71 -0
- data/lib/rustici_software_cloud_v2/api/application_management_api.rb +253 -63
- data/lib/rustici_software_cloud_v2/api/authentication_api.rb +11 -17
- data/lib/rustici_software_cloud_v2/api/course_api.rb +910 -160
- data/lib/rustici_software_cloud_v2/api/dispatch_api.rb +2236 -0
- data/lib/rustici_software_cloud_v2/api/invitations_api.rb +1025 -0
- data/lib/rustici_software_cloud_v2/api/learner_api.rb +367 -0
- data/lib/rustici_software_cloud_v2/api/ping_api.rb +6 -4
- data/lib/rustici_software_cloud_v2/api/registration_api.rb +448 -295
- data/lib/rustici_software_cloud_v2/api/reporting_api.rb +191 -0
- data/lib/rustici_software_cloud_v2/api/xapi_api.rb +581 -0
- data/lib/rustici_software_cloud_v2/api/zoomi_api.rb +528 -0
- data/lib/rustici_software_cloud_v2/api_client.rb +5 -5
- data/lib/rustici_software_cloud_v2/api_error.rb +2 -2
- data/lib/rustici_software_cloud_v2/configuration.rb +11 -20
- data/lib/rustici_software_cloud_v2/models/about_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/activity_result_schema.rb +10 -38
- data/lib/rustici_software_cloud_v2/models/application_info_schema.rb +234 -0
- data/lib/rustici_software_cloud_v2/models/application_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/{link_schema.rb → application_request_schema.rb} +14 -16
- data/lib/rustici_software_cloud_v2/models/application_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/application_token.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/asset_file_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/{course_tags_batch_schema.rb → batch_tags_schema.rb} +21 -17
- data/lib/rustici_software_cloud_v2/models/comment_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/completion_amount_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/course_activity_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/course_list_non_paged_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/course_list_schema.rb +6 -3
- data/lib/rustici_software_cloud_v2/models/course_reference_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/course_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/{registration_tags_batch_schema.rb → create_dispatch_id_schema.rb} +25 -25
- data/lib/rustici_software_cloud_v2/models/create_dispatch_list_schema.rb +187 -0
- data/lib/rustici_software_cloud_v2/models/create_dispatch_schema.rb +306 -0
- data/lib/rustici_software_cloud_v2/models/create_private_invitation_schema.rb +252 -0
- data/lib/rustici_software_cloud_v2/models/create_public_invitation_schema.rb +250 -0
- data/lib/rustici_software_cloud_v2/models/create_registration_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_created_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_request_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/destination_id_schema.rb +195 -0
- data/lib/rustici_software_cloud_v2/models/destination_list_schema.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/destination_schema.rb +227 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_id_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_list_schema.rb +197 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_lti_info_schema.rb +221 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_registration_count_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_schema.rb +326 -0
- data/lib/rustici_software_cloud_v2/models/{tag_post_schema.rb → enabled_schema.rb} +17 -6
- data/lib/rustici_software_cloud_v2/models/file_list_item_schema.rb +205 -0
- data/lib/rustici_software_cloud_v2/models/file_list_schema.rb +187 -0
- data/lib/rustici_software_cloud_v2/models/import_asset_request_schema.rb +207 -0
- data/lib/rustici_software_cloud_v2/models/import_fetch_request_schema.rb +31 -8
- data/lib/rustici_software_cloud_v2/models/import_job_result_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/import_media_file_reference_request_schema.rb +216 -0
- data/lib/rustici_software_cloud_v2/models/import_request_schema.rb +195 -0
- data/lib/rustici_software_cloud_v2/models/import_result_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/integer_result_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/invitation_email_schema.rb +214 -0
- data/lib/rustici_software_cloud_v2/models/invitation_job_status_schema.rb +226 -0
- data/lib/rustici_software_cloud_v2/models/invitation_summary_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/invitation_summary_schema.rb +225 -0
- data/lib/rustici_software_cloud_v2/models/item_value_pair_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/launch_auth_options_schema.rb +212 -0
- data/lib/rustici_software_cloud_v2/models/launch_auth_schema.rb +204 -0
- data/lib/rustici_software_cloud_v2/models/launch_history_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +10 -38
- data/lib/rustici_software_cloud_v2/models/launch_link_request_schema.rb +25 -9
- data/lib/rustici_software_cloud_v2/models/launch_link_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/learner_preference_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/learner_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/media_file_metadata_schema.rb +213 -0
- data/lib/rustici_software_cloud_v2/models/message_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/metadata_schema.rb +12 -10
- data/lib/rustici_software_cloud_v2/models/objective_schema.rb +13 -45
- data/lib/rustici_software_cloud_v2/models/permissions_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/ping_schema.rb +21 -15
- data/lib/rustici_software_cloud_v2/models/post_back_schema.rb +24 -42
- data/lib/rustici_software_cloud_v2/models/private_invitation_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/private_invitation_schema.rb +264 -0
- data/lib/rustici_software_cloud_v2/models/private_invitation_update_schema.rb +215 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_schema.rb +287 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_update_schema.rb +228 -0
- data/lib/rustici_software_cloud_v2/models/registration_completion.rb +2 -2
- data/lib/rustici_software_cloud_v2/models/registration_list_schema.rb +6 -3
- data/lib/rustici_software_cloud_v2/models/registration_schema.rb +17 -4
- data/lib/rustici_software_cloud_v2/models/registration_success.rb +2 -2
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_schema.rb +257 -0
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_usage_schema.rb +212 -0
- data/lib/rustici_software_cloud_v2/models/reportage_auth_token_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/reportage_link_schema.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/response_error.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/runtime_interaction_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/runtime_objective_schema.rb +10 -38
- data/lib/rustici_software_cloud_v2/models/runtime_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/score_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/setting_item.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/setting_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/setting_metadata.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/setting_valid_value.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/settings_individual_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/settings_post_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/shared_data_entry_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/static_properties_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/string_result_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/tag_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/title_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/token_request_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/update_application_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/update_dispatch_schema.rb +266 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema.rb +234 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema_registration_report.rb +213 -0
- data/lib/rustici_software_cloud_v2/models/xapi_account.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_activity.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_activity_definition.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_agent_group.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/xapi_attachment.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_context.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_context_activity.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_credential_auth_type_schema.rb +193 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_permissions_level_schema.rb +193 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_post_schema.rb +255 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_put_schema.rb +239 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_schema.rb +264 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credentials_list_schema.rb +202 -0
- data/lib/rustici_software_cloud_v2/models/xapi_endpoint_schema.rb +203 -0
- data/lib/rustici_software_cloud_v2/models/xapi_interaction_component.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_result.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_score.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_statement.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_list_schema.rb +192 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_post_schema.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_put_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_schema.rb +239 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_reference.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_statement_result.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_verb.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/zoomi_company_id.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/zoomi_course_options_schema.rb +204 -0
- data/lib/rustici_software_cloud_v2/version.rb +3 -3
- data/lib/rustici_software_cloud_v2.rb +68 -6
- data/rustici_software_cloud_v2.gemspec +8 -7
- data/spec/api_client_spec.rb +53 -47
- data/spec/configuration_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -13
- metadata +142 -270
- data/docs/ActivityResultSchema.md +0 -20
- data/docs/ApplicationListSchema.md +0 -8
- data/docs/ApplicationManagementApi.md +0 -570
- data/docs/ApplicationSchema.md +0 -9
- data/docs/ApplicationToken.md +0 -10
- data/docs/AuthenticationApi.md +0 -64
- data/docs/CommentSchema.md +0 -10
- data/docs/CompletionAmountSchema.md +0 -8
- data/docs/CourseActivitySchema.md +0 -15
- data/docs/CourseApi.md +0 -1459
- data/docs/CourseListNonPagedSchema.md +0 -8
- data/docs/CourseListSchema.md +0 -9
- data/docs/CourseReferenceSchema.md +0 -10
- data/docs/CourseSchema.md +0 -20
- data/docs/CourseTagsBatchSchema.md +0 -9
- data/docs/CreateRegistrationSchema.md +0 -17
- data/docs/CredentialCreatedSchema.md +0 -12
- data/docs/CredentialListSchema.md +0 -8
- data/docs/CredentialRequestSchema.md +0 -9
- data/docs/CredentialSchema.md +0 -12
- data/docs/ImportFetchRequestSchema.md +0 -8
- data/docs/ImportJobResultSchema.md +0 -11
- data/docs/ImportResultSchema.md +0 -11
- data/docs/IntegerResultSchema.md +0 -8
- data/docs/ItemValuePairSchema.md +0 -9
- data/docs/LaunchHistoryListSchema.md +0 -8
- data/docs/LaunchHistorySchema.md +0 -17
- data/docs/LaunchLinkRequestSchema.md +0 -17
- data/docs/LaunchLinkSchema.md +0 -8
- data/docs/LearnerPreferenceSchema.md +0 -11
- data/docs/LearnerSchema.md +0 -11
- data/docs/LinkSchema.md +0 -8
- data/docs/MessageSchema.md +0 -8
- data/docs/MetadataSchema.md +0 -14
- data/docs/ObjectiveSchema.md +0 -20
- data/docs/PermissionsSchema.md +0 -9
- data/docs/PingApi.md +0 -57
- data/docs/PingSchema.md +0 -8
- data/docs/PostBackSchema.md +0 -12
- data/docs/RegistrationApi.md +0 -1490
- data/docs/RegistrationCompletion.md +0 -7
- data/docs/RegistrationListSchema.md +0 -9
- data/docs/RegistrationSchema.md +0 -27
- data/docs/RegistrationSuccess.md +0 -7
- data/docs/RegistrationTagsBatchSchema.md +0 -9
- data/docs/ResponseError.md +0 -8
- data/docs/RuntimeInteractionSchema.md +0 -18
- data/docs/RuntimeObjectiveSchema.md +0 -16
- data/docs/RuntimeSchema.md +0 -27
- data/docs/ScoreSchema.md +0 -8
- data/docs/SettingItem.md +0 -12
- data/docs/SettingListSchema.md +0 -8
- data/docs/SettingMetadata.md +0 -15
- data/docs/SettingMetadataValidValues.md +0 -9
- data/docs/SettingValidValue.md +0 -9
- data/docs/SettingsIndividualSchema.md +0 -10
- data/docs/SettingsPostSchema.md +0 -8
- data/docs/SharedDataEntrySchema.md +0 -9
- data/docs/StaticPropertiesSchema.md +0 -13
- data/docs/StringResultSchema.md +0 -8
- data/docs/TagListSchema.md +0 -8
- data/docs/TagPostSchema.md +0 -7
- data/docs/TitleSchema.md +0 -8
- data/docs/TokenRequestSchema.md +0 -9
- data/docs/XapiAccount.md +0 -9
- data/docs/XapiActivity.md +0 -10
- data/docs/XapiActivityDefinition.md +0 -19
- data/docs/XapiAgentGroup.md +0 -14
- data/docs/XapiAttachment.md +0 -14
- data/docs/XapiContext.md +0 -16
- data/docs/XapiContextActivity.md +0 -11
- data/docs/XapiInteractionComponent.md +0 -9
- data/docs/XapiResult.md +0 -13
- data/docs/XapiScore.md +0 -11
- data/docs/XapiStatement.md +0 -20
- data/docs/XapiStatementReference.md +0 -9
- data/docs/XapiStatementResult.md +0 -9
- data/docs/XapiVerb.md +0 -9
- data/git_push.sh +0 -55
- data/lib/rustici_software_cloud_v2/models/setting_metadata_valid_values.rb +0 -209
- data/spec/models/activity_result_schema_spec.rb +0 -133
- data/spec/models/application_list_schema_spec.rb +0 -53
- data/spec/models/application_schema_spec.rb +0 -59
- data/spec/models/application_token_spec.rb +0 -65
- data/spec/models/comment_schema_spec.rb +0 -65
- data/spec/models/completion_amount_schema_spec.rb +0 -53
- data/spec/models/course_activity_schema_spec.rb +0 -99
- data/spec/models/course_list_non_paged_schema_spec.rb +0 -53
- data/spec/models/course_list_schema_spec.rb +0 -59
- data/spec/models/course_reference_schema_spec.rb +0 -65
- data/spec/models/course_schema_spec.rb +0 -129
- data/spec/models/create_registration_schema_spec.rb +0 -107
- data/spec/models/credential_created_schema_spec.rb +0 -77
- data/spec/models/credential_list_schema_spec.rb +0 -53
- data/spec/models/credential_request_schema_spec.rb +0 -59
- data/spec/models/credential_schema_spec.rb +0 -77
- data/spec/models/import_fetch_request_schema_spec.rb +0 -53
- data/spec/models/import_job_result_schema_spec.rb +0 -75
- data/spec/models/import_result_schema_spec.rb +0 -71
- data/spec/models/integer_result_schema_spec.rb +0 -53
- data/spec/models/item_value_pair_schema_spec.rb +0 -59
- data/spec/models/launch_history_list_schema_spec.rb +0 -53
- data/spec/models/launch_history_schema_spec.rb +0 -115
- data/spec/models/launch_link_request_schema_spec.rb +0 -107
- data/spec/models/launch_link_schema_spec.rb +0 -53
- data/spec/models/learner_preference_schema_spec.rb +0 -71
- data/spec/models/learner_schema_spec.rb +0 -71
- data/spec/models/link_schema_spec.rb +0 -53
- data/spec/models/message_schema_spec.rb +0 -53
- data/spec/models/metadata_schema_spec.rb +0 -89
- data/spec/models/objective_schema_spec.rb +0 -137
- data/spec/models/permissions_schema_spec.rb +0 -59
- data/spec/models/ping_schema_spec.rb +0 -53
- data/spec/models/post_back_schema_spec.rb +0 -85
- data/spec/models/registration_completion_spec.rb +0 -47
- data/spec/models/registration_list_schema_spec.rb +0 -59
- data/spec/models/registration_schema_spec.rb +0 -167
- data/spec/models/registration_success_spec.rb +0 -47
- data/spec/models/response_error_spec.rb +0 -53
- data/spec/models/runtime_interaction_schema_spec.rb +0 -117
- data/spec/models/runtime_objective_schema_spec.rb +0 -109
- data/spec/models/runtime_schema_spec.rb +0 -171
- data/spec/models/score_schema_spec.rb +0 -53
- data/spec/models/setting_item_spec.rb +0 -81
- data/spec/models/setting_list_schema_spec.rb +0 -53
- data/spec/models/setting_metadata_spec.rb +0 -99
- data/spec/models/setting_metadata_valid_values_spec.rb +0 -59
- data/spec/models/settings_individual_schema_spec.rb +0 -65
- data/spec/models/settings_post_schema_spec.rb +0 -53
- data/spec/models/shared_data_entry_schema_spec.rb +0 -59
- data/spec/models/static_properties_schema_spec.rb +0 -83
- data/spec/models/string_result_schema_spec.rb +0 -53
- data/spec/models/title_schema_spec.rb +0 -53
- data/spec/models/token_request_schema_spec.rb +0 -59
- data/swagger-codegen.config +0 -11
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.12
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -99,6 +99,7 @@ module RusticiSoftwareCloudV2
|
|
|
99
99
|
true
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
+
|
|
102
103
|
# Checks equality by comparing each attribute.
|
|
103
104
|
# @param [Object] Object to be compared
|
|
104
105
|
def ==(o)
|
|
@@ -131,7 +132,7 @@ module RusticiSoftwareCloudV2
|
|
|
131
132
|
return nil unless attributes.is_a?(Hash)
|
|
132
133
|
self.class.swagger_types.each_pair do |key, type|
|
|
133
134
|
if type =~ /\AArray<(.*)>/i
|
|
134
|
-
# check to ensure the input is an array given that the
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
135
136
|
# is documented as an array but the input is not
|
|
136
137
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
137
138
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
@@ -227,5 +228,6 @@ module RusticiSoftwareCloudV2
|
|
|
227
228
|
value
|
|
228
229
|
end
|
|
229
230
|
end
|
|
231
|
+
|
|
230
232
|
end
|
|
231
233
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.12
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -81,6 +81,7 @@ module RusticiSoftwareCloudV2
|
|
|
81
81
|
true
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
|
|
84
85
|
# Checks equality by comparing each attribute.
|
|
85
86
|
# @param [Object] Object to be compared
|
|
86
87
|
def ==(o)
|
|
@@ -111,7 +112,7 @@ module RusticiSoftwareCloudV2
|
|
|
111
112
|
return nil unless attributes.is_a?(Hash)
|
|
112
113
|
self.class.swagger_types.each_pair do |key, type|
|
|
113
114
|
if type =~ /\AArray<(.*)>/i
|
|
114
|
-
# check to ensure the input is an array given that the
|
|
115
|
+
# check to ensure the input is an array given that the attribute
|
|
115
116
|
# is documented as an array but the input is not
|
|
116
117
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
117
118
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
@@ -207,5 +208,6 @@ module RusticiSoftwareCloudV2
|
|
|
207
208
|
value
|
|
208
209
|
end
|
|
209
210
|
end
|
|
211
|
+
|
|
210
212
|
end
|
|
211
213
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.12
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -155,6 +155,7 @@ module RusticiSoftwareCloudV2
|
|
|
155
155
|
true
|
|
156
156
|
end
|
|
157
157
|
|
|
158
|
+
|
|
158
159
|
# Checks equality by comparing each attribute.
|
|
159
160
|
# @param [Object] Object to be compared
|
|
160
161
|
def ==(o)
|
|
@@ -194,7 +195,7 @@ module RusticiSoftwareCloudV2
|
|
|
194
195
|
return nil unless attributes.is_a?(Hash)
|
|
195
196
|
self.class.swagger_types.each_pair do |key, type|
|
|
196
197
|
if type =~ /\AArray<(.*)>/i
|
|
197
|
-
# check to ensure the input is an array given that the
|
|
198
|
+
# check to ensure the input is an array given that the attribute
|
|
198
199
|
# is documented as an array but the input is not
|
|
199
200
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
200
201
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
@@ -290,5 +291,6 @@ module RusticiSoftwareCloudV2
|
|
|
290
291
|
value
|
|
291
292
|
end
|
|
292
293
|
end
|
|
294
|
+
|
|
293
295
|
end
|
|
294
296
|
end
|
|
@@ -0,0 +1,192 @@
|
|
|
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 XapiStatementPipeListSchema
|
|
17
|
+
attr_accessor :xapi_statement_pipes
|
|
18
|
+
|
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
|
+
def self.attribute_map
|
|
21
|
+
{
|
|
22
|
+
:'xapi_statement_pipes' => :'xapiStatementPipes'
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Attribute type mapping.
|
|
27
|
+
def self.swagger_types
|
|
28
|
+
{
|
|
29
|
+
:'xapi_statement_pipes' => :'Array<XapiStatementPipeSchema>'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Initializes the object
|
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
35
|
+
def initialize(attributes = {})
|
|
36
|
+
return unless attributes.is_a?(Hash)
|
|
37
|
+
|
|
38
|
+
# convert string to symbol for hash key
|
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
40
|
+
|
|
41
|
+
if attributes.has_key?(:'xapiStatementPipes')
|
|
42
|
+
if (value = attributes[:'xapiStatementPipes']).is_a?(Array)
|
|
43
|
+
self.xapi_statement_pipes = value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
49
|
+
# @return Array for valid properties with the reasons
|
|
50
|
+
def list_invalid_properties
|
|
51
|
+
invalid_properties = Array.new
|
|
52
|
+
if @xapi_statement_pipes.nil?
|
|
53
|
+
invalid_properties.push('invalid value for "xapi_statement_pipes", xapi_statement_pipes cannot be nil.')
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
invalid_properties
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Check to see if the all the properties in the model are valid
|
|
60
|
+
# @return true if the model is valid
|
|
61
|
+
def valid?
|
|
62
|
+
return false if @xapi_statement_pipes.nil?
|
|
63
|
+
true
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
# Checks equality by comparing each attribute.
|
|
68
|
+
# @param [Object] Object to be compared
|
|
69
|
+
def ==(o)
|
|
70
|
+
return true if self.equal?(o)
|
|
71
|
+
self.class == o.class &&
|
|
72
|
+
xapi_statement_pipes == o.xapi_statement_pipes
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# @see the `==` method
|
|
76
|
+
# @param [Object] Object to be compared
|
|
77
|
+
def eql?(o)
|
|
78
|
+
self == o
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Calculates hash code according to all attributes.
|
|
82
|
+
# @return [Fixnum] Hash code
|
|
83
|
+
def hash
|
|
84
|
+
[xapi_statement_pipes].hash
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Builds the object from hash
|
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
89
|
+
# @return [Object] Returns the model itself
|
|
90
|
+
def build_from_hash(attributes)
|
|
91
|
+
return nil unless attributes.is_a?(Hash)
|
|
92
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
93
|
+
if type =~ /\AArray<(.*)>/i
|
|
94
|
+
# check to ensure the input is an array given that the attribute
|
|
95
|
+
# is documented as an array but the input is not
|
|
96
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
97
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
98
|
+
end
|
|
99
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
100
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
101
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
self
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Deserializes the data based on type
|
|
108
|
+
# @param string type Data type
|
|
109
|
+
# @param string value Value to be deserialized
|
|
110
|
+
# @return [Object] Deserialized data
|
|
111
|
+
def _deserialize(type, value)
|
|
112
|
+
case type.to_sym
|
|
113
|
+
when :DateTime
|
|
114
|
+
DateTime.parse(value)
|
|
115
|
+
when :Date
|
|
116
|
+
Date.parse(value)
|
|
117
|
+
when :String
|
|
118
|
+
value.to_s
|
|
119
|
+
when :Integer
|
|
120
|
+
value.to_i
|
|
121
|
+
when :Float
|
|
122
|
+
value.to_f
|
|
123
|
+
when :BOOLEAN
|
|
124
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
125
|
+
true
|
|
126
|
+
else
|
|
127
|
+
false
|
|
128
|
+
end
|
|
129
|
+
when :Object
|
|
130
|
+
# generic object (usually a Hash), return directly
|
|
131
|
+
value
|
|
132
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
133
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
134
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
135
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
136
|
+
k_type = Regexp.last_match[:k_type]
|
|
137
|
+
v_type = Regexp.last_match[:v_type]
|
|
138
|
+
{}.tap do |hash|
|
|
139
|
+
value.each do |k, v|
|
|
140
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
else # model
|
|
144
|
+
temp_model = RusticiSoftwareCloudV2.const_get(type).new
|
|
145
|
+
temp_model.build_from_hash(value)
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Returns the string representation of the object
|
|
150
|
+
# @return [String] String presentation of the object
|
|
151
|
+
def to_s
|
|
152
|
+
to_hash.to_s
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
|
157
|
+
def to_body
|
|
158
|
+
to_hash
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Returns the object in the form of hash
|
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
|
163
|
+
def to_hash
|
|
164
|
+
hash = {}
|
|
165
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
166
|
+
value = self.send(attr)
|
|
167
|
+
next if value.nil?
|
|
168
|
+
hash[param] = _to_hash(value)
|
|
169
|
+
end
|
|
170
|
+
hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Outputs non-array value in the form of hash
|
|
174
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
175
|
+
# @param [Object] value Any valid value
|
|
176
|
+
# @return [Hash] Returns the value in the form of hash
|
|
177
|
+
def _to_hash(value)
|
|
178
|
+
if value.is_a?(Array)
|
|
179
|
+
value.compact.map { |v| _to_hash(v) }
|
|
180
|
+
elsif value.is_a?(Hash)
|
|
181
|
+
{}.tap do |hash|
|
|
182
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
183
|
+
end
|
|
184
|
+
elsif value.respond_to? :to_hash
|
|
185
|
+
value.to_hash
|
|
186
|
+
else
|
|
187
|
+
value
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
end
|
|
192
|
+
end
|
|
@@ -0,0 +1,199 @@
|
|
|
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 XapiStatementPipePostSchema
|
|
17
|
+
attr_accessor :source
|
|
18
|
+
|
|
19
|
+
attr_accessor :target
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'source' => :'source',
|
|
25
|
+
:'target' => :'target'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Attribute type mapping.
|
|
30
|
+
def self.swagger_types
|
|
31
|
+
{
|
|
32
|
+
:'source' => :'XapiEndpointSchema',
|
|
33
|
+
:'target' => :'XapiEndpointSchema'
|
|
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?(:'source')
|
|
46
|
+
self.source = attributes[:'source']
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
if attributes.has_key?(:'target')
|
|
50
|
+
self.target = attributes[:'target']
|
|
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
|
+
if @target.nil?
|
|
59
|
+
invalid_properties.push('invalid value for "target", target cannot be nil.')
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
invalid_properties
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Check to see if the all the properties in the model are valid
|
|
66
|
+
# @return true if the model is valid
|
|
67
|
+
def valid?
|
|
68
|
+
return false if @target.nil?
|
|
69
|
+
true
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# Checks equality by comparing each attribute.
|
|
74
|
+
# @param [Object] Object to be compared
|
|
75
|
+
def ==(o)
|
|
76
|
+
return true if self.equal?(o)
|
|
77
|
+
self.class == o.class &&
|
|
78
|
+
source == o.source &&
|
|
79
|
+
target == o.target
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# @see the `==` method
|
|
83
|
+
# @param [Object] Object to be compared
|
|
84
|
+
def eql?(o)
|
|
85
|
+
self == o
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Calculates hash code according to all attributes.
|
|
89
|
+
# @return [Fixnum] Hash code
|
|
90
|
+
def hash
|
|
91
|
+
[source, target].hash
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Builds the object from hash
|
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
96
|
+
# @return [Object] Returns the model itself
|
|
97
|
+
def build_from_hash(attributes)
|
|
98
|
+
return nil unless attributes.is_a?(Hash)
|
|
99
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
100
|
+
if type =~ /\AArray<(.*)>/i
|
|
101
|
+
# check to ensure the input is an array given that the attribute
|
|
102
|
+
# is documented as an array but the input is not
|
|
103
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
104
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
105
|
+
end
|
|
106
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
107
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
108
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
self
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Deserializes the data based on type
|
|
115
|
+
# @param string type Data type
|
|
116
|
+
# @param string value Value to be deserialized
|
|
117
|
+
# @return [Object] Deserialized data
|
|
118
|
+
def _deserialize(type, value)
|
|
119
|
+
case type.to_sym
|
|
120
|
+
when :DateTime
|
|
121
|
+
DateTime.parse(value)
|
|
122
|
+
when :Date
|
|
123
|
+
Date.parse(value)
|
|
124
|
+
when :String
|
|
125
|
+
value.to_s
|
|
126
|
+
when :Integer
|
|
127
|
+
value.to_i
|
|
128
|
+
when :Float
|
|
129
|
+
value.to_f
|
|
130
|
+
when :BOOLEAN
|
|
131
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
132
|
+
true
|
|
133
|
+
else
|
|
134
|
+
false
|
|
135
|
+
end
|
|
136
|
+
when :Object
|
|
137
|
+
# generic object (usually a Hash), return directly
|
|
138
|
+
value
|
|
139
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
140
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
141
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
142
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
143
|
+
k_type = Regexp.last_match[:k_type]
|
|
144
|
+
v_type = Regexp.last_match[:v_type]
|
|
145
|
+
{}.tap do |hash|
|
|
146
|
+
value.each do |k, v|
|
|
147
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
else # model
|
|
151
|
+
temp_model = RusticiSoftwareCloudV2.const_get(type).new
|
|
152
|
+
temp_model.build_from_hash(value)
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Returns the string representation of the object
|
|
157
|
+
# @return [String] String presentation of the object
|
|
158
|
+
def to_s
|
|
159
|
+
to_hash.to_s
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
163
|
+
# @return [Hash] Returns the object in the form of hash
|
|
164
|
+
def to_body
|
|
165
|
+
to_hash
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Returns the object in the form of hash
|
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
|
170
|
+
def to_hash
|
|
171
|
+
hash = {}
|
|
172
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
173
|
+
value = self.send(attr)
|
|
174
|
+
next if value.nil?
|
|
175
|
+
hash[param] = _to_hash(value)
|
|
176
|
+
end
|
|
177
|
+
hash
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Outputs non-array value in the form of hash
|
|
181
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
182
|
+
# @param [Object] value Any valid value
|
|
183
|
+
# @return [Hash] Returns the value in the form of hash
|
|
184
|
+
def _to_hash(value)
|
|
185
|
+
if value.is_a?(Array)
|
|
186
|
+
value.compact.map { |v| _to_hash(v) }
|
|
187
|
+
elsif value.is_a?(Hash)
|
|
188
|
+
{}.tap do |hash|
|
|
189
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
190
|
+
end
|
|
191
|
+
elsif value.respond_to? :to_hash
|
|
192
|
+
value.to_hash
|
|
193
|
+
else
|
|
194
|
+
value
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
end
|
|
199
|
+
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 XapiStatementPipePutSchema
|
|
17
|
+
attr_accessor :source
|
|
18
|
+
|
|
19
|
+
attr_accessor :target
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'source' => :'source',
|
|
25
|
+
:'target' => :'target'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Attribute type mapping.
|
|
30
|
+
def self.swagger_types
|
|
31
|
+
{
|
|
32
|
+
:'source' => :'XapiEndpointSchema',
|
|
33
|
+
:'target' => :'XapiEndpointSchema'
|
|
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?(:'source')
|
|
46
|
+
self.source = attributes[:'source']
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
if attributes.has_key?(:'target')
|
|
50
|
+
self.target = attributes[:'target']
|
|
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
|
+
source == o.source &&
|
|
74
|
+
target == o.target
|
|
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
|
+
[source, target].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
|