rustici_software_cloud_v2 1.0.0beta → 1.0.1
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/README.md +194 -88
- data/lib/rustici_software_cloud_v2/api/about_api.rb +71 -0
- data/lib/rustici_software_cloud_v2/api/application_management_api.rb +161 -97
- data/lib/rustici_software_cloud_v2/api/authentication_api.rb +13 -13
- data/lib/rustici_software_cloud_v2/api/course_api.rb +246 -260
- data/lib/rustici_software_cloud_v2/api/dispatch_api.rb +1994 -0
- data/lib/rustici_software_cloud_v2/api/invitations_api.rb +964 -0
- data/lib/rustici_software_cloud_v2/api/learner_api.rb +296 -0
- data/lib/rustici_software_cloud_v2/api/ping_api.rb +10 -8
- data/lib/rustici_software_cloud_v2/api/registration_api.rb +379 -324
- data/lib/rustici_software_cloud_v2/api/reporting_api.rb +191 -0
- data/lib/rustici_software_cloud_v2/api/xapi_api.rb +555 -0
- data/lib/rustici_software_cloud_v2/api/zoomi_api.rb +448 -0
- data/lib/rustici_software_cloud_v2/api_client.rb +2 -3
- data/lib/rustici_software_cloud_v2/api_error.rb +1 -2
- data/lib/rustici_software_cloud_v2/configuration.rb +9 -19
- data/lib/rustici_software_cloud_v2/models/about_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/activity_result_schema.rb +17 -14
- data/lib/rustici_software_cloud_v2/models/application_list_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/application_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/application_token.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/{course_tags_batch_schema.rb → batch_tags_schema.rb} +29 -23
- data/lib/rustici_software_cloud_v2/models/comment_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/completion_amount_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/course_activity_schema.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/course_list_non_paged_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/course_list_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/course_reference_schema.rb +11 -8
- data/lib/rustici_software_cloud_v2/models/course_schema.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/create_dispatch_id_schema.rb +225 -0
- data/lib/rustici_software_cloud_v2/models/{link_schema.rb → create_dispatch_list_schema.rb} +22 -21
- data/lib/rustici_software_cloud_v2/models/create_dispatch_schema.rb +308 -0
- data/lib/rustici_software_cloud_v2/models/create_private_invitation_schema.rb +254 -0
- data/lib/rustici_software_cloud_v2/models/create_public_invitation_schema.rb +252 -0
- data/lib/rustici_software_cloud_v2/models/create_registration_schema.rb +15 -11
- data/lib/rustici_software_cloud_v2/models/credential_created_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/credential_list_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/credential_request_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/credential_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/destination_id_schema.rb +197 -0
- data/lib/rustici_software_cloud_v2/models/destination_list_schema.rb +200 -0
- data/lib/rustici_software_cloud_v2/models/{setting_metadata_valid_values.rb → destination_schema.rb} +42 -31
- data/lib/rustici_software_cloud_v2/models/dispatch_id_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_list_schema.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_registration_count_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_schema.rb +290 -0
- data/lib/rustici_software_cloud_v2/models/{tag_post_schema.rb → enabled_schema.rb} +24 -11
- data/lib/rustici_software_cloud_v2/models/import_fetch_request_schema.rb +12 -9
- data/lib/rustici_software_cloud_v2/models/import_job_result_schema.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/import_result_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/integer_result_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/invitation_email_schema.rb +215 -0
- data/lib/rustici_software_cloud_v2/models/invitation_job_status_schema.rb +253 -0
- data/lib/rustici_software_cloud_v2/models/invitation_summary_list.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/invitation_summary_schema.rb +227 -0
- data/lib/rustici_software_cloud_v2/models/item_value_pair_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/launch_history_list_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +19 -16
- data/lib/rustici_software_cloud_v2/models/launch_link_request_schema.rb +17 -8
- data/lib/rustici_software_cloud_v2/models/launch_link_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/learner_preference_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/learner_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/message_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/metadata_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/objective_schema.rb +23 -20
- data/lib/rustici_software_cloud_v2/models/permissions_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/ping_schema.rb +28 -20
- data/lib/rustici_software_cloud_v2/models/post_back_schema.rb +33 -20
- data/lib/rustici_software_cloud_v2/models/private_invitation_list.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/private_invitation_schema.rb +266 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_list.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_schema.rb +289 -0
- data/lib/rustici_software_cloud_v2/models/registration_completion.rb +5 -14
- data/lib/rustici_software_cloud_v2/models/registration_list_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/registration_schema.rb +24 -9
- data/lib/rustici_software_cloud_v2/models/registration_success.rb +5 -14
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_schema.rb +259 -0
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_usage_schema.rb +214 -0
- data/lib/rustici_software_cloud_v2/models/reportage_auth_token_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/reportage_link_schema.rb +187 -0
- data/lib/rustici_software_cloud_v2/models/response_error.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/runtime_interaction_schema.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/runtime_objective_schema.rb +19 -16
- data/lib/rustici_software_cloud_v2/models/runtime_schema.rb +15 -12
- data/lib/rustici_software_cloud_v2/models/score_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/setting_item.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/setting_list_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/setting_metadata.rb +15 -12
- data/lib/rustici_software_cloud_v2/models/setting_valid_value.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/settings_individual_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/settings_post_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/shared_data_entry_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/static_properties_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/string_result_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/tag_list_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/title_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/token_request_schema.rb +14 -10
- data/lib/rustici_software_cloud_v2/models/update_dispatch_schema.rb +258 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_list.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema.rb +236 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema_registration_report.rb +214 -0
- data/lib/rustici_software_cloud_v2/models/xapi_account.rb +13 -10
- data/lib/rustici_software_cloud_v2/models/xapi_activity.rb +13 -10
- data/lib/rustici_software_cloud_v2/models/xapi_activity_definition.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/xapi_agent_group.rb +14 -12
- data/lib/rustici_software_cloud_v2/models/xapi_attachment.rb +18 -15
- data/lib/rustici_software_cloud_v2/models/xapi_context.rb +12 -9
- data/lib/rustici_software_cloud_v2/models/xapi_context_activity.rb +11 -8
- data/lib/rustici_software_cloud_v2/models/xapi_credential_auth_type_schema.rb +220 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_permissions_level_schema.rb +220 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_post_schema.rb +252 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_schema.rb +266 -0
- data/lib/rustici_software_cloud_v2/models/{registration_tags_batch_schema.rb → xapi_credentials_list_schema.rb} +30 -31
- data/lib/rustici_software_cloud_v2/models/xapi_endpoint_schema.rb +205 -0
- data/lib/rustici_software_cloud_v2/models/xapi_interaction_component.rb +13 -10
- data/lib/rustici_software_cloud_v2/models/xapi_result.rb +12 -9
- data/lib/rustici_software_cloud_v2/models/xapi_score.rb +11 -8
- data/lib/rustici_software_cloud_v2/models/xapi_statement.rb +11 -8
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_list_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_post_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_schema.rb +241 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_reference.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/xapi_statement_result.rb +12 -9
- data/lib/rustici_software_cloud_v2/models/xapi_verb.rb +13 -10
- data/lib/rustici_software_cloud_v2/models/zoomi_company_id.rb +187 -0
- data/lib/rustici_software_cloud_v2/models/zoomi_course_options_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/version.rb +2 -3
- data/lib/rustici_software_cloud_v2.rb +50 -6
- data/rustici_software_cloud_v2.gemspec +10 -11
- data/spec/api_client_spec.rb +1 -13
- data/spec/configuration_spec.rb +9 -10
- data/spec/spec_helper.rb +1 -13
- metadata +107 -271
- 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/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
|
@@ -0,0 +1,196 @@
|
|
|
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
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
module RusticiSoftwareCloudV2
|
|
15
|
+
|
|
16
|
+
class DispatchRegistrationCountSchema
|
|
17
|
+
attr_accessor :registration_count
|
|
18
|
+
|
|
19
|
+
attr_accessor :last_reset_date
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'registration_count' => :'registrationCount',
|
|
26
|
+
:'last_reset_date' => :'lastResetDate'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Attribute type mapping.
|
|
31
|
+
def self.swagger_types
|
|
32
|
+
{
|
|
33
|
+
:'registration_count' => :'Integer',
|
|
34
|
+
:'last_reset_date' => :'DateTime'
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Initializes the object
|
|
39
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
40
|
+
def initialize(attributes = {})
|
|
41
|
+
return unless attributes.is_a?(Hash)
|
|
42
|
+
|
|
43
|
+
# convert string to symbol for hash key
|
|
44
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
45
|
+
|
|
46
|
+
if attributes.has_key?(:'registrationCount')
|
|
47
|
+
self.registration_count = attributes[:'registrationCount']
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
if attributes.has_key?(:'lastResetDate')
|
|
51
|
+
self.last_reset_date = attributes[:'lastResetDate']
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
57
|
+
# @return Array for valid properies with the reasons
|
|
58
|
+
def list_invalid_properties
|
|
59
|
+
invalid_properties = Array.new
|
|
60
|
+
return invalid_properties
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Check to see if the all the properties in the model are valid
|
|
64
|
+
# @return true if the model is valid
|
|
65
|
+
def valid?
|
|
66
|
+
return true
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Checks equality by comparing each attribute.
|
|
70
|
+
# @param [Object] Object to be compared
|
|
71
|
+
def ==(o)
|
|
72
|
+
return true if self.equal?(o)
|
|
73
|
+
self.class == o.class &&
|
|
74
|
+
registration_count == o.registration_count &&
|
|
75
|
+
last_reset_date == o.last_reset_date
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# @see the `==` method
|
|
79
|
+
# @param [Object] Object to be compared
|
|
80
|
+
def eql?(o)
|
|
81
|
+
self == o
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Calculates hash code according to all attributes.
|
|
85
|
+
# @return [Fixnum] Hash code
|
|
86
|
+
def hash
|
|
87
|
+
[registration_count, last_reset_date].hash
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Builds the object from hash
|
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
92
|
+
# @return [Object] Returns the model itself
|
|
93
|
+
def build_from_hash(attributes)
|
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
|
95
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
96
|
+
if type =~ /\AArray<(.*)>/i
|
|
97
|
+
# check to ensure the input is an array given that the the attribute
|
|
98
|
+
# is documented as an array but the input is not
|
|
99
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
100
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
101
|
+
end
|
|
102
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
103
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
104
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
self
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Deserializes the data based on type
|
|
111
|
+
# @param string type Data type
|
|
112
|
+
# @param string value Value to be deserialized
|
|
113
|
+
# @return [Object] Deserialized data
|
|
114
|
+
def _deserialize(type, value)
|
|
115
|
+
case type.to_sym
|
|
116
|
+
when :DateTime
|
|
117
|
+
DateTime.parse(value)
|
|
118
|
+
when :Date
|
|
119
|
+
Date.parse(value)
|
|
120
|
+
when :String
|
|
121
|
+
value.to_s
|
|
122
|
+
when :Integer
|
|
123
|
+
value.to_i
|
|
124
|
+
when :Float
|
|
125
|
+
value.to_f
|
|
126
|
+
when :BOOLEAN
|
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
128
|
+
true
|
|
129
|
+
else
|
|
130
|
+
false
|
|
131
|
+
end
|
|
132
|
+
when :Object
|
|
133
|
+
# generic object (usually a Hash), return directly
|
|
134
|
+
value
|
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
|
141
|
+
{}.tap do |hash|
|
|
142
|
+
value.each do |k, v|
|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
else # model
|
|
147
|
+
temp_model = RusticiSoftwareCloudV2.const_get(type).new
|
|
148
|
+
temp_model.build_from_hash(value)
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Returns the string representation of the object
|
|
153
|
+
# @return [String] String presentation of the object
|
|
154
|
+
def to_s
|
|
155
|
+
to_hash.to_s
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
|
160
|
+
def to_body
|
|
161
|
+
to_hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Returns the object in the form of hash
|
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
|
166
|
+
def to_hash
|
|
167
|
+
hash = {}
|
|
168
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
169
|
+
value = self.send(attr)
|
|
170
|
+
next if value.nil?
|
|
171
|
+
hash[param] = _to_hash(value)
|
|
172
|
+
end
|
|
173
|
+
hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Outputs non-array value in the form of hash
|
|
177
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
178
|
+
# @param [Object] value Any valid value
|
|
179
|
+
# @return [Hash] Returns the value in the form of hash
|
|
180
|
+
def _to_hash(value)
|
|
181
|
+
if value.is_a?(Array)
|
|
182
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
183
|
+
elsif value.is_a?(Hash)
|
|
184
|
+
{}.tap do |hash|
|
|
185
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
186
|
+
end
|
|
187
|
+
elsif value.respond_to? :to_hash
|
|
188
|
+
value.to_hash
|
|
189
|
+
else
|
|
190
|
+
value
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
end
|
|
@@ -0,0 +1,290 @@
|
|
|
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
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
module RusticiSoftwareCloudV2
|
|
15
|
+
|
|
16
|
+
class DispatchSchema
|
|
17
|
+
# Destination ID.
|
|
18
|
+
attr_accessor :destination_id
|
|
19
|
+
|
|
20
|
+
# Serialized external package ID.
|
|
21
|
+
attr_accessor :course_id
|
|
22
|
+
|
|
23
|
+
# If true, then new registrations can be created for this dispatch.
|
|
24
|
+
attr_accessor :allow_new_registrations
|
|
25
|
+
|
|
26
|
+
# If false, the dispatch can not be launched.
|
|
27
|
+
attr_accessor :enabled
|
|
28
|
+
|
|
29
|
+
# If true, then a new registration instance will be created if the client LMS doesn't provide launch data for an existing one. Otherwise, the same instance will always be used for the given cmi.learner_id.
|
|
30
|
+
attr_accessor :instanced
|
|
31
|
+
|
|
32
|
+
# The maximum number of registrations that can be created for this dispatch, where '0' means 'unlimited registrations'.
|
|
33
|
+
attr_accessor :registration_cap
|
|
34
|
+
|
|
35
|
+
# The current number of registrations that have been created for this dispatch.
|
|
36
|
+
attr_accessor :registration_count
|
|
37
|
+
|
|
38
|
+
# The date after which this dispatch will be disabled as an ISO 8601 string, or 'none' for no expiration date.
|
|
39
|
+
attr_accessor :expiration_date
|
|
40
|
+
|
|
41
|
+
# The tags to associate with this Dispatch.
|
|
42
|
+
attr_accessor :tags
|
|
43
|
+
|
|
44
|
+
# SCORM Cloud user e-mail associated with this dispatch. If this is not provided, it will default to the owner of the Realm.
|
|
45
|
+
attr_accessor :email
|
|
46
|
+
|
|
47
|
+
# Any provided notes about this dispatch.
|
|
48
|
+
attr_accessor :notes
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
52
|
+
def self.attribute_map
|
|
53
|
+
{
|
|
54
|
+
:'destination_id' => :'destinationId',
|
|
55
|
+
:'course_id' => :'courseId',
|
|
56
|
+
:'allow_new_registrations' => :'allowNewRegistrations',
|
|
57
|
+
:'enabled' => :'enabled',
|
|
58
|
+
:'instanced' => :'instanced',
|
|
59
|
+
:'registration_cap' => :'registrationCap',
|
|
60
|
+
:'registration_count' => :'registrationCount',
|
|
61
|
+
:'expiration_date' => :'expirationDate',
|
|
62
|
+
:'tags' => :'tags',
|
|
63
|
+
:'email' => :'email',
|
|
64
|
+
:'notes' => :'notes'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Attribute type mapping.
|
|
69
|
+
def self.swagger_types
|
|
70
|
+
{
|
|
71
|
+
:'destination_id' => :'String',
|
|
72
|
+
:'course_id' => :'String',
|
|
73
|
+
:'allow_new_registrations' => :'BOOLEAN',
|
|
74
|
+
:'enabled' => :'BOOLEAN',
|
|
75
|
+
:'instanced' => :'BOOLEAN',
|
|
76
|
+
:'registration_cap' => :'Integer',
|
|
77
|
+
:'registration_count' => :'Integer',
|
|
78
|
+
:'expiration_date' => :'DateTime',
|
|
79
|
+
:'tags' => :'Array<String>',
|
|
80
|
+
:'email' => :'String',
|
|
81
|
+
:'notes' => :'String'
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Initializes the object
|
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
87
|
+
def initialize(attributes = {})
|
|
88
|
+
return unless attributes.is_a?(Hash)
|
|
89
|
+
|
|
90
|
+
# convert string to symbol for hash key
|
|
91
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
92
|
+
|
|
93
|
+
if attributes.has_key?(:'destinationId')
|
|
94
|
+
self.destination_id = attributes[:'destinationId']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.has_key?(:'courseId')
|
|
98
|
+
self.course_id = attributes[:'courseId']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.has_key?(:'allowNewRegistrations')
|
|
102
|
+
self.allow_new_registrations = attributes[:'allowNewRegistrations']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.has_key?(:'enabled')
|
|
106
|
+
self.enabled = attributes[:'enabled']
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.has_key?(:'instanced')
|
|
110
|
+
self.instanced = attributes[:'instanced']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.has_key?(:'registrationCap')
|
|
114
|
+
self.registration_cap = attributes[:'registrationCap']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.has_key?(:'registrationCount')
|
|
118
|
+
self.registration_count = attributes[:'registrationCount']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.has_key?(:'expirationDate')
|
|
122
|
+
self.expiration_date = attributes[:'expirationDate']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.has_key?(:'tags')
|
|
126
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
|
127
|
+
self.tags = value
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.has_key?(:'email')
|
|
132
|
+
self.email = attributes[:'email']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.has_key?(:'notes')
|
|
136
|
+
self.notes = attributes[:'notes']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
142
|
+
# @return Array for valid properies with the reasons
|
|
143
|
+
def list_invalid_properties
|
|
144
|
+
invalid_properties = Array.new
|
|
145
|
+
return invalid_properties
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Check to see if the all the properties in the model are valid
|
|
149
|
+
# @return true if the model is valid
|
|
150
|
+
def valid?
|
|
151
|
+
return true
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Checks equality by comparing each attribute.
|
|
155
|
+
# @param [Object] Object to be compared
|
|
156
|
+
def ==(o)
|
|
157
|
+
return true if self.equal?(o)
|
|
158
|
+
self.class == o.class &&
|
|
159
|
+
destination_id == o.destination_id &&
|
|
160
|
+
course_id == o.course_id &&
|
|
161
|
+
allow_new_registrations == o.allow_new_registrations &&
|
|
162
|
+
enabled == o.enabled &&
|
|
163
|
+
instanced == o.instanced &&
|
|
164
|
+
registration_cap == o.registration_cap &&
|
|
165
|
+
registration_count == o.registration_count &&
|
|
166
|
+
expiration_date == o.expiration_date &&
|
|
167
|
+
tags == o.tags &&
|
|
168
|
+
email == o.email &&
|
|
169
|
+
notes == o.notes
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# @see the `==` method
|
|
173
|
+
# @param [Object] Object to be compared
|
|
174
|
+
def eql?(o)
|
|
175
|
+
self == o
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Calculates hash code according to all attributes.
|
|
179
|
+
# @return [Fixnum] Hash code
|
|
180
|
+
def hash
|
|
181
|
+
[destination_id, course_id, allow_new_registrations, enabled, instanced, registration_cap, registration_count, expiration_date, tags, email, notes].hash
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Builds the object from hash
|
|
185
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
186
|
+
# @return [Object] Returns the model itself
|
|
187
|
+
def build_from_hash(attributes)
|
|
188
|
+
return nil unless attributes.is_a?(Hash)
|
|
189
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
190
|
+
if type =~ /\AArray<(.*)>/i
|
|
191
|
+
# check to ensure the input is an array given that the the attribute
|
|
192
|
+
# is documented as an array but the input is not
|
|
193
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
194
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
195
|
+
end
|
|
196
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
197
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
198
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
self
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Deserializes the data based on type
|
|
205
|
+
# @param string type Data type
|
|
206
|
+
# @param string value Value to be deserialized
|
|
207
|
+
# @return [Object] Deserialized data
|
|
208
|
+
def _deserialize(type, value)
|
|
209
|
+
case type.to_sym
|
|
210
|
+
when :DateTime
|
|
211
|
+
DateTime.parse(value)
|
|
212
|
+
when :Date
|
|
213
|
+
Date.parse(value)
|
|
214
|
+
when :String
|
|
215
|
+
value.to_s
|
|
216
|
+
when :Integer
|
|
217
|
+
value.to_i
|
|
218
|
+
when :Float
|
|
219
|
+
value.to_f
|
|
220
|
+
when :BOOLEAN
|
|
221
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
222
|
+
true
|
|
223
|
+
else
|
|
224
|
+
false
|
|
225
|
+
end
|
|
226
|
+
when :Object
|
|
227
|
+
# generic object (usually a Hash), return directly
|
|
228
|
+
value
|
|
229
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
230
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
231
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
232
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
233
|
+
k_type = Regexp.last_match[:k_type]
|
|
234
|
+
v_type = Regexp.last_match[:v_type]
|
|
235
|
+
{}.tap do |hash|
|
|
236
|
+
value.each do |k, v|
|
|
237
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
else # model
|
|
241
|
+
temp_model = RusticiSoftwareCloudV2.const_get(type).new
|
|
242
|
+
temp_model.build_from_hash(value)
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Returns the string representation of the object
|
|
247
|
+
# @return [String] String presentation of the object
|
|
248
|
+
def to_s
|
|
249
|
+
to_hash.to_s
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
253
|
+
# @return [Hash] Returns the object in the form of hash
|
|
254
|
+
def to_body
|
|
255
|
+
to_hash
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Returns the object in the form of hash
|
|
259
|
+
# @return [Hash] Returns the object in the form of hash
|
|
260
|
+
def to_hash
|
|
261
|
+
hash = {}
|
|
262
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
263
|
+
value = self.send(attr)
|
|
264
|
+
next if value.nil?
|
|
265
|
+
hash[param] = _to_hash(value)
|
|
266
|
+
end
|
|
267
|
+
hash
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Outputs non-array value in the form of hash
|
|
271
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
272
|
+
# @param [Object] value Any valid value
|
|
273
|
+
# @return [Hash] Returns the value in the form of hash
|
|
274
|
+
def _to_hash(value)
|
|
275
|
+
if value.is_a?(Array)
|
|
276
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
277
|
+
elsif value.is_a?(Hash)
|
|
278
|
+
{}.tap do |hash|
|
|
279
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
280
|
+
end
|
|
281
|
+
elsif value.respond_to? :to_hash
|
|
282
|
+
value.to_hash
|
|
283
|
+
else
|
|
284
|
+
value
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
end
|
|
@@ -3,26 +3,31 @@
|
|
|
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.3
|
|
10
9
|
|
|
11
10
|
=end
|
|
12
11
|
|
|
13
12
|
require 'date'
|
|
14
13
|
|
|
15
14
|
module RusticiSoftwareCloudV2
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
class EnabledSchema
|
|
17
|
+
attr_accessor :enabled
|
|
18
|
+
|
|
19
|
+
|
|
17
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
18
21
|
def self.attribute_map
|
|
19
22
|
{
|
|
23
|
+
:'enabled' => :'enabled'
|
|
20
24
|
}
|
|
21
25
|
end
|
|
22
26
|
|
|
23
27
|
# Attribute type mapping.
|
|
24
28
|
def self.swagger_types
|
|
25
29
|
{
|
|
30
|
+
:'enabled' => :'BOOLEAN'
|
|
26
31
|
}
|
|
27
32
|
end
|
|
28
33
|
|
|
@@ -32,27 +37,33 @@ module RusticiSoftwareCloudV2
|
|
|
32
37
|
return unless attributes.is_a?(Hash)
|
|
33
38
|
|
|
34
39
|
# convert string to symbol for hash key
|
|
35
|
-
attributes = attributes.each_with_object({})
|
|
40
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
41
|
+
|
|
42
|
+
if attributes.has_key?(:'enabled')
|
|
43
|
+
self.enabled = attributes[:'enabled']
|
|
44
|
+
end
|
|
45
|
+
|
|
36
46
|
end
|
|
37
47
|
|
|
38
48
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
39
|
-
# @return Array for valid
|
|
49
|
+
# @return Array for valid properies with the reasons
|
|
40
50
|
def list_invalid_properties
|
|
41
51
|
invalid_properties = Array.new
|
|
42
|
-
invalid_properties
|
|
52
|
+
return invalid_properties
|
|
43
53
|
end
|
|
44
54
|
|
|
45
55
|
# Check to see if the all the properties in the model are valid
|
|
46
56
|
# @return true if the model is valid
|
|
47
57
|
def valid?
|
|
48
|
-
true
|
|
58
|
+
return true
|
|
49
59
|
end
|
|
50
60
|
|
|
51
61
|
# Checks equality by comparing each attribute.
|
|
52
62
|
# @param [Object] Object to be compared
|
|
53
63
|
def ==(o)
|
|
54
64
|
return true if self.equal?(o)
|
|
55
|
-
self.class == o.class
|
|
65
|
+
self.class == o.class &&
|
|
66
|
+
enabled == o.enabled
|
|
56
67
|
end
|
|
57
68
|
|
|
58
69
|
# @see the `==` method
|
|
@@ -64,7 +75,7 @@ module RusticiSoftwareCloudV2
|
|
|
64
75
|
# Calculates hash code according to all attributes.
|
|
65
76
|
# @return [Fixnum] Hash code
|
|
66
77
|
def hash
|
|
67
|
-
[].hash
|
|
78
|
+
[enabled].hash
|
|
68
79
|
end
|
|
69
80
|
|
|
70
81
|
# Builds the object from hash
|
|
@@ -77,7 +88,7 @@ module RusticiSoftwareCloudV2
|
|
|
77
88
|
# check to ensure the input is an array given that the the attribute
|
|
78
89
|
# is documented as an array but the input is not
|
|
79
90
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
80
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map
|
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
81
92
|
end
|
|
82
93
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
83
94
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -159,7 +170,7 @@ module RusticiSoftwareCloudV2
|
|
|
159
170
|
# @return [Hash] Returns the value in the form of hash
|
|
160
171
|
def _to_hash(value)
|
|
161
172
|
if value.is_a?(Array)
|
|
162
|
-
value.compact.map
|
|
173
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
163
174
|
elsif value.is_a?(Hash)
|
|
164
175
|
{}.tap do |hash|
|
|
165
176
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -170,5 +181,7 @@ module RusticiSoftwareCloudV2
|
|
|
170
181
|
value
|
|
171
182
|
end
|
|
172
183
|
end
|
|
184
|
+
|
|
173
185
|
end
|
|
186
|
+
|
|
174
187
|
end
|
|
@@ -3,10 +3,9 @@
|
|
|
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.3
|
|
10
9
|
|
|
11
10
|
=end
|
|
12
11
|
|
|
@@ -18,6 +17,7 @@ module RusticiSoftwareCloudV2
|
|
|
18
17
|
# URL path to the .zip package to download to import this course
|
|
19
18
|
attr_accessor :url
|
|
20
19
|
|
|
20
|
+
|
|
21
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
22
|
def self.attribute_map
|
|
23
23
|
{
|
|
@@ -38,29 +38,30 @@ module RusticiSoftwareCloudV2
|
|
|
38
38
|
return unless attributes.is_a?(Hash)
|
|
39
39
|
|
|
40
40
|
# convert string to symbol for hash key
|
|
41
|
-
attributes = attributes.each_with_object({})
|
|
41
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
42
42
|
|
|
43
43
|
if attributes.has_key?(:'url')
|
|
44
44
|
self.url = attributes[:'url']
|
|
45
45
|
end
|
|
46
|
+
|
|
46
47
|
end
|
|
47
48
|
|
|
48
49
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
49
|
-
# @return Array for valid
|
|
50
|
+
# @return Array for valid properies with the reasons
|
|
50
51
|
def list_invalid_properties
|
|
51
52
|
invalid_properties = Array.new
|
|
52
53
|
if @url.nil?
|
|
53
|
-
invalid_properties.push(
|
|
54
|
+
invalid_properties.push("invalid value for 'url', url cannot be nil.")
|
|
54
55
|
end
|
|
55
56
|
|
|
56
|
-
invalid_properties
|
|
57
|
+
return invalid_properties
|
|
57
58
|
end
|
|
58
59
|
|
|
59
60
|
# Check to see if the all the properties in the model are valid
|
|
60
61
|
# @return true if the model is valid
|
|
61
62
|
def valid?
|
|
62
63
|
return false if @url.nil?
|
|
63
|
-
true
|
|
64
|
+
return true
|
|
64
65
|
end
|
|
65
66
|
|
|
66
67
|
# Checks equality by comparing each attribute.
|
|
@@ -93,7 +94,7 @@ module RusticiSoftwareCloudV2
|
|
|
93
94
|
# check to ensure the input is an array given that the the attribute
|
|
94
95
|
# is documented as an array but the input is not
|
|
95
96
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
96
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map
|
|
97
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
97
98
|
end
|
|
98
99
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
99
100
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -175,7 +176,7 @@ module RusticiSoftwareCloudV2
|
|
|
175
176
|
# @return [Hash] Returns the value in the form of hash
|
|
176
177
|
def _to_hash(value)
|
|
177
178
|
if value.is_a?(Array)
|
|
178
|
-
value.compact.map
|
|
179
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
179
180
|
elsif value.is_a?(Hash)
|
|
180
181
|
{}.tap do |hash|
|
|
181
182
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -186,5 +187,7 @@ module RusticiSoftwareCloudV2
|
|
|
186
187
|
value
|
|
187
188
|
end
|
|
188
189
|
end
|
|
190
|
+
|
|
189
191
|
end
|
|
192
|
+
|
|
190
193
|
end
|