incident_io_api 2.71.0 → 2.72.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/lib/incident_io/api/incident_participant_workloads_v2_api.rb +80 -0
- data/lib/incident_io/models/incident_participant_workload_hour_v2.rb +244 -0
- data/lib/incident_io/models/incident_participant_workloads_list_hours_result_v2.rb +218 -0
- data/lib/incident_io/version.rb +1 -1
- data/lib/incident_io.rb +2 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e785f60eb22c2bd5b8989009c1dfd88268824b1825c5e8411dc22c43676e7c65
|
|
4
|
+
data.tar.gz: e0449698e2bdc9b40c07a97b7ceb7ea8171af459dfeae6d9c3d1a5d9e5a81e2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b7862257b504fa73177666ba2561a26d0d183dc3460c7a279693a7d4fc04302c99dca51b845fed73d23b53e7137ddb3bada258c47f3dccc1ab6560dad5181dc
|
|
7
|
+
data.tar.gz: dfcdb2315faee4ac80d94075c50a1a22d1e095da5c8a48354e5904d9af2744a79a9761e868147b7493ab086931b48be99a6b1976b0d2d93ac0ea2fa1261bed8a
|
|
@@ -82,5 +82,85 @@ module IncidentIo
|
|
|
82
82
|
end
|
|
83
83
|
return data, status_code, headers
|
|
84
84
|
end
|
|
85
|
+
|
|
86
|
+
# ListHours IncidentParticipantWorkloads V2
|
|
87
|
+
# List each user's workload on each incident, hour by hour, newest first. Each row is the time one user spent on one incident in one hour. Sum the rows to get any total you need, such as the time each person spent on incidents last month. Rows come newest first. To cover a period, set `before` to its end, then follow `pagination_meta.after` until you reach rows older than its start. A page can hold fewer rows than `page_size`, so keep following `after` until it is absent. Workload is calculated periodically, so values can lag real time and the most recent period may still be filling. The metadata reports the time the figures are calculated up to. Workload on private incidents is only included for API keys with the `incident_workloads.view.private_incidents` scope.
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @option opts [Integer] :page_size Integer number of records to return (default to 25)
|
|
90
|
+
# @option opts [String] :after The cursor from a previous response's `pagination_meta.after`. Returns the rows older than that page.
|
|
91
|
+
# @option opts [Time] :before Only return hours that start before this time
|
|
92
|
+
# @option opts [String] :incident_id Only return workload on this incident
|
|
93
|
+
# @option opts [String] :user_id Only return workload for this user
|
|
94
|
+
# @return [IncidentParticipantWorkloadsListHoursResultV2]
|
|
95
|
+
def incident_participant_workloads_v2_list_hours(opts = {})
|
|
96
|
+
data, _status_code, _headers = incident_participant_workloads_v2_list_hours_with_http_info(opts)
|
|
97
|
+
data
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# ListHours IncidentParticipantWorkloads V2
|
|
101
|
+
# List each user's workload on each incident, hour by hour, newest first. Each row is the time one user spent on one incident in one hour. Sum the rows to get any total you need, such as the time each person spent on incidents last month. Rows come newest first. To cover a period, set `before` to its end, then follow `pagination_meta.after` until you reach rows older than its start. A page can hold fewer rows than `page_size`, so keep following `after` until it is absent. Workload is calculated periodically, so values can lag real time and the most recent period may still be filling. The metadata reports the time the figures are calculated up to. Workload on private incidents is only included for API keys with the `incident_workloads.view.private_incidents` scope.
|
|
102
|
+
# @param [Hash] opts the optional parameters
|
|
103
|
+
# @option opts [Integer] :page_size Integer number of records to return (default to 25)
|
|
104
|
+
# @option opts [String] :after The cursor from a previous response's `pagination_meta.after`. Returns the rows older than that page.
|
|
105
|
+
# @option opts [Time] :before Only return hours that start before this time
|
|
106
|
+
# @option opts [String] :incident_id Only return workload on this incident
|
|
107
|
+
# @option opts [String] :user_id Only return workload for this user
|
|
108
|
+
# @return [Array<(IncidentParticipantWorkloadsListHoursResultV2, Integer, Hash)>] IncidentParticipantWorkloadsListHoursResultV2 data, response status code and response headers
|
|
109
|
+
def incident_participant_workloads_v2_list_hours_with_http_info(opts = {})
|
|
110
|
+
if @api_client.config.debugging
|
|
111
|
+
@api_client.config.logger.debug 'Calling API: IncidentParticipantWorkloadsV2Api.incident_participant_workloads_v2_list_hours ...'
|
|
112
|
+
end
|
|
113
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 250
|
|
114
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IncidentParticipantWorkloadsV2Api.incident_participant_workloads_v2_list_hours, must be smaller than or equal to 250.'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
118
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IncidentParticipantWorkloadsV2Api.incident_participant_workloads_v2_list_hours, must be greater than or equal to 1.'
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# resource path
|
|
122
|
+
local_var_path = '/v2/incident_participant_workload_hours'
|
|
123
|
+
|
|
124
|
+
# query parameters
|
|
125
|
+
query_params = opts[:query_params] || {}
|
|
126
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
127
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
128
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
129
|
+
query_params[:'incident_id'] = opts[:'incident_id'] if !opts[:'incident_id'].nil?
|
|
130
|
+
query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
|
131
|
+
|
|
132
|
+
# header parameters
|
|
133
|
+
header_params = opts[:header_params] || {}
|
|
134
|
+
# HTTP header 'Accept' (if needed)
|
|
135
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
136
|
+
|
|
137
|
+
# form parameters
|
|
138
|
+
form_params = opts[:form_params] || {}
|
|
139
|
+
|
|
140
|
+
# http body (model)
|
|
141
|
+
post_body = opts[:debug_body]
|
|
142
|
+
|
|
143
|
+
# return_type
|
|
144
|
+
return_type = opts[:debug_return_type] || 'IncidentParticipantWorkloadsListHoursResultV2'
|
|
145
|
+
|
|
146
|
+
# auth_names
|
|
147
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
148
|
+
|
|
149
|
+
new_options = opts.merge(
|
|
150
|
+
:operation => :"IncidentParticipantWorkloadsV2Api.incident_participant_workloads_v2_list_hours",
|
|
151
|
+
:header_params => header_params,
|
|
152
|
+
:query_params => query_params,
|
|
153
|
+
:form_params => form_params,
|
|
154
|
+
:body => post_body,
|
|
155
|
+
:auth_names => auth_names,
|
|
156
|
+
:return_type => return_type
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
160
|
+
if @api_client.config.debugging
|
|
161
|
+
@api_client.config.logger.debug "API called: IncidentParticipantWorkloadsV2Api#incident_participant_workloads_v2_list_hours\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
162
|
+
end
|
|
163
|
+
return data, status_code, headers
|
|
164
|
+
end
|
|
85
165
|
end
|
|
86
166
|
end
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#incident.io
|
|
3
|
+
|
|
4
|
+
#Ruby client for the incident.io API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module IncidentIo
|
|
17
|
+
class IncidentParticipantWorkloadHourV2 < ApiModelBase
|
|
18
|
+
# The start of the hour this workload is for
|
|
19
|
+
attr_accessor :activity_hour
|
|
20
|
+
|
|
21
|
+
# The incident the user worked on
|
|
22
|
+
attr_accessor :incident_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :user
|
|
25
|
+
|
|
26
|
+
attr_accessor :workload
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'activity_hour' => :'activity_hour',
|
|
32
|
+
:'incident_id' => :'incident_id',
|
|
33
|
+
:'user' => :'user',
|
|
34
|
+
:'workload' => :'workload'
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns attribute mapping this model knows about
|
|
39
|
+
def self.acceptable_attribute_map
|
|
40
|
+
attribute_map
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
|
44
|
+
def self.acceptable_attributes
|
|
45
|
+
acceptable_attribute_map.values
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
def self.openapi_types
|
|
50
|
+
{
|
|
51
|
+
:'activity_hour' => :'Time',
|
|
52
|
+
:'incident_id' => :'String',
|
|
53
|
+
:'user' => :'UserV2',
|
|
54
|
+
:'workload' => :'WorkloadMinutesV2'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# List of attributes with nullable: true
|
|
59
|
+
def self.openapi_nullable
|
|
60
|
+
Set.new([
|
|
61
|
+
])
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::IncidentParticipantWorkloadHourV2` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::IncidentParticipantWorkloadHourV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'activity_hour')
|
|
81
|
+
self.activity_hour = attributes[:'activity_hour']
|
|
82
|
+
else
|
|
83
|
+
self.activity_hour = nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'incident_id')
|
|
87
|
+
self.incident_id = attributes[:'incident_id']
|
|
88
|
+
else
|
|
89
|
+
self.incident_id = nil
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'user')
|
|
93
|
+
self.user = attributes[:'user']
|
|
94
|
+
else
|
|
95
|
+
self.user = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'workload')
|
|
99
|
+
self.workload = attributes[:'workload']
|
|
100
|
+
else
|
|
101
|
+
self.workload = nil
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
if @activity_hour.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "activity_hour", activity_hour cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @incident_id.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "incident_id", incident_id cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @user.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "user", user cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @workload.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "workload", workload cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
invalid_properties
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Check to see if the all the properties in the model are valid
|
|
130
|
+
# @return true if the model is valid
|
|
131
|
+
def valid?
|
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
133
|
+
return false if @activity_hour.nil?
|
|
134
|
+
return false if @incident_id.nil?
|
|
135
|
+
return false if @user.nil?
|
|
136
|
+
return false if @workload.nil?
|
|
137
|
+
true
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Custom attribute writer method with validation
|
|
141
|
+
# @param [Object] activity_hour Value to be assigned
|
|
142
|
+
def activity_hour=(activity_hour)
|
|
143
|
+
if activity_hour.nil?
|
|
144
|
+
fail ArgumentError, 'activity_hour cannot be nil'
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
@activity_hour = activity_hour
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Custom attribute writer method with validation
|
|
151
|
+
# @param [Object] incident_id Value to be assigned
|
|
152
|
+
def incident_id=(incident_id)
|
|
153
|
+
if incident_id.nil?
|
|
154
|
+
fail ArgumentError, 'incident_id cannot be nil'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
@incident_id = incident_id
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Custom attribute writer method with validation
|
|
161
|
+
# @param [Object] user Value to be assigned
|
|
162
|
+
def user=(user)
|
|
163
|
+
if user.nil?
|
|
164
|
+
fail ArgumentError, 'user cannot be nil'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
@user = user
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Custom attribute writer method with validation
|
|
171
|
+
# @param [Object] workload Value to be assigned
|
|
172
|
+
def workload=(workload)
|
|
173
|
+
if workload.nil?
|
|
174
|
+
fail ArgumentError, 'workload cannot be nil'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
@workload = workload
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Checks equality by comparing each attribute.
|
|
181
|
+
# @param [Object] Object to be compared
|
|
182
|
+
def ==(o)
|
|
183
|
+
return true if self.equal?(o)
|
|
184
|
+
self.class == o.class &&
|
|
185
|
+
activity_hour == o.activity_hour &&
|
|
186
|
+
incident_id == o.incident_id &&
|
|
187
|
+
user == o.user &&
|
|
188
|
+
workload == o.workload
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# @see the `==` method
|
|
192
|
+
# @param [Object] Object to be compared
|
|
193
|
+
def eql?(o)
|
|
194
|
+
self == o
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Calculates hash code according to all attributes.
|
|
198
|
+
# @return [Integer] Hash code
|
|
199
|
+
def hash
|
|
200
|
+
[activity_hour, incident_id, user, workload].hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Builds the object from hash
|
|
204
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
205
|
+
# @return [Object] Returns the model itself
|
|
206
|
+
def self.build_from_hash(attributes)
|
|
207
|
+
return nil unless attributes.is_a?(Hash)
|
|
208
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
209
|
+
transformed_hash = {}
|
|
210
|
+
openapi_types.each_pair do |key, type|
|
|
211
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
212
|
+
transformed_hash["#{key}"] = nil
|
|
213
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
214
|
+
# check to ensure the input is an array given that the attribute
|
|
215
|
+
# is documented as an array but the input is not
|
|
216
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
217
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
218
|
+
end
|
|
219
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
220
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
new(transformed_hash)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Returns the object in the form of hash
|
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
|
228
|
+
def to_hash
|
|
229
|
+
hash = {}
|
|
230
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
231
|
+
value = self.send(attr)
|
|
232
|
+
if value.nil?
|
|
233
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
234
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
hash[param] = _to_hash(value)
|
|
238
|
+
end
|
|
239
|
+
hash
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
end
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#incident.io
|
|
3
|
+
|
|
4
|
+
#Ruby client for the incident.io API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module IncidentIo
|
|
17
|
+
class IncidentParticipantWorkloadsListHoursResultV2 < ApiModelBase
|
|
18
|
+
attr_accessor :incident_participant_workload_hours
|
|
19
|
+
|
|
20
|
+
attr_accessor :metadata
|
|
21
|
+
|
|
22
|
+
attr_accessor :pagination_meta
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'incident_participant_workload_hours' => :'incident_participant_workload_hours',
|
|
28
|
+
:'metadata' => :'metadata',
|
|
29
|
+
:'pagination_meta' => :'pagination_meta'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'incident_participant_workload_hours' => :'Array<IncidentParticipantWorkloadHourV2>',
|
|
47
|
+
:'metadata' => :'WorkloadMetadataV2',
|
|
48
|
+
:'pagination_meta' => :'PaginationMetaResultV2'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
+
def initialize(attributes = {})
|
|
61
|
+
if (!attributes.is_a?(Hash))
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::IncidentParticipantWorkloadsListHoursResultV2` initialize method"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::IncidentParticipantWorkloadsListHoursResultV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
|
+
end
|
|
71
|
+
h[k.to_sym] = v
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'incident_participant_workload_hours')
|
|
75
|
+
if (value = attributes[:'incident_participant_workload_hours']).is_a?(Array)
|
|
76
|
+
self.incident_participant_workload_hours = value
|
|
77
|
+
end
|
|
78
|
+
else
|
|
79
|
+
self.incident_participant_workload_hours = nil
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'metadata')
|
|
83
|
+
self.metadata = attributes[:'metadata']
|
|
84
|
+
else
|
|
85
|
+
self.metadata = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'pagination_meta')
|
|
89
|
+
self.pagination_meta = attributes[:'pagination_meta']
|
|
90
|
+
else
|
|
91
|
+
self.pagination_meta = nil
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
+
invalid_properties = Array.new
|
|
100
|
+
if @incident_participant_workload_hours.nil?
|
|
101
|
+
invalid_properties.push('invalid value for "incident_participant_workload_hours", incident_participant_workload_hours cannot be nil.')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if @metadata.nil?
|
|
105
|
+
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if @pagination_meta.nil?
|
|
109
|
+
invalid_properties.push('invalid value for "pagination_meta", pagination_meta cannot be nil.')
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
invalid_properties
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Check to see if the all the properties in the model are valid
|
|
116
|
+
# @return true if the model is valid
|
|
117
|
+
def valid?
|
|
118
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
119
|
+
return false if @incident_participant_workload_hours.nil?
|
|
120
|
+
return false if @metadata.nil?
|
|
121
|
+
return false if @pagination_meta.nil?
|
|
122
|
+
true
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Custom attribute writer method with validation
|
|
126
|
+
# @param [Object] incident_participant_workload_hours Value to be assigned
|
|
127
|
+
def incident_participant_workload_hours=(incident_participant_workload_hours)
|
|
128
|
+
if incident_participant_workload_hours.nil?
|
|
129
|
+
fail ArgumentError, 'incident_participant_workload_hours cannot be nil'
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
@incident_participant_workload_hours = incident_participant_workload_hours
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Custom attribute writer method with validation
|
|
136
|
+
# @param [Object] metadata Value to be assigned
|
|
137
|
+
def metadata=(metadata)
|
|
138
|
+
if metadata.nil?
|
|
139
|
+
fail ArgumentError, 'metadata cannot be nil'
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
@metadata = metadata
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] pagination_meta Value to be assigned
|
|
147
|
+
def pagination_meta=(pagination_meta)
|
|
148
|
+
if pagination_meta.nil?
|
|
149
|
+
fail ArgumentError, 'pagination_meta cannot be nil'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
@pagination_meta = pagination_meta
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Checks equality by comparing each attribute.
|
|
156
|
+
# @param [Object] Object to be compared
|
|
157
|
+
def ==(o)
|
|
158
|
+
return true if self.equal?(o)
|
|
159
|
+
self.class == o.class &&
|
|
160
|
+
incident_participant_workload_hours == o.incident_participant_workload_hours &&
|
|
161
|
+
metadata == o.metadata &&
|
|
162
|
+
pagination_meta == o.pagination_meta
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# @see the `==` method
|
|
166
|
+
# @param [Object] Object to be compared
|
|
167
|
+
def eql?(o)
|
|
168
|
+
self == o
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Calculates hash code according to all attributes.
|
|
172
|
+
# @return [Integer] Hash code
|
|
173
|
+
def hash
|
|
174
|
+
[incident_participant_workload_hours, metadata, pagination_meta].hash
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Builds the object from hash
|
|
178
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
179
|
+
# @return [Object] Returns the model itself
|
|
180
|
+
def self.build_from_hash(attributes)
|
|
181
|
+
return nil unless attributes.is_a?(Hash)
|
|
182
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
183
|
+
transformed_hash = {}
|
|
184
|
+
openapi_types.each_pair do |key, type|
|
|
185
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
186
|
+
transformed_hash["#{key}"] = nil
|
|
187
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
188
|
+
# check to ensure the input is an array given that the attribute
|
|
189
|
+
# is documented as an array but the input is not
|
|
190
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
191
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
192
|
+
end
|
|
193
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
194
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
new(transformed_hash)
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Returns the object in the form of hash
|
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
|
202
|
+
def to_hash
|
|
203
|
+
hash = {}
|
|
204
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
205
|
+
value = self.send(attr)
|
|
206
|
+
if value.nil?
|
|
207
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
208
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
hash[param] = _to_hash(value)
|
|
212
|
+
end
|
|
213
|
+
hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
data/lib/incident_io/version.rb
CHANGED
data/lib/incident_io.rb
CHANGED
|
@@ -1085,7 +1085,9 @@ IncidentIo.autoload :IncidentMembershipsCreatePayloadV1, 'incident_io/models/inc
|
|
|
1085
1085
|
IncidentIo.autoload :IncidentMembershipsCreateResultV1, 'incident_io/models/incident_memberships_create_result_v1'
|
|
1086
1086
|
IncidentIo.autoload :IncidentMembershipsRevokePayloadV1, 'incident_io/models/incident_memberships_revoke_payload_v1'
|
|
1087
1087
|
IncidentIo.autoload :IncidentParticipantV2, 'incident_io/models/incident_participant_v2'
|
|
1088
|
+
IncidentIo.autoload :IncidentParticipantWorkloadHourV2, 'incident_io/models/incident_participant_workload_hour_v2'
|
|
1088
1089
|
IncidentIo.autoload :IncidentParticipantWorkloadV2, 'incident_io/models/incident_participant_workload_v2'
|
|
1090
|
+
IncidentIo.autoload :IncidentParticipantWorkloadsListHoursResultV2, 'incident_io/models/incident_participant_workloads_list_hours_result_v2'
|
|
1089
1091
|
IncidentIo.autoload :IncidentParticipantWorkloadsListResultV2, 'incident_io/models/incident_participant_workloads_list_result_v2'
|
|
1090
1092
|
IncidentIo.autoload :IncidentParticipantsListResultV2, 'incident_io/models/incident_participants_list_result_v2'
|
|
1091
1093
|
IncidentIo.autoload :IncidentParticipantsV2, 'incident_io/models/incident_participants_v2'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: incident_io_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.72.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- incident.io
|
|
@@ -1207,7 +1207,9 @@ files:
|
|
|
1207
1207
|
- lib/incident_io/models/incident_memberships_create_result_v1.rb
|
|
1208
1208
|
- lib/incident_io/models/incident_memberships_revoke_payload_v1.rb
|
|
1209
1209
|
- lib/incident_io/models/incident_participant_v2.rb
|
|
1210
|
+
- lib/incident_io/models/incident_participant_workload_hour_v2.rb
|
|
1210
1211
|
- lib/incident_io/models/incident_participant_workload_v2.rb
|
|
1212
|
+
- lib/incident_io/models/incident_participant_workloads_list_hours_result_v2.rb
|
|
1211
1213
|
- lib/incident_io/models/incident_participant_workloads_list_result_v2.rb
|
|
1212
1214
|
- lib/incident_io/models/incident_participants_list_result_v2.rb
|
|
1213
1215
|
- lib/incident_io/models/incident_participants_v2.rb
|