incident_io_api 4.1.0 → 4.3.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/alert_grouping_preferences_v3_api.rb +367 -0
- data/lib/incident_io/api/alert_rules_v3_api.rb +367 -0
- data/lib/incident_io/api/catalog_v3_api.rb +68 -0
- data/lib/incident_io/api/team_grouping_preferences_v3_api.rb +364 -0
- data/lib/incident_io/models/alert_grouping_conditional_branch_v3.rb +204 -0
- data/lib/incident_io/models/alert_grouping_default_branch_v3.rb +165 -0
- data/lib/incident_io/models/alert_grouping_preference_v3.rb +368 -0
- data/lib/incident_io/models/alert_grouping_preferences_create_payload_v3.rb +225 -0
- data/lib/incident_io/models/alert_grouping_preferences_create_result_v3.rb +164 -0
- data/lib/incident_io/models/alert_grouping_preferences_list_result_v3.rb +192 -0
- data/lib/incident_io/models/alert_grouping_preferences_show_result_v3.rb +164 -0
- data/lib/incident_io/models/alert_grouping_preferences_update_payload_v3.rb +198 -0
- data/lib/incident_io/models/alert_grouping_preferences_update_result_v3.rb +164 -0
- data/lib/incident_io/models/alert_grouping_settings_v3.rb +246 -0
- data/lib/incident_io/models/alert_rule_action_v3.rb +240 -0
- data/lib/incident_io/models/alert_rule_block_v3.rb +222 -0
- data/lib/incident_io/models/alert_rule_branch_v3.rb +254 -0
- data/lib/incident_io/models/alert_rule_create_incident_action_v3.rb +177 -0
- data/lib/incident_io/models/alert_rule_escalate_action_v3.rb +215 -0
- data/lib/incident_io/models/alert_rule_nested_branch_v3.rb +242 -0
- data/lib/incident_io/models/alert_rule_post_action_v3.rb +202 -0
- data/lib/incident_io/models/alert_rule_set_v3.rb +351 -0
- data/lib/incident_io/models/alert_rules_create_payload_v3.rb +225 -0
- data/lib/incident_io/models/alert_rules_create_result_v3.rb +164 -0
- data/lib/incident_io/models/alert_rules_list_result_v3.rb +192 -0
- data/lib/incident_io/models/alert_rules_show_result_v3.rb +164 -0
- data/lib/incident_io/models/alert_rules_update_payload_v3.rb +198 -0
- data/lib/incident_io/models/alert_rules_update_result_v3.rb +164 -0
- data/lib/incident_io/models/catalog_bulk_archive_entries_payload_v3.rb +212 -0
- data/lib/incident_io/models/team_grouping_preference_v3.rb +300 -0
- data/lib/incident_io/models/team_grouping_preferences_create_payload_v3.rb +191 -0
- data/lib/incident_io/models/team_grouping_preferences_create_result_v3.rb +164 -0
- data/lib/incident_io/models/team_grouping_preferences_list_result_v3.rb +192 -0
- data/lib/incident_io/models/team_grouping_preferences_show_result_v3.rb +164 -0
- data/lib/incident_io/models/team_grouping_preferences_update_payload_v3.rb +191 -0
- data/lib/incident_io/models/team_grouping_preferences_update_result_v3.rb +164 -0
- data/lib/incident_io/version.rb +1 -1
- data/lib/incident_io.rb +35 -0
- metadata +37 -2
|
@@ -0,0 +1,198 @@
|
|
|
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 AlertRulesUpdatePayloadV3 < ApiModelBase
|
|
18
|
+
# The blocks of rules, in order. Every block runs for an alert.
|
|
19
|
+
attr_accessor :blocks
|
|
20
|
+
|
|
21
|
+
# Expressions the blocks' conditions and actions reference. Omit it when the rules use none.
|
|
22
|
+
attr_accessor :expressions
|
|
23
|
+
|
|
24
|
+
attr_accessor :message_template
|
|
25
|
+
|
|
26
|
+
# The version this update writes. When set, it must be one more than the set's current version, so two editors can't overwrite each other. When omitted, the update applies to the current version.
|
|
27
|
+
attr_accessor :version
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'blocks' => :'blocks',
|
|
33
|
+
:'expressions' => :'expressions',
|
|
34
|
+
:'message_template' => :'message_template',
|
|
35
|
+
:'version' => :'version'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'blocks' => :'Array<AlertRuleBlockV3>',
|
|
53
|
+
:'expressions' => :'Array<ExpressionPayloadV3>',
|
|
54
|
+
:'message_template' => :'EngineParamBindingPayloadV3',
|
|
55
|
+
:'version' => :'Integer'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of attributes with nullable: true
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AlertRulesUpdatePayloadV3` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AlertRulesUpdatePayloadV3`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'blocks')
|
|
82
|
+
if (value = attributes[:'blocks']).is_a?(Array)
|
|
83
|
+
self.blocks = value
|
|
84
|
+
end
|
|
85
|
+
else
|
|
86
|
+
self.blocks = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'expressions')
|
|
90
|
+
if (value = attributes[:'expressions']).is_a?(Array)
|
|
91
|
+
self.expressions = value
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'message_template')
|
|
96
|
+
self.message_template = attributes[:'message_template']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'version')
|
|
100
|
+
self.version = attributes[:'version']
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
105
|
+
# @return Array for valid properties with the reasons
|
|
106
|
+
def list_invalid_properties
|
|
107
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
108
|
+
invalid_properties = Array.new
|
|
109
|
+
if @blocks.nil?
|
|
110
|
+
invalid_properties.push('invalid value for "blocks", blocks cannot be nil.')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
invalid_properties
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Check to see if the all the properties in the model are valid
|
|
117
|
+
# @return true if the model is valid
|
|
118
|
+
def valid?
|
|
119
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
120
|
+
return false if @blocks.nil?
|
|
121
|
+
true
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Custom attribute writer method with validation
|
|
125
|
+
# @param [Object] blocks Value to be assigned
|
|
126
|
+
def blocks=(blocks)
|
|
127
|
+
if blocks.nil?
|
|
128
|
+
fail ArgumentError, 'blocks cannot be nil'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
@blocks = blocks
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Checks equality by comparing each attribute.
|
|
135
|
+
# @param [Object] Object to be compared
|
|
136
|
+
def ==(o)
|
|
137
|
+
return true if self.equal?(o)
|
|
138
|
+
self.class == o.class &&
|
|
139
|
+
blocks == o.blocks &&
|
|
140
|
+
expressions == o.expressions &&
|
|
141
|
+
message_template == o.message_template &&
|
|
142
|
+
version == o.version
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# @see the `==` method
|
|
146
|
+
# @param [Object] Object to be compared
|
|
147
|
+
def eql?(o)
|
|
148
|
+
self == o
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Calculates hash code according to all attributes.
|
|
152
|
+
# @return [Integer] Hash code
|
|
153
|
+
def hash
|
|
154
|
+
[blocks, expressions, message_template, version].hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Builds the object from hash
|
|
158
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
159
|
+
# @return [Object] Returns the model itself
|
|
160
|
+
def self.build_from_hash(attributes)
|
|
161
|
+
return nil unless attributes.is_a?(Hash)
|
|
162
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
163
|
+
transformed_hash = {}
|
|
164
|
+
openapi_types.each_pair do |key, type|
|
|
165
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = nil
|
|
167
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
168
|
+
# check to ensure the input is an array given that the attribute
|
|
169
|
+
# is documented as an array but the input is not
|
|
170
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
171
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
172
|
+
end
|
|
173
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
174
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
new(transformed_hash)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Returns the object in the form of hash
|
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
|
182
|
+
def to_hash
|
|
183
|
+
hash = {}
|
|
184
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
185
|
+
value = self.send(attr)
|
|
186
|
+
if value.nil?
|
|
187
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
188
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
hash[param] = _to_hash(value)
|
|
192
|
+
end
|
|
193
|
+
hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
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 AlertRulesUpdateResultV3 < ApiModelBase
|
|
18
|
+
attr_accessor :alert_rule_set
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'alert_rule_set' => :'alert_rule_set'
|
|
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
|
+
:'alert_rule_set' => :'AlertRuleSetV3'
|
|
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::AlertRulesUpdateResultV3` 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::AlertRulesUpdateResultV3`. 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?(:'alert_rule_set')
|
|
67
|
+
self.alert_rule_set = attributes[:'alert_rule_set']
|
|
68
|
+
else
|
|
69
|
+
self.alert_rule_set = 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 @alert_rule_set.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "alert_rule_set", alert_rule_set 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 @alert_rule_set.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] alert_rule_set Value to be assigned
|
|
95
|
+
def alert_rule_set=(alert_rule_set)
|
|
96
|
+
if alert_rule_set.nil?
|
|
97
|
+
fail ArgumentError, 'alert_rule_set cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@alert_rule_set = alert_rule_set
|
|
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
|
+
alert_rule_set == o.alert_rule_set
|
|
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
|
+
[alert_rule_set].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
|
|
@@ -0,0 +1,212 @@
|
|
|
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 CatalogBulkArchiveEntriesPayloadV3 < ApiModelBase
|
|
18
|
+
# The ID of the catalog type that the entries belong to
|
|
19
|
+
attr_accessor :catalog_type_id
|
|
20
|
+
|
|
21
|
+
# The IDs of the entries to archive. Maximum 250 entries per request.
|
|
22
|
+
attr_accessor :entry_ids
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'catalog_type_id' => :'catalog_type_id',
|
|
28
|
+
:'entry_ids' => :'entry_ids'
|
|
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
|
+
:'catalog_type_id' => :'String',
|
|
46
|
+
:'entry_ids' => :'Array<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::CatalogBulkArchiveEntriesPayloadV3` 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::CatalogBulkArchiveEntriesPayloadV3`. 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?(:'catalog_type_id')
|
|
73
|
+
self.catalog_type_id = attributes[:'catalog_type_id']
|
|
74
|
+
else
|
|
75
|
+
self.catalog_type_id = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'entry_ids')
|
|
79
|
+
if (value = attributes[:'entry_ids']).is_a?(Array)
|
|
80
|
+
self.entry_ids = value
|
|
81
|
+
end
|
|
82
|
+
else
|
|
83
|
+
self.entry_ids = nil
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
88
|
+
# @return Array for valid properties with the reasons
|
|
89
|
+
def list_invalid_properties
|
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
91
|
+
invalid_properties = Array.new
|
|
92
|
+
if @catalog_type_id.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "catalog_type_id", catalog_type_id cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if @entry_ids.nil?
|
|
97
|
+
invalid_properties.push('invalid value for "entry_ids", entry_ids cannot be nil.')
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if @entry_ids.length > 250
|
|
101
|
+
invalid_properties.push('invalid value for "entry_ids", number of items must be less than or equal to 250.')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if @entry_ids.length < 1
|
|
105
|
+
invalid_properties.push('invalid value for "entry_ids", number of items must be greater than or equal to 1.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
invalid_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Check to see if the all the properties in the model are valid
|
|
112
|
+
# @return true if the model is valid
|
|
113
|
+
def valid?
|
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
115
|
+
return false if @catalog_type_id.nil?
|
|
116
|
+
return false if @entry_ids.nil?
|
|
117
|
+
return false if @entry_ids.length > 250
|
|
118
|
+
return false if @entry_ids.length < 1
|
|
119
|
+
true
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Custom attribute writer method with validation
|
|
123
|
+
# @param [Object] catalog_type_id Value to be assigned
|
|
124
|
+
def catalog_type_id=(catalog_type_id)
|
|
125
|
+
if catalog_type_id.nil?
|
|
126
|
+
fail ArgumentError, 'catalog_type_id cannot be nil'
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
@catalog_type_id = catalog_type_id
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Custom attribute writer method with validation
|
|
133
|
+
# @param [Object] entry_ids Value to be assigned
|
|
134
|
+
def entry_ids=(entry_ids)
|
|
135
|
+
if entry_ids.nil?
|
|
136
|
+
fail ArgumentError, 'entry_ids cannot be nil'
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if entry_ids.length > 250
|
|
140
|
+
fail ArgumentError, 'invalid value for "entry_ids", number of items must be less than or equal to 250.'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if entry_ids.length < 1
|
|
144
|
+
fail ArgumentError, 'invalid value for "entry_ids", number of items must be greater than or equal to 1.'
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
@entry_ids = entry_ids
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Checks equality by comparing each attribute.
|
|
151
|
+
# @param [Object] Object to be compared
|
|
152
|
+
def ==(o)
|
|
153
|
+
return true if self.equal?(o)
|
|
154
|
+
self.class == o.class &&
|
|
155
|
+
catalog_type_id == o.catalog_type_id &&
|
|
156
|
+
entry_ids == o.entry_ids
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# @see the `==` method
|
|
160
|
+
# @param [Object] Object to be compared
|
|
161
|
+
def eql?(o)
|
|
162
|
+
self == o
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Calculates hash code according to all attributes.
|
|
166
|
+
# @return [Integer] Hash code
|
|
167
|
+
def hash
|
|
168
|
+
[catalog_type_id, entry_ids].hash
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Builds the object from hash
|
|
172
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
173
|
+
# @return [Object] Returns the model itself
|
|
174
|
+
def self.build_from_hash(attributes)
|
|
175
|
+
return nil unless attributes.is_a?(Hash)
|
|
176
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
177
|
+
transformed_hash = {}
|
|
178
|
+
openapi_types.each_pair do |key, type|
|
|
179
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
180
|
+
transformed_hash["#{key}"] = nil
|
|
181
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
182
|
+
# check to ensure the input is an array given that the attribute
|
|
183
|
+
# is documented as an array but the input is not
|
|
184
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
185
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
186
|
+
end
|
|
187
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
188
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
new(transformed_hash)
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
end
|