zernio-sdk 0.0.536 → 0.0.538

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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -1
  3. data/docs/AdAudiencesApi.md +5 -5
  4. data/docs/AdCampaignsApi.md +142 -0
  5. data/docs/AdsApi.md +715 -33
  6. data/docs/CreateAdCampaign201Response.md +24 -0
  7. data/docs/CreateAdCampaignRequest.md +32 -0
  8. data/docs/CreateAdCreative201Response.md +20 -0
  9. data/docs/CreateAdCreativeRequest.md +38 -0
  10. data/docs/CreateAdCreativeRequestCarouselCardsInner.md +26 -0
  11. data/docs/DeleteAdCreative200Response.md +20 -0
  12. data/docs/DuplicateAd200Response.md +22 -0
  13. data/docs/DuplicateAdRequest.md +28 -0
  14. data/docs/DuplicateAdSet200Response.md +22 -0
  15. data/docs/DuplicateAdSetRequest.md +36 -0
  16. data/docs/GetAdCreative200Response.md +18 -0
  17. data/docs/ListAdCreatives200Response.md +22 -0
  18. data/docs/ListAdImages200Response.md +22 -0
  19. data/docs/ListAdLabels200Response.md +22 -0
  20. data/docs/ListHighDemandPeriods200Response.md +22 -0
  21. data/docs/UpdateAdCreative200Response.md +22 -0
  22. data/docs/UpdateAdCreativeRequest.md +20 -0
  23. data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
  24. data/lib/zernio-sdk/api/ad_campaigns_api.rb +142 -0
  25. data/lib/zernio-sdk/api/ads_api.rb +748 -48
  26. data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +210 -0
  27. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +343 -0
  28. data/lib/zernio-sdk/models/create_ad_creative201_response.rb +157 -0
  29. data/lib/zernio-sdk/models/create_ad_creative_request.rb +390 -0
  30. data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +255 -0
  31. data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +156 -0
  32. data/lib/zernio-sdk/models/duplicate_ad200_response.rb +200 -0
  33. data/lib/zernio-sdk/models/duplicate_ad_request.rb +243 -0
  34. data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +201 -0
  35. data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +302 -0
  36. data/lib/zernio-sdk/models/get_ad_creative200_response.rb +148 -0
  37. data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +167 -0
  38. data/lib/zernio-sdk/models/list_ad_images200_response.rb +167 -0
  39. data/lib/zernio-sdk/models/list_ad_labels200_response.rb +167 -0
  40. data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +168 -0
  41. data/lib/zernio-sdk/models/update_ad_creative200_response.rb +165 -0
  42. data/lib/zernio-sdk/models/update_ad_creative_request.rb +200 -0
  43. data/lib/zernio-sdk/version.rb +1 -1
  44. data/lib/zernio-sdk.rb +17 -0
  45. data/openapi.yaml +445 -7
  46. data/spec/api/ad_audiences_api_spec.rb +2 -2
  47. data/spec/api/ad_campaigns_api_spec.rb +25 -0
  48. data/spec/api/ads_api_spec.rb +128 -0
  49. data/spec/models/create_ad_campaign201_response_spec.rb +58 -0
  50. data/spec/models/create_ad_campaign_request_spec.rb +94 -0
  51. data/spec/models/create_ad_creative201_response_spec.rb +42 -0
  52. data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +60 -0
  53. data/spec/models/create_ad_creative_request_spec.rb +96 -0
  54. data/spec/models/delete_ad_creative200_response_spec.rb +42 -0
  55. data/spec/models/duplicate_ad200_response_spec.rb +52 -0
  56. data/spec/models/duplicate_ad_request_spec.rb +74 -0
  57. data/spec/models/duplicate_ad_set200_response_spec.rb +52 -0
  58. data/spec/models/duplicate_ad_set_request_spec.rb +102 -0
  59. data/spec/models/get_ad_creative200_response_spec.rb +36 -0
  60. data/spec/models/list_ad_creatives200_response_spec.rb +48 -0
  61. data/spec/models/list_ad_images200_response_spec.rb +48 -0
  62. data/spec/models/list_ad_labels200_response_spec.rb +48 -0
  63. data/spec/models/list_high_demand_periods200_response_spec.rb +48 -0
  64. data/spec/models/update_ad_creative200_response_spec.rb +48 -0
  65. data/spec/models/update_ad_creative_request_spec.rb +42 -0
  66. metadata +70 -2
@@ -0,0 +1,156 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
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 DeleteAdCreative200Response < ApiModelBase
18
+ attr_accessor :creative_id
19
+
20
+ attr_accessor :message
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'creative_id' => :'creativeId',
26
+ :'message' => :'message'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'creative_id' => :'String',
44
+ :'message' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DeleteAdCreative200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DeleteAdCreative200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'creative_id')
71
+ self.creative_id = attributes[:'creative_id']
72
+ end
73
+
74
+ if attributes.key?(:'message')
75
+ self.message = attributes[:'message']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ creative_id == o.creative_id &&
100
+ message == o.message
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [creative_id, message].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+
154
+ end
155
+
156
+ end
@@ -0,0 +1,200 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
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 DuplicateAd200Response < ApiModelBase
18
+ # Platform ID of the new ad
19
+ attr_accessor :copied_ad_id
20
+
21
+ attr_accessor :discovery
22
+
23
+ attr_accessor :raw
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'copied_ad_id' => :'copiedAdId',
51
+ :'discovery' => :'discovery',
52
+ :'raw' => :'raw'
53
+ }
54
+ end
55
+
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ acceptable_attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'copied_ad_id' => :'String',
70
+ :'discovery' => :'String',
71
+ :'raw' => :'Object'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DuplicateAd200Response` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DuplicateAd200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'copied_ad_id')
98
+ self.copied_ad_id = attributes[:'copied_ad_id']
99
+ end
100
+
101
+ if attributes.key?(:'discovery')
102
+ self.discovery = attributes[:'discovery']
103
+ end
104
+
105
+ if attributes.key?(:'raw')
106
+ self.raw = attributes[:'raw']
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
+ invalid_properties = Array.new
115
+ invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ warn '[DEPRECATED] the `valid?` method is obsolete'
122
+ discovery_validator = EnumAttributeValidator.new('String', ["triggered", "skipped", "failed"])
123
+ return false unless discovery_validator.valid?(@discovery)
124
+ true
125
+ end
126
+
127
+ # Custom attribute writer method checking allowed values (enum).
128
+ # @param [Object] discovery Object to be assigned
129
+ def discovery=(discovery)
130
+ validator = EnumAttributeValidator.new('String', ["triggered", "skipped", "failed"])
131
+ unless validator.valid?(discovery)
132
+ fail ArgumentError, "invalid value for \"discovery\", must be one of #{validator.allowable_values}."
133
+ end
134
+ @discovery = discovery
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ copied_ad_id == o.copied_ad_id &&
143
+ discovery == o.discovery &&
144
+ raw == o.raw
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [copied_ad_id, discovery, raw].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ attributes = attributes.transform_keys(&:to_sym)
165
+ transformed_hash = {}
166
+ openapi_types.each_pair do |key, type|
167
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = nil
169
+ elsif type =~ /\AArray<(.*)>/i
170
+ # check to ensure the input is an array given that the attribute
171
+ # is documented as an array but the input is not
172
+ if attributes[attribute_map[key]].is_a?(Array)
173
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
174
+ end
175
+ elsif !attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
177
+ end
178
+ end
179
+ new(transformed_hash)
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ end
199
+
200
+ end
@@ -0,0 +1,243 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
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 DuplicateAdRequest < ApiModelBase
18
+ # Destination platform ad set id (defaults to the source's ad set)
19
+ attr_accessor :ad_set_id
20
+
21
+ attr_accessor :status_option
22
+
23
+ attr_accessor :rename_strategy
24
+
25
+ attr_accessor :rename_prefix
26
+
27
+ attr_accessor :rename_suffix
28
+
29
+ attr_accessor :sync_after
30
+
31
+ class EnumAttributeValidator
32
+ attr_reader :datatype
33
+ attr_reader :allowable_values
34
+
35
+ def initialize(datatype, allowable_values)
36
+ @allowable_values = allowable_values.map do |value|
37
+ case datatype.to_s
38
+ when /Integer/i
39
+ value.to_i
40
+ when /Float/i
41
+ value.to_f
42
+ else
43
+ value
44
+ end
45
+ end
46
+ end
47
+
48
+ def valid?(value)
49
+ !value || allowable_values.include?(value)
50
+ end
51
+ end
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+ :'ad_set_id' => :'adSetId',
57
+ :'status_option' => :'statusOption',
58
+ :'rename_strategy' => :'renameStrategy',
59
+ :'rename_prefix' => :'renamePrefix',
60
+ :'rename_suffix' => :'renameSuffix',
61
+ :'sync_after' => :'syncAfter'
62
+ }
63
+ end
64
+
65
+ # Returns attribute mapping this model knows about
66
+ def self.acceptable_attribute_map
67
+ attribute_map
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ acceptable_attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'ad_set_id' => :'String',
79
+ :'status_option' => :'String',
80
+ :'rename_strategy' => :'String',
81
+ :'rename_prefix' => :'String',
82
+ :'rename_suffix' => :'String',
83
+ :'sync_after' => :'Boolean'
84
+ }
85
+ end
86
+
87
+ # List of attributes with nullable: true
88
+ def self.openapi_nullable
89
+ Set.new([
90
+ ])
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ def initialize(attributes = {})
96
+ if (!attributes.is_a?(Hash))
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DuplicateAdRequest` initialize method"
98
+ end
99
+
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ acceptable_attribute_map = self.class.acceptable_attribute_map
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!acceptable_attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DuplicateAdRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'ad_set_id')
110
+ self.ad_set_id = attributes[:'ad_set_id']
111
+ end
112
+
113
+ if attributes.key?(:'status_option')
114
+ self.status_option = attributes[:'status_option']
115
+ else
116
+ self.status_option = 'PAUSED'
117
+ end
118
+
119
+ if attributes.key?(:'rename_strategy')
120
+ self.rename_strategy = attributes[:'rename_strategy']
121
+ end
122
+
123
+ if attributes.key?(:'rename_prefix')
124
+ self.rename_prefix = attributes[:'rename_prefix']
125
+ end
126
+
127
+ if attributes.key?(:'rename_suffix')
128
+ self.rename_suffix = attributes[:'rename_suffix']
129
+ end
130
+
131
+ if attributes.key?(:'sync_after')
132
+ self.sync_after = attributes[:'sync_after']
133
+ else
134
+ self.sync_after = true
135
+ end
136
+ end
137
+
138
+ # Show invalid properties with the reasons. Usually used together with valid?
139
+ # @return Array for valid properties with the reasons
140
+ def list_invalid_properties
141
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
142
+ invalid_properties = Array.new
143
+ invalid_properties
144
+ end
145
+
146
+ # Check to see if the all the properties in the model are valid
147
+ # @return true if the model is valid
148
+ def valid?
149
+ warn '[DEPRECATED] the `valid?` method is obsolete'
150
+ status_option_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED", "INHERITED_FROM_SOURCE"])
151
+ return false unless status_option_validator.valid?(@status_option)
152
+ rename_strategy_validator = EnumAttributeValidator.new('String', ["DEEP_RENAME", "ONLY_TOP_LEVEL_RENAME", "NO_RENAME"])
153
+ return false unless rename_strategy_validator.valid?(@rename_strategy)
154
+ true
155
+ end
156
+
157
+ # Custom attribute writer method checking allowed values (enum).
158
+ # @param [Object] status_option Object to be assigned
159
+ def status_option=(status_option)
160
+ validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED", "INHERITED_FROM_SOURCE"])
161
+ unless validator.valid?(status_option)
162
+ fail ArgumentError, "invalid value for \"status_option\", must be one of #{validator.allowable_values}."
163
+ end
164
+ @status_option = status_option
165
+ end
166
+
167
+ # Custom attribute writer method checking allowed values (enum).
168
+ # @param [Object] rename_strategy Object to be assigned
169
+ def rename_strategy=(rename_strategy)
170
+ validator = EnumAttributeValidator.new('String', ["DEEP_RENAME", "ONLY_TOP_LEVEL_RENAME", "NO_RENAME"])
171
+ unless validator.valid?(rename_strategy)
172
+ fail ArgumentError, "invalid value for \"rename_strategy\", must be one of #{validator.allowable_values}."
173
+ end
174
+ @rename_strategy = rename_strategy
175
+ end
176
+
177
+ # Checks equality by comparing each attribute.
178
+ # @param [Object] Object to be compared
179
+ def ==(o)
180
+ return true if self.equal?(o)
181
+ self.class == o.class &&
182
+ ad_set_id == o.ad_set_id &&
183
+ status_option == o.status_option &&
184
+ rename_strategy == o.rename_strategy &&
185
+ rename_prefix == o.rename_prefix &&
186
+ rename_suffix == o.rename_suffix &&
187
+ sync_after == o.sync_after
188
+ end
189
+
190
+ # @see the `==` method
191
+ # @param [Object] Object to be compared
192
+ def eql?(o)
193
+ self == o
194
+ end
195
+
196
+ # Calculates hash code according to all attributes.
197
+ # @return [Integer] Hash code
198
+ def hash
199
+ [ad_set_id, status_option, rename_strategy, rename_prefix, rename_suffix, sync_after].hash
200
+ end
201
+
202
+ # Builds the object from hash
203
+ # @param [Hash] attributes Model attributes in the form of hash
204
+ # @return [Object] Returns the model itself
205
+ def self.build_from_hash(attributes)
206
+ return nil unless attributes.is_a?(Hash)
207
+ attributes = attributes.transform_keys(&:to_sym)
208
+ transformed_hash = {}
209
+ openapi_types.each_pair do |key, type|
210
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
211
+ transformed_hash["#{key}"] = nil
212
+ elsif type =~ /\AArray<(.*)>/i
213
+ # check to ensure the input is an array given that the attribute
214
+ # is documented as an array but the input is not
215
+ if attributes[attribute_map[key]].is_a?(Array)
216
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
217
+ end
218
+ elsif !attributes[attribute_map[key]].nil?
219
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
220
+ end
221
+ end
222
+ new(transformed_hash)
223
+ end
224
+
225
+ # Returns the object in the form of hash
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_hash
228
+ hash = {}
229
+ self.class.attribute_map.each_pair do |attr, param|
230
+ value = self.send(attr)
231
+ if value.nil?
232
+ is_nullable = self.class.openapi_nullable.include?(attr)
233
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
234
+ end
235
+
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ end
242
+
243
+ end