incident_io_api 2.7.0 → 2.8.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,175 @@
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 StatusPageComponentsUpdatePayloadV2 < ApiModelBase
18
+ # Optional short description of this component
19
+ attr_accessor :description
20
+
21
+ # Human-readable name for the component
22
+ attr_accessor :name
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'description' => :'description',
28
+ :'name' => :'name'
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
+ :'description' => :'String',
46
+ :'name' => :'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::StatusPageComponentsUpdatePayloadV2` 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::StatusPageComponentsUpdatePayloadV2`. 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?(:'description')
73
+ self.description = attributes[:'description']
74
+ end
75
+
76
+ if attributes.key?(:'name')
77
+ self.name = attributes[:'name']
78
+ else
79
+ self.name = nil
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ if @name.nil?
89
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ return false if @name.nil?
100
+ true
101
+ end
102
+
103
+ # Custom attribute writer method with validation
104
+ # @param [Object] name Value to be assigned
105
+ def name=(name)
106
+ if name.nil?
107
+ fail ArgumentError, 'name cannot be nil'
108
+ end
109
+
110
+ @name = name
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ description == o.description &&
119
+ name == o.name
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [description, name].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ attributes = attributes.transform_keys(&:to_sym)
140
+ transformed_hash = {}
141
+ openapi_types.each_pair do |key, type|
142
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = nil
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[attribute_map[key]].is_a?(Array)
148
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
+ end
150
+ elsif !attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
+ end
153
+ end
154
+ new(transformed_hash)
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ if value.nil?
164
+ is_nullable = self.class.openapi_nullable.include?(attr)
165
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
166
+ end
167
+
168
+ hash[param] = _to_hash(value)
169
+ end
170
+ hash
171
+ end
172
+
173
+ end
174
+
175
+ end
@@ -0,0 +1,164 @@
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 StatusPageComponentsUpdateResultV2 < ApiModelBase
18
+ attr_accessor :status_page_component
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'status_page_component' => :'status_page_component'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'status_page_component' => :'StatusPageComponentV2'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::StatusPageComponentsUpdateResultV2` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::StatusPageComponentsUpdateResultV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'status_page_component')
67
+ self.status_page_component = attributes[:'status_page_component']
68
+ else
69
+ self.status_page_component = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @status_page_component.nil?
79
+ invalid_properties.push('invalid value for "status_page_component", status_page_component cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @status_page_component.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] status_page_component Value to be assigned
95
+ def status_page_component=(status_page_component)
96
+ if status_page_component.nil?
97
+ fail ArgumentError, 'status_page_component cannot be nil'
98
+ end
99
+
100
+ @status_page_component = status_page_component
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ status_page_component == o.status_page_component
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [status_page_component].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -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 = "2.7.0"
7
+ VERSION = "2.8.0"
8
8
  end
data/lib/incident_io.rb CHANGED
@@ -1069,6 +1069,13 @@ IncidentIo.autoload :SeveritiesUpdateResultV1, 'incident_io/models/severities_up
1069
1069
  IncidentIo.autoload :SeverityV1, 'incident_io/models/severity_v1'
1070
1070
  IncidentIo.autoload :SeverityV2, 'incident_io/models/severity_v2'
1071
1071
  IncidentIo.autoload :StatusPageComponentAvailabilityV2, 'incident_io/models/status_page_component_availability_v2'
1072
+ IncidentIo.autoload :StatusPageComponentV2, 'incident_io/models/status_page_component_v2'
1073
+ IncidentIo.autoload :StatusPageComponentsCreatePayloadV2, 'incident_io/models/status_page_components_create_payload_v2'
1074
+ IncidentIo.autoload :StatusPageComponentsCreateResultV2, 'incident_io/models/status_page_components_create_result_v2'
1075
+ IncidentIo.autoload :StatusPageComponentsListResultV2, 'incident_io/models/status_page_components_list_result_v2'
1076
+ IncidentIo.autoload :StatusPageComponentsShowResultV2, 'incident_io/models/status_page_components_show_result_v2'
1077
+ IncidentIo.autoload :StatusPageComponentsUpdatePayloadV2, 'incident_io/models/status_page_components_update_payload_v2'
1078
+ IncidentIo.autoload :StatusPageComponentsUpdateResultV2, 'incident_io/models/status_page_components_update_result_v2'
1072
1079
  IncidentIo.autoload :StatusPageIncidentAffectedComponentV2, 'incident_io/models/status_page_incident_affected_component_v2'
1073
1080
  IncidentIo.autoload :StatusPageIncidentComponentImpactV2, 'incident_io/models/status_page_incident_component_impact_v2'
1074
1081
  IncidentIo.autoload :StatusPageIncidentUpdateV2, 'incident_io/models/status_page_incident_update_v2'
@@ -1257,6 +1264,7 @@ IncidentIo.autoload :ScheduleSyncTargetsV2Api, 'incident_io/api/schedule_sync_ta
1257
1264
  IncidentIo.autoload :SchedulesV2Api, 'incident_io/api/schedules_v2_api'
1258
1265
  IncidentIo.autoload :SecretsV2Api, 'incident_io/api/secrets_v2_api'
1259
1266
  IncidentIo.autoload :SeveritiesV1Api, 'incident_io/api/severities_v1_api'
1267
+ IncidentIo.autoload :StatusPageComponentsV2Api, 'incident_io/api/status_page_components_v2_api'
1260
1268
  IncidentIo.autoload :StatusPagesV1Api, 'incident_io/api/status_pages_v1_api'
1261
1269
  IncidentIo.autoload :StatusPagesV2Api, 'incident_io/api/status_pages_v2_api'
1262
1270
  IncidentIo.autoload :TeamsV3Api, 'incident_io/api/teams_v3_api'
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: 2.7.0
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - incident.io
@@ -129,6 +129,7 @@ files:
129
129
  - lib/incident_io/api/schedules_v2_api.rb
130
130
  - lib/incident_io/api/secrets_v2_api.rb
131
131
  - lib/incident_io/api/severities_v1_api.rb
132
+ - lib/incident_io/api/status_page_components_v2_api.rb
132
133
  - lib/incident_io/api/status_pages_v1_api.rb
133
134
  - lib/incident_io/api/status_pages_v2_api.rb
134
135
  - lib/incident_io/api/teams_v3_api.rb
@@ -1191,6 +1192,13 @@ files:
1191
1192
  - lib/incident_io/models/severity_v1.rb
1192
1193
  - lib/incident_io/models/severity_v2.rb
1193
1194
  - lib/incident_io/models/status_page_component_availability_v2.rb
1195
+ - lib/incident_io/models/status_page_component_v2.rb
1196
+ - lib/incident_io/models/status_page_components_create_payload_v2.rb
1197
+ - lib/incident_io/models/status_page_components_create_result_v2.rb
1198
+ - lib/incident_io/models/status_page_components_list_result_v2.rb
1199
+ - lib/incident_io/models/status_page_components_show_result_v2.rb
1200
+ - lib/incident_io/models/status_page_components_update_payload_v2.rb
1201
+ - lib/incident_io/models/status_page_components_update_result_v2.rb
1194
1202
  - lib/incident_io/models/status_page_incident_affected_component_v2.rb
1195
1203
  - lib/incident_io/models/status_page_incident_component_impact_v2.rb
1196
1204
  - lib/incident_io/models/status_page_incident_update_v2.rb