incident_io_api 2.44.0 → 2.46.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: 0dab216e25006fdb9aca8297a66d8effef8d014ad6fc455e1cca72e88acffe5c
4
- data.tar.gz: cdd3d18abe870ba37cfe49265523b65f7e8ef90ff526e474719fe6cf4041afaa
3
+ metadata.gz: bb5228e11478074cd49594f7516ac0f8e985f040a424afe33b9a5ec311fadcfd
4
+ data.tar.gz: 4d458b00293d523b2e2f9a5db3b23ce462dfbf955796de9038d93b220d5b7651
5
5
  SHA512:
6
- metadata.gz: d4c2db4b9e289497ef5a8044ad8768014513332863b7b0ee06f4fb58e733956ff8bec3b680faadc6091c3cfd14b018eafd81d5713f7079f973261cf77b8118f6
7
- data.tar.gz: 68d38c3298f983d34804007c02a3eb09ff36b580ea1841d69c28af385362c947ed0555400e05c9928fb8134aa2573c16b760cbcfd5647d4d2f9666bfd74bd7ca
6
+ metadata.gz: fe6b12a64fd0ac52f07d51b69922c892b105807ff3fdec72750ee124d69b059fd6d12f143f7c0770ee6197c2fc9ce01ecc0593cee55a0bde1769bca4ac44f1f5
7
+ data.tar.gz: 1e949679bc2456e89465a4503abb46b35f2b3f5bc1058f2b2abb6c35bcba62165737c3e5e12dd4eaa55332b0209f55edfca4cb05dd83f633bcbe735b360435c5
@@ -825,6 +825,75 @@ module IncidentIo
825
825
  return data, status_code, headers
826
826
  end
827
827
 
828
+ # ShowStatusPageCustomerPage Status Pages V2
829
+ # Show one customer's page on a customer status page: its current status, its components, and the incidents and maintenance windows that customer sees. customer_id is the external_id of the catalog entry that defines the customer's page. That entry belongs to the catalog type the status page is split by. You can't use this endpoint for a customer whose catalog entry has no external_id. This endpoint requires a valid API key but no specific scopes. Responses can be up to 30 seconds old.
830
+ # @param status_page_id [String] ID of the customer status page. You can find this by calling the ListStatusPages endpoint.
831
+ # @param customer_id [String] The external_id of the customer's catalog entry
832
+ # @param [Hash] opts the optional parameters
833
+ # @return [StatusPagesShowStatusPageCustomerPageResultV2]
834
+ def status_pages_v2_show_status_page_customer_page(status_page_id, customer_id, opts = {})
835
+ data, _status_code, _headers = status_pages_v2_show_status_page_customer_page_with_http_info(status_page_id, customer_id, opts)
836
+ data
837
+ end
838
+
839
+ # ShowStatusPageCustomerPage Status Pages V2
840
+ # Show one customer's page on a customer status page: its current status, its components, and the incidents and maintenance windows that customer sees. customer_id is the external_id of the catalog entry that defines the customer's page. That entry belongs to the catalog type the status page is split by. You can't use this endpoint for a customer whose catalog entry has no external_id. This endpoint requires a valid API key but no specific scopes. Responses can be up to 30 seconds old.
841
+ # @param status_page_id [String] ID of the customer status page. You can find this by calling the ListStatusPages endpoint.
842
+ # @param customer_id [String] The external_id of the customer's catalog entry
843
+ # @param [Hash] opts the optional parameters
844
+ # @return [Array<(StatusPagesShowStatusPageCustomerPageResultV2, Integer, Hash)>] StatusPagesShowStatusPageCustomerPageResultV2 data, response status code and response headers
845
+ def status_pages_v2_show_status_page_customer_page_with_http_info(status_page_id, customer_id, opts = {})
846
+ if @api_client.config.debugging
847
+ @api_client.config.logger.debug 'Calling API: StatusPagesV2Api.status_pages_v2_show_status_page_customer_page ...'
848
+ end
849
+ # verify the required parameter 'status_page_id' is set
850
+ if @api_client.config.client_side_validation && status_page_id.nil?
851
+ fail ArgumentError, "Missing the required parameter 'status_page_id' when calling StatusPagesV2Api.status_pages_v2_show_status_page_customer_page"
852
+ end
853
+ # verify the required parameter 'customer_id' is set
854
+ if @api_client.config.client_side_validation && customer_id.nil?
855
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling StatusPagesV2Api.status_pages_v2_show_status_page_customer_page"
856
+ end
857
+ # resource path
858
+ local_var_path = '/v2/status_pages/{status_page_id}/customers/{customer_id}'.sub('{status_page_id}', CGI.escape(status_page_id.to_s)).sub('{customer_id}', CGI.escape(customer_id.to_s))
859
+
860
+ # query parameters
861
+ query_params = opts[:query_params] || {}
862
+
863
+ # header parameters
864
+ header_params = opts[:header_params] || {}
865
+ # HTTP header 'Accept' (if needed)
866
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
867
+
868
+ # form parameters
869
+ form_params = opts[:form_params] || {}
870
+
871
+ # http body (model)
872
+ post_body = opts[:debug_body]
873
+
874
+ # return_type
875
+ return_type = opts[:debug_return_type] || 'StatusPagesShowStatusPageCustomerPageResultV2'
876
+
877
+ # auth_names
878
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
879
+
880
+ new_options = opts.merge(
881
+ :operation => :"StatusPagesV2Api.status_pages_v2_show_status_page_customer_page",
882
+ :header_params => header_params,
883
+ :query_params => query_params,
884
+ :form_params => form_params,
885
+ :body => post_body,
886
+ :auth_names => auth_names,
887
+ :return_type => return_type
888
+ )
889
+
890
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
891
+ if @api_client.config.debugging
892
+ @api_client.config.logger.debug "API called: StatusPagesV2Api#status_pages_v2_show_status_page_customer_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
893
+ end
894
+ return data, status_code, headers
895
+ end
896
+
828
897
  # ShowStatusPageIncident Status Pages V2
829
898
  # Show a status page incident. This endpoint requires a valid API key but no specific scopes.
830
899
  # @param status_page_incident_id [String] ID of the status page incident
@@ -24,6 +24,9 @@ module IncidentIo
24
24
  # Whether draft pull requests are reviewed after the change (review, skip)
25
25
  attr_accessor :after_draft_reviews
26
26
 
27
+ # Whether a review that finds no issues posts a comment after the change (post, skip)
28
+ attr_accessor :after_no_issue_reviews
29
+
27
30
  # Whose pull requests are reviewed after the change (everyone, selected_users)
28
31
  attr_accessor :after_reviewed_authors
29
32
 
@@ -33,10 +36,13 @@ module IncidentIo
33
36
  # Whether draft pull requests were reviewed before the change (review, skip)
34
37
  attr_accessor :before_draft_reviews
35
38
 
39
+ # Whether a review that found no issues posted a comment before the change (post, skip)
40
+ attr_accessor :before_no_issue_reviews
41
+
36
42
  # Whose pull requests were reviewed before the change (everyone, selected_users)
37
43
  attr_accessor :before_reviewed_authors
38
44
 
39
- # What the update changed, comma separated (automatic_reviews, draft_reviews, reviewed_authors, reviewed_users)
45
+ # What the update changed, comma separated (automatic_reviews, draft_reviews, no_issue_reviews, reviewed_authors, reviewed_users)
40
46
  attr_accessor :changed
41
47
 
42
48
  # The users removed from those whose pull requests are reviewed, comma separated
@@ -48,9 +54,11 @@ module IncidentIo
48
54
  :'added_user_ids' => :'added_user_ids',
49
55
  :'after_automatic_reviews' => :'after_automatic_reviews',
50
56
  :'after_draft_reviews' => :'after_draft_reviews',
57
+ :'after_no_issue_reviews' => :'after_no_issue_reviews',
51
58
  :'after_reviewed_authors' => :'after_reviewed_authors',
52
59
  :'before_automatic_reviews' => :'before_automatic_reviews',
53
60
  :'before_draft_reviews' => :'before_draft_reviews',
61
+ :'before_no_issue_reviews' => :'before_no_issue_reviews',
54
62
  :'before_reviewed_authors' => :'before_reviewed_authors',
55
63
  :'changed' => :'changed',
56
64
  :'removed_user_ids' => :'removed_user_ids'
@@ -73,9 +81,11 @@ module IncidentIo
73
81
  :'added_user_ids' => :'String',
74
82
  :'after_automatic_reviews' => :'String',
75
83
  :'after_draft_reviews' => :'String',
84
+ :'after_no_issue_reviews' => :'String',
76
85
  :'after_reviewed_authors' => :'String',
77
86
  :'before_automatic_reviews' => :'String',
78
87
  :'before_draft_reviews' => :'String',
88
+ :'before_no_issue_reviews' => :'String',
79
89
  :'before_reviewed_authors' => :'String',
80
90
  :'changed' => :'String',
81
91
  :'removed_user_ids' => :'String'
@@ -116,6 +126,10 @@ module IncidentIo
116
126
  self.after_draft_reviews = attributes[:'after_draft_reviews']
117
127
  end
118
128
 
129
+ if attributes.key?(:'after_no_issue_reviews')
130
+ self.after_no_issue_reviews = attributes[:'after_no_issue_reviews']
131
+ end
132
+
119
133
  if attributes.key?(:'after_reviewed_authors')
120
134
  self.after_reviewed_authors = attributes[:'after_reviewed_authors']
121
135
  end
@@ -128,6 +142,10 @@ module IncidentIo
128
142
  self.before_draft_reviews = attributes[:'before_draft_reviews']
129
143
  end
130
144
 
145
+ if attributes.key?(:'before_no_issue_reviews')
146
+ self.before_no_issue_reviews = attributes[:'before_no_issue_reviews']
147
+ end
148
+
131
149
  if attributes.key?(:'before_reviewed_authors')
132
150
  self.before_reviewed_authors = attributes[:'before_reviewed_authors']
133
151
  end
@@ -181,9 +199,11 @@ module IncidentIo
181
199
  added_user_ids == o.added_user_ids &&
182
200
  after_automatic_reviews == o.after_automatic_reviews &&
183
201
  after_draft_reviews == o.after_draft_reviews &&
202
+ after_no_issue_reviews == o.after_no_issue_reviews &&
184
203
  after_reviewed_authors == o.after_reviewed_authors &&
185
204
  before_automatic_reviews == o.before_automatic_reviews &&
186
205
  before_draft_reviews == o.before_draft_reviews &&
206
+ before_no_issue_reviews == o.before_no_issue_reviews &&
187
207
  before_reviewed_authors == o.before_reviewed_authors &&
188
208
  changed == o.changed &&
189
209
  removed_user_ids == o.removed_user_ids
@@ -198,7 +218,7 @@ module IncidentIo
198
218
  # Calculates hash code according to all attributes.
199
219
  # @return [Integer] Hash code
200
220
  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
221
+ [added_user_ids, after_automatic_reviews, after_draft_reviews, after_no_issue_reviews, after_reviewed_authors, before_automatic_reviews, before_draft_reviews, before_no_issue_reviews, before_reviewed_authors, changed, removed_user_ids].hash
202
222
  end
203
223
 
204
224
  # Builds the object from hash
@@ -16,7 +16,7 @@ require 'time'
16
16
  module IncidentIo
17
17
  # Availability of a status page component over a requested time window.
18
18
  class StatusPageComponentAvailabilityV2 < ApiModelBase
19
- # Availability over the window as a percentage, floored (for example \"99.94\"). Omitted when we have no data covering the window.
19
+ # Availability over the window as a percentage, floored (for example \"99.94\"). It has at least as many decimal places as the status page's uptime decimal places setting. Above 99.99%, it can have more decimal places, up to six. Omitted when we have no data covering the window.
20
20
  attr_accessor :availability_percent
21
21
 
22
22
  # ID of the component. This may be found by calling the ShowStatusPageStructure endpoint.
@@ -0,0 +1,256 @@
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 StatusPageCustomerPageComponentV2 < ApiModelBase
18
+ # The ID of this component. Incidents and maintenance windows refer to components by this ID.
19
+ attr_accessor :component_id
20
+
21
+ # A description shown under the component's name, if it has one
22
+ attr_accessor :description
23
+
24
+ # Whether the page shows this component's uptime
25
+ attr_accessor :display_uptime
26
+
27
+ # The name of this component
28
+ attr_accessor :name
29
+
30
+ # The current status of this component Known values: `operational`, `under_maintenance`, `degraded_performance`, `partial_outage`, `full_outage`
31
+ attr_accessor :status
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'component_id' => :'component_id',
37
+ :'description' => :'description',
38
+ :'display_uptime' => :'display_uptime',
39
+ :'name' => :'name',
40
+ :'status' => :'status'
41
+ }
42
+ end
43
+
44
+ # Returns attribute mapping this model knows about
45
+ def self.acceptable_attribute_map
46
+ attribute_map
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ acceptable_attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'component_id' => :'String',
58
+ :'description' => :'String',
59
+ :'display_uptime' => :'Boolean',
60
+ :'name' => :'String',
61
+ :'status' => :'String'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::StatusPageCustomerPageComponentV2` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::StatusPageCustomerPageComponentV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'component_id')
88
+ self.component_id = attributes[:'component_id']
89
+ else
90
+ self.component_id = nil
91
+ end
92
+
93
+ if attributes.key?(:'description')
94
+ self.description = attributes[:'description']
95
+ end
96
+
97
+ if attributes.key?(:'display_uptime')
98
+ self.display_uptime = attributes[:'display_uptime']
99
+ else
100
+ self.display_uptime = nil
101
+ end
102
+
103
+ if attributes.key?(:'name')
104
+ self.name = attributes[:'name']
105
+ else
106
+ self.name = nil
107
+ end
108
+
109
+ if attributes.key?(:'status')
110
+ self.status = attributes[:'status']
111
+ else
112
+ self.status = nil
113
+ end
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properties with the reasons
118
+ def list_invalid_properties
119
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
120
+ invalid_properties = Array.new
121
+ if @component_id.nil?
122
+ invalid_properties.push('invalid value for "component_id", component_id cannot be nil.')
123
+ end
124
+
125
+ if @display_uptime.nil?
126
+ invalid_properties.push('invalid value for "display_uptime", display_uptime cannot be nil.')
127
+ end
128
+
129
+ if @name.nil?
130
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
131
+ end
132
+
133
+ if @status.nil?
134
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
135
+ end
136
+
137
+ invalid_properties
138
+ end
139
+
140
+ # Check to see if the all the properties in the model are valid
141
+ # @return true if the model is valid
142
+ def valid?
143
+ warn '[DEPRECATED] the `valid?` method is obsolete'
144
+ return false if @component_id.nil?
145
+ return false if @display_uptime.nil?
146
+ return false if @name.nil?
147
+ return false if @status.nil?
148
+ true
149
+ end
150
+
151
+ # Custom attribute writer method with validation
152
+ # @param [Object] component_id Value to be assigned
153
+ def component_id=(component_id)
154
+ if component_id.nil?
155
+ fail ArgumentError, 'component_id cannot be nil'
156
+ end
157
+
158
+ @component_id = component_id
159
+ end
160
+
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] display_uptime Value to be assigned
163
+ def display_uptime=(display_uptime)
164
+ if display_uptime.nil?
165
+ fail ArgumentError, 'display_uptime cannot be nil'
166
+ end
167
+
168
+ @display_uptime = display_uptime
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] name Value to be assigned
173
+ def name=(name)
174
+ if name.nil?
175
+ fail ArgumentError, 'name cannot be nil'
176
+ end
177
+
178
+ @name = name
179
+ end
180
+
181
+ # Custom attribute writer method with validation
182
+ # @param [Object] status Value to be assigned
183
+ def status=(status)
184
+ if status.nil?
185
+ fail ArgumentError, 'status cannot be nil'
186
+ end
187
+
188
+ @status = status
189
+ end
190
+
191
+ # Checks equality by comparing each attribute.
192
+ # @param [Object] Object to be compared
193
+ def ==(o)
194
+ return true if self.equal?(o)
195
+ self.class == o.class &&
196
+ component_id == o.component_id &&
197
+ description == o.description &&
198
+ display_uptime == o.display_uptime &&
199
+ name == o.name &&
200
+ status == o.status
201
+ end
202
+
203
+ # @see the `==` method
204
+ # @param [Object] Object to be compared
205
+ def eql?(o)
206
+ self == o
207
+ end
208
+
209
+ # Calculates hash code according to all attributes.
210
+ # @return [Integer] Hash code
211
+ def hash
212
+ [component_id, description, display_uptime, name, status].hash
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def self.build_from_hash(attributes)
219
+ return nil unless attributes.is_a?(Hash)
220
+ attributes = attributes.transform_keys(&:to_sym)
221
+ transformed_hash = {}
222
+ openapi_types.each_pair do |key, type|
223
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
224
+ transformed_hash["#{key}"] = nil
225
+ elsif type =~ /\AArray<(.*)>/i
226
+ # check to ensure the input is an array given that the attribute
227
+ # is documented as an array but the input is not
228
+ if attributes[attribute_map[key]].is_a?(Array)
229
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
230
+ end
231
+ elsif !attributes[attribute_map[key]].nil?
232
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
233
+ end
234
+ end
235
+ new(transformed_hash)
236
+ end
237
+
238
+ # Returns the object in the form of hash
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_hash
241
+ hash = {}
242
+ self.class.attribute_map.each_pair do |attr, param|
243
+ value = self.send(attr)
244
+ if value.nil?
245
+ is_nullable = self.class.openapi_nullable.include?(attr)
246
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
247
+ end
248
+
249
+ hash[param] = _to_hash(value)
250
+ end
251
+ hash
252
+ end
253
+
254
+ end
255
+
256
+ end