incident_io_api 4.3.0 → 4.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a39ce175b39db8e12600a0159dac23bb68ff3677109638ea13f63b1844870e1
4
- data.tar.gz: 34200ffe6efa21e113bbc132baffe00fe227cffcd828d4b954dc123a8cf2fe51
3
+ metadata.gz: 6c94010a30cdf346d38c38fbf489db60a82f510f08d6864229e5a0b4c1923485
4
+ data.tar.gz: 116b7da09c94583e01b576fab68463c644ad72e42b18d3322f208bfcc291d1a1
5
5
  SHA512:
6
- metadata.gz: 9884d360bb7a557e3d02a3f90739ca153d3fe6a6b2bc5c783425d50ffcce3467747e06c1ea999fd9f5ae1139b5a0f63b950c1afa4edce016549b6e3599e0ea42
7
- data.tar.gz: fc2f384d09767951ba677da0ddacce1c5c2b60f8518e5ad5b764856223fb1370bb4f40da2e12b4af146c6399cb94b398a3e4a8a8354bee8798fecb1d3e674c2e
6
+ metadata.gz: d2fadfb74cde2b89ed03eaf1202bf6be513da4ce25c3d8a3a15086d9a962be5b2b4033652b1db5be7d7bc466ebd784833471165a94a7c4c72cc60b4d314847e9
7
+ data.tar.gz: 8aee8c0c6288ec757f548179ef5202615ac42e66b0a2115929d0019a5d00b190a1882a96b788f7a7a3f7719a361b240c0b3d4ac3d63b9625f508c3c647274236
@@ -0,0 +1,165 @@
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 AlertSourceAlertmanagerOptionsV2 < ApiModelBase
18
+ # Whether to create one alert per evaluation group or one alert per series within a group
19
+ attr_accessor :one_alert_per_group
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'one_alert_per_group' => :'one_alert_per_group'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'one_alert_per_group' => :'Boolean'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AlertSourceAlertmanagerOptionsV2` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AlertSourceAlertmanagerOptionsV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'one_alert_per_group')
68
+ self.one_alert_per_group = attributes[:'one_alert_per_group']
69
+ else
70
+ self.one_alert_per_group = true
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if @one_alert_per_group.nil?
80
+ invalid_properties.push('invalid value for "one_alert_per_group", one_alert_per_group cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @one_alert_per_group.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] one_alert_per_group Value to be assigned
96
+ def one_alert_per_group=(one_alert_per_group)
97
+ if one_alert_per_group.nil?
98
+ fail ArgumentError, 'one_alert_per_group cannot be nil'
99
+ end
100
+
101
+ @one_alert_per_group = one_alert_per_group
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ one_alert_per_group == o.one_alert_per_group
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [one_alert_per_group].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -18,6 +18,8 @@ module IncidentIo
18
18
  # URL that can be used to send alert events to this source. This is only set for sources that accept webhook/HTTP events; email sources use the email_address field, and integration-based sources (like Jira) receive events through their native integrations.
19
19
  attr_accessor :alert_events_url
20
20
 
21
+ attr_accessor :alertmanager_options
22
+
21
23
  # Whether alerts from this source keep counting down to auto-resolve while attached to an incident. Defaults to true. Has no effect without auto_resolve_timeout_minutes.
22
24
  attr_accessor :auto_resolve_incident_alerts
23
25
 
@@ -63,6 +65,7 @@ module IncidentIo
63
65
  def self.attribute_map
64
66
  {
65
67
  :'alert_events_url' => :'alert_events_url',
68
+ :'alertmanager_options' => :'alertmanager_options',
66
69
  :'auto_resolve_incident_alerts' => :'auto_resolve_incident_alerts',
67
70
  :'auto_resolve_timeout_minutes' => :'auto_resolve_timeout_minutes',
68
71
  :'azure_devops_options' => :'azure_devops_options',
@@ -96,6 +99,7 @@ module IncidentIo
96
99
  def self.openapi_types
97
100
  {
98
101
  :'alert_events_url' => :'String',
102
+ :'alertmanager_options' => :'AlertSourceAlertmanagerOptionsV2',
99
103
  :'auto_resolve_incident_alerts' => :'Boolean',
100
104
  :'auto_resolve_timeout_minutes' => :'Integer',
101
105
  :'azure_devops_options' => :'AlertSourceAzureDevopsOptionsV2',
@@ -141,6 +145,10 @@ module IncidentIo
141
145
  self.alert_events_url = attributes[:'alert_events_url']
142
146
  end
143
147
 
148
+ if attributes.key?(:'alertmanager_options')
149
+ self.alertmanager_options = attributes[:'alertmanager_options']
150
+ end
151
+
144
152
  if attributes.key?(:'auto_resolve_incident_alerts')
145
153
  self.auto_resolve_incident_alerts = attributes[:'auto_resolve_incident_alerts']
146
154
  end
@@ -299,6 +307,7 @@ module IncidentIo
299
307
  return true if self.equal?(o)
300
308
  self.class == o.class &&
301
309
  alert_events_url == o.alert_events_url &&
310
+ alertmanager_options == o.alertmanager_options &&
302
311
  auto_resolve_incident_alerts == o.auto_resolve_incident_alerts &&
303
312
  auto_resolve_timeout_minutes == o.auto_resolve_timeout_minutes &&
304
313
  azure_devops_options == o.azure_devops_options &&
@@ -326,7 +335,7 @@ module IncidentIo
326
335
  # Calculates hash code according to all attributes.
327
336
  # @return [Integer] Hash code
328
337
  def hash
329
- [alert_events_url, auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, id, jira_options, name, owning_team_ids, rate_limit_sharding, secret_token, source_type, template].hash
338
+ [alert_events_url, alertmanager_options, auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, id, jira_options, name, owning_team_ids, rate_limit_sharding, secret_token, source_type, template].hash
330
339
  end
331
340
 
332
341
  # Builds the object from hash
@@ -15,6 +15,8 @@ require 'time'
15
15
 
16
16
  module IncidentIo
17
17
  class AlertSourcesCreatePayloadV2 < ApiModelBase
18
+ attr_accessor :alertmanager_options
19
+
18
20
  # Whether alerts from this source keep counting down to auto-resolve while attached to an incident. Defaults to true. Has no effect without auto_resolve_timeout_minutes.
19
21
  attr_accessor :auto_resolve_incident_alerts
20
22
 
@@ -53,6 +55,7 @@ module IncidentIo
53
55
  # Attribute mapping from ruby-style variable name to JSON key.
54
56
  def self.attribute_map
55
57
  {
58
+ :'alertmanager_options' => :'alertmanager_options',
56
59
  :'auto_resolve_incident_alerts' => :'auto_resolve_incident_alerts',
57
60
  :'auto_resolve_timeout_minutes' => :'auto_resolve_timeout_minutes',
58
61
  :'azure_devops_options' => :'azure_devops_options',
@@ -83,6 +86,7 @@ module IncidentIo
83
86
  # Attribute type mapping.
84
87
  def self.openapi_types
85
88
  {
89
+ :'alertmanager_options' => :'AlertSourceAlertmanagerOptionsV2',
86
90
  :'auto_resolve_incident_alerts' => :'Boolean',
87
91
  :'auto_resolve_timeout_minutes' => :'Integer',
88
92
  :'azure_devops_options' => :'AlertSourceAzureDevopsOptionsV2',
@@ -122,6 +126,10 @@ module IncidentIo
122
126
  h[k.to_sym] = v
123
127
  }
124
128
 
129
+ if attributes.key?(:'alertmanager_options')
130
+ self.alertmanager_options = attributes[:'alertmanager_options']
131
+ end
132
+
125
133
  if attributes.key?(:'auto_resolve_incident_alerts')
126
134
  self.auto_resolve_incident_alerts = attributes[:'auto_resolve_incident_alerts']
127
135
  end
@@ -254,6 +262,7 @@ module IncidentIo
254
262
  def ==(o)
255
263
  return true if self.equal?(o)
256
264
  self.class == o.class &&
265
+ alertmanager_options == o.alertmanager_options &&
257
266
  auto_resolve_incident_alerts == o.auto_resolve_incident_alerts &&
258
267
  auto_resolve_timeout_minutes == o.auto_resolve_timeout_minutes &&
259
268
  azure_devops_options == o.azure_devops_options &&
@@ -279,7 +288,7 @@ module IncidentIo
279
288
  # Calculates hash code according to all attributes.
280
289
  # @return [Integer] Hash code
281
290
  def hash
282
- [auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, jira_options, name, owning_team_ids, rate_limit_sharding, source_type, template].hash
291
+ [alertmanager_options, auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, jira_options, name, owning_team_ids, rate_limit_sharding, source_type, template].hash
283
292
  end
284
293
 
285
294
  # Builds the object from hash
@@ -15,6 +15,8 @@ require 'time'
15
15
 
16
16
  module IncidentIo
17
17
  class AlertSourcesUpdatePayloadV2 < ApiModelBase
18
+ attr_accessor :alertmanager_options
19
+
18
20
  # Whether alerts from this source keep counting down to auto-resolve while attached to an incident. Defaults to true. Has no effect without auto_resolve_timeout_minutes.
19
21
  attr_accessor :auto_resolve_incident_alerts
20
22
 
@@ -53,6 +55,7 @@ module IncidentIo
53
55
  # Attribute mapping from ruby-style variable name to JSON key.
54
56
  def self.attribute_map
55
57
  {
58
+ :'alertmanager_options' => :'alertmanager_options',
56
59
  :'auto_resolve_incident_alerts' => :'auto_resolve_incident_alerts',
57
60
  :'auto_resolve_timeout_minutes' => :'auto_resolve_timeout_minutes',
58
61
  :'azure_devops_options' => :'azure_devops_options',
@@ -83,6 +86,7 @@ module IncidentIo
83
86
  # Attribute type mapping.
84
87
  def self.openapi_types
85
88
  {
89
+ :'alertmanager_options' => :'AlertSourceAlertmanagerOptionsV2',
86
90
  :'auto_resolve_incident_alerts' => :'Boolean',
87
91
  :'auto_resolve_timeout_minutes' => :'Integer',
88
92
  :'azure_devops_options' => :'AlertSourceAzureDevopsOptionsV2',
@@ -122,6 +126,10 @@ module IncidentIo
122
126
  h[k.to_sym] = v
123
127
  }
124
128
 
129
+ if attributes.key?(:'alertmanager_options')
130
+ self.alertmanager_options = attributes[:'alertmanager_options']
131
+ end
132
+
125
133
  if attributes.key?(:'auto_resolve_incident_alerts')
126
134
  self.auto_resolve_incident_alerts = attributes[:'auto_resolve_incident_alerts']
127
135
  end
@@ -237,6 +245,7 @@ module IncidentIo
237
245
  def ==(o)
238
246
  return true if self.equal?(o)
239
247
  self.class == o.class &&
248
+ alertmanager_options == o.alertmanager_options &&
240
249
  auto_resolve_incident_alerts == o.auto_resolve_incident_alerts &&
241
250
  auto_resolve_timeout_minutes == o.auto_resolve_timeout_minutes &&
242
251
  azure_devops_options == o.azure_devops_options &&
@@ -262,7 +271,7 @@ module IncidentIo
262
271
  # Calculates hash code according to all attributes.
263
272
  # @return [Integer] Hash code
264
273
  def hash
265
- [auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, disabled, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, jira_options, name, owning_team_ids, rate_limit_sharding, template].hash
274
+ [alertmanager_options, auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, disabled, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, jira_options, name, owning_team_ids, rate_limit_sharding, template].hash
266
275
  end
267
276
 
268
277
  # Builds the object from hash
@@ -4,5 +4,5 @@ module IncidentIo
4
4
  # The release workflow sets this before building, so it tracks whatever we
5
5
  # last published. Listed in .openapi-generator-ignore so regeneration can't
6
6
  # reset it.
7
- VERSION = "4.3.0"
7
+ VERSION = "4.4.0"
8
8
  end
data/lib/incident_io.rb CHANGED
@@ -187,6 +187,7 @@ IncidentIo.autoload :AlertRulesShowResultV3, 'incident_io/models/alert_rules_sho
187
187
  IncidentIo.autoload :AlertRulesUpdatePayloadV3, 'incident_io/models/alert_rules_update_payload_v3'
188
188
  IncidentIo.autoload :AlertRulesUpdateResultV3, 'incident_io/models/alert_rules_update_result_v3'
189
189
  IncidentIo.autoload :AlertSlimV2, 'incident_io/models/alert_slim_v2'
190
+ IncidentIo.autoload :AlertSourceAlertmanagerOptionsV2, 'incident_io/models/alert_source_alertmanager_options_v2'
190
191
  IncidentIo.autoload :AlertSourceAzureDevopsOptionsV2, 'incident_io/models/alert_source_azure_devops_options_v2'
191
192
  IncidentIo.autoload :AlertSourceEmailOptionsPayloadV2, 'incident_io/models/alert_source_email_options_payload_v2'
192
193
  IncidentIo.autoload :AlertSourceEmailOptionsV2, 'incident_io/models/alert_source_email_options_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: 4.3.0
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - incident.io
@@ -306,6 +306,7 @@ files:
306
306
  - lib/incident_io/models/alert_rules_update_payload_v3.rb
307
307
  - lib/incident_io/models/alert_rules_update_result_v3.rb
308
308
  - lib/incident_io/models/alert_slim_v2.rb
309
+ - lib/incident_io/models/alert_source_alertmanager_options_v2.rb
309
310
  - lib/incident_io/models/alert_source_azure_devops_options_v2.rb
310
311
  - lib/incident_io/models/alert_source_email_options_payload_v2.rb
311
312
  - lib/incident_io/models/alert_source_email_options_v2.rb