incident_io_api 2.30.0 → 2.31.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.
@@ -0,0 +1,245 @@
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 AuditLogReliabilityReviewSettingsUpdatedMetadataV2 < ApiModelBase
18
+ # The users added to those whose pull requests are reviewed, comma separated
19
+ attr_accessor :added_user_ids
20
+
21
+ # Which pushes to a pull request are reviewed after the change (every_push, once_per_pull_request)
22
+ attr_accessor :after_automatic_reviews
23
+
24
+ # Whether draft pull requests are reviewed after the change (review, skip)
25
+ attr_accessor :after_draft_reviews
26
+
27
+ # Whose pull requests are reviewed after the change (everyone, selected_users)
28
+ attr_accessor :after_reviewed_authors
29
+
30
+ # Which pushes to a pull request were reviewed before the change (every_push, once_per_pull_request)
31
+ attr_accessor :before_automatic_reviews
32
+
33
+ # Whether draft pull requests were reviewed before the change (review, skip)
34
+ attr_accessor :before_draft_reviews
35
+
36
+ # Whose pull requests were reviewed before the change (everyone, selected_users)
37
+ attr_accessor :before_reviewed_authors
38
+
39
+ # What the update changed, comma separated (automatic_reviews, draft_reviews, reviewed_authors, reviewed_users)
40
+ attr_accessor :changed
41
+
42
+ # The users removed from those whose pull requests are reviewed, comma separated
43
+ attr_accessor :removed_user_ids
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'added_user_ids' => :'added_user_ids',
49
+ :'after_automatic_reviews' => :'after_automatic_reviews',
50
+ :'after_draft_reviews' => :'after_draft_reviews',
51
+ :'after_reviewed_authors' => :'after_reviewed_authors',
52
+ :'before_automatic_reviews' => :'before_automatic_reviews',
53
+ :'before_draft_reviews' => :'before_draft_reviews',
54
+ :'before_reviewed_authors' => :'before_reviewed_authors',
55
+ :'changed' => :'changed',
56
+ :'removed_user_ids' => :'removed_user_ids'
57
+ }
58
+ end
59
+
60
+ # Returns attribute mapping this model knows about
61
+ def self.acceptable_attribute_map
62
+ attribute_map
63
+ end
64
+
65
+ # Returns all the JSON keys this model knows about
66
+ def self.acceptable_attributes
67
+ acceptable_attribute_map.values
68
+ end
69
+
70
+ # Attribute type mapping.
71
+ def self.openapi_types
72
+ {
73
+ :'added_user_ids' => :'String',
74
+ :'after_automatic_reviews' => :'String',
75
+ :'after_draft_reviews' => :'String',
76
+ :'after_reviewed_authors' => :'String',
77
+ :'before_automatic_reviews' => :'String',
78
+ :'before_draft_reviews' => :'String',
79
+ :'before_reviewed_authors' => :'String',
80
+ :'changed' => :'String',
81
+ :'removed_user_ids' => :'String'
82
+ }
83
+ end
84
+
85
+ # List of attributes with nullable: true
86
+ def self.openapi_nullable
87
+ Set.new([
88
+ ])
89
+ end
90
+
91
+ # Initializes the object
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ def initialize(attributes = {})
94
+ if (!attributes.is_a?(Hash))
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AuditLogReliabilityReviewSettingsUpdatedMetadataV2` initialize method"
96
+ end
97
+
98
+ # check to see if the attribute exists and convert string to symbol for hash key
99
+ acceptable_attribute_map = self.class.acceptable_attribute_map
100
+ attributes = attributes.each_with_object({}) { |(k, v), h|
101
+ if (!acceptable_attribute_map.key?(k.to_sym))
102
+ fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AuditLogReliabilityReviewSettingsUpdatedMetadataV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
103
+ end
104
+ h[k.to_sym] = v
105
+ }
106
+
107
+ if attributes.key?(:'added_user_ids')
108
+ self.added_user_ids = attributes[:'added_user_ids']
109
+ end
110
+
111
+ if attributes.key?(:'after_automatic_reviews')
112
+ self.after_automatic_reviews = attributes[:'after_automatic_reviews']
113
+ end
114
+
115
+ if attributes.key?(:'after_draft_reviews')
116
+ self.after_draft_reviews = attributes[:'after_draft_reviews']
117
+ end
118
+
119
+ if attributes.key?(:'after_reviewed_authors')
120
+ self.after_reviewed_authors = attributes[:'after_reviewed_authors']
121
+ end
122
+
123
+ if attributes.key?(:'before_automatic_reviews')
124
+ self.before_automatic_reviews = attributes[:'before_automatic_reviews']
125
+ end
126
+
127
+ if attributes.key?(:'before_draft_reviews')
128
+ self.before_draft_reviews = attributes[:'before_draft_reviews']
129
+ end
130
+
131
+ if attributes.key?(:'before_reviewed_authors')
132
+ self.before_reviewed_authors = attributes[:'before_reviewed_authors']
133
+ end
134
+
135
+ if attributes.key?(:'changed')
136
+ self.changed = attributes[:'changed']
137
+ else
138
+ self.changed = nil
139
+ end
140
+
141
+ if attributes.key?(:'removed_user_ids')
142
+ self.removed_user_ids = attributes[:'removed_user_ids']
143
+ end
144
+ end
145
+
146
+ # Show invalid properties with the reasons. Usually used together with valid?
147
+ # @return Array for valid properties with the reasons
148
+ def list_invalid_properties
149
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
150
+ invalid_properties = Array.new
151
+ if @changed.nil?
152
+ invalid_properties.push('invalid value for "changed", changed cannot be nil.')
153
+ end
154
+
155
+ invalid_properties
156
+ end
157
+
158
+ # Check to see if the all the properties in the model are valid
159
+ # @return true if the model is valid
160
+ def valid?
161
+ warn '[DEPRECATED] the `valid?` method is obsolete'
162
+ return false if @changed.nil?
163
+ true
164
+ end
165
+
166
+ # Custom attribute writer method with validation
167
+ # @param [Object] changed Value to be assigned
168
+ def changed=(changed)
169
+ if changed.nil?
170
+ fail ArgumentError, 'changed cannot be nil'
171
+ end
172
+
173
+ @changed = changed
174
+ end
175
+
176
+ # Checks equality by comparing each attribute.
177
+ # @param [Object] Object to be compared
178
+ def ==(o)
179
+ return true if self.equal?(o)
180
+ self.class == o.class &&
181
+ added_user_ids == o.added_user_ids &&
182
+ after_automatic_reviews == o.after_automatic_reviews &&
183
+ after_draft_reviews == o.after_draft_reviews &&
184
+ after_reviewed_authors == o.after_reviewed_authors &&
185
+ before_automatic_reviews == o.before_automatic_reviews &&
186
+ before_draft_reviews == o.before_draft_reviews &&
187
+ before_reviewed_authors == o.before_reviewed_authors &&
188
+ changed == o.changed &&
189
+ removed_user_ids == o.removed_user_ids
190
+ end
191
+
192
+ # @see the `==` method
193
+ # @param [Object] Object to be compared
194
+ def eql?(o)
195
+ self == o
196
+ end
197
+
198
+ # Calculates hash code according to all attributes.
199
+ # @return [Integer] Hash code
200
+ def hash
201
+ [added_user_ids, after_automatic_reviews, after_draft_reviews, after_reviewed_authors, before_automatic_reviews, before_draft_reviews, before_reviewed_authors, changed, removed_user_ids].hash
202
+ end
203
+
204
+ # Builds the object from hash
205
+ # @param [Hash] attributes Model attributes in the form of hash
206
+ # @return [Object] Returns the model itself
207
+ def self.build_from_hash(attributes)
208
+ return nil unless attributes.is_a?(Hash)
209
+ attributes = attributes.transform_keys(&:to_sym)
210
+ transformed_hash = {}
211
+ openapi_types.each_pair do |key, type|
212
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
213
+ transformed_hash["#{key}"] = nil
214
+ elsif type =~ /\AArray<(.*)>/i
215
+ # check to ensure the input is an array given that the attribute
216
+ # is documented as an array but the input is not
217
+ if attributes[attribute_map[key]].is_a?(Array)
218
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
219
+ end
220
+ elsif !attributes[attribute_map[key]].nil?
221
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
222
+ end
223
+ end
224
+ new(transformed_hash)
225
+ end
226
+
227
+ # Returns the object in the form of hash
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_hash
230
+ hash = {}
231
+ self.class.attribute_map.each_pair do |attr, param|
232
+ value = self.send(attr)
233
+ if value.nil?
234
+ is_nullable = self.class.openapi_nullable.include?(attr)
235
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
236
+ end
237
+
238
+ hash[param] = _to_hash(value)
239
+ end
240
+ hash
241
+ end
242
+
243
+ end
244
+
245
+ end
@@ -0,0 +1,158 @@
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 AuditLogReliabilityReviewSpendLimitUpdatedMetadataV2 < ApiModelBase
18
+ # The monthly spend limit after the change, in cents. Absent when there is no limit
19
+ attr_accessor :after_spend_limit_cents
20
+
21
+ # The monthly spend limit before the change, in cents. Absent when there was no limit
22
+ attr_accessor :before_spend_limit_cents
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'after_spend_limit_cents' => :'after_spend_limit_cents',
28
+ :'before_spend_limit_cents' => :'before_spend_limit_cents'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'after_spend_limit_cents' => :'String',
46
+ :'before_spend_limit_cents' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AuditLogReliabilityReviewSpendLimitUpdatedMetadataV2` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AuditLogReliabilityReviewSpendLimitUpdatedMetadataV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'after_spend_limit_cents')
73
+ self.after_spend_limit_cents = attributes[:'after_spend_limit_cents']
74
+ end
75
+
76
+ if attributes.key?(:'before_spend_limit_cents')
77
+ self.before_spend_limit_cents = attributes[:'before_spend_limit_cents']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ after_spend_limit_cents == o.after_spend_limit_cents &&
102
+ before_spend_limit_cents == o.before_spend_limit_cents
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [after_spend_limit_cents, before_spend_limit_cents].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ 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`, `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`, `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`, `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`, `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.