hubspot-api-client 3.3.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/hubspot-api-client.rb +61 -0
- data/lib/hubspot/codegen/cms/audit-logs/api/default_api.rb +106 -0
- data/lib/hubspot/codegen/cms/audit-logs/api_client.rb +422 -0
- data/lib/hubspot/codegen/cms/audit-logs/api_error.rb +61 -0
- data/lib/hubspot/codegen/cms/audit-logs/configuration.rb +258 -0
- data/lib/hubspot/codegen/cms/audit-logs/models/collection_response_public_audit_log.rb +226 -0
- data/lib/hubspot/codegen/cms/audit-logs/models/error.rb +292 -0
- data/lib/hubspot/codegen/cms/audit-logs/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/cms/audit-logs/models/next_page.rb +224 -0
- data/lib/hubspot/codegen/cms/audit-logs/models/paging.rb +210 -0
- data/lib/hubspot/codegen/cms/audit-logs/models/public_audit_log.rb +352 -0
- data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +183 -0
- data/lib/hubspot/codegen/cms/domains/api_client.rb +422 -0
- data/lib/hubspot/codegen/cms/domains/api_error.rb +61 -0
- data/lib/hubspot/codegen/cms/domains/configuration.rb +258 -0
- data/lib/hubspot/codegen/cms/domains/models/collection_response_with_total_domain.rb +240 -0
- data/lib/hubspot/codegen/cms/domains/models/domain.rb +1091 -0
- data/lib/hubspot/codegen/cms/domains/models/domain_cdn_config.rb +497 -0
- data/lib/hubspot/codegen/cms/domains/models/domain_setup_info.rb +231 -0
- data/lib/hubspot/codegen/cms/domains/models/error.rb +292 -0
- data/lib/hubspot/codegen/cms/domains/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/cms/domains/models/next_page.rb +224 -0
- data/lib/hubspot/codegen/cms/domains/models/paging.rb +210 -0
- data/lib/hubspot/codegen/cms/performance/api/default_api.rb +186 -0
- data/lib/hubspot/codegen/cms/performance/api_client.rb +422 -0
- data/lib/hubspot/codegen/cms/performance/api_error.rb +61 -0
- data/lib/hubspot/codegen/cms/performance/configuration.rb +258 -0
- data/lib/hubspot/codegen/cms/performance/models/error.rb +292 -0
- data/lib/hubspot/codegen/cms/performance/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/cms/performance/models/performance_view.rb +528 -0
- data/lib/hubspot/codegen/cms/performance/models/public_performance_response.rb +332 -0
- data/lib/hubspot/codegen/cms/site-search/api/default_api.rb +225 -0
- data/lib/hubspot/codegen/cms/site-search/api_client.rb +422 -0
- data/lib/hubspot/codegen/cms/site-search/api_error.rb +61 -0
- data/lib/hubspot/codegen/cms/site-search/configuration.rb +258 -0
- data/lib/hubspot/codegen/cms/site-search/models/content_search_result.rb +427 -0
- data/lib/hubspot/codegen/cms/site-search/models/error.rb +292 -0
- data/lib/hubspot/codegen/cms/site-search/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/cms/site-search/models/indexed_data.rb +279 -0
- data/lib/hubspot/codegen/cms/site-search/models/public_search_results.rb +282 -0
- data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +257 -0
- data/lib/hubspot/codegen/cms/url-redirects/api/redirects_api.rb +368 -0
- data/lib/hubspot/codegen/cms/url-redirects/api_client.rb +422 -0
- data/lib/hubspot/codegen/cms/url-redirects/api_error.rb +61 -0
- data/lib/hubspot/codegen/cms/url-redirects/configuration.rb +258 -0
- data/lib/hubspot/codegen/cms/url-redirects/models/collection_response_with_total_url_mapping.rb +242 -0
- data/lib/hubspot/codegen/cms/url-redirects/models/error.rb +292 -0
- data/lib/hubspot/codegen/cms/url-redirects/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/cms/url-redirects/models/next_page.rb +224 -0
- data/lib/hubspot/codegen/cms/url-redirects/models/paging.rb +210 -0
- data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping.rb +596 -0
- data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping_create_request_body.rb +306 -0
- data/lib/hubspot/version.rb +1 -1
- data/sample-apps/search-result-paging-app/.env.template +4 -0
- data/sample-apps/search-result-paging-app/.gitignore +35 -0
- data/sample-apps/search-result-paging-app/.rspec +1 -0
- data/sample-apps/search-result-paging-app/.ruby-version +1 -0
- data/sample-apps/search-result-paging-app/Dockerfile +22 -0
- data/sample-apps/search-result-paging-app/Gemfile +35 -0
- data/sample-apps/search-result-paging-app/Gemfile.lock +279 -0
- data/sample-apps/search-result-paging-app/README.md +0 -0
- data/sample-apps/search-result-paging-app/Rakefile +6 -0
- data/sample-apps/search-result-paging-app/app/assets/config/manifest.js +3 -0
- data/sample-apps/search-result-paging-app/app/assets/images/.keep +0 -0
- data/sample-apps/search-result-paging-app/app/assets/javascripts/application.js +25 -0
- data/sample-apps/search-result-paging-app/app/assets/javascripts/cable.js +13 -0
- data/sample-apps/search-result-paging-app/app/assets/javascripts/channels/.keep +0 -0
- data/sample-apps/search-result-paging-app/app/assets/stylesheets/application.css +77 -0
- data/sample-apps/search-result-paging-app/app/controllers/application_controller.rb +12 -0
- data/sample-apps/search-result-paging-app/app/controllers/concerns/.keep +0 -0
- data/sample-apps/search-result-paging-app/app/controllers/concerns/exception_handler.rb +12 -0
- data/sample-apps/search-result-paging-app/app/controllers/home_controller.rb +14 -0
- data/sample-apps/search-result-paging-app/app/controllers/oauth/authorization_controller.rb +19 -0
- data/sample-apps/search-result-paging-app/app/helpers/application_helper.rb +2 -0
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/authorize.rb +17 -0
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/get_authorization_uri.rb +35 -0
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb +21 -0
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/generate.rb +28 -0
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/refresh.rb +35 -0
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/contacts/get_page.rb +26 -0
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/contacts/search.rb +35 -0
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/properties/create.rb +23 -0
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/properties/destroy.rb +16 -0
- data/sample-apps/search-result-paging-app/app/models/application_record.rb +3 -0
- data/sample-apps/search-result-paging-app/app/models/concerns/.keep +0 -0
- data/sample-apps/search-result-paging-app/app/views/home/index.html.erb +13 -0
- data/sample-apps/search-result-paging-app/app/views/layouts/application.html.erb +23 -0
- data/sample-apps/search-result-paging-app/app/views/oauth/authorization/login.html.erb +15 -0
- data/sample-apps/search-result-paging-app/app/views/shared/_header.html.erb +18 -0
- data/sample-apps/search-result-paging-app/bin/bundle +3 -0
- data/sample-apps/search-result-paging-app/bin/rails +9 -0
- data/sample-apps/search-result-paging-app/bin/rake +9 -0
- data/sample-apps/search-result-paging-app/bin/setup +36 -0
- data/sample-apps/search-result-paging-app/bin/spring +17 -0
- data/sample-apps/search-result-paging-app/bin/update +31 -0
- data/sample-apps/search-result-paging-app/bin/yarn +11 -0
- data/sample-apps/search-result-paging-app/config.ru +5 -0
- data/sample-apps/search-result-paging-app/config/application.rb +19 -0
- data/sample-apps/search-result-paging-app/config/boot.rb +3 -0
- data/sample-apps/search-result-paging-app/config/cable.yml +10 -0
- data/sample-apps/search-result-paging-app/config/database.yml +25 -0
- data/sample-apps/search-result-paging-app/config/environment.rb +5 -0
- data/sample-apps/search-result-paging-app/config/environments/development.rb +61 -0
- data/sample-apps/search-result-paging-app/config/environments/production.rb +94 -0
- data/sample-apps/search-result-paging-app/config/environments/test.rb +46 -0
- data/sample-apps/search-result-paging-app/config/initializers/assets.rb +14 -0
- data/sample-apps/search-result-paging-app/config/initializers/filter_parameter_logging.rb +4 -0
- data/sample-apps/search-result-paging-app/config/initializers/hubspot-api-client.rb +3 -0
- data/sample-apps/search-result-paging-app/config/initializers/mime_types.rb +1 -0
- data/sample-apps/search-result-paging-app/config/initializers/wrap_parameters.rb +14 -0
- data/sample-apps/search-result-paging-app/config/locales/en.yml +33 -0
- data/sample-apps/search-result-paging-app/config/puma.rb +34 -0
- data/sample-apps/search-result-paging-app/config/routes.rb +7 -0
- data/sample-apps/search-result-paging-app/config/spring.rb +6 -0
- data/sample-apps/search-result-paging-app/db/seeds.rb +7 -0
- data/sample-apps/search-result-paging-app/docker-compose.yml +11 -0
- data/sample-apps/search-result-paging-app/docker-entrypoint.sh +8 -0
- data/sample-apps/search-result-paging-app/lib/assets/.keep +0 -0
- data/sample-apps/search-result-paging-app/lib/tasks/.keep +0 -0
- data/sample-apps/search-result-paging-app/lib/tasks/search_contacts.rake +36 -0
- data/sample-apps/search-result-paging-app/log/.keep +0 -0
- data/sample-apps/search-result-paging-app/package.json +5 -0
- data/sample-apps/search-result-paging-app/public/404.html +67 -0
- data/sample-apps/search-result-paging-app/public/422.html +67 -0
- data/sample-apps/search-result-paging-app/public/500.html +66 -0
- data/sample-apps/search-result-paging-app/public/apple-touch-icon-precomposed.png +0 -0
- data/sample-apps/search-result-paging-app/public/apple-touch-icon.png +0 -0
- data/sample-apps/search-result-paging-app/public/favicon.ico +0 -0
- data/sample-apps/search-result-paging-app/public/robots.txt +1 -0
- data/sample-apps/search-result-paging-app/tmp/.keep +0 -0
- metadata +309 -2
@@ -0,0 +1,497 @@
|
|
1
|
+
=begin
|
2
|
+
#Domains
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module Cms
|
17
|
+
module Domains
|
18
|
+
class DomainCdnConfig
|
19
|
+
attr_accessor :portal_id
|
20
|
+
|
21
|
+
attr_accessor :created
|
22
|
+
|
23
|
+
attr_accessor :updated
|
24
|
+
|
25
|
+
attr_accessor :domain_id
|
26
|
+
|
27
|
+
attr_accessor :cert_id
|
28
|
+
|
29
|
+
attr_accessor :cert_expiration_date
|
30
|
+
|
31
|
+
attr_accessor :cdn_id
|
32
|
+
|
33
|
+
attr_accessor :cdn_group_id
|
34
|
+
|
35
|
+
attr_accessor :ssl_status
|
36
|
+
|
37
|
+
attr_accessor :validation_method
|
38
|
+
|
39
|
+
attr_accessor :http_body
|
40
|
+
|
41
|
+
attr_accessor :http_url_path
|
42
|
+
|
43
|
+
attr_accessor :cname
|
44
|
+
|
45
|
+
attr_accessor :cname_target
|
46
|
+
|
47
|
+
attr_accessor :minimum_tls_version
|
48
|
+
|
49
|
+
attr_accessor :alternate_origin_hostname
|
50
|
+
|
51
|
+
attr_accessor :id
|
52
|
+
|
53
|
+
class EnumAttributeValidator
|
54
|
+
attr_reader :datatype
|
55
|
+
attr_reader :allowable_values
|
56
|
+
|
57
|
+
def initialize(datatype, allowable_values)
|
58
|
+
@allowable_values = allowable_values.map do |value|
|
59
|
+
case datatype.to_s
|
60
|
+
when /Integer/i
|
61
|
+
value.to_i
|
62
|
+
when /Float/i
|
63
|
+
value.to_f
|
64
|
+
else
|
65
|
+
value
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def valid?(value)
|
71
|
+
!value || allowable_values.include?(value)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
76
|
+
def self.attribute_map
|
77
|
+
{
|
78
|
+
:'portal_id' => :'portalId',
|
79
|
+
:'created' => :'created',
|
80
|
+
:'updated' => :'updated',
|
81
|
+
:'domain_id' => :'domainId',
|
82
|
+
:'cert_id' => :'certId',
|
83
|
+
:'cert_expiration_date' => :'certExpirationDate',
|
84
|
+
:'cdn_id' => :'cdnId',
|
85
|
+
:'cdn_group_id' => :'cdnGroupId',
|
86
|
+
:'ssl_status' => :'sslStatus',
|
87
|
+
:'validation_method' => :'validationMethod',
|
88
|
+
:'http_body' => :'httpBody',
|
89
|
+
:'http_url_path' => :'httpUrlPath',
|
90
|
+
:'cname' => :'cname',
|
91
|
+
:'cname_target' => :'cnameTarget',
|
92
|
+
:'minimum_tls_version' => :'minimumTlsVersion',
|
93
|
+
:'alternate_origin_hostname' => :'alternateOriginHostname',
|
94
|
+
:'id' => :'id'
|
95
|
+
}
|
96
|
+
end
|
97
|
+
|
98
|
+
# Attribute type mapping.
|
99
|
+
def self.openapi_types
|
100
|
+
{
|
101
|
+
:'portal_id' => :'Integer',
|
102
|
+
:'created' => :'Integer',
|
103
|
+
:'updated' => :'Integer',
|
104
|
+
:'domain_id' => :'Integer',
|
105
|
+
:'cert_id' => :'Integer',
|
106
|
+
:'cert_expiration_date' => :'Integer',
|
107
|
+
:'cdn_id' => :'String',
|
108
|
+
:'cdn_group_id' => :'String',
|
109
|
+
:'ssl_status' => :'String',
|
110
|
+
:'validation_method' => :'String',
|
111
|
+
:'http_body' => :'String',
|
112
|
+
:'http_url_path' => :'String',
|
113
|
+
:'cname' => :'String',
|
114
|
+
:'cname_target' => :'String',
|
115
|
+
:'minimum_tls_version' => :'String',
|
116
|
+
:'alternate_origin_hostname' => :'String',
|
117
|
+
:'id' => :'Integer'
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
# List of attributes with nullable: true
|
122
|
+
def self.openapi_nullable
|
123
|
+
Set.new([
|
124
|
+
])
|
125
|
+
end
|
126
|
+
|
127
|
+
# Initializes the object
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
def initialize(attributes = {})
|
130
|
+
if (!attributes.is_a?(Hash))
|
131
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Cms::Domains::DomainCdnConfig` initialize method"
|
132
|
+
end
|
133
|
+
|
134
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
135
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
136
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
137
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::Domains::DomainCdnConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
138
|
+
end
|
139
|
+
h[k.to_sym] = v
|
140
|
+
}
|
141
|
+
|
142
|
+
if attributes.key?(:'portal_id')
|
143
|
+
self.portal_id = attributes[:'portal_id']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.key?(:'created')
|
147
|
+
self.created = attributes[:'created']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.key?(:'updated')
|
151
|
+
self.updated = attributes[:'updated']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'domain_id')
|
155
|
+
self.domain_id = attributes[:'domain_id']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.key?(:'cert_id')
|
159
|
+
self.cert_id = attributes[:'cert_id']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.key?(:'cert_expiration_date')
|
163
|
+
self.cert_expiration_date = attributes[:'cert_expiration_date']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.key?(:'cdn_id')
|
167
|
+
self.cdn_id = attributes[:'cdn_id']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.key?(:'cdn_group_id')
|
171
|
+
self.cdn_group_id = attributes[:'cdn_group_id']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'ssl_status')
|
175
|
+
self.ssl_status = attributes[:'ssl_status']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'validation_method')
|
179
|
+
self.validation_method = attributes[:'validation_method']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.key?(:'http_body')
|
183
|
+
self.http_body = attributes[:'http_body']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.key?(:'http_url_path')
|
187
|
+
self.http_url_path = attributes[:'http_url_path']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'cname')
|
191
|
+
self.cname = attributes[:'cname']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.key?(:'cname_target')
|
195
|
+
self.cname_target = attributes[:'cname_target']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.key?(:'minimum_tls_version')
|
199
|
+
self.minimum_tls_version = attributes[:'minimum_tls_version']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.key?(:'alternate_origin_hostname')
|
203
|
+
self.alternate_origin_hostname = attributes[:'alternate_origin_hostname']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.key?(:'id')
|
207
|
+
self.id = attributes[:'id']
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
212
|
+
# @return Array for valid properties with the reasons
|
213
|
+
def list_invalid_properties
|
214
|
+
invalid_properties = Array.new
|
215
|
+
if @portal_id.nil?
|
216
|
+
invalid_properties.push('invalid value for "portal_id", portal_id cannot be nil.')
|
217
|
+
end
|
218
|
+
|
219
|
+
if @created.nil?
|
220
|
+
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
221
|
+
end
|
222
|
+
|
223
|
+
if @updated.nil?
|
224
|
+
invalid_properties.push('invalid value for "updated", updated cannot be nil.')
|
225
|
+
end
|
226
|
+
|
227
|
+
if @domain_id.nil?
|
228
|
+
invalid_properties.push('invalid value for "domain_id", domain_id cannot be nil.')
|
229
|
+
end
|
230
|
+
|
231
|
+
if @cert_id.nil?
|
232
|
+
invalid_properties.push('invalid value for "cert_id", cert_id cannot be nil.')
|
233
|
+
end
|
234
|
+
|
235
|
+
if @cert_expiration_date.nil?
|
236
|
+
invalid_properties.push('invalid value for "cert_expiration_date", cert_expiration_date cannot be nil.')
|
237
|
+
end
|
238
|
+
|
239
|
+
if @cdn_id.nil?
|
240
|
+
invalid_properties.push('invalid value for "cdn_id", cdn_id cannot be nil.')
|
241
|
+
end
|
242
|
+
|
243
|
+
if @cdn_group_id.nil?
|
244
|
+
invalid_properties.push('invalid value for "cdn_group_id", cdn_group_id cannot be nil.')
|
245
|
+
end
|
246
|
+
|
247
|
+
if @ssl_status.nil?
|
248
|
+
invalid_properties.push('invalid value for "ssl_status", ssl_status cannot be nil.')
|
249
|
+
end
|
250
|
+
|
251
|
+
if @validation_method.nil?
|
252
|
+
invalid_properties.push('invalid value for "validation_method", validation_method cannot be nil.')
|
253
|
+
end
|
254
|
+
|
255
|
+
if @http_body.nil?
|
256
|
+
invalid_properties.push('invalid value for "http_body", http_body cannot be nil.')
|
257
|
+
end
|
258
|
+
|
259
|
+
if @http_url_path.nil?
|
260
|
+
invalid_properties.push('invalid value for "http_url_path", http_url_path cannot be nil.')
|
261
|
+
end
|
262
|
+
|
263
|
+
if @cname.nil?
|
264
|
+
invalid_properties.push('invalid value for "cname", cname cannot be nil.')
|
265
|
+
end
|
266
|
+
|
267
|
+
if @cname_target.nil?
|
268
|
+
invalid_properties.push('invalid value for "cname_target", cname_target cannot be nil.')
|
269
|
+
end
|
270
|
+
|
271
|
+
if @minimum_tls_version.nil?
|
272
|
+
invalid_properties.push('invalid value for "minimum_tls_version", minimum_tls_version cannot be nil.')
|
273
|
+
end
|
274
|
+
|
275
|
+
if @alternate_origin_hostname.nil?
|
276
|
+
invalid_properties.push('invalid value for "alternate_origin_hostname", alternate_origin_hostname cannot be nil.')
|
277
|
+
end
|
278
|
+
|
279
|
+
if @id.nil?
|
280
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
281
|
+
end
|
282
|
+
|
283
|
+
invalid_properties
|
284
|
+
end
|
285
|
+
|
286
|
+
# Check to see if the all the properties in the model are valid
|
287
|
+
# @return true if the model is valid
|
288
|
+
def valid?
|
289
|
+
return false if @portal_id.nil?
|
290
|
+
return false if @created.nil?
|
291
|
+
return false if @updated.nil?
|
292
|
+
return false if @domain_id.nil?
|
293
|
+
return false if @cert_id.nil?
|
294
|
+
return false if @cert_expiration_date.nil?
|
295
|
+
return false if @cdn_id.nil?
|
296
|
+
return false if @cdn_group_id.nil?
|
297
|
+
return false if @ssl_status.nil?
|
298
|
+
ssl_status_validator = EnumAttributeValidator.new('String', ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"])
|
299
|
+
return false unless ssl_status_validator.valid?(@ssl_status)
|
300
|
+
return false if @validation_method.nil?
|
301
|
+
validation_method_validator = EnumAttributeValidator.new('String', ["0", "1", "2"])
|
302
|
+
return false unless validation_method_validator.valid?(@validation_method)
|
303
|
+
return false if @http_body.nil?
|
304
|
+
return false if @http_url_path.nil?
|
305
|
+
return false if @cname.nil?
|
306
|
+
return false if @cname_target.nil?
|
307
|
+
return false if @minimum_tls_version.nil?
|
308
|
+
minimum_tls_version_validator = EnumAttributeValidator.new('String', ["1.0", "1.1", "1.2", "1.3", "none", "null"])
|
309
|
+
return false unless minimum_tls_version_validator.valid?(@minimum_tls_version)
|
310
|
+
return false if @alternate_origin_hostname.nil?
|
311
|
+
return false if @id.nil?
|
312
|
+
true
|
313
|
+
end
|
314
|
+
|
315
|
+
# Custom attribute writer method checking allowed values (enum).
|
316
|
+
# @param [Object] ssl_status Object to be assigned
|
317
|
+
def ssl_status=(ssl_status)
|
318
|
+
validator = EnumAttributeValidator.new('String', ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"])
|
319
|
+
unless validator.valid?(ssl_status)
|
320
|
+
fail ArgumentError, "invalid value for \"ssl_status\", must be one of #{validator.allowable_values}."
|
321
|
+
end
|
322
|
+
@ssl_status = ssl_status
|
323
|
+
end
|
324
|
+
|
325
|
+
# Custom attribute writer method checking allowed values (enum).
|
326
|
+
# @param [Object] validation_method Object to be assigned
|
327
|
+
def validation_method=(validation_method)
|
328
|
+
validator = EnumAttributeValidator.new('String', ["0", "1", "2"])
|
329
|
+
unless validator.valid?(validation_method)
|
330
|
+
fail ArgumentError, "invalid value for \"validation_method\", must be one of #{validator.allowable_values}."
|
331
|
+
end
|
332
|
+
@validation_method = validation_method
|
333
|
+
end
|
334
|
+
|
335
|
+
# Custom attribute writer method checking allowed values (enum).
|
336
|
+
# @param [Object] minimum_tls_version Object to be assigned
|
337
|
+
def minimum_tls_version=(minimum_tls_version)
|
338
|
+
validator = EnumAttributeValidator.new('String', ["1.0", "1.1", "1.2", "1.3", "none", "null"])
|
339
|
+
unless validator.valid?(minimum_tls_version)
|
340
|
+
fail ArgumentError, "invalid value for \"minimum_tls_version\", must be one of #{validator.allowable_values}."
|
341
|
+
end
|
342
|
+
@minimum_tls_version = minimum_tls_version
|
343
|
+
end
|
344
|
+
|
345
|
+
# Checks equality by comparing each attribute.
|
346
|
+
# @param [Object] Object to be compared
|
347
|
+
def ==(o)
|
348
|
+
return true if self.equal?(o)
|
349
|
+
self.class == o.class &&
|
350
|
+
portal_id == o.portal_id &&
|
351
|
+
created == o.created &&
|
352
|
+
updated == o.updated &&
|
353
|
+
domain_id == o.domain_id &&
|
354
|
+
cert_id == o.cert_id &&
|
355
|
+
cert_expiration_date == o.cert_expiration_date &&
|
356
|
+
cdn_id == o.cdn_id &&
|
357
|
+
cdn_group_id == o.cdn_group_id &&
|
358
|
+
ssl_status == o.ssl_status &&
|
359
|
+
validation_method == o.validation_method &&
|
360
|
+
http_body == o.http_body &&
|
361
|
+
http_url_path == o.http_url_path &&
|
362
|
+
cname == o.cname &&
|
363
|
+
cname_target == o.cname_target &&
|
364
|
+
minimum_tls_version == o.minimum_tls_version &&
|
365
|
+
alternate_origin_hostname == o.alternate_origin_hostname &&
|
366
|
+
id == o.id
|
367
|
+
end
|
368
|
+
|
369
|
+
# @see the `==` method
|
370
|
+
# @param [Object] Object to be compared
|
371
|
+
def eql?(o)
|
372
|
+
self == o
|
373
|
+
end
|
374
|
+
|
375
|
+
# Calculates hash code according to all attributes.
|
376
|
+
# @return [Integer] Hash code
|
377
|
+
def hash
|
378
|
+
[portal_id, created, updated, domain_id, cert_id, cert_expiration_date, cdn_id, cdn_group_id, ssl_status, validation_method, http_body, http_url_path, cname, cname_target, minimum_tls_version, alternate_origin_hostname, id].hash
|
379
|
+
end
|
380
|
+
|
381
|
+
# Builds the object from hash
|
382
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
383
|
+
# @return [Object] Returns the model itself
|
384
|
+
def self.build_from_hash(attributes)
|
385
|
+
new.build_from_hash(attributes)
|
386
|
+
end
|
387
|
+
|
388
|
+
# Builds the object from hash
|
389
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
390
|
+
# @return [Object] Returns the model itself
|
391
|
+
def build_from_hash(attributes)
|
392
|
+
return nil unless attributes.is_a?(Hash)
|
393
|
+
self.class.openapi_types.each_pair do |key, type|
|
394
|
+
if type =~ /\AArray<(.*)>/i
|
395
|
+
# check to ensure the input is an array given that the attribute
|
396
|
+
# is documented as an array but the input is not
|
397
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
398
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
399
|
+
end
|
400
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
401
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
402
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
403
|
+
end
|
404
|
+
|
405
|
+
self
|
406
|
+
end
|
407
|
+
|
408
|
+
# Deserializes the data based on type
|
409
|
+
# @param string type Data type
|
410
|
+
# @param string value Value to be deserialized
|
411
|
+
# @return [Object] Deserialized data
|
412
|
+
def _deserialize(type, value)
|
413
|
+
case type.to_sym
|
414
|
+
when :DateTime
|
415
|
+
DateTime.parse(value)
|
416
|
+
when :Date
|
417
|
+
Date.parse(value)
|
418
|
+
when :String
|
419
|
+
value.to_s
|
420
|
+
when :Integer
|
421
|
+
value.to_i
|
422
|
+
when :Float
|
423
|
+
value.to_f
|
424
|
+
when :Boolean
|
425
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
426
|
+
true
|
427
|
+
else
|
428
|
+
false
|
429
|
+
end
|
430
|
+
when :Object
|
431
|
+
# generic object (usually a Hash), return directly
|
432
|
+
value
|
433
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
434
|
+
inner_type = Regexp.last_match[:inner_type]
|
435
|
+
value.map { |v| _deserialize(inner_type, v) }
|
436
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
437
|
+
k_type = Regexp.last_match[:k_type]
|
438
|
+
v_type = Regexp.last_match[:v_type]
|
439
|
+
{}.tap do |hash|
|
440
|
+
value.each do |k, v|
|
441
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
442
|
+
end
|
443
|
+
end
|
444
|
+
else # model
|
445
|
+
Hubspot::Cms::Domains.const_get(type).build_from_hash(value)
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
# Returns the string representation of the object
|
450
|
+
# @return [String] String presentation of the object
|
451
|
+
def to_s
|
452
|
+
to_hash.to_s
|
453
|
+
end
|
454
|
+
|
455
|
+
# to_body is an alias to to_hash (backward compatibility)
|
456
|
+
# @return [Hash] Returns the object in the form of hash
|
457
|
+
def to_body
|
458
|
+
to_hash
|
459
|
+
end
|
460
|
+
|
461
|
+
# Returns the object in the form of hash
|
462
|
+
# @return [Hash] Returns the object in the form of hash
|
463
|
+
def to_hash
|
464
|
+
hash = {}
|
465
|
+
self.class.attribute_map.each_pair do |attr, param|
|
466
|
+
value = self.send(attr)
|
467
|
+
if value.nil?
|
468
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
469
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
470
|
+
end
|
471
|
+
|
472
|
+
hash[param] = _to_hash(value)
|
473
|
+
end
|
474
|
+
hash
|
475
|
+
end
|
476
|
+
|
477
|
+
# Outputs non-array value in the form of hash
|
478
|
+
# For object, use to_hash. Otherwise, just return the value
|
479
|
+
# @param [Object] value Any valid value
|
480
|
+
# @return [Hash] Returns the value in the form of hash
|
481
|
+
def _to_hash(value)
|
482
|
+
if value.is_a?(Array)
|
483
|
+
value.compact.map { |v| _to_hash(v) }
|
484
|
+
elsif value.is_a?(Hash)
|
485
|
+
{}.tap do |hash|
|
486
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
487
|
+
end
|
488
|
+
elsif value.respond_to? :to_hash
|
489
|
+
value.to_hash
|
490
|
+
else
|
491
|
+
value
|
492
|
+
end
|
493
|
+
end
|
494
|
+
end
|
495
|
+
end
|
496
|
+
end
|
497
|
+
end
|