incident_io_api 2.22.0 → 2.24.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,319 @@
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
+ # A glossary entry is one term an organisation has coined — an acronym, a service name, or a piece of internal jargon — and the description of what it means. AI features use the glossary, in rank order, so they understand those terms. Lower ranks come first. Deleting an entry archives it, which frees the term so it can be coined again as a new entry.
18
+ class GlossaryEntryV2 < ApiModelBase
19
+ # When the entry was created
20
+ attr_accessor :created_at
21
+
22
+ # What the term means
23
+ attr_accessor :description
24
+
25
+ # Unique identifier for this glossary entry
26
+ attr_accessor :id
27
+
28
+ # The term, e.g. an acronym or service name
29
+ attr_accessor :item
30
+
31
+ # The entry's position in the glossary
32
+ attr_accessor :rank
33
+
34
+ # When the entry was last updated
35
+ attr_accessor :updated_at
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'created_at' => :'created_at',
41
+ :'description' => :'description',
42
+ :'id' => :'id',
43
+ :'item' => :'item',
44
+ :'rank' => :'rank',
45
+ :'updated_at' => :'updated_at'
46
+ }
47
+ end
48
+
49
+ # Returns attribute mapping this model knows about
50
+ def self.acceptable_attribute_map
51
+ attribute_map
52
+ end
53
+
54
+ # Returns all the JSON keys this model knows about
55
+ def self.acceptable_attributes
56
+ acceptable_attribute_map.values
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.openapi_types
61
+ {
62
+ :'created_at' => :'Time',
63
+ :'description' => :'String',
64
+ :'id' => :'String',
65
+ :'item' => :'String',
66
+ :'rank' => :'Integer',
67
+ :'updated_at' => :'Time'
68
+ }
69
+ end
70
+
71
+ # List of attributes with nullable: true
72
+ def self.openapi_nullable
73
+ Set.new([
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::GlossaryEntryV2` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ acceptable_attribute_map = self.class.acceptable_attribute_map
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!acceptable_attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::GlossaryEntryV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'created_at')
94
+ self.created_at = attributes[:'created_at']
95
+ else
96
+ self.created_at = nil
97
+ end
98
+
99
+ if attributes.key?(:'description')
100
+ self.description = attributes[:'description']
101
+ else
102
+ self.description = 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?(:'item')
112
+ self.item = attributes[:'item']
113
+ else
114
+ self.item = nil
115
+ end
116
+
117
+ if attributes.key?(:'rank')
118
+ self.rank = attributes[:'rank']
119
+ else
120
+ self.rank = nil
121
+ end
122
+
123
+ if attributes.key?(:'updated_at')
124
+ self.updated_at = attributes[:'updated_at']
125
+ else
126
+ self.updated_at = nil
127
+ end
128
+ end
129
+
130
+ # Show invalid properties with the reasons. Usually used together with valid?
131
+ # @return Array for valid properties with the reasons
132
+ def list_invalid_properties
133
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
134
+ invalid_properties = Array.new
135
+ if @created_at.nil?
136
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
137
+ end
138
+
139
+ if @description.nil?
140
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
141
+ end
142
+
143
+ if @description.to_s.length > 2000
144
+ invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 2000.')
145
+ end
146
+
147
+ if @id.nil?
148
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
149
+ end
150
+
151
+ if @item.nil?
152
+ invalid_properties.push('invalid value for "item", item cannot be nil.')
153
+ end
154
+
155
+ if @item.to_s.length > 128
156
+ invalid_properties.push('invalid value for "item", the character length must be smaller than or equal to 128.')
157
+ end
158
+
159
+ if @rank.nil?
160
+ invalid_properties.push('invalid value for "rank", rank cannot be nil.')
161
+ end
162
+
163
+ if @updated_at.nil?
164
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
165
+ end
166
+
167
+ invalid_properties
168
+ end
169
+
170
+ # Check to see if the all the properties in the model are valid
171
+ # @return true if the model is valid
172
+ def valid?
173
+ warn '[DEPRECATED] the `valid?` method is obsolete'
174
+ return false if @created_at.nil?
175
+ return false if @description.nil?
176
+ return false if @description.to_s.length > 2000
177
+ return false if @id.nil?
178
+ return false if @item.nil?
179
+ return false if @item.to_s.length > 128
180
+ return false if @rank.nil?
181
+ return false if @updated_at.nil?
182
+ true
183
+ end
184
+
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] created_at Value to be assigned
187
+ def created_at=(created_at)
188
+ if created_at.nil?
189
+ fail ArgumentError, 'created_at cannot be nil'
190
+ end
191
+
192
+ @created_at = created_at
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] description Value to be assigned
197
+ def description=(description)
198
+ if description.nil?
199
+ fail ArgumentError, 'description cannot be nil'
200
+ end
201
+
202
+ if description.to_s.length > 2000
203
+ fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 2000.'
204
+ end
205
+
206
+ @description = description
207
+ end
208
+
209
+ # Custom attribute writer method with validation
210
+ # @param [Object] id Value to be assigned
211
+ def id=(id)
212
+ if id.nil?
213
+ fail ArgumentError, 'id cannot be nil'
214
+ end
215
+
216
+ @id = id
217
+ end
218
+
219
+ # Custom attribute writer method with validation
220
+ # @param [Object] item Value to be assigned
221
+ def item=(item)
222
+ if item.nil?
223
+ fail ArgumentError, 'item cannot be nil'
224
+ end
225
+
226
+ if item.to_s.length > 128
227
+ fail ArgumentError, 'invalid value for "item", the character length must be smaller than or equal to 128.'
228
+ end
229
+
230
+ @item = item
231
+ end
232
+
233
+ # Custom attribute writer method with validation
234
+ # @param [Object] rank Value to be assigned
235
+ def rank=(rank)
236
+ if rank.nil?
237
+ fail ArgumentError, 'rank cannot be nil'
238
+ end
239
+
240
+ @rank = rank
241
+ end
242
+
243
+ # Custom attribute writer method with validation
244
+ # @param [Object] updated_at Value to be assigned
245
+ def updated_at=(updated_at)
246
+ if updated_at.nil?
247
+ fail ArgumentError, 'updated_at cannot be nil'
248
+ end
249
+
250
+ @updated_at = updated_at
251
+ end
252
+
253
+ # Checks equality by comparing each attribute.
254
+ # @param [Object] Object to be compared
255
+ def ==(o)
256
+ return true if self.equal?(o)
257
+ self.class == o.class &&
258
+ created_at == o.created_at &&
259
+ description == o.description &&
260
+ id == o.id &&
261
+ item == o.item &&
262
+ rank == o.rank &&
263
+ updated_at == o.updated_at
264
+ end
265
+
266
+ # @see the `==` method
267
+ # @param [Object] Object to be compared
268
+ def eql?(o)
269
+ self == o
270
+ end
271
+
272
+ # Calculates hash code according to all attributes.
273
+ # @return [Integer] Hash code
274
+ def hash
275
+ [created_at, description, id, item, rank, updated_at].hash
276
+ end
277
+
278
+ # Builds the object from hash
279
+ # @param [Hash] attributes Model attributes in the form of hash
280
+ # @return [Object] Returns the model itself
281
+ def self.build_from_hash(attributes)
282
+ return nil unless attributes.is_a?(Hash)
283
+ attributes = attributes.transform_keys(&:to_sym)
284
+ transformed_hash = {}
285
+ openapi_types.each_pair do |key, type|
286
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
287
+ transformed_hash["#{key}"] = nil
288
+ elsif type =~ /\AArray<(.*)>/i
289
+ # check to ensure the input is an array given that the attribute
290
+ # is documented as an array but the input is not
291
+ if attributes[attribute_map[key]].is_a?(Array)
292
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
293
+ end
294
+ elsif !attributes[attribute_map[key]].nil?
295
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
296
+ end
297
+ end
298
+ new(transformed_hash)
299
+ end
300
+
301
+ # Returns the object in the form of hash
302
+ # @return [Hash] Returns the object in the form of hash
303
+ def to_hash
304
+ hash = {}
305
+ self.class.attribute_map.each_pair do |attr, param|
306
+ value = self.send(attr)
307
+ if value.nil?
308
+ is_nullable = self.class.openapi_nullable.include?(attr)
309
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
310
+ end
311
+
312
+ hash[param] = _to_hash(value)
313
+ end
314
+ hash
315
+ end
316
+
317
+ end
318
+
319
+ 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.22.0"
7
+ VERSION = "2.24.0"
8
8
  end
data/lib/incident_io.rb CHANGED
@@ -768,6 +768,16 @@ IncidentIo.autoload :FollowUpsUpdatePayloadV2, 'incident_io/models/follow_ups_up
768
768
  IncidentIo.autoload :FollowUpsUpdatePayloadV3, 'incident_io/models/follow_ups_update_payload_v3'
769
769
  IncidentIo.autoload :FollowUpsUpdateResultV2, 'incident_io/models/follow_ups_update_result_v2'
770
770
  IncidentIo.autoload :FollowUpsUpdateResultV3, 'incident_io/models/follow_ups_update_result_v3'
771
+ IncidentIo.autoload :GlossaryEntriesCreatePayloadV2, 'incident_io/models/glossary_entries_create_payload_v2'
772
+ IncidentIo.autoload :GlossaryEntriesCreateResultV2, 'incident_io/models/glossary_entries_create_result_v2'
773
+ IncidentIo.autoload :GlossaryEntriesListResultV2, 'incident_io/models/glossary_entries_list_result_v2'
774
+ IncidentIo.autoload :GlossaryEntriesShowResultV2, 'incident_io/models/glossary_entries_show_result_v2'
775
+ IncidentIo.autoload :GlossaryEntriesUpdatePayloadV2, 'incident_io/models/glossary_entries_update_payload_v2'
776
+ IncidentIo.autoload :GlossaryEntriesUpdateRanksPayloadV2, 'incident_io/models/glossary_entries_update_ranks_payload_v2'
777
+ IncidentIo.autoload :GlossaryEntriesUpdateRanksResultV2, 'incident_io/models/glossary_entries_update_ranks_result_v2'
778
+ IncidentIo.autoload :GlossaryEntriesUpdateResultV2, 'incident_io/models/glossary_entries_update_result_v2'
779
+ IncidentIo.autoload :GlossaryEntryRankUpdateV2, 'incident_io/models/glossary_entry_rank_update_v2'
780
+ IncidentIo.autoload :GlossaryEntryV2, 'incident_io/models/glossary_entry_v2'
771
781
  IncidentIo.autoload :GroupingKeyV2, 'incident_io/models/grouping_key_v2'
772
782
  IncidentIo.autoload :GroupingKeyV3, 'incident_io/models/grouping_key_v3'
773
783
  IncidentIo.autoload :GroupingSettingsV3, 'incident_io/models/grouping_settings_v3'
@@ -1268,6 +1278,7 @@ IncidentIo.autoload :EscalationPathTemplatesV2Api, 'incident_io/api/escalation_p
1268
1278
  IncidentIo.autoload :EscalationsV2Api, 'incident_io/api/escalations_v2_api'
1269
1279
  IncidentIo.autoload :FollowUpsV2Api, 'incident_io/api/follow_ups_v2_api'
1270
1280
  IncidentIo.autoload :FollowUpsV3Api, 'incident_io/api/follow_ups_v3_api'
1281
+ IncidentIo.autoload :GlossaryEntriesV2Api, 'incident_io/api/glossary_entries_v2_api'
1271
1282
  IncidentIo.autoload :HeartbeatV2Api, 'incident_io/api/heartbeat_v2_api'
1272
1283
  IncidentIo.autoload :IPAllowlistsV1Api, 'incident_io/api/ip_allowlists_v1_api'
1273
1284
  IncidentIo.autoload :IncidentActivityLogEntriesV2Api, 'incident_io/api/incident_activity_log_entries_v2_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.22.0
4
+ version: 2.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - incident.io
@@ -100,6 +100,7 @@ files:
100
100
  - lib/incident_io/api/escalations_v2_api.rb
101
101
  - lib/incident_io/api/follow_ups_v2_api.rb
102
102
  - lib/incident_io/api/follow_ups_v3_api.rb
103
+ - lib/incident_io/api/glossary_entries_v2_api.rb
103
104
  - lib/incident_io/api/heartbeat_v2_api.rb
104
105
  - lib/incident_io/api/incident_activity_log_entries_v2_api.rb
105
106
  - lib/incident_io/api/incident_attachments_v1_api.rb
@@ -894,6 +895,16 @@ files:
894
895
  - lib/incident_io/models/follow_ups_update_payload_v3.rb
895
896
  - lib/incident_io/models/follow_ups_update_result_v2.rb
896
897
  - lib/incident_io/models/follow_ups_update_result_v3.rb
898
+ - lib/incident_io/models/glossary_entries_create_payload_v2.rb
899
+ - lib/incident_io/models/glossary_entries_create_result_v2.rb
900
+ - lib/incident_io/models/glossary_entries_list_result_v2.rb
901
+ - lib/incident_io/models/glossary_entries_show_result_v2.rb
902
+ - lib/incident_io/models/glossary_entries_update_payload_v2.rb
903
+ - lib/incident_io/models/glossary_entries_update_ranks_payload_v2.rb
904
+ - lib/incident_io/models/glossary_entries_update_ranks_result_v2.rb
905
+ - lib/incident_io/models/glossary_entries_update_result_v2.rb
906
+ - lib/incident_io/models/glossary_entry_rank_update_v2.rb
907
+ - lib/incident_io/models/glossary_entry_v2.rb
897
908
  - lib/incident_io/models/grouping_key_v2.rb
898
909
  - lib/incident_io/models/grouping_key_v3.rb
899
910
  - lib/incident_io/models/grouping_settings_v3.rb