purecloud 0.18.0 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Gemfile.lock +2 -2
- data/README.md +1 -7
- data/config-ruby.json +1 -1
- data/extensions/auth.rb +2 -2
- data/lib/purecloud.rb +110 -75
- data/lib/purecloud/api/architect_api.rb +3127 -74
- data/lib/purecloud/api/attributes_api.rb +33 -33
- data/lib/purecloud/api/authorization_api.rb +83 -83
- data/lib/purecloud/api/compliance_api.rb +5 -5
- data/lib/purecloud/api/configuration_api.rb +594 -397
- data/lib/purecloud/api/content_management_api.rb +183 -183
- data/lib/purecloud/api/conversations_api.rb +289 -159
- data/lib/purecloud/api/downloads_api.rb +6 -6
- data/lib/purecloud/api/external_contacts_api.rb +1693 -0
- data/lib/purecloud/api/fax_api.rb +24 -24
- data/lib/purecloud/api/geolocation_api.rb +14 -14
- data/lib/purecloud/api/greetings_api.rb +68 -68
- data/lib/purecloud/api/groups_api.rb +31 -20
- data/lib/purecloud/api/languages_api.rb +18 -11
- data/lib/purecloud/api/licensing_api.rb +5 -5
- data/lib/purecloud/api/locations_api.rb +11 -11
- data/lib/purecloud/api/notifications_api.rb +41 -41
- data/lib/purecloud/api/o_auth_api.rb +69 -69
- data/lib/purecloud/api/outbound_api.rb +505 -325
- data/lib/purecloud/api/presence_api.rb +65 -65
- data/lib/purecloud/api/quality_api.rb +66 -639
- data/lib/purecloud/api/recording_api.rb +1343 -0
- data/lib/purecloud/api/response_management_api.rb +687 -0
- data/lib/purecloud/api/routing_api.rb +224 -170
- data/lib/purecloud/api/scripts_api.rb +52 -52
- data/lib/purecloud/api/search_api.rb +5 -5
- data/lib/purecloud/api/stations_api.rb +8 -8
- data/lib/purecloud/api/telephony_providers_edge_api.rb +138 -138
- data/lib/purecloud/api/user_recordings_api.rb +29 -29
- data/lib/purecloud/api/users_api.rb +123 -123
- data/lib/purecloud/api/utilities_api.rb +71 -15
- data/lib/purecloud/api/voicemail_api.rb +42 -42
- data/lib/purecloud/api_client.rb +1 -1
- data/lib/purecloud/models/address.rb +49 -51
- data/lib/purecloud/models/attribute_filter_item.rb +177 -0
- data/lib/purecloud/models/automate_queue_member_entity_listing.rb +238 -0
- data/lib/purecloud/models/available_additional_service.rb +40 -1
- data/lib/purecloud/models/{topic_entity_listing.rb → available_topic_entity_listing.rb} +1 -1
- data/lib/purecloud/models/call.rb +36 -5
- data/lib/purecloud/models/{line_properties.rb → call_command.rb} +13 -3
- data/lib/purecloud/models/callback.rb +15 -4
- data/lib/purecloud/models/campaign.rb +219 -17
- data/lib/purecloud/models/campaign_progress.rb +186 -0
- data/lib/purecloud/models/channel_topic_entity_listing.rb +238 -0
- data/lib/purecloud/models/charge.rb +14 -4
- data/lib/purecloud/models/{attribute_value.rb → client_text_table_transform.rb} +52 -82
- data/lib/purecloud/models/contact.rb +1 -1
- data/lib/purecloud/models/contact_list.rb +111 -1
- data/lib/purecloud/models/contact_listing.rb +238 -0
- data/lib/purecloud/models/content_attribute_filter_item.rb +177 -0
- data/lib/purecloud/models/content_facet_filter_item.rb +1 -1
- data/lib/purecloud/models/content_query_request.rb +16 -4
- data/lib/purecloud/models/control.rb +221 -0
- data/lib/purecloud/models/{flow_activate_request.rb → control_options.rb} +18 -12
- data/lib/purecloud/models/create_callback_command.rb +200 -0
- data/lib/purecloud/models/discount.rb +220 -0
- data/lib/purecloud/models/document.rb +13 -1
- data/lib/purecloud/models/document_attribute.rb +158 -0
- data/lib/purecloud/models/document_update.rb +28 -16
- data/lib/purecloud/models/document_upload.rb +4 -16
- data/lib/purecloud/models/domain_voice_rate_extended_response_item_entity_listing.rb +238 -0
- data/lib/purecloud/models/domain_voice_rate_international_response_item_entity_listing.rb +238 -0
- data/lib/purecloud/models/domain_voice_rate_response_item_entity_listing.rb +1 -1
- data/lib/purecloud/models/edge_line.rb +1 -1
- data/lib/purecloud/models/edge_logs_job.rb +181 -0
- data/lib/purecloud/models/edge_logs_job_file.rb +243 -0
- data/lib/purecloud/models/edge_logs_job_request.rb +168 -0
- data/lib/purecloud/models/{backend_work_item_data_element.rb → edge_logs_job_response.rb} +16 -24
- data/lib/purecloud/models/{flow_lock_request.rb → edge_logs_job_upload_request.rb} +10 -12
- data/lib/purecloud/models/email.rb +15 -4
- data/lib/purecloud/models/endpoint.rb +1 -1
- data/lib/purecloud/models/{flow_associate_workspaces_request.rb → estimated_wait_time_predictions.rb} +10 -11
- data/lib/purecloud/models/external_contact.rb +320 -0
- data/lib/purecloud/models/external_organization.rb +306 -0
- data/lib/purecloud/models/external_organization_listing.rb +238 -0
- data/lib/purecloud/models/facet_filter_item.rb +1 -1
- data/lib/purecloud/models/flow_body.rb +1 -1
- data/lib/purecloud/models/flow_body_format.rb +10 -20
- data/lib/purecloud/models/flow_terminate_request.rb +3 -16
- data/lib/purecloud/models/form.rb +148 -0
- data/lib/purecloud/models/group.rb +11 -1
- data/lib/purecloud/models/health_check_info.rb +268 -0
- data/lib/purecloud/models/{body_2.rb → inline_response_200.rb} +1 -1
- data/lib/purecloud/models/integration_type.rb +209 -0
- data/lib/purecloud/models/integration_type_entity_listing.rb +238 -0
- data/lib/purecloud/models/key_rotation_schedule.rb +1 -0
- data/lib/purecloud/models/language.rb +41 -1
- data/lib/purecloud/models/line.rb +1 -1
- data/lib/purecloud/models/line_base.rb +1 -1
- data/lib/purecloud/models/media_policies.rb +169 -0
- data/lib/purecloud/models/media_policy.rb +171 -0
- data/lib/purecloud/models/note.rb +200 -0
- data/lib/purecloud/models/{user_station_resource.rb → note_listing.rb} +68 -58
- data/lib/purecloud/models/o_auth_client.rb +1 -1
- data/lib/purecloud/models/page.rb +2 -2
- data/lib/purecloud/models/{byte_buffer.rb → payment_method.rb} +48 -61
- data/lib/purecloud/models/payment_method_listing.rb +238 -0
- data/lib/purecloud/models/payment_token_provider.rb +180 -0
- data/lib/purecloud/models/phone.rb +1 -1
- data/lib/purecloud/models/phone_base.rb +1 -1
- data/lib/purecloud/models/phone_number.rb +198 -0
- data/lib/purecloud/models/phones_reboot.rb +14 -4
- data/lib/purecloud/models/policy.rb +14 -1
- data/lib/purecloud/models/prediction_results.rb +167 -0
- data/lib/purecloud/models/query_request.rb +16 -4
- data/lib/purecloud/models/queue_member_entity_listing.rb +1 -1
- data/lib/purecloud/models/quote.rb +13 -1
- data/lib/purecloud/models/recording_settings.rb +146 -0
- data/lib/purecloud/models/relationship.rb +201 -0
- data/lib/purecloud/models/relationship_listing.rb +238 -0
- data/lib/purecloud/models/report_schedule.rb +3 -2
- data/lib/purecloud/models/service_type.rb +12 -1
- data/lib/purecloud/models/social_expression.rb +25 -4
- data/lib/purecloud/models/spreadsheet_transform_entity_listing.rb +1 -1
- data/lib/purecloud/models/template.rb +1 -1
- data/lib/purecloud/models/text_table_transform_entity_listing.rb +1 -1
- data/lib/purecloud/models/ticker.rb +158 -0
- data/lib/purecloud/models/time_slot.rb +1 -0
- data/lib/purecloud/models/trunk_base.rb +1 -1
- data/lib/purecloud/models/vendor_connection_request.rb +166 -0
- data/lib/purecloud/models/video.rb +15 -4
- data/lib/purecloud/models/work_item_definition.rb +8 -10
- data/lib/purecloud/version.rb +1 -1
- data/ossindex.json +17 -0
- data/purecloud.gemspec +4 -3
- data/rakefile +3 -15
- data/spec/test.rb +6 -3
- data/swagger.json +1 -1
- data/swagger_template/api_client.mustache +304 -0
- data/swagger_template/base_object.mustache +90 -0
- data/{PureCloud.gemspec → swagger_template/gemspec.mustache} +12 -11
- data/version.json +1 -1
- metadata +76 -25
- data/lib/purecloud/api/analytics_api.rb +0 -1554
- data/lib/purecloud/api/orphaned_recordings_api.rb +0 -205
- data/newVersion.md +0 -1
@@ -74,7 +74,7 @@ module PureCloud
|
|
74
74
|
|
75
75
|
# Custom attribute writer method checking allowed values (enum).
|
76
76
|
def operator=(operator)
|
77
|
-
allowed_values = ["IN", "RANGE", "EQUALS", "NOTEQUALS", "LESSTHAN", "LESSTHANEQUALS", "GREATERTHAN", "GREATERTHANEQUALS"]
|
77
|
+
allowed_values = ["IN", "RANGE", "EQUALS", "NOTEQUALS", "LESSTHAN", "LESSTHANEQUALS", "GREATERTHAN", "GREATERTHANEQUALS", "CONTAINS"]
|
78
78
|
if operator && !allowed_values.include?(operator)
|
79
79
|
fail "invalid value for 'operator', must be one of #{allowed_values}"
|
80
80
|
end
|
@@ -2,21 +2,17 @@ require 'date'
|
|
2
2
|
|
3
3
|
module PureCloud
|
4
4
|
class FlowBodyFormat
|
5
|
-
attr_accessor :
|
5
|
+
attr_accessor :schema_uri
|
6
6
|
|
7
7
|
attr_accessor :description
|
8
8
|
|
9
|
-
attr_accessor :schema_uri
|
10
|
-
|
11
9
|
# Attribute mapping from ruby-style variable name to JSON key.
|
12
10
|
def self.attribute_map
|
13
11
|
{
|
14
12
|
|
15
|
-
:'
|
13
|
+
:'schema_uri' => :'schemaUri',
|
16
14
|
|
17
|
-
:'description' => :'description'
|
18
|
-
|
19
|
-
:'schema_uri' => :'schemaUri'
|
15
|
+
:'description' => :'description'
|
20
16
|
|
21
17
|
}
|
22
18
|
end
|
@@ -24,9 +20,8 @@ module PureCloud
|
|
24
20
|
# Attribute type mapping.
|
25
21
|
def self.swagger_types
|
26
22
|
{
|
27
|
-
:'
|
28
|
-
:'description' => :'String'
|
29
|
-
:'schema_uri' => :'String'
|
23
|
+
:'schema_uri' => :'String',
|
24
|
+
:'description' => :'String'
|
30
25
|
|
31
26
|
}
|
32
27
|
end
|
@@ -38,27 +33,22 @@ module PureCloud
|
|
38
33
|
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
39
34
|
|
40
35
|
|
41
|
-
if attributes[:'
|
42
|
-
self.
|
36
|
+
if attributes[:'schemaUri']
|
37
|
+
self.schema_uri = attributes[:'schemaUri']
|
43
38
|
end
|
44
39
|
|
45
40
|
if attributes[:'description']
|
46
41
|
self.description = attributes[:'description']
|
47
42
|
end
|
48
43
|
|
49
|
-
if attributes[:'schemaUri']
|
50
|
-
self.schema_uri = attributes[:'schemaUri']
|
51
|
-
end
|
52
|
-
|
53
44
|
end
|
54
45
|
|
55
46
|
# Check equality by comparing each attribute.
|
56
47
|
def ==(o)
|
57
48
|
return true if self.equal?(o)
|
58
49
|
self.class == o.class &&
|
59
|
-
|
60
|
-
description == o.description
|
61
|
-
schema_uri == o.schema_uri
|
50
|
+
schema_uri == o.schema_uri &&
|
51
|
+
description == o.description
|
62
52
|
end
|
63
53
|
|
64
54
|
# @see the `==` method
|
@@ -68,7 +58,7 @@ module PureCloud
|
|
68
58
|
|
69
59
|
# Calculate hash code according to all attributes.
|
70
60
|
def hash
|
71
|
-
[
|
61
|
+
[schema_uri, description].hash
|
72
62
|
end
|
73
63
|
|
74
64
|
# build the object from hash
|
@@ -1,20 +1,15 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
module PureCloud
|
4
|
-
# Passed into a terminate command to customize the termination
|
4
|
+
# Passed into a terminate command to customize the termination action.
|
5
5
|
class FlowTerminateRequest
|
6
|
-
#
|
7
|
-
attr_accessor :force
|
8
|
-
|
9
|
-
# Reason for termination.
|
6
|
+
# Reason code for a termination.
|
10
7
|
attr_accessor :reason
|
11
8
|
|
12
9
|
# Attribute mapping from ruby-style variable name to JSON key.
|
13
10
|
def self.attribute_map
|
14
11
|
{
|
15
12
|
|
16
|
-
:'force' => :'force',
|
17
|
-
|
18
13
|
:'reason' => :'reason'
|
19
14
|
|
20
15
|
}
|
@@ -23,7 +18,6 @@ module PureCloud
|
|
23
18
|
# Attribute type mapping.
|
24
19
|
def self.swagger_types
|
25
20
|
{
|
26
|
-
:'force' => :'BOOLEAN',
|
27
21
|
:'reason' => :'String'
|
28
22
|
|
29
23
|
}
|
@@ -36,12 +30,6 @@ module PureCloud
|
|
36
30
|
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
37
31
|
|
38
32
|
|
39
|
-
if attributes[:'force']
|
40
|
-
self.force = attributes[:'force']
|
41
|
-
else
|
42
|
-
self.force = false
|
43
|
-
end
|
44
|
-
|
45
33
|
if attributes[:'reason']
|
46
34
|
self.reason = attributes[:'reason']
|
47
35
|
end
|
@@ -52,7 +40,6 @@ module PureCloud
|
|
52
40
|
def ==(o)
|
53
41
|
return true if self.equal?(o)
|
54
42
|
self.class == o.class &&
|
55
|
-
force == o.force &&
|
56
43
|
reason == o.reason
|
57
44
|
end
|
58
45
|
|
@@ -63,7 +50,7 @@ module PureCloud
|
|
63
50
|
|
64
51
|
# Calculate hash code according to all attributes.
|
65
52
|
def hash
|
66
|
-
[
|
53
|
+
[reason].hash
|
67
54
|
end
|
68
55
|
|
69
56
|
# build the object from hash
|
@@ -0,0 +1,148 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module PureCloud
|
4
|
+
class Form
|
5
|
+
attr_accessor :controls
|
6
|
+
|
7
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
8
|
+
def self.attribute_map
|
9
|
+
{
|
10
|
+
|
11
|
+
:'controls' => :'controls'
|
12
|
+
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
# Attribute type mapping.
|
17
|
+
def self.swagger_types
|
18
|
+
{
|
19
|
+
:'controls' => :'Array<Control>'
|
20
|
+
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(attributes = {})
|
25
|
+
return unless attributes.is_a?(Hash)
|
26
|
+
|
27
|
+
# convert string to symbol for hash key
|
28
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
29
|
+
|
30
|
+
|
31
|
+
if attributes[:'controls']
|
32
|
+
if (value = attributes[:'controls']).is_a?(Array)
|
33
|
+
self.controls = value
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
# Check equality by comparing each attribute.
|
40
|
+
def ==(o)
|
41
|
+
return true if self.equal?(o)
|
42
|
+
self.class == o.class &&
|
43
|
+
controls == o.controls
|
44
|
+
end
|
45
|
+
|
46
|
+
# @see the `==` method
|
47
|
+
def eql?(o)
|
48
|
+
self == o
|
49
|
+
end
|
50
|
+
|
51
|
+
# Calculate hash code according to all attributes.
|
52
|
+
def hash
|
53
|
+
[controls].hash
|
54
|
+
end
|
55
|
+
|
56
|
+
# build the object from hash
|
57
|
+
def build_from_hash(attributes)
|
58
|
+
return nil unless attributes.is_a?(Hash)
|
59
|
+
self.class.swagger_types.each_pair do |key, type|
|
60
|
+
if type =~ /^Array<(.*)>/i
|
61
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
62
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
63
|
+
else
|
64
|
+
#TODO show warning in debug mode
|
65
|
+
end
|
66
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
67
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
68
|
+
else
|
69
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
self
|
74
|
+
end
|
75
|
+
|
76
|
+
def _deserialize(type, value)
|
77
|
+
case type.to_sym
|
78
|
+
when :DateTime
|
79
|
+
DateTime.parse(value)
|
80
|
+
when :Date
|
81
|
+
Date.parse(value)
|
82
|
+
when :String
|
83
|
+
value.to_s
|
84
|
+
when :Integer
|
85
|
+
value.to_i
|
86
|
+
when :Float
|
87
|
+
value.to_f
|
88
|
+
when :BOOLEAN
|
89
|
+
if value =~ /^(true|t|yes|y|1)$/i
|
90
|
+
true
|
91
|
+
else
|
92
|
+
false
|
93
|
+
end
|
94
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
95
|
+
inner_type = Regexp.last_match[:inner_type]
|
96
|
+
value.map { |v| _deserialize(inner_type, v) }
|
97
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
98
|
+
k_type = Regexp.last_match[:k_type]
|
99
|
+
v_type = Regexp.last_match[:v_type]
|
100
|
+
{}.tap do |hash|
|
101
|
+
value.each do |k, v|
|
102
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
else # model
|
106
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
107
|
+
_model.build_from_hash(value)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
def to_s
|
112
|
+
to_hash.to_s
|
113
|
+
end
|
114
|
+
|
115
|
+
# to_body is an alias to to_body (backward compatibility))
|
116
|
+
def to_body
|
117
|
+
to_hash
|
118
|
+
end
|
119
|
+
|
120
|
+
# return the object in the form of hash
|
121
|
+
def to_hash
|
122
|
+
hash = {}
|
123
|
+
self.class.attribute_map.each_pair do |attr, param|
|
124
|
+
value = self.send(attr)
|
125
|
+
next if value.nil?
|
126
|
+
hash[param] = _to_hash(value)
|
127
|
+
end
|
128
|
+
hash
|
129
|
+
end
|
130
|
+
|
131
|
+
# Method to output non-array value in the form of hash
|
132
|
+
# For object, use to_hash. Otherwise, just return the value
|
133
|
+
def _to_hash(value)
|
134
|
+
if value.is_a?(Array)
|
135
|
+
value.compact.map{ |v| _to_hash(v) }
|
136
|
+
elsif value.is_a?(Hash)
|
137
|
+
{}.tap do |hash|
|
138
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
139
|
+
end
|
140
|
+
elsif value.respond_to? :to_hash
|
141
|
+
value.to_hash
|
142
|
+
else
|
143
|
+
value
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
end
|
148
|
+
end
|
@@ -17,6 +17,8 @@ module PureCloud
|
|
17
17
|
|
18
18
|
attr_accessor :group_state
|
19
19
|
|
20
|
+
attr_accessor :version
|
21
|
+
|
20
22
|
# The URI for this object
|
21
23
|
attr_accessor :self_uri
|
22
24
|
|
@@ -38,6 +40,8 @@ module PureCloud
|
|
38
40
|
|
39
41
|
:'group_state' => :'groupState',
|
40
42
|
|
43
|
+
:'version' => :'version',
|
44
|
+
|
41
45
|
:'self_uri' => :'selfUri'
|
42
46
|
|
43
47
|
}
|
@@ -53,6 +57,7 @@ module PureCloud
|
|
53
57
|
:'group_type' => :'String',
|
54
58
|
:'group_images' => :'GroupImages',
|
55
59
|
:'group_state' => :'String',
|
60
|
+
:'version' => :'Float',
|
56
61
|
:'self_uri' => :'String'
|
57
62
|
|
58
63
|
}
|
@@ -93,6 +98,10 @@ module PureCloud
|
|
93
98
|
self.group_state = attributes[:'groupState']
|
94
99
|
end
|
95
100
|
|
101
|
+
if attributes[:'version']
|
102
|
+
self.version = attributes[:'version']
|
103
|
+
end
|
104
|
+
|
96
105
|
if attributes[:'selfUri']
|
97
106
|
self.self_uri = attributes[:'selfUri']
|
98
107
|
end
|
@@ -128,6 +137,7 @@ module PureCloud
|
|
128
137
|
group_type == o.group_type &&
|
129
138
|
group_images == o.group_images &&
|
130
139
|
group_state == o.group_state &&
|
140
|
+
version == o.version &&
|
131
141
|
self_uri == o.self_uri
|
132
142
|
end
|
133
143
|
|
@@ -138,7 +148,7 @@ module PureCloud
|
|
138
148
|
|
139
149
|
# Calculate hash code according to all attributes.
|
140
150
|
def hash
|
141
|
-
[id, name, description, member_count, group_type, group_images, group_state, self_uri].hash
|
151
|
+
[id, name, description, member_count, group_type, group_images, group_state, version, self_uri].hash
|
142
152
|
end
|
143
153
|
|
144
154
|
# build the object from hash
|
@@ -0,0 +1,268 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module PureCloud
|
4
|
+
class HealthCheckInfo
|
5
|
+
# The globally unique identifier for the object.
|
6
|
+
attr_accessor :id
|
7
|
+
|
8
|
+
attr_accessor :name
|
9
|
+
|
10
|
+
# The URI for this object
|
11
|
+
attr_accessor :self_uri
|
12
|
+
|
13
|
+
attr_accessor :build_time
|
14
|
+
|
15
|
+
attr_accessor :build_version
|
16
|
+
|
17
|
+
attr_accessor :build_jdk
|
18
|
+
|
19
|
+
attr_accessor :built_by
|
20
|
+
|
21
|
+
attr_accessor :implementation_build
|
22
|
+
|
23
|
+
attr_accessor :implementation_version
|
24
|
+
|
25
|
+
attr_accessor :status
|
26
|
+
|
27
|
+
attr_accessor :ping_ms
|
28
|
+
|
29
|
+
# Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
30
|
+
attr_accessor :date
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
|
36
|
+
:'id' => :'id',
|
37
|
+
|
38
|
+
:'name' => :'name',
|
39
|
+
|
40
|
+
:'self_uri' => :'selfUri',
|
41
|
+
|
42
|
+
:'build_time' => :'Build-Time',
|
43
|
+
|
44
|
+
:'build_version' => :'Build-Version',
|
45
|
+
|
46
|
+
:'build_jdk' => :'Build-Jdk',
|
47
|
+
|
48
|
+
:'built_by' => :'Built-By',
|
49
|
+
|
50
|
+
:'implementation_build' => :'Implementation-Build',
|
51
|
+
|
52
|
+
:'implementation_version' => :'Implementation-Version',
|
53
|
+
|
54
|
+
:'status' => :'Status',
|
55
|
+
|
56
|
+
:'ping_ms' => :'Ping-Ms',
|
57
|
+
|
58
|
+
:'date' => :'Date'
|
59
|
+
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.swagger_types
|
65
|
+
{
|
66
|
+
:'id' => :'String',
|
67
|
+
:'name' => :'String',
|
68
|
+
:'self_uri' => :'String',
|
69
|
+
:'build_time' => :'String',
|
70
|
+
:'build_version' => :'String',
|
71
|
+
:'build_jdk' => :'String',
|
72
|
+
:'built_by' => :'String',
|
73
|
+
:'implementation_build' => :'String',
|
74
|
+
:'implementation_version' => :'String',
|
75
|
+
:'status' => :'String',
|
76
|
+
:'ping_ms' => :'Integer',
|
77
|
+
:'date' => :'DateTime'
|
78
|
+
|
79
|
+
}
|
80
|
+
end
|
81
|
+
|
82
|
+
def initialize(attributes = {})
|
83
|
+
return unless attributes.is_a?(Hash)
|
84
|
+
|
85
|
+
# convert string to symbol for hash key
|
86
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
87
|
+
|
88
|
+
|
89
|
+
if attributes[:'id']
|
90
|
+
self.id = attributes[:'id']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes[:'name']
|
94
|
+
self.name = attributes[:'name']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes[:'selfUri']
|
98
|
+
self.self_uri = attributes[:'selfUri']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes[:'Build-Time']
|
102
|
+
self.build_time = attributes[:'Build-Time']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes[:'Build-Version']
|
106
|
+
self.build_version = attributes[:'Build-Version']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes[:'Build-Jdk']
|
110
|
+
self.build_jdk = attributes[:'Build-Jdk']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes[:'Built-By']
|
114
|
+
self.built_by = attributes[:'Built-By']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes[:'Implementation-Build']
|
118
|
+
self.implementation_build = attributes[:'Implementation-Build']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes[:'Implementation-Version']
|
122
|
+
self.implementation_version = attributes[:'Implementation-Version']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes[:'Status']
|
126
|
+
self.status = attributes[:'Status']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes[:'Ping-Ms']
|
130
|
+
self.ping_ms = attributes[:'Ping-Ms']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes[:'Date']
|
134
|
+
self.date = attributes[:'Date']
|
135
|
+
end
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
# Custom attribute writer method checking allowed values (enum).
|
140
|
+
def status=(status)
|
141
|
+
allowed_values = ["OK", "CREATED", "ACCEPTED", "NO_CONTENT", "RESET_CONTENT", "PARTIAL_CONTENT", "MOVED_PERMANENTLY", "FOUND", "SEE_OTHER", "NOT_MODIFIED", "USE_PROXY", "TEMPORARY_REDIRECT", "BAD_REQUEST", "UNAUTHORIZED", "PAYMENT_REQUIRED", "FORBIDDEN", "NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "PROXY_AUTHENTICATION_REQUIRED", "REQUEST_TIMEOUT", "CONFLICT", "GONE", "LENGTH_REQUIRED", "PRECONDITION_FAILED", "REQUEST_ENTITY_TOO_LARGE", "REQUEST_URI_TOO_LONG", "UNSUPPORTED_MEDIA_TYPE", "REQUESTED_RANGE_NOT_SATISFIABLE", "EXPECTATION_FAILED", "INTERNAL_SERVER_ERROR", "NOT_IMPLEMENTED", "BAD_GATEWAY", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT", "HTTP_VERSION_NOT_SUPPORTED"]
|
142
|
+
if status && !allowed_values.include?(status)
|
143
|
+
fail "invalid value for 'status', must be one of #{allowed_values}"
|
144
|
+
end
|
145
|
+
@status = status
|
146
|
+
end
|
147
|
+
|
148
|
+
# Check equality by comparing each attribute.
|
149
|
+
def ==(o)
|
150
|
+
return true if self.equal?(o)
|
151
|
+
self.class == o.class &&
|
152
|
+
id == o.id &&
|
153
|
+
name == o.name &&
|
154
|
+
self_uri == o.self_uri &&
|
155
|
+
build_time == o.build_time &&
|
156
|
+
build_version == o.build_version &&
|
157
|
+
build_jdk == o.build_jdk &&
|
158
|
+
built_by == o.built_by &&
|
159
|
+
implementation_build == o.implementation_build &&
|
160
|
+
implementation_version == o.implementation_version &&
|
161
|
+
status == o.status &&
|
162
|
+
ping_ms == o.ping_ms &&
|
163
|
+
date == o.date
|
164
|
+
end
|
165
|
+
|
166
|
+
# @see the `==` method
|
167
|
+
def eql?(o)
|
168
|
+
self == o
|
169
|
+
end
|
170
|
+
|
171
|
+
# Calculate hash code according to all attributes.
|
172
|
+
def hash
|
173
|
+
[id, name, self_uri, build_time, build_version, build_jdk, built_by, implementation_build, implementation_version, status, ping_ms, date].hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# build the object from hash
|
177
|
+
def build_from_hash(attributes)
|
178
|
+
return nil unless attributes.is_a?(Hash)
|
179
|
+
self.class.swagger_types.each_pair do |key, type|
|
180
|
+
if type =~ /^Array<(.*)>/i
|
181
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
182
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
183
|
+
else
|
184
|
+
#TODO show warning in debug mode
|
185
|
+
end
|
186
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
187
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
188
|
+
else
|
189
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
self
|
194
|
+
end
|
195
|
+
|
196
|
+
def _deserialize(type, value)
|
197
|
+
case type.to_sym
|
198
|
+
when :DateTime
|
199
|
+
DateTime.parse(value)
|
200
|
+
when :Date
|
201
|
+
Date.parse(value)
|
202
|
+
when :String
|
203
|
+
value.to_s
|
204
|
+
when :Integer
|
205
|
+
value.to_i
|
206
|
+
when :Float
|
207
|
+
value.to_f
|
208
|
+
when :BOOLEAN
|
209
|
+
if value =~ /^(true|t|yes|y|1)$/i
|
210
|
+
true
|
211
|
+
else
|
212
|
+
false
|
213
|
+
end
|
214
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
215
|
+
inner_type = Regexp.last_match[:inner_type]
|
216
|
+
value.map { |v| _deserialize(inner_type, v) }
|
217
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
218
|
+
k_type = Regexp.last_match[:k_type]
|
219
|
+
v_type = Regexp.last_match[:v_type]
|
220
|
+
{}.tap do |hash|
|
221
|
+
value.each do |k, v|
|
222
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
else # model
|
226
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
227
|
+
_model.build_from_hash(value)
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
def to_s
|
232
|
+
to_hash.to_s
|
233
|
+
end
|
234
|
+
|
235
|
+
# to_body is an alias to to_body (backward compatibility))
|
236
|
+
def to_body
|
237
|
+
to_hash
|
238
|
+
end
|
239
|
+
|
240
|
+
# return the object in the form of hash
|
241
|
+
def to_hash
|
242
|
+
hash = {}
|
243
|
+
self.class.attribute_map.each_pair do |attr, param|
|
244
|
+
value = self.send(attr)
|
245
|
+
next if value.nil?
|
246
|
+
hash[param] = _to_hash(value)
|
247
|
+
end
|
248
|
+
hash
|
249
|
+
end
|
250
|
+
|
251
|
+
# Method to output non-array value in the form of hash
|
252
|
+
# For object, use to_hash. Otherwise, just return the value
|
253
|
+
def _to_hash(value)
|
254
|
+
if value.is_a?(Array)
|
255
|
+
value.compact.map{ |v| _to_hash(v) }
|
256
|
+
elsif value.is_a?(Hash)
|
257
|
+
{}.tap do |hash|
|
258
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
259
|
+
end
|
260
|
+
elsif value.respond_to? :to_hash
|
261
|
+
value.to_hash
|
262
|
+
else
|
263
|
+
value
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
end
|
268
|
+
end
|