incident_io_api 2.46.0 → 2.48.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/models/audit_log_reliability_review_rule_created_metadata_v2.rb +229 -0
- data/lib/incident_io/models/audit_log_reliability_review_rule_updated_metadata_v2.rb +255 -0
- data/lib/incident_io/models/audit_log_target_v2.rb +1 -1
- data/lib/incident_io/models/audit_logs_escalation_urgency_created_v1.rb +300 -0
- data/lib/incident_io/models/audit_logs_escalation_urgency_deleted_v1.rb +300 -0
- data/lib/incident_io/models/audit_logs_escalation_urgency_updated_v1.rb +300 -0
- data/lib/incident_io/models/audit_logs_reliability_review_rule_created_v1.rb +326 -0
- data/lib/incident_io/models/audit_logs_reliability_review_rule_deleted_v1.rb +300 -0
- data/lib/incident_io/models/audit_logs_reliability_review_rule_updated_v1.rb +326 -0
- data/lib/incident_io/version.rb +1 -1
- data/lib/incident_io.rb +8 -0
- metadata +10 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52fca245c858fd1138928a22ac2c52b3ca300c227b5958ce32fa4dca70b75103
|
|
4
|
+
data.tar.gz: ed8d714c295ecc74b3a9f21daad6091cec8f3d26e2ccaa1b19028ccbb38f6c62
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96a7163fe16fc2b62ae85bd6d7e9a8a7f543285697159b8470b30e675ba3365a6fd4641efa81c72e510bef1c583c8ed05ca6c7d9b7a0a15b43f60092c1d3027e
|
|
7
|
+
data.tar.gz: 3322771ea1aad911cb66dbef9fa302a3ebc2c7a30c3bacceae9a01ef8bc5a45d1675155a3878abefa685dc8e9620ee6eddd4fd0f79fc8a41727e412cb6f5e108
|
|
@@ -0,0 +1,229 @@
|
|
|
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 AuditLogReliabilityReviewRuleCreatedMetadataV2 < ApiModelBase
|
|
18
|
+
# Whether the rule tells the review to look for something or not to raise it (flag, ignore)
|
|
19
|
+
attr_accessor :kind
|
|
20
|
+
|
|
21
|
+
# How the rule came to exist (user, dont_raise_again, remember_reply)
|
|
22
|
+
attr_accessor :origin
|
|
23
|
+
|
|
24
|
+
# The repository the rule applies to
|
|
25
|
+
attr_accessor :repository_id
|
|
26
|
+
|
|
27
|
+
# The rule's severity (high, medium, low). Absent when it has none
|
|
28
|
+
attr_accessor :severity
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'kind' => :'kind',
|
|
34
|
+
:'origin' => :'origin',
|
|
35
|
+
:'repository_id' => :'repository_id',
|
|
36
|
+
:'severity' => :'severity'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'kind' => :'String',
|
|
54
|
+
:'origin' => :'String',
|
|
55
|
+
:'repository_id' => :'String',
|
|
56
|
+
:'severity' => :'String'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AuditLogReliabilityReviewRuleCreatedMetadataV2` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AuditLogReliabilityReviewRuleCreatedMetadataV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'kind')
|
|
83
|
+
self.kind = attributes[:'kind']
|
|
84
|
+
else
|
|
85
|
+
self.kind = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'origin')
|
|
89
|
+
self.origin = attributes[:'origin']
|
|
90
|
+
else
|
|
91
|
+
self.origin = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'repository_id')
|
|
95
|
+
self.repository_id = attributes[:'repository_id']
|
|
96
|
+
else
|
|
97
|
+
self.repository_id = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'severity')
|
|
101
|
+
self.severity = attributes[:'severity']
|
|
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 @kind.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "kind", kind cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @origin.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "origin", origin cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @repository_id.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "repository_id", repository_id cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
invalid_properties
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Check to see if the all the properties in the model are valid
|
|
126
|
+
# @return true if the model is valid
|
|
127
|
+
def valid?
|
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
|
+
return false if @kind.nil?
|
|
130
|
+
return false if @origin.nil?
|
|
131
|
+
return false if @repository_id.nil?
|
|
132
|
+
true
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Custom attribute writer method with validation
|
|
136
|
+
# @param [Object] kind Value to be assigned
|
|
137
|
+
def kind=(kind)
|
|
138
|
+
if kind.nil?
|
|
139
|
+
fail ArgumentError, 'kind cannot be nil'
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
@kind = kind
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] origin Value to be assigned
|
|
147
|
+
def origin=(origin)
|
|
148
|
+
if origin.nil?
|
|
149
|
+
fail ArgumentError, 'origin cannot be nil'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
@origin = origin
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] repository_id Value to be assigned
|
|
157
|
+
def repository_id=(repository_id)
|
|
158
|
+
if repository_id.nil?
|
|
159
|
+
fail ArgumentError, 'repository_id cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@repository_id = repository_id
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Checks equality by comparing each attribute.
|
|
166
|
+
# @param [Object] Object to be compared
|
|
167
|
+
def ==(o)
|
|
168
|
+
return true if self.equal?(o)
|
|
169
|
+
self.class == o.class &&
|
|
170
|
+
kind == o.kind &&
|
|
171
|
+
origin == o.origin &&
|
|
172
|
+
repository_id == o.repository_id &&
|
|
173
|
+
severity == o.severity
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# @see the `==` method
|
|
177
|
+
# @param [Object] Object to be compared
|
|
178
|
+
def eql?(o)
|
|
179
|
+
self == o
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Calculates hash code according to all attributes.
|
|
183
|
+
# @return [Integer] Hash code
|
|
184
|
+
def hash
|
|
185
|
+
[kind, origin, repository_id, severity].hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Builds the object from hash
|
|
189
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
190
|
+
# @return [Object] Returns the model itself
|
|
191
|
+
def self.build_from_hash(attributes)
|
|
192
|
+
return nil unless attributes.is_a?(Hash)
|
|
193
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
194
|
+
transformed_hash = {}
|
|
195
|
+
openapi_types.each_pair do |key, type|
|
|
196
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
197
|
+
transformed_hash["#{key}"] = nil
|
|
198
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
199
|
+
# check to ensure the input is an array given that the attribute
|
|
200
|
+
# is documented as an array but the input is not
|
|
201
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
202
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
203
|
+
end
|
|
204
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
205
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
new(transformed_hash)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Returns the object in the form of hash
|
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
|
213
|
+
def to_hash
|
|
214
|
+
hash = {}
|
|
215
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
216
|
+
value = self.send(attr)
|
|
217
|
+
if value.nil?
|
|
218
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
219
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
hash[param] = _to_hash(value)
|
|
223
|
+
end
|
|
224
|
+
hash
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
@@ -0,0 +1,255 @@
|
|
|
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 AuditLogReliabilityReviewRuleUpdatedMetadataV2 < ApiModelBase
|
|
18
|
+
# The rule's kind after the change (flag, ignore)
|
|
19
|
+
attr_accessor :after_kind
|
|
20
|
+
|
|
21
|
+
# The repository the rule applies to after the change
|
|
22
|
+
attr_accessor :after_repository_id
|
|
23
|
+
|
|
24
|
+
# The rule's severity after the change (high, medium, low). Absent when it has none
|
|
25
|
+
attr_accessor :after_severity
|
|
26
|
+
|
|
27
|
+
# The rule's kind before the change (flag, ignore)
|
|
28
|
+
attr_accessor :before_kind
|
|
29
|
+
|
|
30
|
+
# The repository the rule applied to before the change
|
|
31
|
+
attr_accessor :before_repository_id
|
|
32
|
+
|
|
33
|
+
# The rule's severity before the change (high, medium, low). Absent when it had none
|
|
34
|
+
attr_accessor :before_severity
|
|
35
|
+
|
|
36
|
+
# What the change changed, comma separated (title, body, kind, severity, examples, repository, paths, disabled, locked, restored)
|
|
37
|
+
attr_accessor :changed
|
|
38
|
+
|
|
39
|
+
# Whether the rule is switched off after the change (true, false)
|
|
40
|
+
attr_accessor :disabled
|
|
41
|
+
|
|
42
|
+
# Whether the rule is locked after the change (true, false)
|
|
43
|
+
attr_accessor :locked
|
|
44
|
+
|
|
45
|
+
# The rule that replaced this one, when the change made a new version of it
|
|
46
|
+
attr_accessor :new_rule_id
|
|
47
|
+
|
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
|
+
def self.attribute_map
|
|
50
|
+
{
|
|
51
|
+
:'after_kind' => :'after_kind',
|
|
52
|
+
:'after_repository_id' => :'after_repository_id',
|
|
53
|
+
:'after_severity' => :'after_severity',
|
|
54
|
+
:'before_kind' => :'before_kind',
|
|
55
|
+
:'before_repository_id' => :'before_repository_id',
|
|
56
|
+
:'before_severity' => :'before_severity',
|
|
57
|
+
:'changed' => :'changed',
|
|
58
|
+
:'disabled' => :'disabled',
|
|
59
|
+
:'locked' => :'locked',
|
|
60
|
+
:'new_rule_id' => :'new_rule_id'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Returns attribute mapping this model knows about
|
|
65
|
+
def self.acceptable_attribute_map
|
|
66
|
+
attribute_map
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Returns all the JSON keys this model knows about
|
|
70
|
+
def self.acceptable_attributes
|
|
71
|
+
acceptable_attribute_map.values
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Attribute type mapping.
|
|
75
|
+
def self.openapi_types
|
|
76
|
+
{
|
|
77
|
+
:'after_kind' => :'String',
|
|
78
|
+
:'after_repository_id' => :'String',
|
|
79
|
+
:'after_severity' => :'String',
|
|
80
|
+
:'before_kind' => :'String',
|
|
81
|
+
:'before_repository_id' => :'String',
|
|
82
|
+
:'before_severity' => :'String',
|
|
83
|
+
:'changed' => :'String',
|
|
84
|
+
:'disabled' => :'String',
|
|
85
|
+
:'locked' => :'String',
|
|
86
|
+
:'new_rule_id' => :'String'
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# List of attributes with nullable: true
|
|
91
|
+
def self.openapi_nullable
|
|
92
|
+
Set.new([
|
|
93
|
+
])
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Initializes the object
|
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
98
|
+
def initialize(attributes = {})
|
|
99
|
+
if (!attributes.is_a?(Hash))
|
|
100
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AuditLogReliabilityReviewRuleUpdatedMetadataV2` initialize method"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
104
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
105
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
106
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AuditLogReliabilityReviewRuleUpdatedMetadataV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
108
|
+
end
|
|
109
|
+
h[k.to_sym] = v
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'after_kind')
|
|
113
|
+
self.after_kind = attributes[:'after_kind']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'after_repository_id')
|
|
117
|
+
self.after_repository_id = attributes[:'after_repository_id']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'after_severity')
|
|
121
|
+
self.after_severity = attributes[:'after_severity']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'before_kind')
|
|
125
|
+
self.before_kind = attributes[:'before_kind']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'before_repository_id')
|
|
129
|
+
self.before_repository_id = attributes[:'before_repository_id']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'before_severity')
|
|
133
|
+
self.before_severity = attributes[:'before_severity']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'changed')
|
|
137
|
+
self.changed = attributes[:'changed']
|
|
138
|
+
else
|
|
139
|
+
self.changed = nil
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'disabled')
|
|
143
|
+
self.disabled = attributes[:'disabled']
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'locked')
|
|
147
|
+
self.locked = attributes[:'locked']
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'new_rule_id')
|
|
151
|
+
self.new_rule_id = attributes[:'new_rule_id']
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
156
|
+
# @return Array for valid properties with the reasons
|
|
157
|
+
def list_invalid_properties
|
|
158
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
159
|
+
invalid_properties = Array.new
|
|
160
|
+
if @changed.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "changed", changed cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
invalid_properties
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Check to see if the all the properties in the model are valid
|
|
168
|
+
# @return true if the model is valid
|
|
169
|
+
def valid?
|
|
170
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
171
|
+
return false if @changed.nil?
|
|
172
|
+
true
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Custom attribute writer method with validation
|
|
176
|
+
# @param [Object] changed Value to be assigned
|
|
177
|
+
def changed=(changed)
|
|
178
|
+
if changed.nil?
|
|
179
|
+
fail ArgumentError, 'changed cannot be nil'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
@changed = changed
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Checks equality by comparing each attribute.
|
|
186
|
+
# @param [Object] Object to be compared
|
|
187
|
+
def ==(o)
|
|
188
|
+
return true if self.equal?(o)
|
|
189
|
+
self.class == o.class &&
|
|
190
|
+
after_kind == o.after_kind &&
|
|
191
|
+
after_repository_id == o.after_repository_id &&
|
|
192
|
+
after_severity == o.after_severity &&
|
|
193
|
+
before_kind == o.before_kind &&
|
|
194
|
+
before_repository_id == o.before_repository_id &&
|
|
195
|
+
before_severity == o.before_severity &&
|
|
196
|
+
changed == o.changed &&
|
|
197
|
+
disabled == o.disabled &&
|
|
198
|
+
locked == o.locked &&
|
|
199
|
+
new_rule_id == o.new_rule_id
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# @see the `==` method
|
|
203
|
+
# @param [Object] Object to be compared
|
|
204
|
+
def eql?(o)
|
|
205
|
+
self == o
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Calculates hash code according to all attributes.
|
|
209
|
+
# @return [Integer] Hash code
|
|
210
|
+
def hash
|
|
211
|
+
[after_kind, after_repository_id, after_severity, before_kind, before_repository_id, before_severity, changed, disabled, locked, new_rule_id].hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Builds the object from hash
|
|
215
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
216
|
+
# @return [Object] Returns the model itself
|
|
217
|
+
def self.build_from_hash(attributes)
|
|
218
|
+
return nil unless attributes.is_a?(Hash)
|
|
219
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
220
|
+
transformed_hash = {}
|
|
221
|
+
openapi_types.each_pair do |key, type|
|
|
222
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
223
|
+
transformed_hash["#{key}"] = nil
|
|
224
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
225
|
+
# check to ensure the input is an array given that the attribute
|
|
226
|
+
# is documented as an array but the input is not
|
|
227
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
228
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
229
|
+
end
|
|
230
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
231
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
new(transformed_hash)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Returns the object in the form of hash
|
|
238
|
+
# @return [Hash] Returns the object in the form of hash
|
|
239
|
+
def to_hash
|
|
240
|
+
hash = {}
|
|
241
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
242
|
+
value = self.send(attr)
|
|
243
|
+
if value.nil?
|
|
244
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
245
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
hash[param] = _to_hash(value)
|
|
249
|
+
end
|
|
250
|
+
hash
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
end
|
|
@@ -21,7 +21,7 @@ module IncidentIo
|
|
|
21
21
|
# The name of the target
|
|
22
22
|
attr_accessor :name
|
|
23
23
|
|
|
24
|
-
# The type of target Known values: `api_key`, `alert`, `alert_chat_message_template`, `alert_route`, `alert_schema`, `alert_source`, `alert_priority`, `announcement_rule`, `announcement_post_template`, `catalog_type`, `catalog_entry`, `catalog_attribute`, `connector_config`, `custom_field`, `debrief_invite_rule`, `escalation`, `escalation_path`, `escalation_path_template`, `extension_connector`, `extension_connector_tool`, `extension_plugin`, `glossary_entry`, `investigation_trigger`, `investigation_config`, `code_repository`, `reliability_review_settings`, `follow_up_category`, `follow_up_priority`, `holiday_user_feed`, `hris_time_off_policy`, `incident`, `incident_call_transcription_session`, `incident_call_setting`, `incident_duration_metric`, `incident_template`, `incident_summary_config`, `incident_update_config`, `maintenance_window`, `incident_role`, `incident_status`, `incident_timestamp`, `incident_timestamp_set_by_rule`, `incident_type`, `integration`, `internal_status_page`, `ip_allowlist`, `nudge`, `on_call_notification_method`, `on_call_notification_pause`, `organisation`, `organisation_settings`, `schedule_override`, `schedule_sync_rule`, `schedule_sync_target`, `policy`, `policy_report_schedule`, `post_incident_task`, `postmortem_template`, `postmortem_template_section`, `private_incident_membership`, `rbac_role`, `scim_group`, `schedule`, `team_role`, `secret`, `severity`, `status_page`, `status_page_sub_page`, `status_page_template`, `team_settings`, `telemetry_data_source`, `twilio_connection`, `user`, `user_api_key`, `workflow`, `activity_log`, `timeline_item`, `on_call_upsell_request`
|
|
24
|
+
# The type of target Known values: `api_key`, `alert`, `alert_chat_message_template`, `alert_route`, `alert_schema`, `alert_source`, `alert_priority`, `escalation_urgency`, `announcement_rule`, `announcement_post_template`, `catalog_type`, `catalog_entry`, `catalog_attribute`, `connector_config`, `custom_field`, `debrief_invite_rule`, `escalation`, `escalation_path`, `escalation_path_template`, `extension_connector`, `extension_connector_tool`, `extension_plugin`, `glossary_entry`, `investigation_trigger`, `investigation_config`, `code_repository`, `reliability_review_settings`, `reliability_review_rule`, `follow_up_category`, `follow_up_priority`, `holiday_user_feed`, `hris_time_off_policy`, `incident`, `incident_call_transcription_session`, `incident_call_setting`, `incident_duration_metric`, `incident_template`, `incident_summary_config`, `incident_update_config`, `maintenance_window`, `incident_role`, `incident_status`, `incident_timestamp`, `incident_timestamp_set_by_rule`, `incident_type`, `integration`, `internal_status_page`, `ip_allowlist`, `nudge`, `on_call_notification_method`, `on_call_notification_pause`, `organisation`, `organisation_settings`, `schedule_override`, `schedule_sync_rule`, `schedule_sync_target`, `policy`, `policy_report_schedule`, `post_incident_task`, `postmortem_template`, `postmortem_template_section`, `private_incident_membership`, `rbac_role`, `scim_group`, `schedule`, `team_role`, `secret`, `severity`, `status_page`, `status_page_sub_page`, `status_page_template`, `team_settings`, `telemetry_data_source`, `twilio_connection`, `user`, `user_api_key`, `workflow`, `activity_log`, `timeline_item`, `on_call_upsell_request`
|
|
25
25
|
attr_accessor :type
|
|
26
26
|
|
|
27
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|