late-sdk 0.0.950 → 0.0.952

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -0
  3. data/docs/AdCampaignsApi.md +155 -1
  4. data/docs/AdKeyword.md +3 -1
  5. data/docs/AdKeywordQuality.md +24 -0
  6. data/docs/AdScheduleWindow.md +32 -0
  7. data/docs/BoostPostRequest.md +2 -0
  8. data/docs/BoostPostRequestPromotedObject.md +20 -0
  9. data/docs/GetCampaignAdSchedule200Response.md +28 -0
  10. data/docs/GetCampaignAdSchedule200ResponsePerformance.md +22 -0
  11. data/docs/GetCampaignAdSchedule200ResponsePerformanceByDayOfWeekInner.md +26 -0
  12. data/docs/GetCampaignAdSchedule200ResponsePerformanceByHourInner.md +26 -0
  13. data/docs/UpdateCampaignAdSchedule200Response.md +22 -0
  14. data/docs/UpdateCampaignAdScheduleRequest.md +18 -0
  15. data/docs/UpdateCampaignAdScheduleRequestScheduleInner.md +28 -0
  16. data/lib/zernio-sdk/api/ad_campaigns_api.rb +166 -2
  17. data/lib/zernio-sdk/models/ad_keyword.rb +11 -2
  18. data/lib/zernio-sdk/models/ad_keyword_quality.rb +241 -0
  19. data/lib/zernio-sdk/models/ad_schedule_window.rb +329 -0
  20. data/lib/zernio-sdk/models/boost_post_request.rb +10 -1
  21. data/lib/zernio-sdk/models/boost_post_request_promoted_object.rb +159 -0
  22. data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response.rb +197 -0
  23. data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response_performance.rb +174 -0
  24. data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response_performance_by_day_of_week_inner.rb +218 -0
  25. data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response_performance_by_hour_inner.rb +212 -0
  26. data/lib/zernio-sdk/models/update_campaign_ad_schedule200_response.rb +167 -0
  27. data/lib/zernio-sdk/models/update_campaign_ad_schedule_request.rb +176 -0
  28. data/lib/zernio-sdk/models/update_campaign_ad_schedule_request_schedule_inner.rb +362 -0
  29. data/lib/zernio-sdk/version.rb +1 -1
  30. data/lib/zernio-sdk.rb +10 -0
  31. data/openapi.yaml +230 -7
  32. data/spec/api/ad_campaigns_api_spec.rb +31 -1
  33. data/spec/models/ad_keyword_quality_spec.rb +66 -0
  34. data/spec/models/ad_keyword_spec.rb +6 -0
  35. data/spec/models/ad_schedule_window_spec.rb +90 -0
  36. data/spec/models/boost_post_request_promoted_object_spec.rb +42 -0
  37. data/spec/models/boost_post_request_spec.rb +6 -0
  38. data/spec/models/get_campaign_ad_schedule200_response_performance_by_day_of_week_inner_spec.rb +64 -0
  39. data/spec/models/get_campaign_ad_schedule200_response_performance_by_hour_inner_spec.rb +60 -0
  40. data/spec/models/get_campaign_ad_schedule200_response_performance_spec.rb +48 -0
  41. data/spec/models/get_campaign_ad_schedule200_response_spec.rb +66 -0
  42. data/spec/models/update_campaign_ad_schedule200_response_spec.rb +48 -0
  43. data/spec/models/update_campaign_ad_schedule_request_schedule_inner_spec.rb +78 -0
  44. data/spec/models/update_campaign_ad_schedule_request_spec.rb +36 -0
  45. data/zernio-sdk-0.0.952.gem +0 -0
  46. metadata +43 -3
  47. data/zernio-sdk-0.0.950.gem +0 -0
@@ -0,0 +1,212 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GetCampaignAdSchedule200ResponsePerformanceByHourInner < ApiModelBase
18
+ attr_accessor :hour
19
+
20
+ attr_accessor :impressions
21
+
22
+ attr_accessor :clicks
23
+
24
+ # Account currency, not USD-normalized.
25
+ attr_accessor :cost
26
+
27
+ attr_accessor :conversions
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'hour' => :'hour',
33
+ :'impressions' => :'impressions',
34
+ :'clicks' => :'clicks',
35
+ :'cost' => :'cost',
36
+ :'conversions' => :'conversions'
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
+ :'hour' => :'Integer',
54
+ :'impressions' => :'Integer',
55
+ :'clicks' => :'Integer',
56
+ :'cost' => :'Float',
57
+ :'conversions' => :'Float'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetCampaignAdSchedule200ResponsePerformanceByHourInner` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetCampaignAdSchedule200ResponsePerformanceByHourInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'hour')
84
+ self.hour = attributes[:'hour']
85
+ end
86
+
87
+ if attributes.key?(:'impressions')
88
+ self.impressions = attributes[:'impressions']
89
+ end
90
+
91
+ if attributes.key?(:'clicks')
92
+ self.clicks = attributes[:'clicks']
93
+ end
94
+
95
+ if attributes.key?(:'cost')
96
+ self.cost = attributes[:'cost']
97
+ end
98
+
99
+ if attributes.key?(:'conversions')
100
+ self.conversions = attributes[:'conversions']
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 !@hour.nil? && @hour > 23
110
+ invalid_properties.push('invalid value for "hour", must be smaller than or equal to 23.')
111
+ end
112
+
113
+ if !@hour.nil? && @hour < 0
114
+ invalid_properties.push('invalid value for "hour", must be greater than or equal to 0.')
115
+ end
116
+
117
+ invalid_properties
118
+ end
119
+
120
+ # Check to see if the all the properties in the model are valid
121
+ # @return true if the model is valid
122
+ def valid?
123
+ warn '[DEPRECATED] the `valid?` method is obsolete'
124
+ return false if !@hour.nil? && @hour > 23
125
+ return false if !@hour.nil? && @hour < 0
126
+ true
127
+ end
128
+
129
+ # Custom attribute writer method with validation
130
+ # @param [Object] hour Value to be assigned
131
+ def hour=(hour)
132
+ if hour.nil?
133
+ fail ArgumentError, 'hour cannot be nil'
134
+ end
135
+
136
+ if hour > 23
137
+ fail ArgumentError, 'invalid value for "hour", must be smaller than or equal to 23.'
138
+ end
139
+
140
+ if hour < 0
141
+ fail ArgumentError, 'invalid value for "hour", must be greater than or equal to 0.'
142
+ end
143
+
144
+ @hour = hour
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ hour == o.hour &&
153
+ impressions == o.impressions &&
154
+ clicks == o.clicks &&
155
+ cost == o.cost &&
156
+ conversions == o.conversions
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
+ [hour, impressions, clicks, cost, conversions].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
@@ -0,0 +1,167 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class UpdateCampaignAdSchedule200Response < ApiModelBase
18
+ attr_accessor :campaign_id
19
+
20
+ attr_accessor :schedule
21
+
22
+ attr_accessor :serves_around_the_clock
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'campaign_id' => :'campaignId',
28
+ :'schedule' => :'schedule',
29
+ :'serves_around_the_clock' => :'servesAroundTheClock'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'campaign_id' => :'String',
47
+ :'schedule' => :'Array<AdScheduleWindow>',
48
+ :'serves_around_the_clock' => :'Boolean'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UpdateCampaignAdSchedule200Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UpdateCampaignAdSchedule200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'campaign_id')
75
+ self.campaign_id = attributes[:'campaign_id']
76
+ end
77
+
78
+ if attributes.key?(:'schedule')
79
+ if (value = attributes[:'schedule']).is_a?(Array)
80
+ self.schedule = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'serves_around_the_clock')
85
+ self.serves_around_the_clock = attributes[:'serves_around_the_clock']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ campaign_id == o.campaign_id &&
110
+ schedule == o.schedule &&
111
+ serves_around_the_clock == o.serves_around_the_clock
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [campaign_id, schedule, serves_around_the_clock].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Returns the object in the form of hash
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_hash
152
+ hash = {}
153
+ self.class.attribute_map.each_pair do |attr, param|
154
+ value = self.send(attr)
155
+ if value.nil?
156
+ is_nullable = self.class.openapi_nullable.include?(attr)
157
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
+ end
159
+
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ end
166
+
167
+ end
@@ -0,0 +1,176 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class UpdateCampaignAdScheduleRequest < ApiModelBase
18
+ # The complete set of windows. Required, so clearing the schedule is always deliberate rather than an omission.
19
+ attr_accessor :schedule
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'schedule' => :'schedule'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'schedule' => :'Array<UpdateCampaignAdScheduleRequestScheduleInner>'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UpdateCampaignAdScheduleRequest` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UpdateCampaignAdScheduleRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'schedule')
68
+ if (value = attributes[:'schedule']).is_a?(Array)
69
+ self.schedule = value
70
+ end
71
+ else
72
+ self.schedule = nil
73
+ end
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properties with the reasons
78
+ def list_invalid_properties
79
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
80
+ invalid_properties = Array.new
81
+ if @schedule.nil?
82
+ invalid_properties.push('invalid value for "schedule", schedule cannot be nil.')
83
+ end
84
+
85
+ if @schedule.length > 42
86
+ invalid_properties.push('invalid value for "schedule", number of items must be less than or equal to 42.')
87
+ end
88
+
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ warn '[DEPRECATED] the `valid?` method is obsolete'
96
+ return false if @schedule.nil?
97
+ return false if @schedule.length > 42
98
+ true
99
+ end
100
+
101
+ # Custom attribute writer method with validation
102
+ # @param [Object] schedule Value to be assigned
103
+ def schedule=(schedule)
104
+ if schedule.nil?
105
+ fail ArgumentError, 'schedule cannot be nil'
106
+ end
107
+
108
+ if schedule.length > 42
109
+ fail ArgumentError, 'invalid value for "schedule", number of items must be less than or equal to 42.'
110
+ end
111
+
112
+ @schedule = schedule
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ schedule == o.schedule
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [schedule].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Returns the object in the form of hash
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_hash
161
+ hash = {}
162
+ self.class.attribute_map.each_pair do |attr, param|
163
+ value = self.send(attr)
164
+ if value.nil?
165
+ is_nullable = self.class.openapi_nullable.include?(attr)
166
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
167
+ end
168
+
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ end
175
+
176
+ end