purecloudplatformclientv2 75.1.0 → 79.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 +4 -4
- data/README.md +2 -2
- data/docs/ActivityCode.md +1 -1
- data/docs/AnalyticsApi.md +66 -2
- data/docs/AnalyticsConversationAsyncQueryResponse.md +1 -1
- data/docs/AnalyticsConversationQueryResponse.md +1 -1
- data/docs/AnalyticsParticipant.md +1 -0
- data/docs/AnalyticsParticipantWithoutAttributes.md +1 -0
- data/docs/ArchitectApi.md +345 -0
- data/docs/AuditApi.md +3 -1
- data/docs/AuditLogMessage.md +1 -1
- data/docs/AuthorizationApi.md +154 -9
- data/docs/AvailableTopic.md +3 -1
- data/docs/BuAgentScheduleActivity.md +18 -0
- data/docs/BuAgentSchedulePublishedScheduleReference.md +16 -0
- data/docs/BuAgentScheduleSearchResponse.md +15 -0
- data/docs/BuAgentScheduleShift.md +18 -0
- data/docs/BuAgentSchedulesSearchResponse.md +15 -0
- data/docs/BuAsyncAgentSchedulesSearchResponse.md +17 -0
- data/docs/BuFullDayTimeOffMarker.md +18 -0
- data/docs/BuScheduleReference.md +15 -0
- data/docs/Call.md +1 -1
- data/docs/CallBasic.md +1 -1
- data/docs/CallMediaParticipant.md +1 -1
- data/docs/CallbackMediaParticipant.md +1 -1
- data/docs/CampaignProgress.md +2 -1
- data/docs/ChatMediaParticipant.md +1 -1
- data/docs/CobrowseMediaParticipant.md +1 -1
- data/docs/ConversationsApi.md +71 -1
- data/docs/CopyAttachmentsRequest.md +14 -0
- data/docs/CreateManagementUnitApiRequest.md +3 -2
- data/docs/CreateManagementUnitSettingsRequest.md +1 -1
- data/docs/CreateWorkPlanShift.md +1 -1
- data/docs/DataTableExportJob.md +22 -0
- data/docs/DataTableImportJob.md +25 -0
- data/docs/DivsPermittedEntityListing.md +23 -0
- data/docs/EmailMediaParticipant.md +1 -1
- data/docs/EntityListing.md +17 -0
- data/docs/ErrorBody.md +2 -2
- data/docs/ErrorInfo.md +14 -0
- data/docs/Evaluation.md +1 -0
- data/docs/EvaluationQuestionGroupScore.md +4 -0
- data/docs/EvaluationScoringSet.md +1 -0
- data/docs/FacebookIntegrationRequest.md +2 -2
- data/docs/GDPRJourneyCustomer.md +2 -2
- data/docs/InboundDomain.md +2 -0
- data/docs/Library.md +4 -3
- data/docs/LicenseApi.md +66 -0
- data/docs/MailFromResult.md +15 -0
- data/docs/ManagementUnit.md +2 -2
- data/docs/ManagementUnitSettingsRequest.md +1 -1
- data/docs/MessageMediaParticipant.md +1 -1
- data/docs/MessagingApi.md +0 -936
- data/docs/MessagingTemplate.md +15 -0
- data/docs/Organization.md +1 -0
- data/docs/QualityApi.md +5 -6
- data/docs/Record.md +15 -0
- data/docs/ReportingExportMetadataJobListing.md +22 -0
- data/docs/ReportingExportMetadataJobResponse.md +22 -0
- data/docs/Response.md +2 -0
- data/docs/RoutingApi.md +385 -0
- data/docs/RoutingSettings.md +13 -0
- data/docs/SCIMApi.md +397 -23
- data/docs/ScimUserExtensions.md +14 -0
- data/docs/ScimUserRole.md +13 -0
- data/docs/ScimUserRoutingLanguage.md +14 -0
- data/docs/ScimUserRoutingSkill.md +14 -0
- data/docs/ScimV2CreateUser.md +2 -1
- data/docs/ScimV2SchemaAttribute.md +24 -0
- data/docs/ScimV2SchemaDefinition.md +17 -0
- data/docs/ScimV2SchemaListResponse.md +17 -0
- data/docs/ScimV2User.md +2 -1
- data/docs/ShortTermForecast.md +2 -2
- data/docs/ShortTermForecastListItemResponse.md +2 -2
- data/docs/ShortTermForecastReference.md +2 -2
- data/docs/TimeOffRequestLookup.md +3 -3
- data/docs/TimeOffRequestResponse.md +3 -3
- data/docs/UserScheduleAdherence.md +1 -1
- data/docs/UsersApi.md +358 -10
- data/docs/ViewFilter.md +4 -10
- data/docs/WeekSchedule.md +1 -1
- data/docs/WeekScheduleListItemResponse.md +1 -1
- data/docs/WeekScheduleReference.md +1 -1
- data/docs/WorkPlanShift.md +1 -1
- data/docs/WorkforceManagementApi.md +40 -41
- data/lib/purecloudplatformclientv2.rb +27 -0
- data/lib/purecloudplatformclientv2/api/analytics_api.rb +73 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +373 -0
- data/lib/purecloudplatformclientv2/api/audit_api.rb +9 -0
- data/lib/purecloudplatformclientv2/api/authorization_api.rb +185 -7
- data/lib/purecloudplatformclientv2/api/conversations_api.rb +84 -0
- data/lib/purecloudplatformclientv2/api/license_api.rb +63 -0
- data/lib/purecloudplatformclientv2/api/messaging_api.rb +0 -949
- data/lib/purecloudplatformclientv2/api/quality_api.rb +8 -6
- data/lib/purecloudplatformclientv2/api/routing_api.rb +378 -0
- data/lib/purecloudplatformclientv2/api/scim_api.rb +366 -26
- data/lib/purecloudplatformclientv2/api/users_api.rb +398 -7
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +3 -3
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/activity_code.rb +30 -30
- data/lib/purecloudplatformclientv2/models/analytics_conversation_async_query_response.rb +15 -15
- data/lib/purecloudplatformclientv2/models/analytics_conversation_query_response.rb +15 -15
- data/lib/purecloudplatformclientv2/models/analytics_participant.rb +27 -1
- data/lib/purecloudplatformclientv2/models/analytics_participant_without_attributes.rb +27 -1
- data/lib/purecloudplatformclientv2/models/audit_log_message.rb +5 -5
- data/lib/purecloudplatformclientv2/models/available_topic.rb +57 -4
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_activity.rb +332 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_published_schedule_reference.rb +280 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_search_response.rb +258 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_shift.rb +334 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedules_search_response.rb +258 -0
- data/lib/purecloudplatformclientv2/models/bu_async_agent_schedules_search_response.rb +320 -0
- data/lib/purecloudplatformclientv2/models/bu_full_day_time_off_marker.rb +332 -0
- data/lib/purecloudplatformclientv2/models/bu_schedule_reference.rb +254 -0
- data/lib/purecloudplatformclientv2/models/call.rb +1 -1
- data/lib/purecloudplatformclientv2/models/call_basic.rb +1 -1
- data/lib/purecloudplatformclientv2/models/call_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/callback_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/campaign_progress.rb +28 -2
- data/lib/purecloudplatformclientv2/models/chat_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/cobrowse_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/copy_attachments_request.rb +240 -0
- data/lib/purecloudplatformclientv2/models/create_management_unit_api_request.rb +37 -16
- data/lib/purecloudplatformclientv2/models/create_management_unit_settings_request.rb +1 -1
- data/lib/purecloudplatformclientv2/models/create_work_plan_shift.rb +1 -1
- data/lib/purecloudplatformclientv2/models/data_table_export_job.rb +455 -0
- data/lib/purecloudplatformclientv2/models/data_table_import_job.rb +547 -0
- data/lib/purecloudplatformclientv2/models/divs_permitted_entity_listing.rb +453 -0
- data/lib/purecloudplatformclientv2/models/email_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/entity_listing.rb +303 -0
- data/lib/purecloudplatformclientv2/models/error_body.rb +20 -20
- data/lib/purecloudplatformclientv2/models/error_info.rb +226 -0
- data/lib/purecloudplatformclientv2/models/evaluation.rb +27 -1
- data/lib/purecloudplatformclientv2/models/evaluation_question_group_score.rb +101 -1
- data/lib/purecloudplatformclientv2/models/evaluation_scoring_set.rb +26 -1
- data/lib/purecloudplatformclientv2/models/facebook_integration_request.rb +2 -7
- data/lib/purecloudplatformclientv2/models/flow_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/gdpr_journey_customer.rb +2 -12
- data/lib/purecloudplatformclientv2/models/inbound_domain.rb +53 -1
- data/lib/purecloudplatformclientv2/models/library.rb +44 -2
- data/lib/purecloudplatformclientv2/models/mail_from_result.rb +275 -0
- data/lib/purecloudplatformclientv2/models/management_unit.rb +2 -2
- data/lib/purecloudplatformclientv2/models/management_unit_settings_request.rb +1 -1
- data/lib/purecloudplatformclientv2/models/message_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/messaging_template.rb +270 -0
- data/lib/purecloudplatformclientv2/models/organization.rb +41 -1
- data/lib/purecloudplatformclientv2/models/record.rb +269 -0
- data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/reporting_export_metadata_job_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/reporting_export_metadata_job_response.rb +459 -0
- data/lib/purecloudplatformclientv2/models/response.rb +67 -1
- data/lib/purecloudplatformclientv2/models/routing_settings.rb +202 -0
- data/lib/purecloudplatformclientv2/models/scim_metadata.rb +2 -2
- data/lib/purecloudplatformclientv2/models/scim_user_extensions.rb +233 -0
- data/lib/purecloudplatformclientv2/models/scim_user_role.rb +203 -0
- data/lib/purecloudplatformclientv2/models/scim_user_routing_language.rb +234 -0
- data/lib/purecloudplatformclientv2/models/scim_user_routing_skill.rb +234 -0
- data/lib/purecloudplatformclientv2/models/scim_v2_create_user.rb +30 -5
- data/lib/purecloudplatformclientv2/models/scim_v2_group_reference.rb +2 -2
- data/lib/purecloudplatformclientv2/models/scim_v2_member_reference.rb +2 -2
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_attribute.rb +551 -0
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_definition.rb +309 -0
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_list_response.rb +311 -0
- data/lib/purecloudplatformclientv2/models/scim_v2_user.rb +27 -2
- data/lib/purecloudplatformclientv2/models/segment_detail_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/short_term_forecast.rb +30 -35
- data/lib/purecloudplatformclientv2/models/short_term_forecast_list_item_response.rb +30 -35
- data/lib/purecloudplatformclientv2/models/short_term_forecast_reference.rb +22 -27
- data/lib/purecloudplatformclientv2/models/time_off_request_lookup.rb +3 -3
- data/lib/purecloudplatformclientv2/models/time_off_request_response.rb +3 -3
- data/lib/purecloudplatformclientv2/models/user_schedule_adherence.rb +1 -1
- data/lib/purecloudplatformclientv2/models/view_filter.rb +53 -255
- data/lib/purecloudplatformclientv2/models/week_schedule.rb +21 -21
- data/lib/purecloudplatformclientv2/models/week_schedule_list_item_response.rb +21 -21
- data/lib/purecloudplatformclientv2/models/week_schedule_reference.rb +14 -14
- data/lib/purecloudplatformclientv2/models/work_plan_shift.rb +1 -1
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +56 -2
@@ -58,6 +58,8 @@ module PureCloud
|
|
58
58
|
# The URI of the schema for the enterprise user.
|
59
59
|
attr_accessor :urnietfparamsscimschemasextensionenterprise2_0_user
|
60
60
|
|
61
|
+
attr_accessor :urnietfparamsscimschemasextensiongenesyspurecloud2_0_user
|
62
|
+
|
61
63
|
# Attribute mapping from ruby-style variable name to JSON key.
|
62
64
|
def self.attribute_map
|
63
65
|
{
|
@@ -86,7 +88,9 @@ module PureCloud
|
|
86
88
|
|
87
89
|
:'roles' => :'roles',
|
88
90
|
|
89
|
-
:'urnietfparamsscimschemasextensionenterprise2_0_user' => :'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User'
|
91
|
+
:'urnietfparamsscimschemasextensionenterprise2_0_user' => :'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User',
|
92
|
+
|
93
|
+
:'urnietfparamsscimschemasextensiongenesyspurecloud2_0_user' => :'urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User'
|
90
94
|
|
91
95
|
}
|
92
96
|
end
|
@@ -117,9 +121,11 @@ module PureCloud
|
|
117
121
|
|
118
122
|
:'groups' => :'Array<ScimV2GroupReference>',
|
119
123
|
|
120
|
-
:'roles' => :'Array<
|
124
|
+
:'roles' => :'Array<ScimUserRole>',
|
125
|
+
|
126
|
+
:'urnietfparamsscimschemasextensionenterprise2_0_user' => :'ScimV2EnterpriseUser',
|
121
127
|
|
122
|
-
:'
|
128
|
+
:'urnietfparamsscimschemasextensiongenesyspurecloud2_0_user' => :'ScimUserExtensions'
|
123
129
|
|
124
130
|
}
|
125
131
|
end
|
@@ -262,6 +268,15 @@ module PureCloud
|
|
262
268
|
end
|
263
269
|
|
264
270
|
|
271
|
+
if attributes.has_key?(:'urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User')
|
272
|
+
|
273
|
+
|
274
|
+
self.urnietfparamsscimschemasextensiongenesyspurecloud2_0_user = attributes[:'urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User']
|
275
|
+
|
276
|
+
|
277
|
+
end
|
278
|
+
|
279
|
+
|
265
280
|
end
|
266
281
|
|
267
282
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -334,6 +349,10 @@ module PureCloud
|
|
334
349
|
|
335
350
|
|
336
351
|
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
337
356
|
|
338
357
|
|
339
358
|
|
@@ -401,6 +420,11 @@ module PureCloud
|
|
401
420
|
|
402
421
|
|
403
422
|
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
404
428
|
|
405
429
|
|
406
430
|
|
@@ -424,7 +448,8 @@ module PureCloud
|
|
424
448
|
external_id == o.external_id &&
|
425
449
|
groups == o.groups &&
|
426
450
|
roles == o.roles &&
|
427
|
-
urnietfparamsscimschemasextensionenterprise2_0_user == o.urnietfparamsscimschemasextensionenterprise2_0_user
|
451
|
+
urnietfparamsscimschemasextensionenterprise2_0_user == o.urnietfparamsscimschemasextensionenterprise2_0_user &&
|
452
|
+
urnietfparamsscimschemasextensiongenesyspurecloud2_0_user == o.urnietfparamsscimschemasextensiongenesyspurecloud2_0_user
|
428
453
|
end
|
429
454
|
|
430
455
|
# @see the `==` method
|
@@ -436,7 +461,7 @@ module PureCloud
|
|
436
461
|
# Calculates hash code according to all attributes.
|
437
462
|
# @return [Fixnum] Hash code
|
438
463
|
def hash
|
439
|
-
[schemas, active, user_name, display_name, password, title, phone_numbers, emails, photos, external_id, groups, roles, urnietfparamsscimschemasextensionenterprise2_0_user].hash
|
464
|
+
[schemas, active, user_name, display_name, password, title, phone_numbers, emails, photos, external_id, groups, roles, urnietfparamsscimschemasextensionenterprise2_0_user, urnietfparamsscimschemasextensiongenesyspurecloud2_0_user].hash
|
440
465
|
end
|
441
466
|
|
442
467
|
# build the object from hash
|
@@ -107,7 +107,7 @@ module PureCloud
|
|
107
107
|
|
108
108
|
|
109
109
|
|
110
|
-
allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType"]
|
110
|
+
allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType", "Schema"]
|
111
111
|
if @type && !allowed_values.include?(@type)
|
112
112
|
return false
|
113
113
|
end
|
@@ -129,7 +129,7 @@ module PureCloud
|
|
129
129
|
# Custom attribute writer method checking allowed values (enum).
|
130
130
|
# @param [Object] type Object to be assigned
|
131
131
|
def type=(type)
|
132
|
-
allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType"]
|
132
|
+
allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType", "Schema"]
|
133
133
|
if type && !allowed_values.include?(type)
|
134
134
|
fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
|
135
135
|
end
|
@@ -107,7 +107,7 @@ module PureCloud
|
|
107
107
|
|
108
108
|
|
109
109
|
|
110
|
-
allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType"]
|
110
|
+
allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType", "Schema"]
|
111
111
|
if @type && !allowed_values.include?(@type)
|
112
112
|
return false
|
113
113
|
end
|
@@ -129,7 +129,7 @@ module PureCloud
|
|
129
129
|
# Custom attribute writer method checking allowed values (enum).
|
130
130
|
# @param [Object] type Object to be assigned
|
131
131
|
def type=(type)
|
132
|
-
allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType"]
|
132
|
+
allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType", "Schema"]
|
133
133
|
if type && !allowed_values.include?(type)
|
134
134
|
fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
|
135
135
|
end
|
@@ -0,0 +1,551 @@
|
|
1
|
+
=begin
|
2
|
+
PureCloud Platform API
|
3
|
+
|
4
|
+
With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: DeveloperEvangelists@genesys.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
License: UNLICENSED
|
11
|
+
https://help.mypurecloud.com/articles/terms-and-conditions/
|
12
|
+
|
13
|
+
Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/
|
14
|
+
|
15
|
+
=end
|
16
|
+
|
17
|
+
require 'date'
|
18
|
+
|
19
|
+
module PureCloud
|
20
|
+
# A complex type that defines service provider attributes, or sub-attributes and their qualities.
|
21
|
+
class ScimV2SchemaAttribute
|
22
|
+
# The attribute's name
|
23
|
+
attr_accessor :name
|
24
|
+
|
25
|
+
# The attribute's data type. Valid values are \"string\", \"boolean\", \"decimal\", \"integer\", \"dateTime\", \"reference\", and \"complex\".
|
26
|
+
attr_accessor :type
|
27
|
+
|
28
|
+
# When an attribute is of type \"complex\", \"subAttributes\" defines a set of sub-attributes. \"subAttributes\" has the same schema sub-attributes as \"attributes\"
|
29
|
+
attr_accessor :sub_attributes
|
30
|
+
|
31
|
+
# A Boolean value indicating the attribute's plurality.
|
32
|
+
attr_accessor :multi_valued
|
33
|
+
|
34
|
+
# The attribute's human-readable description.
|
35
|
+
attr_accessor :description
|
36
|
+
|
37
|
+
# A Boolean value that specifies whether or not the attribute is required.
|
38
|
+
attr_accessor :required
|
39
|
+
|
40
|
+
# A collection of suggested canonical values that MAY be used (e.g., \"work\" and \"home\"). In some cases, service providers MAY choose to ignore unsupported values. OPTIONAL.
|
41
|
+
attr_accessor :canonical_values
|
42
|
+
|
43
|
+
# A Boolean value that specifies whether or not a string attribute is case sensitive. The server SHALL use case sensitivity when evaluating filters. For attributes that are case exact, the server SHALL preserve case for any value submitted. If the attribute is case insensitive, the server MAY alter case for a submitted value. Case sensitivity also impacts how attribute values MAY be compared against filter values (see Section 3.4.2.2 of [RFC7644])
|
44
|
+
attr_accessor :case_exact
|
45
|
+
|
46
|
+
# A single keyword indicating the circumstances under which the value of the attribute can be (re)defined. Value are readOnly, readWrite, immutable, writeOnly
|
47
|
+
attr_accessor :mutability
|
48
|
+
|
49
|
+
# A single keyword that indicates when an attribute and associated values are returned in response to a GET request, or in response to a PUT, POST, or PATCH request. Valid keywords are as follows: always, never, default, request
|
50
|
+
attr_accessor :returned
|
51
|
+
|
52
|
+
# A single keyword value that specifies how the service provider enforces uniqueness of attribute values. A server MAY reject an invalid value based on uniqueness by returning HTTP response code 400 (Bad Request). A client MAY enforce uniqueness on the client side to a greater degree than the service provider enforces. For example, a client could make a value unique while the server has uniqueness of \"none\". Valid keywords are as follows: none, server, global
|
53
|
+
attr_accessor :uniqueness
|
54
|
+
|
55
|
+
# A multi-valued array of JSON strings that indicate the SCIM resource types that may be referenced. Values include User, Group, external and uri.
|
56
|
+
attr_accessor :reference_types
|
57
|
+
|
58
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
59
|
+
def self.attribute_map
|
60
|
+
{
|
61
|
+
|
62
|
+
:'name' => :'name',
|
63
|
+
|
64
|
+
:'type' => :'type',
|
65
|
+
|
66
|
+
:'sub_attributes' => :'subAttributes',
|
67
|
+
|
68
|
+
:'multi_valued' => :'multiValued',
|
69
|
+
|
70
|
+
:'description' => :'description',
|
71
|
+
|
72
|
+
:'required' => :'required',
|
73
|
+
|
74
|
+
:'canonical_values' => :'canonicalValues',
|
75
|
+
|
76
|
+
:'case_exact' => :'caseExact',
|
77
|
+
|
78
|
+
:'mutability' => :'mutability',
|
79
|
+
|
80
|
+
:'returned' => :'returned',
|
81
|
+
|
82
|
+
:'uniqueness' => :'uniqueness',
|
83
|
+
|
84
|
+
:'reference_types' => :'referenceTypes'
|
85
|
+
|
86
|
+
}
|
87
|
+
end
|
88
|
+
|
89
|
+
# Attribute type mapping.
|
90
|
+
def self.swagger_types
|
91
|
+
{
|
92
|
+
|
93
|
+
:'name' => :'String',
|
94
|
+
|
95
|
+
:'type' => :'String',
|
96
|
+
|
97
|
+
:'sub_attributes' => :'Array<ScimV2SchemaAttribute>',
|
98
|
+
|
99
|
+
:'multi_valued' => :'BOOLEAN',
|
100
|
+
|
101
|
+
:'description' => :'String',
|
102
|
+
|
103
|
+
:'required' => :'BOOLEAN',
|
104
|
+
|
105
|
+
:'canonical_values' => :'Array<String>',
|
106
|
+
|
107
|
+
:'case_exact' => :'BOOLEAN',
|
108
|
+
|
109
|
+
:'mutability' => :'String',
|
110
|
+
|
111
|
+
:'returned' => :'String',
|
112
|
+
|
113
|
+
:'uniqueness' => :'String',
|
114
|
+
|
115
|
+
:'reference_types' => :'Array<String>'
|
116
|
+
|
117
|
+
}
|
118
|
+
end
|
119
|
+
|
120
|
+
# Initializes the object
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
def initialize(attributes = {})
|
123
|
+
return unless attributes.is_a?(Hash)
|
124
|
+
|
125
|
+
# convert string to symbol for hash key
|
126
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
127
|
+
|
128
|
+
|
129
|
+
if attributes.has_key?(:'name')
|
130
|
+
|
131
|
+
|
132
|
+
self.name = attributes[:'name']
|
133
|
+
|
134
|
+
|
135
|
+
end
|
136
|
+
|
137
|
+
|
138
|
+
if attributes.has_key?(:'type')
|
139
|
+
|
140
|
+
|
141
|
+
self.type = attributes[:'type']
|
142
|
+
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
|
147
|
+
if attributes.has_key?(:'subAttributes')
|
148
|
+
|
149
|
+
if (value = attributes[:'subAttributes']).is_a?(Array)
|
150
|
+
self.sub_attributes = value
|
151
|
+
end
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
end
|
156
|
+
|
157
|
+
|
158
|
+
if attributes.has_key?(:'multiValued')
|
159
|
+
|
160
|
+
|
161
|
+
self.multi_valued = attributes[:'multiValued']
|
162
|
+
|
163
|
+
|
164
|
+
end
|
165
|
+
|
166
|
+
|
167
|
+
if attributes.has_key?(:'description')
|
168
|
+
|
169
|
+
|
170
|
+
self.description = attributes[:'description']
|
171
|
+
|
172
|
+
|
173
|
+
end
|
174
|
+
|
175
|
+
|
176
|
+
if attributes.has_key?(:'required')
|
177
|
+
|
178
|
+
|
179
|
+
self.required = attributes[:'required']
|
180
|
+
|
181
|
+
|
182
|
+
end
|
183
|
+
|
184
|
+
|
185
|
+
if attributes.has_key?(:'canonicalValues')
|
186
|
+
|
187
|
+
if (value = attributes[:'canonicalValues']).is_a?(Array)
|
188
|
+
self.canonical_values = value
|
189
|
+
end
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
end
|
194
|
+
|
195
|
+
|
196
|
+
if attributes.has_key?(:'caseExact')
|
197
|
+
|
198
|
+
|
199
|
+
self.case_exact = attributes[:'caseExact']
|
200
|
+
|
201
|
+
|
202
|
+
end
|
203
|
+
|
204
|
+
|
205
|
+
if attributes.has_key?(:'mutability')
|
206
|
+
|
207
|
+
|
208
|
+
self.mutability = attributes[:'mutability']
|
209
|
+
|
210
|
+
|
211
|
+
end
|
212
|
+
|
213
|
+
|
214
|
+
if attributes.has_key?(:'returned')
|
215
|
+
|
216
|
+
|
217
|
+
self.returned = attributes[:'returned']
|
218
|
+
|
219
|
+
|
220
|
+
end
|
221
|
+
|
222
|
+
|
223
|
+
if attributes.has_key?(:'uniqueness')
|
224
|
+
|
225
|
+
|
226
|
+
self.uniqueness = attributes[:'uniqueness']
|
227
|
+
|
228
|
+
|
229
|
+
end
|
230
|
+
|
231
|
+
|
232
|
+
if attributes.has_key?(:'referenceTypes')
|
233
|
+
|
234
|
+
if (value = attributes[:'referenceTypes']).is_a?(Array)
|
235
|
+
self.reference_types = value
|
236
|
+
end
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
end
|
241
|
+
|
242
|
+
|
243
|
+
end
|
244
|
+
|
245
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
246
|
+
# @return Array for valid properies with the reasons
|
247
|
+
def list_invalid_properties
|
248
|
+
invalid_properties = Array.new
|
249
|
+
|
250
|
+
|
251
|
+
return invalid_properties
|
252
|
+
end
|
253
|
+
|
254
|
+
# Check to see if the all the properties in the model are valid
|
255
|
+
# @return true if the model is valid
|
256
|
+
def valid?
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
allowed_values = ["STRING", "BOOLEAN", "DECIMAL", "INTEGER", "DATE_TIME", "REFERENCE", "COMPLEX"]
|
265
|
+
if @type && !allowed_values.include?(@type)
|
266
|
+
return false
|
267
|
+
end
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
allowed_values = ["readWrite", "readOnly", "immutable", "writeOnly"]
|
298
|
+
if @mutability && !allowed_values.include?(@mutability)
|
299
|
+
return false
|
300
|
+
end
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
allowed_values = ["ALWAYS", "NEVER", "DEFAULT", "REQUEST"]
|
307
|
+
if @returned && !allowed_values.include?(@returned)
|
308
|
+
return false
|
309
|
+
end
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
allowed_values = ["NONE", "SERVER", "GLOBAL"]
|
316
|
+
if @uniqueness && !allowed_values.include?(@uniqueness)
|
317
|
+
return false
|
318
|
+
end
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
end
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
# Custom attribute writer method checking allowed values (enum).
|
336
|
+
# @param [Object] type Object to be assigned
|
337
|
+
def type=(type)
|
338
|
+
allowed_values = ["STRING", "BOOLEAN", "DECIMAL", "INTEGER", "DATE_TIME", "REFERENCE", "COMPLEX"]
|
339
|
+
if type && !allowed_values.include?(type)
|
340
|
+
fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
|
341
|
+
end
|
342
|
+
@type = type
|
343
|
+
end
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
# Custom attribute writer method checking allowed values (enum).
|
380
|
+
# @param [Object] mutability Object to be assigned
|
381
|
+
def mutability=(mutability)
|
382
|
+
allowed_values = ["readWrite", "readOnly", "immutable", "writeOnly"]
|
383
|
+
if mutability && !allowed_values.include?(mutability)
|
384
|
+
fail ArgumentError, "invalid value for 'mutability', must be one of #{allowed_values}."
|
385
|
+
end
|
386
|
+
@mutability = mutability
|
387
|
+
end
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
# Custom attribute writer method checking allowed values (enum).
|
394
|
+
# @param [Object] returned Object to be assigned
|
395
|
+
def returned=(returned)
|
396
|
+
allowed_values = ["ALWAYS", "NEVER", "DEFAULT", "REQUEST"]
|
397
|
+
if returned && !allowed_values.include?(returned)
|
398
|
+
fail ArgumentError, "invalid value for 'returned', must be one of #{allowed_values}."
|
399
|
+
end
|
400
|
+
@returned = returned
|
401
|
+
end
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
# Custom attribute writer method checking allowed values (enum).
|
408
|
+
# @param [Object] uniqueness Object to be assigned
|
409
|
+
def uniqueness=(uniqueness)
|
410
|
+
allowed_values = ["NONE", "SERVER", "GLOBAL"]
|
411
|
+
if uniqueness && !allowed_values.include?(uniqueness)
|
412
|
+
fail ArgumentError, "invalid value for 'uniqueness', must be one of #{allowed_values}."
|
413
|
+
end
|
414
|
+
@uniqueness = uniqueness
|
415
|
+
end
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
# Checks equality by comparing each attribute.
|
426
|
+
# @param [Object] Object to be compared
|
427
|
+
def ==(o)
|
428
|
+
return true if self.equal?(o)
|
429
|
+
self.class == o.class &&
|
430
|
+
name == o.name &&
|
431
|
+
type == o.type &&
|
432
|
+
sub_attributes == o.sub_attributes &&
|
433
|
+
multi_valued == o.multi_valued &&
|
434
|
+
description == o.description &&
|
435
|
+
required == o.required &&
|
436
|
+
canonical_values == o.canonical_values &&
|
437
|
+
case_exact == o.case_exact &&
|
438
|
+
mutability == o.mutability &&
|
439
|
+
returned == o.returned &&
|
440
|
+
uniqueness == o.uniqueness &&
|
441
|
+
reference_types == o.reference_types
|
442
|
+
end
|
443
|
+
|
444
|
+
# @see the `==` method
|
445
|
+
# @param [Object] Object to be compared
|
446
|
+
def eql?(o)
|
447
|
+
self == o
|
448
|
+
end
|
449
|
+
|
450
|
+
# Calculates hash code according to all attributes.
|
451
|
+
# @return [Fixnum] Hash code
|
452
|
+
def hash
|
453
|
+
[name, type, sub_attributes, multi_valued, description, required, canonical_values, case_exact, mutability, returned, uniqueness, reference_types].hash
|
454
|
+
end
|
455
|
+
|
456
|
+
# build the object from hash
|
457
|
+
def build_from_hash(attributes)
|
458
|
+
return nil unless attributes.is_a?(Hash)
|
459
|
+
self.class.swagger_types.each_pair do |key, type|
|
460
|
+
if type =~ /^Array<(.*)>/i
|
461
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
462
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
463
|
+
else
|
464
|
+
#TODO show warning in debug mode
|
465
|
+
end
|
466
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
467
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
468
|
+
else
|
469
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
470
|
+
end
|
471
|
+
end
|
472
|
+
|
473
|
+
self
|
474
|
+
end
|
475
|
+
|
476
|
+
def _deserialize(type, value)
|
477
|
+
case type.to_sym
|
478
|
+
when :DateTime
|
479
|
+
DateTime.parse(value)
|
480
|
+
when :Date
|
481
|
+
Date.parse(value)
|
482
|
+
when :String
|
483
|
+
value.to_s
|
484
|
+
when :Integer
|
485
|
+
value.to_i
|
486
|
+
when :Float
|
487
|
+
value.to_f
|
488
|
+
when :BOOLEAN
|
489
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
490
|
+
true
|
491
|
+
else
|
492
|
+
false
|
493
|
+
end
|
494
|
+
when :Object
|
495
|
+
# generic object (usually a Hash), return directly
|
496
|
+
value
|
497
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
498
|
+
inner_type = Regexp.last_match[:inner_type]
|
499
|
+
value.map { |v| _deserialize(inner_type, v) }
|
500
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
501
|
+
k_type = Regexp.last_match[:k_type]
|
502
|
+
v_type = Regexp.last_match[:v_type]
|
503
|
+
{}.tap do |hash|
|
504
|
+
value.each do |k, v|
|
505
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
506
|
+
end
|
507
|
+
end
|
508
|
+
else # model
|
509
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
510
|
+
_model.build_from_hash(value)
|
511
|
+
end
|
512
|
+
end
|
513
|
+
|
514
|
+
def to_s
|
515
|
+
to_hash.to_s
|
516
|
+
end
|
517
|
+
|
518
|
+
# to_body is an alias to to_body (backward compatibility))
|
519
|
+
def to_body
|
520
|
+
to_hash
|
521
|
+
end
|
522
|
+
|
523
|
+
# return the object in the form of hash
|
524
|
+
def to_hash
|
525
|
+
hash = {}
|
526
|
+
self.class.attribute_map.each_pair do |attr, param|
|
527
|
+
value = self.send(attr)
|
528
|
+
next if value.nil?
|
529
|
+
hash[param] = _to_hash(value)
|
530
|
+
end
|
531
|
+
hash
|
532
|
+
end
|
533
|
+
|
534
|
+
# Method to output non-array value in the form of hash
|
535
|
+
# For object, use to_hash. Otherwise, just return the value
|
536
|
+
def _to_hash(value)
|
537
|
+
if value.is_a?(Array)
|
538
|
+
value.compact.map{ |v| _to_hash(v) }
|
539
|
+
elsif value.is_a?(Hash)
|
540
|
+
{}.tap do |hash|
|
541
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
542
|
+
end
|
543
|
+
elsif value.respond_to? :to_hash
|
544
|
+
value.to_hash
|
545
|
+
else
|
546
|
+
value
|
547
|
+
end
|
548
|
+
end
|
549
|
+
|
550
|
+
end
|
551
|
+
end
|