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,242 @@
|
|
|
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 branch nested inside another, with its own conditions and actions
|
|
18
|
+
class AlertRuleNestedBranchV3 < ApiModelBase
|
|
19
|
+
# The actions to take when the branch holds
|
|
20
|
+
attr_accessor :actions
|
|
21
|
+
|
|
22
|
+
# The branch holds when every condition in any one group holds. A branch with no groups always holds.
|
|
23
|
+
attr_accessor :condition_groups
|
|
24
|
+
|
|
25
|
+
# Identifier for this branch, unique within the set
|
|
26
|
+
attr_accessor :id
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'actions' => :'actions',
|
|
32
|
+
:'condition_groups' => :'condition_groups',
|
|
33
|
+
:'id' => :'id'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'actions' => :'Array<AlertRuleActionV3>',
|
|
51
|
+
:'condition_groups' => :'Array<ConditionGroupPayloadV3>',
|
|
52
|
+
:'id' => :'String'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AlertRuleNestedBranchV3` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AlertRuleNestedBranchV3`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'actions')
|
|
79
|
+
if (value = attributes[:'actions']).is_a?(Array)
|
|
80
|
+
self.actions = value
|
|
81
|
+
end
|
|
82
|
+
else
|
|
83
|
+
self.actions = nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'condition_groups')
|
|
87
|
+
if (value = attributes[:'condition_groups']).is_a?(Array)
|
|
88
|
+
self.condition_groups = value
|
|
89
|
+
end
|
|
90
|
+
else
|
|
91
|
+
self.condition_groups = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'id')
|
|
95
|
+
self.id = attributes[:'id']
|
|
96
|
+
else
|
|
97
|
+
self.id = nil
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
|
+
invalid_properties = Array.new
|
|
106
|
+
if @actions.nil?
|
|
107
|
+
invalid_properties.push('invalid value for "actions", actions cannot be nil.')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if @condition_groups.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "condition_groups", condition_groups cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @id.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @id.to_s.length > 128
|
|
119
|
+
invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 128.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @id.to_s.length < 1
|
|
123
|
+
invalid_properties.push('invalid value for "id", the character length must be greater than or equal to 1.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
invalid_properties
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Check to see if the all the properties in the model are valid
|
|
130
|
+
# @return true if the model is valid
|
|
131
|
+
def valid?
|
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
133
|
+
return false if @actions.nil?
|
|
134
|
+
return false if @condition_groups.nil?
|
|
135
|
+
return false if @id.nil?
|
|
136
|
+
return false if @id.to_s.length > 128
|
|
137
|
+
return false if @id.to_s.length < 1
|
|
138
|
+
true
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Custom attribute writer method with validation
|
|
142
|
+
# @param [Object] actions Value to be assigned
|
|
143
|
+
def actions=(actions)
|
|
144
|
+
if actions.nil?
|
|
145
|
+
fail ArgumentError, 'actions cannot be nil'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
@actions = actions
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] condition_groups Value to be assigned
|
|
153
|
+
def condition_groups=(condition_groups)
|
|
154
|
+
if condition_groups.nil?
|
|
155
|
+
fail ArgumentError, 'condition_groups cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
@condition_groups = condition_groups
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Custom attribute writer method with validation
|
|
162
|
+
# @param [Object] id Value to be assigned
|
|
163
|
+
def id=(id)
|
|
164
|
+
if id.nil?
|
|
165
|
+
fail ArgumentError, 'id cannot be nil'
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if id.to_s.length > 128
|
|
169
|
+
fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 128.'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if id.to_s.length < 1
|
|
173
|
+
fail ArgumentError, 'invalid value for "id", the character length must be greater than or equal to 1.'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
@id = id
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Checks equality by comparing each attribute.
|
|
180
|
+
# @param [Object] Object to be compared
|
|
181
|
+
def ==(o)
|
|
182
|
+
return true if self.equal?(o)
|
|
183
|
+
self.class == o.class &&
|
|
184
|
+
actions == o.actions &&
|
|
185
|
+
condition_groups == o.condition_groups &&
|
|
186
|
+
id == o.id
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# @see the `==` method
|
|
190
|
+
# @param [Object] Object to be compared
|
|
191
|
+
def eql?(o)
|
|
192
|
+
self == o
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Calculates hash code according to all attributes.
|
|
196
|
+
# @return [Integer] Hash code
|
|
197
|
+
def hash
|
|
198
|
+
[actions, condition_groups, id].hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Builds the object from hash
|
|
202
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
203
|
+
# @return [Object] Returns the model itself
|
|
204
|
+
def self.build_from_hash(attributes)
|
|
205
|
+
return nil unless attributes.is_a?(Hash)
|
|
206
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
207
|
+
transformed_hash = {}
|
|
208
|
+
openapi_types.each_pair do |key, type|
|
|
209
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
210
|
+
transformed_hash["#{key}"] = nil
|
|
211
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
212
|
+
# check to ensure the input is an array given that the attribute
|
|
213
|
+
# is documented as an array but the input is not
|
|
214
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
215
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
216
|
+
end
|
|
217
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
218
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
new(transformed_hash)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Returns the object in the form of hash
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_hash
|
|
227
|
+
hash = {}
|
|
228
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
229
|
+
value = self.send(attr)
|
|
230
|
+
if value.nil?
|
|
231
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
232
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
hash[param] = _to_hash(value)
|
|
236
|
+
end
|
|
237
|
+
hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
@@ -0,0 +1,202 @@
|
|
|
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
|
+
# Post the alert to chat channels
|
|
18
|
+
class AlertRulePostActionV3 < ApiModelBase
|
|
19
|
+
# Whether the channels are public, or one private Slack channel entered by its ID. private needs channels to be exactly one literal Slack channel ID, and only post_slack supports it. Defaults to public. Known values: `public`, `private`
|
|
20
|
+
attr_accessor :channel_visibility
|
|
21
|
+
|
|
22
|
+
attr_accessor :channels
|
|
23
|
+
|
|
24
|
+
# per_alert posts one message per alert. group_summary posts one message for the alert's group, and one per alert that is not grouped. Known values: `per_alert`, `group_summary`
|
|
25
|
+
attr_accessor :mode
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'channel_visibility' => :'channel_visibility',
|
|
31
|
+
:'channels' => :'channels',
|
|
32
|
+
:'mode' => :'mode'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'channel_visibility' => :'String',
|
|
50
|
+
:'channels' => :'EngineParamBindingPayloadV3',
|
|
51
|
+
:'mode' => :'String'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AlertRulePostActionV3` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AlertRulePostActionV3`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'channel_visibility')
|
|
78
|
+
self.channel_visibility = attributes[:'channel_visibility']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'channels')
|
|
82
|
+
self.channels = attributes[:'channels']
|
|
83
|
+
else
|
|
84
|
+
self.channels = nil
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'mode')
|
|
88
|
+
self.mode = attributes[:'mode']
|
|
89
|
+
else
|
|
90
|
+
self.mode = nil
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
95
|
+
# @return Array for valid properties with the reasons
|
|
96
|
+
def list_invalid_properties
|
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
if @channels.nil?
|
|
100
|
+
invalid_properties.push('invalid value for "channels", channels cannot be nil.')
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if @mode.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "mode", mode cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
invalid_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Check to see if the all the properties in the model are valid
|
|
111
|
+
# @return true if the model is valid
|
|
112
|
+
def valid?
|
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
114
|
+
return false if @channels.nil?
|
|
115
|
+
return false if @mode.nil?
|
|
116
|
+
true
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Custom attribute writer method with validation
|
|
120
|
+
# @param [Object] channels Value to be assigned
|
|
121
|
+
def channels=(channels)
|
|
122
|
+
if channels.nil?
|
|
123
|
+
fail ArgumentError, 'channels cannot be nil'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
@channels = channels
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method with validation
|
|
130
|
+
# @param [Object] mode Value to be assigned
|
|
131
|
+
def mode=(mode)
|
|
132
|
+
if mode.nil?
|
|
133
|
+
fail ArgumentError, 'mode cannot be nil'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
@mode = mode
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Checks equality by comparing each attribute.
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def ==(o)
|
|
142
|
+
return true if self.equal?(o)
|
|
143
|
+
self.class == o.class &&
|
|
144
|
+
channel_visibility == o.channel_visibility &&
|
|
145
|
+
channels == o.channels &&
|
|
146
|
+
mode == o.mode
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see the `==` method
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def eql?(o)
|
|
152
|
+
self == o
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Calculates hash code according to all attributes.
|
|
156
|
+
# @return [Integer] Hash code
|
|
157
|
+
def hash
|
|
158
|
+
[channel_visibility, channels, mode].hash
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Builds the object from hash
|
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
163
|
+
# @return [Object] Returns the model itself
|
|
164
|
+
def self.build_from_hash(attributes)
|
|
165
|
+
return nil unless attributes.is_a?(Hash)
|
|
166
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
167
|
+
transformed_hash = {}
|
|
168
|
+
openapi_types.each_pair do |key, type|
|
|
169
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
170
|
+
transformed_hash["#{key}"] = nil
|
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
172
|
+
# check to ensure the input is an array given that the attribute
|
|
173
|
+
# is documented as an array but the input is not
|
|
174
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
175
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
176
|
+
end
|
|
177
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
178
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
new(transformed_hash)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Returns the object in the form of hash
|
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
|
186
|
+
def to_hash
|
|
187
|
+
hash = {}
|
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
189
|
+
value = self.send(attr)
|
|
190
|
+
if value.nil?
|
|
191
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
192
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
hash[param] = _to_hash(value)
|
|
196
|
+
end
|
|
197
|
+
hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
end
|