incident_io_api 2.43.0 → 2.45.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/status_pages_v2_api.rb +69 -0
- data/lib/incident_io/models/audit_log_telemetry_data_source_access_inheritance_changed_metadata_v2.rb +165 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_access_inheritance_changed_v1.rb +326 -0
- data/lib/incident_io/models/status_page_customer_page_component_v2.rb +256 -0
- data/lib/incident_io/models/status_page_customer_page_group_v2.rb +258 -0
- data/lib/incident_io/models/status_page_customer_page_item_v2.rb +156 -0
- data/lib/incident_io/models/status_page_customer_page_v2.rb +336 -0
- data/lib/incident_io/models/status_pages_show_status_page_customer_page_result_v2.rb +164 -0
- data/lib/incident_io/version.rb +1 -1
- data/lib/incident_io.rb +7 -0
- metadata +9 -2
|
@@ -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
|
|
@@ -0,0 +1,258 @@
|
|
|
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 StatusPageCustomerPageGroupV2 < ApiModelBase
|
|
18
|
+
# Array of components belonging to this group
|
|
19
|
+
attr_accessor :components
|
|
20
|
+
|
|
21
|
+
# A description shown under the group's name
|
|
22
|
+
attr_accessor :description
|
|
23
|
+
|
|
24
|
+
# Whether the page shows uptime aggregated across the group's components
|
|
25
|
+
attr_accessor :display_aggregated_uptime
|
|
26
|
+
|
|
27
|
+
# Unique ID of this component group
|
|
28
|
+
attr_accessor :id
|
|
29
|
+
|
|
30
|
+
# The name of this component group
|
|
31
|
+
attr_accessor :name
|
|
32
|
+
|
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'components' => :'components',
|
|
37
|
+
:'description' => :'description',
|
|
38
|
+
:'display_aggregated_uptime' => :'display_aggregated_uptime',
|
|
39
|
+
:'id' => :'id',
|
|
40
|
+
:'name' => :'name'
|
|
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
|
+
:'components' => :'Array<StatusPageCustomerPageComponentV2>',
|
|
58
|
+
:'description' => :'String',
|
|
59
|
+
:'display_aggregated_uptime' => :'Boolean',
|
|
60
|
+
:'id' => :'String',
|
|
61
|
+
:'name' => :'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::StatusPageCustomerPageGroupV2` 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::StatusPageCustomerPageGroupV2`. 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?(:'components')
|
|
88
|
+
if (value = attributes[:'components']).is_a?(Array)
|
|
89
|
+
self.components = value
|
|
90
|
+
end
|
|
91
|
+
else
|
|
92
|
+
self.components = nil
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'description')
|
|
96
|
+
self.description = attributes[:'description']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'display_aggregated_uptime')
|
|
100
|
+
self.display_aggregated_uptime = attributes[:'display_aggregated_uptime']
|
|
101
|
+
else
|
|
102
|
+
self.display_aggregated_uptime = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'id')
|
|
106
|
+
self.id = attributes[:'id']
|
|
107
|
+
else
|
|
108
|
+
self.id = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'name')
|
|
112
|
+
self.name = attributes[:'name']
|
|
113
|
+
else
|
|
114
|
+
self.name = nil
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
119
|
+
# @return Array for valid properties with the reasons
|
|
120
|
+
def list_invalid_properties
|
|
121
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
122
|
+
invalid_properties = Array.new
|
|
123
|
+
if @components.nil?
|
|
124
|
+
invalid_properties.push('invalid value for "components", components cannot be nil.')
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if @display_aggregated_uptime.nil?
|
|
128
|
+
invalid_properties.push('invalid value for "display_aggregated_uptime", display_aggregated_uptime cannot be nil.')
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if @id.nil?
|
|
132
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if @name.nil?
|
|
136
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
invalid_properties
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Check to see if the all the properties in the model are valid
|
|
143
|
+
# @return true if the model is valid
|
|
144
|
+
def valid?
|
|
145
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
146
|
+
return false if @components.nil?
|
|
147
|
+
return false if @display_aggregated_uptime.nil?
|
|
148
|
+
return false if @id.nil?
|
|
149
|
+
return false if @name.nil?
|
|
150
|
+
true
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Custom attribute writer method with validation
|
|
154
|
+
# @param [Object] components Value to be assigned
|
|
155
|
+
def components=(components)
|
|
156
|
+
if components.nil?
|
|
157
|
+
fail ArgumentError, 'components cannot be nil'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
@components = components
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Custom attribute writer method with validation
|
|
164
|
+
# @param [Object] display_aggregated_uptime Value to be assigned
|
|
165
|
+
def display_aggregated_uptime=(display_aggregated_uptime)
|
|
166
|
+
if display_aggregated_uptime.nil?
|
|
167
|
+
fail ArgumentError, 'display_aggregated_uptime cannot be nil'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@display_aggregated_uptime = display_aggregated_uptime
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] id Value to be assigned
|
|
175
|
+
def id=(id)
|
|
176
|
+
if id.nil?
|
|
177
|
+
fail ArgumentError, 'id cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
@id = id
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method with validation
|
|
184
|
+
# @param [Object] name Value to be assigned
|
|
185
|
+
def name=(name)
|
|
186
|
+
if name.nil?
|
|
187
|
+
fail ArgumentError, 'name cannot be nil'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
@name = name
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Checks equality by comparing each attribute.
|
|
194
|
+
# @param [Object] Object to be compared
|
|
195
|
+
def ==(o)
|
|
196
|
+
return true if self.equal?(o)
|
|
197
|
+
self.class == o.class &&
|
|
198
|
+
components == o.components &&
|
|
199
|
+
description == o.description &&
|
|
200
|
+
display_aggregated_uptime == o.display_aggregated_uptime &&
|
|
201
|
+
id == o.id &&
|
|
202
|
+
name == o.name
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# @see the `==` method
|
|
206
|
+
# @param [Object] Object to be compared
|
|
207
|
+
def eql?(o)
|
|
208
|
+
self == o
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Calculates hash code according to all attributes.
|
|
212
|
+
# @return [Integer] Hash code
|
|
213
|
+
def hash
|
|
214
|
+
[components, description, display_aggregated_uptime, id, name].hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Builds the object from hash
|
|
218
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
219
|
+
# @return [Object] Returns the model itself
|
|
220
|
+
def self.build_from_hash(attributes)
|
|
221
|
+
return nil unless attributes.is_a?(Hash)
|
|
222
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
223
|
+
transformed_hash = {}
|
|
224
|
+
openapi_types.each_pair do |key, type|
|
|
225
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
226
|
+
transformed_hash["#{key}"] = nil
|
|
227
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
228
|
+
# check to ensure the input is an array given that the attribute
|
|
229
|
+
# is documented as an array but the input is not
|
|
230
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
231
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
232
|
+
end
|
|
233
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
234
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
new(transformed_hash)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Returns the object in the form of hash
|
|
241
|
+
# @return [Hash] Returns the object in the form of hash
|
|
242
|
+
def to_hash
|
|
243
|
+
hash = {}
|
|
244
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
245
|
+
value = self.send(attr)
|
|
246
|
+
if value.nil?
|
|
247
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
248
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
hash[param] = _to_hash(value)
|
|
252
|
+
end
|
|
253
|
+
hash
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
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 StatusPageCustomerPageItemV2 < ApiModelBase
|
|
18
|
+
attr_accessor :component
|
|
19
|
+
|
|
20
|
+
attr_accessor :group
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'component' => :'component',
|
|
26
|
+
:'group' => :'group'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'component' => :'StatusPageCustomerPageComponentV2',
|
|
44
|
+
:'group' => :'StatusPageCustomerPageGroupV2'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::StatusPageCustomerPageItemV2` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::StatusPageCustomerPageItemV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'component')
|
|
71
|
+
self.component = attributes[:'component']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'group')
|
|
75
|
+
self.group = attributes[:'group']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
component == o.component &&
|
|
100
|
+
group == o.group
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Integer] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[component, group].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def self.build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
121
|
+
transformed_hash = {}
|
|
122
|
+
openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = nil
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
new(transformed_hash)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the object in the form of hash
|
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
|
140
|
+
def to_hash
|
|
141
|
+
hash = {}
|
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
143
|
+
value = self.send(attr)
|
|
144
|
+
if value.nil?
|
|
145
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
146
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
hash[param] = _to_hash(value)
|
|
150
|
+
end
|
|
151
|
+
hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|