hubspot-api-client 13.1.0 → 13.2.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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Gemfile.lock +16 -16
  4. data/README.md +4 -2
  5. data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +1 -1
  6. data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +2 -2
  7. data/lib/hubspot/codegen/cms/site-search/api/public_api.rb +1 -4
  8. data/lib/hubspot/codegen/cms/site-search/models/content_search_result.rb +2 -2
  9. data/lib/hubspot/codegen/cms/site-search/models/indexed_data.rb +1 -1
  10. data/lib/hubspot/codegen/cms/site-search/models/{search_hit_field.rb → indexed_field.rb} +35 -35
  11. data/lib/hubspot/codegen/cms/url-redirects/api/redirects_api.rb +23 -21
  12. data/lib/hubspot/codegen/cms/url-redirects/models/{collection_response_with_total_url_mapping.rb → collection_response_with_total_url_mapping_forward_paging.rb} +4 -6
  13. data/lib/hubspot/codegen/cms/url-redirects/models/{paging.rb → forward_paging.rb} +3 -3
  14. data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping.rb +14 -226
  15. data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping_create_request_body.rb +31 -31
  16. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +2 -2
  17. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +2 -2
  18. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +2 -2
  19. data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +2 -2
  20. data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +2 -2
  21. data/lib/hubspot/codegen/crm/objects/calls/api/basic_api.rb +2 -2
  22. data/lib/hubspot/codegen/crm/objects/emails/api/basic_api.rb +2 -2
  23. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +2 -2
  24. data/lib/hubspot/codegen/crm/objects/meetings/api/basic_api.rb +2 -2
  25. data/lib/hubspot/codegen/crm/objects/notes/api/basic_api.rb +2 -2
  26. data/lib/hubspot/codegen/crm/objects/tasks/api/basic_api.rb +2 -2
  27. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +2 -2
  28. data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +2 -2
  29. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +2 -2
  30. data/lib/hubspot/codegen/files/files/api/files_api.rb +2 -2
  31. data/lib/hubspot/codegen/files/files/api/folders_api.rb +3 -3
  32. data/lib/hubspot/codegen/marketing/transactional/api/public_smtp_tokens_api.rb +18 -14
  33. data/lib/hubspot/codegen/marketing/transactional/api/single_send_api.rb +10 -6
  34. data/lib/hubspot/codegen/marketing/transactional/models/{collection_response_smtp_api_token_view.rb → collection_response_smtp_api_token_view_forward_paging.rb} +4 -5
  35. data/lib/hubspot/codegen/marketing/transactional/models/email_send_status_view.rb +15 -15
  36. data/lib/hubspot/codegen/marketing/transactional/models/{paging.rb → forward_paging.rb} +3 -3
  37. data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_email.rb +3 -13
  38. data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_request_egg.rb +22 -30
  39. data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_request_egg.rb +1 -1
  40. data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_view.rb +1 -1
  41. data/lib/hubspot/version.rb +1 -1
  42. data/spec/codegen/cms/site-search/api/public_api_spec.rb +0 -1
  43. data/spec/codegen/cms/site-search/models/content_search_result_spec.rb +1 -1
  44. data/spec/codegen/cms/site-search/models/{search_hit_field_spec.rb → indexed_field_spec.rb} +10 -10
  45. data/spec/codegen/cms/url-redirects/api/redirects_api_spec.rb +3 -5
  46. data/spec/codegen/cms/url-redirects/models/{collection_response_with_total_url_mapping_spec.rb → collection_response_with_total_url_mapping_forward_paging_spec.rb} +6 -6
  47. data/spec/codegen/cms/url-redirects/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
  48. data/spec/codegen/cms/url-redirects/models/url_mapping_create_request_body_spec.rb +10 -10
  49. data/spec/codegen/cms/url-redirects/models/url_mapping_spec.rb +2 -78
  50. data/spec/codegen/crm/contacts/api/basic_api_spec.rb +2 -0
  51. data/spec/codegen/crm/contacts/api/gdpr_api_spec.rb +3 -3
  52. data/spec/codegen/crm/objects/api/gdpr_api_spec.rb +3 -3
  53. data/spec/codegen/crm/objects/feedback_submissions/api/associations_api_spec.rb +14 -14
  54. data/spec/codegen/crm/objects/feedback_submissions/api/basic_api_spec.rb +26 -26
  55. data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +17 -17
  56. data/spec/codegen/crm/objects/feedback_submissions/api/public_object_api_spec.rb +2 -2
  57. data/spec/codegen/crm/quotes/api/public_object_api_spec.rb +2 -2
  58. data/spec/codegen/marketing/transactional/api/public_smtp_tokens_api_spec.rb +2 -2
  59. data/spec/codegen/marketing/transactional/api/single_send_api_spec.rb +1 -1
  60. data/spec/codegen/marketing/transactional/models/{collection_response_smtp_api_token_view_spec.rb → collection_response_smtp_api_token_view_forward_paging_spec.rb} +6 -6
  61. data/spec/codegen/marketing/transactional/models/email_send_status_view_spec.rb +7 -7
  62. data/spec/codegen/marketing/transactional/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
  63. data/spec/codegen/marketing/transactional/models/public_single_send_request_egg_spec.rb +4 -4
  64. metadata +17 -17
@@ -85,23 +85,27 @@ module Hubspot
85
85
 
86
86
  # Create a redirect
87
87
  # Creates and configures a new URL redirect.
88
+ # @param url_mapping_create_request_body [UrlMappingCreateRequestBody]
88
89
  # @param [Hash] opts the optional parameters
89
- # @option opts [UrlMappingCreateRequestBody] :url_mapping_create_request_body
90
90
  # @return [UrlMapping]
91
- def create(opts = {})
92
- data, _status_code, _headers = create_with_http_info(opts)
91
+ def create(url_mapping_create_request_body, opts = {})
92
+ data, _status_code, _headers = create_with_http_info(url_mapping_create_request_body, opts)
93
93
  data
94
94
  end
95
95
 
96
96
  # Create a redirect
97
97
  # Creates and configures a new URL redirect.
98
+ # @param url_mapping_create_request_body [UrlMappingCreateRequestBody]
98
99
  # @param [Hash] opts the optional parameters
99
- # @option opts [UrlMappingCreateRequestBody] :url_mapping_create_request_body
100
100
  # @return [Array<(UrlMapping, Integer, Hash)>] UrlMapping data, response status code and response headers
101
- def create_with_http_info(opts = {})
101
+ def create_with_http_info(url_mapping_create_request_body, opts = {})
102
102
  if @api_client.config.debugging
103
103
  @api_client.config.logger.debug 'Calling API: RedirectsApi.create ...'
104
104
  end
105
+ # verify the required parameter 'url_mapping_create_request_body' is set
106
+ if @api_client.config.client_side_validation && url_mapping_create_request_body.nil?
107
+ fail ArgumentError, "Missing the required parameter 'url_mapping_create_request_body' when calling RedirectsApi.create"
108
+ end
105
109
  # resource path
106
110
  local_var_path = '/cms/v3/url-redirects/'
107
111
 
@@ -119,7 +123,7 @@ module Hubspot
119
123
  form_params = opts[:form_params] || {}
120
124
 
121
125
  # http body (model)
122
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'url_mapping_create_request_body'])
126
+ post_body = opts[:body] || @api_client.object_to_http_body(url_mapping_create_request_body)
123
127
 
124
128
  # return_type
125
129
  return_type = opts[:return_type] || 'UrlMapping'
@@ -215,12 +219,10 @@ module Hubspot
215
219
  # @option opts [DateTime] :updated_after Only return redirects last updated after this date.
216
220
  # @option opts [DateTime] :updated_before Only return redirects last updated before this date.
217
221
  # @option opts [Array<String>] :sort
218
- # @option opts [Array<String>] :properties
219
222
  # @option opts [String] :after The paging cursor token of the last successfully read resource will be returned as the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
220
- # @option opts [String] :before
221
223
  # @option opts [Integer] :limit Maximum number of result per page
222
224
  # @option opts [Boolean] :archived Whether to return only results that have been archived.
223
- # @return [CollectionResponseWithTotalUrlMapping]
225
+ # @return [CollectionResponseWithTotalUrlMappingForwardPaging]
224
226
  def get_page(opts = {})
225
227
  data, _status_code, _headers = get_page_with_http_info(opts)
226
228
  data
@@ -236,12 +238,10 @@ module Hubspot
236
238
  # @option opts [DateTime] :updated_after Only return redirects last updated after this date.
237
239
  # @option opts [DateTime] :updated_before Only return redirects last updated before this date.
238
240
  # @option opts [Array<String>] :sort
239
- # @option opts [Array<String>] :properties
240
241
  # @option opts [String] :after The paging cursor token of the last successfully read resource will be returned as the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
241
- # @option opts [String] :before
242
242
  # @option opts [Integer] :limit Maximum number of result per page
243
243
  # @option opts [Boolean] :archived Whether to return only results that have been archived.
244
- # @return [Array<(CollectionResponseWithTotalUrlMapping, Integer, Hash)>] CollectionResponseWithTotalUrlMapping data, response status code and response headers
244
+ # @return [Array<(CollectionResponseWithTotalUrlMappingForwardPaging, Integer, Hash)>] CollectionResponseWithTotalUrlMappingForwardPaging data, response status code and response headers
245
245
  def get_page_with_http_info(opts = {})
246
246
  if @api_client.config.debugging
247
247
  @api_client.config.logger.debug 'Calling API: RedirectsApi.get_page ...'
@@ -258,9 +258,7 @@ module Hubspot
258
258
  query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
259
259
  query_params[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil?
260
260
  query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?
261
- query_params[:'properties'] = @api_client.build_collection_param(opts[:'properties'], :multi) if !opts[:'properties'].nil?
262
261
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
263
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
264
262
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
265
263
  query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
266
264
 
@@ -276,7 +274,7 @@ module Hubspot
276
274
  post_body = opts[:body]
277
275
 
278
276
  # return_type
279
- return_type = opts[:return_type] || 'CollectionResponseWithTotalUrlMapping'
277
+ return_type = opts[:return_type] || 'CollectionResponseWithTotalUrlMappingForwardPaging'
280
278
 
281
279
  # auth_names
282
280
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
@@ -300,21 +298,21 @@ module Hubspot
300
298
  # Update a redirect
301
299
  # Updates the settings for an existing URL redirect.
302
300
  # @param url_redirect_id [String]
301
+ # @param url_mapping [UrlMapping]
303
302
  # @param [Hash] opts the optional parameters
304
- # @option opts [UrlMapping] :url_mapping
305
303
  # @return [UrlMapping]
306
- def update(url_redirect_id, opts = {})
307
- data, _status_code, _headers = update_with_http_info(url_redirect_id, opts)
304
+ def update(url_redirect_id, url_mapping, opts = {})
305
+ data, _status_code, _headers = update_with_http_info(url_redirect_id, url_mapping, opts)
308
306
  data
309
307
  end
310
308
 
311
309
  # Update a redirect
312
310
  # Updates the settings for an existing URL redirect.
313
311
  # @param url_redirect_id [String]
312
+ # @param url_mapping [UrlMapping]
314
313
  # @param [Hash] opts the optional parameters
315
- # @option opts [UrlMapping] :url_mapping
316
314
  # @return [Array<(UrlMapping, Integer, Hash)>] UrlMapping data, response status code and response headers
317
- def update_with_http_info(url_redirect_id, opts = {})
315
+ def update_with_http_info(url_redirect_id, url_mapping, opts = {})
318
316
  if @api_client.config.debugging
319
317
  @api_client.config.logger.debug 'Calling API: RedirectsApi.update ...'
320
318
  end
@@ -322,6 +320,10 @@ module Hubspot
322
320
  if @api_client.config.client_side_validation && url_redirect_id.nil?
323
321
  fail ArgumentError, "Missing the required parameter 'url_redirect_id' when calling RedirectsApi.update"
324
322
  end
323
+ # verify the required parameter 'url_mapping' is set
324
+ if @api_client.config.client_side_validation && url_mapping.nil?
325
+ fail ArgumentError, "Missing the required parameter 'url_mapping' when calling RedirectsApi.update"
326
+ end
325
327
  # resource path
326
328
  local_var_path = '/cms/v3/url-redirects/{urlRedirectId}'.sub('{' + 'urlRedirectId' + '}', CGI.escape(url_redirect_id.to_s))
327
329
 
@@ -339,7 +341,7 @@ module Hubspot
339
341
  form_params = opts[:form_params] || {}
340
342
 
341
343
  # http body (model)
342
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'url_mapping'])
344
+ post_body = opts[:body] || @api_client.object_to_http_body(url_mapping)
343
345
 
344
346
  # return_type
345
347
  return_type = opts[:return_type] || 'UrlMapping'
@@ -15,11 +15,9 @@ require 'date'
15
15
  module Hubspot
16
16
  module Cms
17
17
  module UrlRedirects
18
- class CollectionResponseWithTotalUrlMapping
19
- # The number of available results.
18
+ class CollectionResponseWithTotalUrlMappingForwardPaging
20
19
  attr_accessor :total
21
20
 
22
- # Matched URLs.
23
21
  attr_accessor :results
24
22
 
25
23
  attr_accessor :paging
@@ -38,7 +36,7 @@ module Hubspot
38
36
  {
39
37
  :'total' => :'Integer',
40
38
  :'results' => :'Array<UrlMapping>',
41
- :'paging' => :'Paging'
39
+ :'paging' => :'ForwardPaging'
42
40
  }
43
41
  end
44
42
 
@@ -52,13 +50,13 @@ module Hubspot
52
50
  # @param [Hash] attributes Model attributes in the form of hash
53
51
  def initialize(attributes = {})
54
52
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Cms::UrlRedirects::CollectionResponseWithTotalUrlMapping` initialize method"
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Cms::UrlRedirects::CollectionResponseWithTotalUrlMappingForwardPaging` initialize method"
56
54
  end
57
55
 
58
56
  # check to see if the attribute exists and convert string to symbol for hash key
59
57
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
58
  if (!self.class.attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::UrlRedirects::CollectionResponseWithTotalUrlMapping`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::UrlRedirects::CollectionResponseWithTotalUrlMappingForwardPaging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
60
  end
63
61
  h[k.to_sym] = v
64
62
  }
@@ -15,7 +15,7 @@ require 'date'
15
15
  module Hubspot
16
16
  module Cms
17
17
  module UrlRedirects
18
- class Paging
18
+ class ForwardPaging
19
19
  attr_accessor :_next
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -42,13 +42,13 @@ module Hubspot
42
42
  # @param [Hash] attributes Model attributes in the form of hash
43
43
  def initialize(attributes = {})
44
44
  if (!attributes.is_a?(Hash))
45
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Cms::UrlRedirects::Paging` initialize method"
45
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Cms::UrlRedirects::ForwardPaging` initialize method"
46
46
  end
47
47
 
48
48
  # check to see if the attribute exists and convert string to symbol for hash key
49
49
  attributes = attributes.each_with_object({}) { |(k, v), h|
50
50
  if (!self.class.attribute_map.key?(k.to_sym))
51
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::UrlRedirects::Paging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
51
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::UrlRedirects::ForwardPaging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
52
52
  end
53
53
  h[k.to_sym] = v
54
54
  }
@@ -19,16 +19,6 @@ module Hubspot
19
19
  # The unique ID of this URL redirect.
20
20
  attr_accessor :id
21
21
 
22
- attr_accessor :portal_id
23
-
24
- attr_accessor :created
25
-
26
- attr_accessor :updated
27
-
28
- attr_accessor :created_by_id
29
-
30
- attr_accessor :updated_by_id
31
-
32
22
  # The target incoming URL, path, or pattern to match for redirection.
33
23
  attr_accessor :route_prefix
34
24
 
@@ -38,13 +28,9 @@ module Hubspot
38
28
  # The type of redirect to create. Options include: 301 (permanent), 302 (temporary), or 305 (proxy). Find more details [here](https://knowledge.hubspot.com/cos-general/how-to-redirect-a-hubspot-page).
39
29
  attr_accessor :redirect_style
40
30
 
41
- attr_accessor :content_group_id
42
-
43
31
  # Whether the URL redirect mapping should apply only if a live page on the URL isn't found. If False, the URL redirect mapping will take precedence over any existing page.
44
32
  attr_accessor :is_only_after_not_found
45
33
 
46
- attr_accessor :is_regex
47
-
48
34
  # Whether the `routePrefix` should match on the entire URL, including the domain.
49
35
  attr_accessor :is_match_full_url
50
36
 
@@ -60,104 +46,48 @@ module Hubspot
60
46
  # Whether the `routePrefix` should match both HTTP and HTTPS protocols.
61
47
  attr_accessor :is_protocol_agnostic
62
48
 
63
- attr_accessor :name
64
-
65
49
  # Used to prioritize URL redirection. If a given URL matches more than one redirect, the one with the **lower** precedence will be used.
66
50
  attr_accessor :precedence
67
51
 
68
- attr_accessor :deleted_at
69
-
70
- attr_accessor :note
71
-
72
- attr_accessor :label
73
-
74
- attr_accessor :internally_created
75
-
76
- attr_accessor :cos_object_type
77
-
78
- attr_accessor :cdn_purge_embargo_time
79
-
80
- class EnumAttributeValidator
81
- attr_reader :datatype
82
- attr_reader :allowable_values
83
-
84
- def initialize(datatype, allowable_values)
85
- @allowable_values = allowable_values.map do |value|
86
- case datatype.to_s
87
- when /Integer/i
88
- value.to_i
89
- when /Float/i
90
- value.to_f
91
- else
92
- value
93
- end
94
- end
95
- end
52
+ attr_accessor :created
96
53
 
97
- def valid?(value)
98
- !value || allowable_values.include?(value)
99
- end
100
- end
54
+ attr_accessor :updated
101
55
 
102
56
  # Attribute mapping from ruby-style variable name to JSON key.
103
57
  def self.attribute_map
104
58
  {
105
59
  :'id' => :'id',
106
- :'portal_id' => :'portalId',
107
- :'created' => :'created',
108
- :'updated' => :'updated',
109
- :'created_by_id' => :'createdById',
110
- :'updated_by_id' => :'updatedById',
111
60
  :'route_prefix' => :'routePrefix',
112
61
  :'destination' => :'destination',
113
62
  :'redirect_style' => :'redirectStyle',
114
- :'content_group_id' => :'contentGroupId',
115
63
  :'is_only_after_not_found' => :'isOnlyAfterNotFound',
116
- :'is_regex' => :'isRegex',
117
64
  :'is_match_full_url' => :'isMatchFullUrl',
118
65
  :'is_match_query_string' => :'isMatchQueryString',
119
66
  :'is_pattern' => :'isPattern',
120
67
  :'is_trailing_slash_optional' => :'isTrailingSlashOptional',
121
68
  :'is_protocol_agnostic' => :'isProtocolAgnostic',
122
- :'name' => :'name',
123
69
  :'precedence' => :'precedence',
124
- :'deleted_at' => :'deletedAt',
125
- :'note' => :'note',
126
- :'label' => :'label',
127
- :'internally_created' => :'internallyCreated',
128
- :'cos_object_type' => :'cosObjectType',
129
- :'cdn_purge_embargo_time' => :'cdnPurgeEmbargoTime'
70
+ :'created' => :'created',
71
+ :'updated' => :'updated'
130
72
  }
131
73
  end
132
74
 
133
75
  # Attribute type mapping.
134
76
  def self.openapi_types
135
77
  {
136
- :'id' => :'Integer',
137
- :'portal_id' => :'Integer',
138
- :'created' => :'Integer',
139
- :'updated' => :'Integer',
140
- :'created_by_id' => :'Integer',
141
- :'updated_by_id' => :'Integer',
78
+ :'id' => :'String',
142
79
  :'route_prefix' => :'String',
143
80
  :'destination' => :'String',
144
81
  :'redirect_style' => :'Integer',
145
- :'content_group_id' => :'Integer',
146
82
  :'is_only_after_not_found' => :'Boolean',
147
- :'is_regex' => :'Boolean',
148
83
  :'is_match_full_url' => :'Boolean',
149
84
  :'is_match_query_string' => :'Boolean',
150
85
  :'is_pattern' => :'Boolean',
151
86
  :'is_trailing_slash_optional' => :'Boolean',
152
87
  :'is_protocol_agnostic' => :'Boolean',
153
- :'name' => :'String',
154
88
  :'precedence' => :'Integer',
155
- :'deleted_at' => :'Integer',
156
- :'note' => :'String',
157
- :'label' => :'String',
158
- :'internally_created' => :'Boolean',
159
- :'cos_object_type' => :'String',
160
- :'cdn_purge_embargo_time' => :'Integer'
89
+ :'created' => :'DateTime',
90
+ :'updated' => :'DateTime'
161
91
  }
162
92
  end
163
93
 
@@ -186,26 +116,6 @@ module Hubspot
186
116
  self.id = attributes[:'id']
187
117
  end
188
118
 
189
- if attributes.key?(:'portal_id')
190
- self.portal_id = attributes[:'portal_id']
191
- end
192
-
193
- if attributes.key?(:'created')
194
- self.created = attributes[:'created']
195
- end
196
-
197
- if attributes.key?(:'updated')
198
- self.updated = attributes[:'updated']
199
- end
200
-
201
- if attributes.key?(:'created_by_id')
202
- self.created_by_id = attributes[:'created_by_id']
203
- end
204
-
205
- if attributes.key?(:'updated_by_id')
206
- self.updated_by_id = attributes[:'updated_by_id']
207
- end
208
-
209
119
  if attributes.key?(:'route_prefix')
210
120
  self.route_prefix = attributes[:'route_prefix']
211
121
  end
@@ -218,18 +128,10 @@ module Hubspot
218
128
  self.redirect_style = attributes[:'redirect_style']
219
129
  end
220
130
 
221
- if attributes.key?(:'content_group_id')
222
- self.content_group_id = attributes[:'content_group_id']
223
- end
224
-
225
131
  if attributes.key?(:'is_only_after_not_found')
226
132
  self.is_only_after_not_found = attributes[:'is_only_after_not_found']
227
133
  end
228
134
 
229
- if attributes.key?(:'is_regex')
230
- self.is_regex = attributes[:'is_regex']
231
- end
232
-
233
135
  if attributes.key?(:'is_match_full_url')
234
136
  self.is_match_full_url = attributes[:'is_match_full_url']
235
137
  end
@@ -250,36 +152,16 @@ module Hubspot
250
152
  self.is_protocol_agnostic = attributes[:'is_protocol_agnostic']
251
153
  end
252
154
 
253
- if attributes.key?(:'name')
254
- self.name = attributes[:'name']
255
- end
256
-
257
155
  if attributes.key?(:'precedence')
258
156
  self.precedence = attributes[:'precedence']
259
157
  end
260
158
 
261
- if attributes.key?(:'deleted_at')
262
- self.deleted_at = attributes[:'deleted_at']
263
- end
264
-
265
- if attributes.key?(:'note')
266
- self.note = attributes[:'note']
267
- end
268
-
269
- if attributes.key?(:'label')
270
- self.label = attributes[:'label']
271
- end
272
-
273
- if attributes.key?(:'internally_created')
274
- self.internally_created = attributes[:'internally_created']
275
- end
276
-
277
- if attributes.key?(:'cos_object_type')
278
- self.cos_object_type = attributes[:'cos_object_type']
159
+ if attributes.key?(:'created')
160
+ self.created = attributes[:'created']
279
161
  end
280
162
 
281
- if attributes.key?(:'cdn_purge_embargo_time')
282
- self.cdn_purge_embargo_time = attributes[:'cdn_purge_embargo_time']
163
+ if attributes.key?(:'updated')
164
+ self.updated = attributes[:'updated']
283
165
  end
284
166
  end
285
167
 
@@ -291,26 +173,6 @@ module Hubspot
291
173
  invalid_properties.push('invalid value for "id", id cannot be nil.')
292
174
  end
293
175
 
294
- if @portal_id.nil?
295
- invalid_properties.push('invalid value for "portal_id", portal_id cannot be nil.')
296
- end
297
-
298
- if @created.nil?
299
- invalid_properties.push('invalid value for "created", created cannot be nil.')
300
- end
301
-
302
- if @updated.nil?
303
- invalid_properties.push('invalid value for "updated", updated cannot be nil.')
304
- end
305
-
306
- if @created_by_id.nil?
307
- invalid_properties.push('invalid value for "created_by_id", created_by_id cannot be nil.')
308
- end
309
-
310
- if @updated_by_id.nil?
311
- invalid_properties.push('invalid value for "updated_by_id", updated_by_id cannot be nil.')
312
- end
313
-
314
176
  if @route_prefix.nil?
315
177
  invalid_properties.push('invalid value for "route_prefix", route_prefix cannot be nil.')
316
178
  end
@@ -323,18 +185,10 @@ module Hubspot
323
185
  invalid_properties.push('invalid value for "redirect_style", redirect_style cannot be nil.')
324
186
  end
325
187
 
326
- if @content_group_id.nil?
327
- invalid_properties.push('invalid value for "content_group_id", content_group_id cannot be nil.')
328
- end
329
-
330
188
  if @is_only_after_not_found.nil?
331
189
  invalid_properties.push('invalid value for "is_only_after_not_found", is_only_after_not_found cannot be nil.')
332
190
  end
333
191
 
334
- if @is_regex.nil?
335
- invalid_properties.push('invalid value for "is_regex", is_regex cannot be nil.')
336
- end
337
-
338
192
  if @is_match_full_url.nil?
339
193
  invalid_properties.push('invalid value for "is_match_full_url", is_match_full_url cannot be nil.')
340
194
  end
@@ -355,38 +209,10 @@ module Hubspot
355
209
  invalid_properties.push('invalid value for "is_protocol_agnostic", is_protocol_agnostic cannot be nil.')
356
210
  end
357
211
 
358
- if @name.nil?
359
- invalid_properties.push('invalid value for "name", name cannot be nil.')
360
- end
361
-
362
212
  if @precedence.nil?
363
213
  invalid_properties.push('invalid value for "precedence", precedence cannot be nil.')
364
214
  end
365
215
 
366
- if @deleted_at.nil?
367
- invalid_properties.push('invalid value for "deleted_at", deleted_at cannot be nil.')
368
- end
369
-
370
- if @note.nil?
371
- invalid_properties.push('invalid value for "note", note cannot be nil.')
372
- end
373
-
374
- if @label.nil?
375
- invalid_properties.push('invalid value for "label", label cannot be nil.')
376
- end
377
-
378
- if @internally_created.nil?
379
- invalid_properties.push('invalid value for "internally_created", internally_created cannot be nil.')
380
- end
381
-
382
- if @cos_object_type.nil?
383
- invalid_properties.push('invalid value for "cos_object_type", cos_object_type cannot be nil.')
384
- end
385
-
386
- if @cdn_purge_embargo_time.nil?
387
- invalid_properties.push('invalid value for "cdn_purge_embargo_time", cdn_purge_embargo_time cannot be nil.')
388
- end
389
-
390
216
  invalid_properties
391
217
  end
392
218
 
@@ -394,75 +220,37 @@ module Hubspot
394
220
  # @return true if the model is valid
395
221
  def valid?
396
222
  return false if @id.nil?
397
- return false if @portal_id.nil?
398
- return false if @created.nil?
399
- return false if @updated.nil?
400
- return false if @created_by_id.nil?
401
- return false if @updated_by_id.nil?
402
223
  return false if @route_prefix.nil?
403
224
  return false if @destination.nil?
404
225
  return false if @redirect_style.nil?
405
- return false if @content_group_id.nil?
406
226
  return false if @is_only_after_not_found.nil?
407
- return false if @is_regex.nil?
408
227
  return false if @is_match_full_url.nil?
409
228
  return false if @is_match_query_string.nil?
410
229
  return false if @is_pattern.nil?
411
230
  return false if @is_trailing_slash_optional.nil?
412
231
  return false if @is_protocol_agnostic.nil?
413
- return false if @name.nil?
414
232
  return false if @precedence.nil?
415
- return false if @deleted_at.nil?
416
- return false if @note.nil?
417
- return false if @label.nil?
418
- return false if @internally_created.nil?
419
- return false if @cos_object_type.nil?
420
- cos_object_type_validator = EnumAttributeValidator.new('String', ["CONTENT", "EXTENSION_RESOURCE", "LAYOUT", "CUSTOM_WIDGET", "WIDGET", "FORM", "PLACEMENT", "IMAGE", "DOMAIN_SETTINGS", "SITE_SETTINGS", "EMAIL_ADDRESS", "WORKFLOW", "HUBDB_TABLE", "REDIRECT_URL", "DESIGN_FOLDER", "SITE_MAP", "DOMAIN", "BLOG", "FILE", "FOLDER", "SITE_MENU", "THEME", "CONTENT_GROUP", "FOLLOW_ME", "KNOWLEDGE_BASE", "LIST_MEMBERSHIP", "CONTACT_MEMBERSHIP", "PASSWORD_PROTECTED", "UNRESTRICTED_ACCESS", "MARKETPLACE_LISTING", "LAYOUT_SECTION", "THEME_SETTINGS", "VIDEO_PLAYER", "URL_MAPPING", "KNOWLEDGE_CATEGORY", "KNOWLEDGE_HOMEPAGE_CATEGORY", "RAW_ASSET", "GLOBAL_CONTENT", "HUBDB_TABLE_ROW", "BLOG_AUTHOR", "SERVERLESS_FUNCTION", "KNOWLEDGE_CATEGORY_TRANSLATION"])
421
- return false unless cos_object_type_validator.valid?(@cos_object_type)
422
- return false if @cdn_purge_embargo_time.nil?
423
233
  true
424
234
  end
425
235
 
426
- # Custom attribute writer method checking allowed values (enum).
427
- # @param [Object] cos_object_type Object to be assigned
428
- def cos_object_type=(cos_object_type)
429
- validator = EnumAttributeValidator.new('String', ["CONTENT", "EXTENSION_RESOURCE", "LAYOUT", "CUSTOM_WIDGET", "WIDGET", "FORM", "PLACEMENT", "IMAGE", "DOMAIN_SETTINGS", "SITE_SETTINGS", "EMAIL_ADDRESS", "WORKFLOW", "HUBDB_TABLE", "REDIRECT_URL", "DESIGN_FOLDER", "SITE_MAP", "DOMAIN", "BLOG", "FILE", "FOLDER", "SITE_MENU", "THEME", "CONTENT_GROUP", "FOLLOW_ME", "KNOWLEDGE_BASE", "LIST_MEMBERSHIP", "CONTACT_MEMBERSHIP", "PASSWORD_PROTECTED", "UNRESTRICTED_ACCESS", "MARKETPLACE_LISTING", "LAYOUT_SECTION", "THEME_SETTINGS", "VIDEO_PLAYER", "URL_MAPPING", "KNOWLEDGE_CATEGORY", "KNOWLEDGE_HOMEPAGE_CATEGORY", "RAW_ASSET", "GLOBAL_CONTENT", "HUBDB_TABLE_ROW", "BLOG_AUTHOR", "SERVERLESS_FUNCTION", "KNOWLEDGE_CATEGORY_TRANSLATION"])
430
- unless validator.valid?(cos_object_type)
431
- fail ArgumentError, "invalid value for \"cos_object_type\", must be one of #{validator.allowable_values}."
432
- end
433
- @cos_object_type = cos_object_type
434
- end
435
-
436
236
  # Checks equality by comparing each attribute.
437
237
  # @param [Object] Object to be compared
438
238
  def ==(o)
439
239
  return true if self.equal?(o)
440
240
  self.class == o.class &&
441
241
  id == o.id &&
442
- portal_id == o.portal_id &&
443
- created == o.created &&
444
- updated == o.updated &&
445
- created_by_id == o.created_by_id &&
446
- updated_by_id == o.updated_by_id &&
447
242
  route_prefix == o.route_prefix &&
448
243
  destination == o.destination &&
449
244
  redirect_style == o.redirect_style &&
450
- content_group_id == o.content_group_id &&
451
245
  is_only_after_not_found == o.is_only_after_not_found &&
452
- is_regex == o.is_regex &&
453
246
  is_match_full_url == o.is_match_full_url &&
454
247
  is_match_query_string == o.is_match_query_string &&
455
248
  is_pattern == o.is_pattern &&
456
249
  is_trailing_slash_optional == o.is_trailing_slash_optional &&
457
250
  is_protocol_agnostic == o.is_protocol_agnostic &&
458
- name == o.name &&
459
251
  precedence == o.precedence &&
460
- deleted_at == o.deleted_at &&
461
- note == o.note &&
462
- label == o.label &&
463
- internally_created == o.internally_created &&
464
- cos_object_type == o.cos_object_type &&
465
- cdn_purge_embargo_time == o.cdn_purge_embargo_time
252
+ created == o.created &&
253
+ updated == o.updated
466
254
  end
467
255
 
468
256
  # @see the `==` method
@@ -474,7 +262,7 @@ module Hubspot
474
262
  # Calculates hash code according to all attributes.
475
263
  # @return [Integer] Hash code
476
264
  def hash
477
- [id, portal_id, created, updated, created_by_id, updated_by_id, route_prefix, destination, redirect_style, content_group_id, is_only_after_not_found, is_regex, is_match_full_url, is_match_query_string, is_pattern, is_trailing_slash_optional, is_protocol_agnostic, name, precedence, deleted_at, note, label, internally_created, cos_object_type, cdn_purge_embargo_time].hash
265
+ [id, route_prefix, destination, redirect_style, is_only_after_not_found, is_match_full_url, is_match_query_string, is_pattern, is_trailing_slash_optional, is_protocol_agnostic, precedence, created, updated].hash
478
266
  end
479
267
 
480
268
  # Builds the object from hash