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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88daae7a11ae6a22dace5ad124eebabc05b3f360c702994d827acced6173f38e
4
- data.tar.gz: a2733e0e4f10772dbdef5d0523b851d50dfdbb02a22c06aa2caa3ff871610385
3
+ metadata.gz: 754c359d331c3c2915e2e2f976cb275811c672a8e30ebfde71bb4144431046a9
4
+ data.tar.gz: 19ad13c29f33fe0459eb0126c485a7b18e4e379a2e10f622b7777947927c0d0f
5
5
  SHA512:
6
- metadata.gz: 1e34e7a095212b9c326399810364c4e74c2785e6d40712beb33004614e9bf51938e78b5347668f543df4b14aa9cda3627a50af42f628bd522c1247cbb72edeff
7
- data.tar.gz: 7079869a49eeedaa334271895d3d352caf479666116c4296d8db37e9a5611a9e5f83db8fe39b395da91513060ae2c10c7415acda05c318d1601a405559065517
6
+ metadata.gz: '08abaa68086d2f8a36e9c110fc87d8fbad8e34e7433fcbee65ba6445e1c9988c4f1b052484939e3bf24e289fedf6db371011b7fb89adc4dd46aae19a711f20aa'
7
+ data.tar.gz: 916edbfebaf0318b91a9331810e1a1f471e0d8254199b3ada9ad1275feb3aea83abb1fa9cdce66c2ad627cb8452d937bb48c2443f85260445542ef4182db08af
@@ -0,0 +1,347 @@
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 'cgi'
14
+
15
+ module IncidentIo
16
+ class StatusPageComponentsV2Api
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Status Page Components V2
23
+ # Create a status page component. Placement on a page is controlled separately via status page structures.
24
+ # @param status_page_components_create_payload_v2 [StatusPageComponentsCreatePayloadV2]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [StatusPageComponentsCreateResultV2]
27
+ def status_page_components_v2_create(status_page_components_create_payload_v2, opts = {})
28
+ data, _status_code, _headers = status_page_components_v2_create_with_http_info(status_page_components_create_payload_v2, opts)
29
+ data
30
+ end
31
+
32
+ # Create Status Page Components V2
33
+ # Create a status page component. Placement on a page is controlled separately via status page structures.
34
+ # @param status_page_components_create_payload_v2 [StatusPageComponentsCreatePayloadV2]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(StatusPageComponentsCreateResultV2, Integer, Hash)>] StatusPageComponentsCreateResultV2 data, response status code and response headers
37
+ def status_page_components_v2_create_with_http_info(status_page_components_create_payload_v2, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: StatusPageComponentsV2Api.status_page_components_v2_create ...'
40
+ end
41
+ # verify the required parameter 'status_page_components_create_payload_v2' is set
42
+ if @api_client.config.client_side_validation && status_page_components_create_payload_v2.nil?
43
+ fail ArgumentError, "Missing the required parameter 'status_page_components_create_payload_v2' when calling StatusPageComponentsV2Api.status_page_components_v2_create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/v2/status_page_components'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(status_page_components_create_payload_v2)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'StatusPageComponentsCreateResultV2'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"StatusPageComponentsV2Api.status_page_components_v2_create",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: StatusPageComponentsV2Api#status_page_components_v2_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Destroy Status Page Components V2
91
+ # Archive a status page component.
92
+ # @param id [String] Unique identifier of the status page component
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [nil]
95
+ def status_page_components_v2_destroy(id, opts = {})
96
+ status_page_components_v2_destroy_with_http_info(id, opts)
97
+ nil
98
+ end
99
+
100
+ # Destroy Status Page Components V2
101
+ # Archive a status page component.
102
+ # @param id [String] Unique identifier of the status page component
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
105
+ def status_page_components_v2_destroy_with_http_info(id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: StatusPageComponentsV2Api.status_page_components_v2_destroy ...'
108
+ end
109
+ # verify the required parameter 'id' is set
110
+ if @api_client.config.client_side_validation && id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'id' when calling StatusPageComponentsV2Api.status_page_components_v2_destroy"
112
+ end
113
+ # resource path
114
+ local_var_path = '/v2/status_page_components/{id}'.sub('{id}', CGI.escape(id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:debug_body]
129
+
130
+ # return_type
131
+ return_type = opts[:debug_return_type]
132
+
133
+ # auth_names
134
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
135
+
136
+ new_options = opts.merge(
137
+ :operation => :"StatusPageComponentsV2Api.status_page_components_v2_destroy",
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: StatusPageComponentsV2Api#status_page_components_v2_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+
153
+ # List Status Page Components V2
154
+ # List all status page components for an organisation.
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [StatusPageComponentsListResultV2]
157
+ def status_page_components_v2_list(opts = {})
158
+ data, _status_code, _headers = status_page_components_v2_list_with_http_info(opts)
159
+ data
160
+ end
161
+
162
+ # List Status Page Components V2
163
+ # List all status page components for an organisation.
164
+ # @param [Hash] opts the optional parameters
165
+ # @return [Array<(StatusPageComponentsListResultV2, Integer, Hash)>] StatusPageComponentsListResultV2 data, response status code and response headers
166
+ def status_page_components_v2_list_with_http_info(opts = {})
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug 'Calling API: StatusPageComponentsV2Api.status_page_components_v2_list ...'
169
+ end
170
+ # resource path
171
+ local_var_path = '/v2/status_page_components'
172
+
173
+ # query parameters
174
+ query_params = opts[:query_params] || {}
175
+
176
+ # header parameters
177
+ header_params = opts[:header_params] || {}
178
+ # HTTP header 'Accept' (if needed)
179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
180
+
181
+ # form parameters
182
+ form_params = opts[:form_params] || {}
183
+
184
+ # http body (model)
185
+ post_body = opts[:debug_body]
186
+
187
+ # return_type
188
+ return_type = opts[:debug_return_type] || 'StatusPageComponentsListResultV2'
189
+
190
+ # auth_names
191
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
192
+
193
+ new_options = opts.merge(
194
+ :operation => :"StatusPageComponentsV2Api.status_page_components_v2_list",
195
+ :header_params => header_params,
196
+ :query_params => query_params,
197
+ :form_params => form_params,
198
+ :body => post_body,
199
+ :auth_names => auth_names,
200
+ :return_type => return_type
201
+ )
202
+
203
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "API called: StatusPageComponentsV2Api#status_page_components_v2_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
+ end
207
+ return data, status_code, headers
208
+ end
209
+
210
+ # Show Status Page Components V2
211
+ # Show a single status page component.
212
+ # @param id [String] Unique identifier of the status page component
213
+ # @param [Hash] opts the optional parameters
214
+ # @return [StatusPageComponentsShowResultV2]
215
+ def status_page_components_v2_show(id, opts = {})
216
+ data, _status_code, _headers = status_page_components_v2_show_with_http_info(id, opts)
217
+ data
218
+ end
219
+
220
+ # Show Status Page Components V2
221
+ # Show a single status page component.
222
+ # @param id [String] Unique identifier of the status page component
223
+ # @param [Hash] opts the optional parameters
224
+ # @return [Array<(StatusPageComponentsShowResultV2, Integer, Hash)>] StatusPageComponentsShowResultV2 data, response status code and response headers
225
+ def status_page_components_v2_show_with_http_info(id, opts = {})
226
+ if @api_client.config.debugging
227
+ @api_client.config.logger.debug 'Calling API: StatusPageComponentsV2Api.status_page_components_v2_show ...'
228
+ end
229
+ # verify the required parameter 'id' is set
230
+ if @api_client.config.client_side_validation && id.nil?
231
+ fail ArgumentError, "Missing the required parameter 'id' when calling StatusPageComponentsV2Api.status_page_components_v2_show"
232
+ end
233
+ # resource path
234
+ local_var_path = '/v2/status_page_components/{id}'.sub('{id}', CGI.escape(id.to_s))
235
+
236
+ # query parameters
237
+ query_params = opts[:query_params] || {}
238
+
239
+ # header parameters
240
+ header_params = opts[:header_params] || {}
241
+ # HTTP header 'Accept' (if needed)
242
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
243
+
244
+ # form parameters
245
+ form_params = opts[:form_params] || {}
246
+
247
+ # http body (model)
248
+ post_body = opts[:debug_body]
249
+
250
+ # return_type
251
+ return_type = opts[:debug_return_type] || 'StatusPageComponentsShowResultV2'
252
+
253
+ # auth_names
254
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
255
+
256
+ new_options = opts.merge(
257
+ :operation => :"StatusPageComponentsV2Api.status_page_components_v2_show",
258
+ :header_params => header_params,
259
+ :query_params => query_params,
260
+ :form_params => form_params,
261
+ :body => post_body,
262
+ :auth_names => auth_names,
263
+ :return_type => return_type
264
+ )
265
+
266
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
267
+ if @api_client.config.debugging
268
+ @api_client.config.logger.debug "API called: StatusPageComponentsV2Api#status_page_components_v2_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
269
+ end
270
+ return data, status_code, headers
271
+ end
272
+
273
+ # Update Status Page Components V2
274
+ # Update a status page component's name and description.
275
+ # @param id [String] Unique identifier of the status page component
276
+ # @param status_page_components_update_payload_v2 [StatusPageComponentsUpdatePayloadV2]
277
+ # @param [Hash] opts the optional parameters
278
+ # @return [StatusPageComponentsUpdateResultV2]
279
+ def status_page_components_v2_update(id, status_page_components_update_payload_v2, opts = {})
280
+ data, _status_code, _headers = status_page_components_v2_update_with_http_info(id, status_page_components_update_payload_v2, opts)
281
+ data
282
+ end
283
+
284
+ # Update Status Page Components V2
285
+ # Update a status page component&#39;s name and description.
286
+ # @param id [String] Unique identifier of the status page component
287
+ # @param status_page_components_update_payload_v2 [StatusPageComponentsUpdatePayloadV2]
288
+ # @param [Hash] opts the optional parameters
289
+ # @return [Array<(StatusPageComponentsUpdateResultV2, Integer, Hash)>] StatusPageComponentsUpdateResultV2 data, response status code and response headers
290
+ def status_page_components_v2_update_with_http_info(id, status_page_components_update_payload_v2, opts = {})
291
+ if @api_client.config.debugging
292
+ @api_client.config.logger.debug 'Calling API: StatusPageComponentsV2Api.status_page_components_v2_update ...'
293
+ end
294
+ # verify the required parameter 'id' is set
295
+ if @api_client.config.client_side_validation && id.nil?
296
+ fail ArgumentError, "Missing the required parameter 'id' when calling StatusPageComponentsV2Api.status_page_components_v2_update"
297
+ end
298
+ # verify the required parameter 'status_page_components_update_payload_v2' is set
299
+ if @api_client.config.client_side_validation && status_page_components_update_payload_v2.nil?
300
+ fail ArgumentError, "Missing the required parameter 'status_page_components_update_payload_v2' when calling StatusPageComponentsV2Api.status_page_components_v2_update"
301
+ end
302
+ # resource path
303
+ local_var_path = '/v2/status_page_components/{id}'.sub('{id}', CGI.escape(id.to_s))
304
+
305
+ # query parameters
306
+ query_params = opts[:query_params] || {}
307
+
308
+ # header parameters
309
+ header_params = opts[:header_params] || {}
310
+ # HTTP header 'Accept' (if needed)
311
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
312
+ # HTTP header 'Content-Type'
313
+ content_type = @api_client.select_header_content_type(['application/json'])
314
+ if !content_type.nil?
315
+ header_params['Content-Type'] = content_type
316
+ end
317
+
318
+ # form parameters
319
+ form_params = opts[:form_params] || {}
320
+
321
+ # http body (model)
322
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(status_page_components_update_payload_v2)
323
+
324
+ # return_type
325
+ return_type = opts[:debug_return_type] || 'StatusPageComponentsUpdateResultV2'
326
+
327
+ # auth_names
328
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
329
+
330
+ new_options = opts.merge(
331
+ :operation => :"StatusPageComponentsV2Api.status_page_components_v2_update",
332
+ :header_params => header_params,
333
+ :query_params => query_params,
334
+ :form_params => form_params,
335
+ :body => post_body,
336
+ :auth_names => auth_names,
337
+ :return_type => return_type
338
+ )
339
+
340
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
341
+ if @api_client.config.debugging
342
+ @api_client.config.logger.debug "API called: StatusPageComponentsV2Api#status_page_components_v2_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
343
+ end
344
+ return data, status_code, headers
345
+ end
346
+ end
347
+ end
@@ -0,0 +1,229 @@
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 status page component that can appear on one or more status pages. Components are organisation-scoped. Placement on a page is controlled by that page's structure, not by ownership of the component.
18
+ class StatusPageComponentV2 < ApiModelBase
19
+ # Optional short description of this component
20
+ attr_accessor :description
21
+
22
+ # Unique identifier for this component
23
+ attr_accessor :id
24
+
25
+ attr_accessor :management_meta
26
+
27
+ # Human-readable name for the component
28
+ attr_accessor :name
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'description' => :'description',
34
+ :'id' => :'id',
35
+ :'management_meta' => :'management_meta',
36
+ :'name' => :'name'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'description' => :'String',
54
+ :'id' => :'String',
55
+ :'management_meta' => :'ManagementMetaV2',
56
+ :'name' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::StatusPageComponentV2` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::StatusPageComponentV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'description')
83
+ self.description = attributes[:'description']
84
+ end
85
+
86
+ if attributes.key?(:'id')
87
+ self.id = attributes[:'id']
88
+ else
89
+ self.id = nil
90
+ end
91
+
92
+ if attributes.key?(:'management_meta')
93
+ self.management_meta = attributes[:'management_meta']
94
+ else
95
+ self.management_meta = nil
96
+ end
97
+
98
+ if attributes.key?(:'name')
99
+ self.name = attributes[:'name']
100
+ else
101
+ self.name = nil
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ if @id.nil?
111
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
112
+ end
113
+
114
+ if @management_meta.nil?
115
+ invalid_properties.push('invalid value for "management_meta", management_meta cannot be nil.')
116
+ end
117
+
118
+ if @name.nil?
119
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
120
+ end
121
+
122
+ invalid_properties
123
+ end
124
+
125
+ # Check to see if the all the properties in the model are valid
126
+ # @return true if the model is valid
127
+ def valid?
128
+ warn '[DEPRECATED] the `valid?` method is obsolete'
129
+ return false if @id.nil?
130
+ return false if @management_meta.nil?
131
+ return false if @name.nil?
132
+ true
133
+ end
134
+
135
+ # Custom attribute writer method with validation
136
+ # @param [Object] id Value to be assigned
137
+ def id=(id)
138
+ if id.nil?
139
+ fail ArgumentError, 'id cannot be nil'
140
+ end
141
+
142
+ @id = id
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] management_meta Value to be assigned
147
+ def management_meta=(management_meta)
148
+ if management_meta.nil?
149
+ fail ArgumentError, 'management_meta cannot be nil'
150
+ end
151
+
152
+ @management_meta = management_meta
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] name Value to be assigned
157
+ def name=(name)
158
+ if name.nil?
159
+ fail ArgumentError, 'name cannot be nil'
160
+ end
161
+
162
+ @name = name
163
+ end
164
+
165
+ # Checks equality by comparing each attribute.
166
+ # @param [Object] Object to be compared
167
+ def ==(o)
168
+ return true if self.equal?(o)
169
+ self.class == o.class &&
170
+ description == o.description &&
171
+ id == o.id &&
172
+ management_meta == o.management_meta &&
173
+ name == o.name
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(o)
179
+ self == o
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Integer] Hash code
184
+ def hash
185
+ [description, id, management_meta, name].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def self.build_from_hash(attributes)
192
+ return nil unless attributes.is_a?(Hash)
193
+ attributes = attributes.transform_keys(&:to_sym)
194
+ transformed_hash = {}
195
+ openapi_types.each_pair do |key, type|
196
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = nil
198
+ elsif type =~ /\AArray<(.*)>/i
199
+ # check to ensure the input is an array given that the attribute
200
+ # is documented as an array but the input is not
201
+ if attributes[attribute_map[key]].is_a?(Array)
202
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
203
+ end
204
+ elsif !attributes[attribute_map[key]].nil?
205
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
206
+ end
207
+ end
208
+ new(transformed_hash)
209
+ end
210
+
211
+ # Returns the object in the form of hash
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_hash
214
+ hash = {}
215
+ self.class.attribute_map.each_pair do |attr, param|
216
+ value = self.send(attr)
217
+ if value.nil?
218
+ is_nullable = self.class.openapi_nullable.include?(attr)
219
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
220
+ end
221
+
222
+ hash[param] = _to_hash(value)
223
+ end
224
+ hash
225
+ end
226
+
227
+ end
228
+
229
+ end