incident_io_api 2.14.0 → 2.16.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/on_call_notification_pauses_v2_api.rb +162 -0
- data/lib/incident_io/models/audit_log_telemetry_data_source_access_policy_changed_metadata_v2_v2.rb +249 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_access_policy_changed_v2.rb +326 -0
- data/lib/incident_io/models/on_call_notification_pause_v2.rb +328 -0
- data/lib/incident_io/models/on_call_notification_pauses_list_result_v2.rb +193 -0
- data/lib/incident_io/models/on_call_notification_pauses_show_result_v2.rb +164 -0
- data/lib/incident_io/version.rb +1 -1
- data/lib/incident_io.rb +6 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f9a9363634a38110736a97de7f1de72cd14592082338c687e047326bd4ff3183
|
|
4
|
+
data.tar.gz: 26d9f561d3c8f61e3a9235cf97c3a4f52d99849d6f3182802da1b3a61e2f4e67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 201fdb0195d5d078cc0af7cc6ff7bf705c46a5f82281214b0929c5e967b552a1da5a9cddba05b3303fce88e6e5c1bdb39238c0a656ae4ab6289c122003e4e831
|
|
7
|
+
data.tar.gz: f73a7b54ce175a26f206f2834bb91aebda37818fbe04a5d355e376a3ee497cfab0a3724aefe9411ea6378a45d11bf0fd97542ea0771ef77c0c183c12eba84a93
|
|
@@ -0,0 +1,162 @@
|
|
|
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 OnCallNotificationPausesV2Api
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List On-call Notification Pauses V2
|
|
23
|
+
# List on-call notification pauses across the organisation. By default this returns pauses that are active now or scheduled for the future. Cancelled pauses are never returned, and pauses that were resumed early have ends_at set to when they were resumed.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [Time] :from Only return pauses that end after this time. Defaults to now, so by default only active and upcoming pauses are returned.
|
|
26
|
+
# @option opts [Time] :to Only return pauses that start before this time
|
|
27
|
+
# @option opts [Integer] :page_size Integer number of records to return (default to 25)
|
|
28
|
+
# @option opts [String] :after A pause's ID. This endpoint will return a list of pauses after this ID in relation to the API response order.
|
|
29
|
+
# @return [OnCallNotificationPausesListResultV2]
|
|
30
|
+
def on_call_notification_pauses_v2_list(opts = {})
|
|
31
|
+
data, _status_code, _headers = on_call_notification_pauses_v2_list_with_http_info(opts)
|
|
32
|
+
data
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# List On-call Notification Pauses V2
|
|
36
|
+
# List on-call notification pauses across the organisation. By default this returns pauses that are active now or scheduled for the future. Cancelled pauses are never returned, and pauses that were resumed early have ends_at set to when they were resumed.
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @option opts [Time] :from Only return pauses that end after this time. Defaults to now, so by default only active and upcoming pauses are returned.
|
|
39
|
+
# @option opts [Time] :to Only return pauses that start before this time
|
|
40
|
+
# @option opts [Integer] :page_size Integer number of records to return (default to 25)
|
|
41
|
+
# @option opts [String] :after A pause's ID. This endpoint will return a list of pauses after this ID in relation to the API response order.
|
|
42
|
+
# @return [Array<(OnCallNotificationPausesListResultV2, Integer, Hash)>] OnCallNotificationPausesListResultV2 data, response status code and response headers
|
|
43
|
+
def on_call_notification_pauses_v2_list_with_http_info(opts = {})
|
|
44
|
+
if @api_client.config.debugging
|
|
45
|
+
@api_client.config.logger.debug 'Calling API: OnCallNotificationPausesV2Api.on_call_notification_pauses_v2_list ...'
|
|
46
|
+
end
|
|
47
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 250
|
|
48
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OnCallNotificationPausesV2Api.on_call_notification_pauses_v2_list, must be smaller than or equal to 250.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
52
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OnCallNotificationPausesV2Api.on_call_notification_pauses_v2_list, must be greater than or equal to 1.'
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# resource path
|
|
56
|
+
local_var_path = '/v2/on_call_notification_pauses'
|
|
57
|
+
|
|
58
|
+
# query parameters
|
|
59
|
+
query_params = opts[:query_params] || {}
|
|
60
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
61
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
62
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
63
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
64
|
+
|
|
65
|
+
# header parameters
|
|
66
|
+
header_params = opts[:header_params] || {}
|
|
67
|
+
# HTTP header 'Accept' (if needed)
|
|
68
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
69
|
+
|
|
70
|
+
# form parameters
|
|
71
|
+
form_params = opts[:form_params] || {}
|
|
72
|
+
|
|
73
|
+
# http body (model)
|
|
74
|
+
post_body = opts[:debug_body]
|
|
75
|
+
|
|
76
|
+
# return_type
|
|
77
|
+
return_type = opts[:debug_return_type] || 'OnCallNotificationPausesListResultV2'
|
|
78
|
+
|
|
79
|
+
# auth_names
|
|
80
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
81
|
+
|
|
82
|
+
new_options = opts.merge(
|
|
83
|
+
:operation => :"OnCallNotificationPausesV2Api.on_call_notification_pauses_v2_list",
|
|
84
|
+
:header_params => header_params,
|
|
85
|
+
:query_params => query_params,
|
|
86
|
+
:form_params => form_params,
|
|
87
|
+
:body => post_body,
|
|
88
|
+
:auth_names => auth_names,
|
|
89
|
+
:return_type => return_type
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug "API called: OnCallNotificationPausesV2Api#on_call_notification_pauses_v2_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Show On-call Notification Pauses V2
|
|
100
|
+
# Show a single on-call notification pause. Cancelled pauses are not found.
|
|
101
|
+
# @param id [String] The pause's ID
|
|
102
|
+
# @param [Hash] opts the optional parameters
|
|
103
|
+
# @return [OnCallNotificationPausesShowResultV2]
|
|
104
|
+
def on_call_notification_pauses_v2_show(id, opts = {})
|
|
105
|
+
data, _status_code, _headers = on_call_notification_pauses_v2_show_with_http_info(id, opts)
|
|
106
|
+
data
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Show On-call Notification Pauses V2
|
|
110
|
+
# Show a single on-call notification pause. Cancelled pauses are not found.
|
|
111
|
+
# @param id [String] The pause's ID
|
|
112
|
+
# @param [Hash] opts the optional parameters
|
|
113
|
+
# @return [Array<(OnCallNotificationPausesShowResultV2, Integer, Hash)>] OnCallNotificationPausesShowResultV2 data, response status code and response headers
|
|
114
|
+
def on_call_notification_pauses_v2_show_with_http_info(id, opts = {})
|
|
115
|
+
if @api_client.config.debugging
|
|
116
|
+
@api_client.config.logger.debug 'Calling API: OnCallNotificationPausesV2Api.on_call_notification_pauses_v2_show ...'
|
|
117
|
+
end
|
|
118
|
+
# verify the required parameter 'id' is set
|
|
119
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
120
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OnCallNotificationPausesV2Api.on_call_notification_pauses_v2_show"
|
|
121
|
+
end
|
|
122
|
+
# resource path
|
|
123
|
+
local_var_path = '/v2/on_call_notification_pauses/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
124
|
+
|
|
125
|
+
# query parameters
|
|
126
|
+
query_params = opts[:query_params] || {}
|
|
127
|
+
|
|
128
|
+
# header parameters
|
|
129
|
+
header_params = opts[:header_params] || {}
|
|
130
|
+
# HTTP header 'Accept' (if needed)
|
|
131
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
132
|
+
|
|
133
|
+
# form parameters
|
|
134
|
+
form_params = opts[:form_params] || {}
|
|
135
|
+
|
|
136
|
+
# http body (model)
|
|
137
|
+
post_body = opts[:debug_body]
|
|
138
|
+
|
|
139
|
+
# return_type
|
|
140
|
+
return_type = opts[:debug_return_type] || 'OnCallNotificationPausesShowResultV2'
|
|
141
|
+
|
|
142
|
+
# auth_names
|
|
143
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
144
|
+
|
|
145
|
+
new_options = opts.merge(
|
|
146
|
+
:operation => :"OnCallNotificationPausesV2Api.on_call_notification_pauses_v2_show",
|
|
147
|
+
:header_params => header_params,
|
|
148
|
+
:query_params => query_params,
|
|
149
|
+
:form_params => form_params,
|
|
150
|
+
:body => post_body,
|
|
151
|
+
:auth_names => auth_names,
|
|
152
|
+
:return_type => return_type
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
156
|
+
if @api_client.config.debugging
|
|
157
|
+
@api_client.config.logger.debug "API called: OnCallNotificationPausesV2Api#on_call_notification_pauses_v2_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
158
|
+
end
|
|
159
|
+
return data, status_code, headers
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
data/lib/incident_io/models/audit_log_telemetry_data_source_access_policy_changed_metadata_v2_v2.rb
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
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 AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2 < ApiModelBase
|
|
18
|
+
# The policy after the change, as JSON
|
|
19
|
+
attr_accessor :after
|
|
20
|
+
|
|
21
|
+
# The policy before the change, as JSON; empty when the connector had no access policy
|
|
22
|
+
attr_accessor :before
|
|
23
|
+
|
|
24
|
+
# Shared by every entry the same save produced, so the decision that changed and the access it reached can be read together
|
|
25
|
+
attr_accessor :change_id
|
|
26
|
+
|
|
27
|
+
# The default notification channels after the change, as JSON; absent when they did not change, empty when there are none
|
|
28
|
+
attr_accessor :notification_channels_after
|
|
29
|
+
|
|
30
|
+
# The default notification channels before the change, as JSON; absent when they did not change, empty when there were none
|
|
31
|
+
attr_accessor :notification_channels_before
|
|
32
|
+
|
|
33
|
+
# ID of the user who saved the policy, absent when staff tooling saved it
|
|
34
|
+
attr_accessor :set_by
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'after' => :'after',
|
|
40
|
+
:'before' => :'before',
|
|
41
|
+
:'change_id' => :'change_id',
|
|
42
|
+
:'notification_channels_after' => :'notification_channels_after',
|
|
43
|
+
:'notification_channels_before' => :'notification_channels_before',
|
|
44
|
+
:'set_by' => :'set_by'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns attribute mapping this model knows about
|
|
49
|
+
def self.acceptable_attribute_map
|
|
50
|
+
attribute_map
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns all the JSON keys this model knows about
|
|
54
|
+
def self.acceptable_attributes
|
|
55
|
+
acceptable_attribute_map.values
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Attribute type mapping.
|
|
59
|
+
def self.openapi_types
|
|
60
|
+
{
|
|
61
|
+
:'after' => :'String',
|
|
62
|
+
:'before' => :'String',
|
|
63
|
+
:'change_id' => :'String',
|
|
64
|
+
:'notification_channels_after' => :'String',
|
|
65
|
+
:'notification_channels_before' => :'String',
|
|
66
|
+
:'set_by' => :'String'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
86
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
88
|
+
end
|
|
89
|
+
h[k.to_sym] = v
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'after')
|
|
93
|
+
self.after = attributes[:'after']
|
|
94
|
+
else
|
|
95
|
+
self.after = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'before')
|
|
99
|
+
self.before = attributes[:'before']
|
|
100
|
+
else
|
|
101
|
+
self.before = nil
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'change_id')
|
|
105
|
+
self.change_id = attributes[:'change_id']
|
|
106
|
+
else
|
|
107
|
+
self.change_id = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'notification_channels_after')
|
|
111
|
+
self.notification_channels_after = attributes[:'notification_channels_after']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'notification_channels_before')
|
|
115
|
+
self.notification_channels_before = attributes[:'notification_channels_before']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'set_by')
|
|
119
|
+
self.set_by = attributes[:'set_by']
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
124
|
+
# @return Array for valid properties with the reasons
|
|
125
|
+
def list_invalid_properties
|
|
126
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
127
|
+
invalid_properties = Array.new
|
|
128
|
+
if @after.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "after", after cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if @before.nil?
|
|
133
|
+
invalid_properties.push('invalid value for "before", before cannot be nil.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if @change_id.nil?
|
|
137
|
+
invalid_properties.push('invalid value for "change_id", change_id cannot be nil.')
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
invalid_properties
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Check to see if the all the properties in the model are valid
|
|
144
|
+
# @return true if the model is valid
|
|
145
|
+
def valid?
|
|
146
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
147
|
+
return false if @after.nil?
|
|
148
|
+
return false if @before.nil?
|
|
149
|
+
return false if @change_id.nil?
|
|
150
|
+
true
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Custom attribute writer method with validation
|
|
154
|
+
# @param [Object] after Value to be assigned
|
|
155
|
+
def after=(after)
|
|
156
|
+
if after.nil?
|
|
157
|
+
fail ArgumentError, 'after cannot be nil'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
@after = after
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Custom attribute writer method with validation
|
|
164
|
+
# @param [Object] before Value to be assigned
|
|
165
|
+
def before=(before)
|
|
166
|
+
if before.nil?
|
|
167
|
+
fail ArgumentError, 'before cannot be nil'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@before = before
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] change_id Value to be assigned
|
|
175
|
+
def change_id=(change_id)
|
|
176
|
+
if change_id.nil?
|
|
177
|
+
fail ArgumentError, 'change_id cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
@change_id = change_id
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Checks equality by comparing each attribute.
|
|
184
|
+
# @param [Object] Object to be compared
|
|
185
|
+
def ==(o)
|
|
186
|
+
return true if self.equal?(o)
|
|
187
|
+
self.class == o.class &&
|
|
188
|
+
after == o.after &&
|
|
189
|
+
before == o.before &&
|
|
190
|
+
change_id == o.change_id &&
|
|
191
|
+
notification_channels_after == o.notification_channels_after &&
|
|
192
|
+
notification_channels_before == o.notification_channels_before &&
|
|
193
|
+
set_by == o.set_by
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# @see the `==` method
|
|
197
|
+
# @param [Object] Object to be compared
|
|
198
|
+
def eql?(o)
|
|
199
|
+
self == o
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Calculates hash code according to all attributes.
|
|
203
|
+
# @return [Integer] Hash code
|
|
204
|
+
def hash
|
|
205
|
+
[after, before, change_id, notification_channels_after, notification_channels_before, set_by].hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Builds the object from hash
|
|
209
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
210
|
+
# @return [Object] Returns the model itself
|
|
211
|
+
def self.build_from_hash(attributes)
|
|
212
|
+
return nil unless attributes.is_a?(Hash)
|
|
213
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
214
|
+
transformed_hash = {}
|
|
215
|
+
openapi_types.each_pair do |key, type|
|
|
216
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
217
|
+
transformed_hash["#{key}"] = nil
|
|
218
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
219
|
+
# check to ensure the input is an array given that the attribute
|
|
220
|
+
# is documented as an array but the input is not
|
|
221
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
222
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
223
|
+
end
|
|
224
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
225
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
new(transformed_hash)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Returns the object in the form of hash
|
|
232
|
+
# @return [Hash] Returns the object in the form of hash
|
|
233
|
+
def to_hash
|
|
234
|
+
hash = {}
|
|
235
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
236
|
+
value = self.send(attr)
|
|
237
|
+
if value.nil?
|
|
238
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
239
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
hash[param] = _to_hash(value)
|
|
243
|
+
end
|
|
244
|
+
hash
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
end
|