hubspot-api-client 17.1.1 → 17.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/hubspot/codegen/cms/pages/api/landing_pages_api.rb +2754 -0
  5. data/lib/hubspot/codegen/cms/pages/api/site_pages_api.rb +1896 -0
  6. data/lib/hubspot/codegen/cms/pages/api_client.rb +410 -0
  7. data/lib/hubspot/codegen/cms/pages/api_error.rb +61 -0
  8. data/lib/hubspot/codegen/cms/pages/configuration.rb +287 -0
  9. data/lib/hubspot/codegen/cms/pages/models/ab_test_create_request_v_next.rb +244 -0
  10. data/lib/hubspot/codegen/cms/pages/models/ab_test_end_request_v_next.rb +244 -0
  11. data/lib/hubspot/codegen/cms/pages/models/ab_test_rerun_request_v_next.rb +244 -0
  12. data/lib/hubspot/codegen/cms/pages/models/angle.rb +244 -0
  13. data/lib/hubspot/codegen/cms/pages/models/attach_to_lang_primary_request_v_next.rb +269 -0
  14. data/lib/hubspot/codegen/cms/pages/models/background_image.rb +259 -0
  15. data/lib/hubspot/codegen/cms/pages/models/batch_input_content_folder.rb +231 -0
  16. data/lib/hubspot/codegen/cms/pages/models/batch_input_json_node.rb +231 -0
  17. data/lib/hubspot/codegen/cms/pages/models/batch_input_page.rb +231 -0
  18. data/lib/hubspot/codegen/cms/pages/models/batch_input_string.rb +231 -0
  19. data/lib/hubspot/codegen/cms/pages/models/batch_response_content_folder.rb +326 -0
  20. data/lib/hubspot/codegen/cms/pages/models/batch_response_content_folder_with_errors.rb +354 -0
  21. data/lib/hubspot/codegen/cms/pages/models/batch_response_page.rb +326 -0
  22. data/lib/hubspot/codegen/cms/pages/models/batch_response_page_with_errors.rb +354 -0
  23. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_content_folder_forward_paging.rb +255 -0
  24. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_page_forward_paging.rb +255 -0
  25. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_version_content_folder.rb +255 -0
  26. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_version_page.rb +255 -0
  27. data/lib/hubspot/codegen/cms/pages/models/color_stop.rb +228 -0
  28. data/lib/hubspot/codegen/cms/pages/models/content_clone_request_v_next.rb +239 -0
  29. data/lib/hubspot/codegen/cms/pages/models/content_folder.rb +317 -0
  30. data/lib/hubspot/codegen/cms/pages/models/content_language_clone_request_v_next.rb +249 -0
  31. data/lib/hubspot/codegen/cms/pages/models/content_language_variation.rb +409 -0
  32. data/lib/hubspot/codegen/cms/pages/models/content_schedule_request_v_next.rb +244 -0
  33. data/lib/hubspot/codegen/cms/pages/models/detach_from_lang_group_request_v_next.rb +229 -0
  34. data/lib/hubspot/codegen/cms/pages/models/error.rb +305 -0
  35. data/lib/hubspot/codegen/cms/pages/models/error_detail.rb +271 -0
  36. data/lib/hubspot/codegen/cms/pages/models/forward_paging.rb +223 -0
  37. data/lib/hubspot/codegen/cms/pages/models/gradient.rb +259 -0
  38. data/lib/hubspot/codegen/cms/pages/models/layout_section.rb +416 -0
  39. data/lib/hubspot/codegen/cms/pages/models/next_page.rb +239 -0
  40. data/lib/hubspot/codegen/cms/pages/models/page.rb +1165 -0
  41. data/lib/hubspot/codegen/cms/pages/models/paging.rb +232 -0
  42. data/lib/hubspot/codegen/cms/pages/models/previous_page.rb +239 -0
  43. data/lib/hubspot/codegen/cms/pages/models/rgba_color.rb +274 -0
  44. data/lib/hubspot/codegen/cms/pages/models/row_meta_data.rb +243 -0
  45. data/lib/hubspot/codegen/cms/pages/models/set_new_language_primary_request_v_next.rb +229 -0
  46. data/lib/hubspot/codegen/cms/pages/models/side_or_corner.rb +244 -0
  47. data/lib/hubspot/codegen/cms/pages/models/standard_error.rb +330 -0
  48. data/lib/hubspot/codegen/cms/pages/models/styles.rb +316 -0
  49. data/lib/hubspot/codegen/cms/pages/models/update_languages_request_v_next.rb +246 -0
  50. data/lib/hubspot/codegen/cms/pages/models/version_content_folder.rb +271 -0
  51. data/lib/hubspot/codegen/cms/pages/models/version_page.rb +271 -0
  52. data/lib/hubspot/codegen/cms/pages/models/version_user.rb +259 -0
  53. data/lib/hubspot/codegen/crm/lists/api/lists_api.rb +635 -0
  54. data/lib/hubspot/codegen/crm/lists/api/memberships_api.rb +452 -0
  55. data/lib/hubspot/codegen/crm/lists/api_client.rb +410 -0
  56. data/lib/hubspot/codegen/crm/lists/api_error.rb +61 -0
  57. data/lib/hubspot/codegen/crm/lists/configuration.rb +287 -0
  58. data/lib/hubspot/codegen/crm/lists/models/collection_response_long.rb +240 -0
  59. data/lib/hubspot/codegen/crm/lists/models/error.rb +305 -0
  60. data/lib/hubspot/codegen/crm/lists/models/error_detail.rb +271 -0
  61. data/lib/hubspot/codegen/crm/lists/models/list_create_request.rb +278 -0
  62. data/lib/hubspot/codegen/crm/lists/models/list_create_response.rb +228 -0
  63. data/lib/hubspot/codegen/crm/lists/models/list_fetch_response.rb +228 -0
  64. data/lib/hubspot/codegen/crm/lists/models/list_filter_update_request.rb +228 -0
  65. data/lib/hubspot/codegen/crm/lists/models/list_search_request.rb +266 -0
  66. data/lib/hubspot/codegen/crm/lists/models/list_search_response.rb +276 -0
  67. data/lib/hubspot/codegen/crm/lists/models/list_update_response.rb +223 -0
  68. data/lib/hubspot/codegen/crm/lists/models/lists_by_id_response.rb +231 -0
  69. data/lib/hubspot/codegen/crm/lists/models/membership_change_request.rb +248 -0
  70. data/lib/hubspot/codegen/crm/lists/models/memberships_update_response.rb +264 -0
  71. data/lib/hubspot/codegen/crm/lists/models/next_page.rb +239 -0
  72. data/lib/hubspot/codegen/crm/lists/models/paging.rb +232 -0
  73. data/lib/hubspot/codegen/crm/lists/models/previous_page.rb +239 -0
  74. data/lib/hubspot/codegen/crm/lists/models/public_absolute_comparative_timestamp_refine_by.rb +292 -0
  75. data/lib/hubspot/codegen/crm/lists/models/public_absolute_ranged_timestamp_refine_by.rb +306 -0
  76. data/lib/hubspot/codegen/crm/lists/models/public_ads_search_filter.rb +336 -0
  77. data/lib/hubspot/codegen/crm/lists/models/public_ads_time_filter.rb +278 -0
  78. data/lib/hubspot/codegen/crm/lists/models/public_all_history_refine_by.rb +264 -0
  79. data/lib/hubspot/codegen/crm/lists/models/public_all_property_types_operation.rb +292 -0
  80. data/lib/hubspot/codegen/crm/lists/models/public_and_filter_branch.rb +310 -0
  81. data/lib/hubspot/codegen/crm/lists/models/public_association_filter_branch.rb +366 -0
  82. data/lib/hubspot/codegen/crm/lists/models/public_association_in_list_filter.rb +352 -0
  83. data/lib/hubspot/codegen/crm/lists/models/public_bool_property_operation.rb +306 -0
  84. data/lib/hubspot/codegen/crm/lists/models/public_calendar_date_property_operation.rb +345 -0
  85. data/lib/hubspot/codegen/crm/lists/models/public_campaign_influenced_filter.rb +278 -0
  86. data/lib/hubspot/codegen/crm/lists/models/public_communication_subscription_filter.rb +333 -0
  87. data/lib/hubspot/codegen/crm/lists/models/public_comparative_date_property_operation.rb +315 -0
  88. data/lib/hubspot/codegen/crm/lists/models/public_comparative_property_updated_operation.rb +315 -0
  89. data/lib/hubspot/codegen/crm/lists/models/public_constant_filter.rb +287 -0
  90. data/lib/hubspot/codegen/crm/lists/models/public_cta_analytics_filter.rb +310 -0
  91. data/lib/hubspot/codegen/crm/lists/models/public_date_point.rb +365 -0
  92. data/lib/hubspot/codegen/crm/lists/models/public_date_property_operation.rb +334 -0
  93. data/lib/hubspot/codegen/crm/lists/models/public_date_time_property_operation.rb +320 -0
  94. data/lib/hubspot/codegen/crm/lists/models/public_email_event_filter.rb +350 -0
  95. data/lib/hubspot/codegen/crm/lists/models/public_email_subscription_filter.rb +305 -0
  96. data/lib/hubspot/codegen/crm/lists/models/public_enumeration_property_operation.rb +308 -0
  97. data/lib/hubspot/codegen/crm/lists/models/public_event_analytics_filter.rb +310 -0
  98. data/lib/hubspot/codegen/crm/lists/models/public_event_analytics_filter_coalescing_refine_by.rb +115 -0
  99. data/lib/hubspot/codegen/crm/lists/models/public_event_filter_metadata.rb +242 -0
  100. data/lib/hubspot/codegen/crm/lists/models/public_fiscal_quarter_reference.rb +328 -0
  101. data/lib/hubspot/codegen/crm/lists/models/public_fiscal_year_reference.rb +328 -0
  102. data/lib/hubspot/codegen/crm/lists/models/public_form_submission_filter.rb +317 -0
  103. data/lib/hubspot/codegen/crm/lists/models/public_form_submission_on_page_filter.rb +331 -0
  104. data/lib/hubspot/codegen/crm/lists/models/public_in_list_filter.rb +301 -0
  105. data/lib/hubspot/codegen/crm/lists/models/public_in_list_filter_metadata.rb +242 -0
  106. data/lib/hubspot/codegen/crm/lists/models/public_index_offset.rb +295 -0
  107. data/lib/hubspot/codegen/crm/lists/models/public_indexed_time_point.rb +310 -0
  108. data/lib/hubspot/codegen/crm/lists/models/public_indexed_time_point_index_reference.rb +114 -0
  109. data/lib/hubspot/codegen/crm/lists/models/public_integration_event_filter.rb +294 -0
  110. data/lib/hubspot/codegen/crm/lists/models/public_month_reference.rb +314 -0
  111. data/lib/hubspot/codegen/crm/lists/models/public_multi_string_property_operation.rb +308 -0
  112. data/lib/hubspot/codegen/crm/lists/models/public_not_all_filter_branch.rb +310 -0
  113. data/lib/hubspot/codegen/crm/lists/models/public_not_any_filter_branch.rb +310 -0
  114. data/lib/hubspot/codegen/crm/lists/models/public_now_reference.rb +300 -0
  115. data/lib/hubspot/codegen/crm/lists/models/public_num_associations_filter.rb +306 -0
  116. data/lib/hubspot/codegen/crm/lists/models/public_num_occurrences_refine_by.rb +282 -0
  117. data/lib/hubspot/codegen/crm/lists/models/public_number_property_operation.rb +306 -0
  118. data/lib/hubspot/codegen/crm/lists/models/public_object_list.rb +373 -0
  119. data/lib/hubspot/codegen/crm/lists/models/public_object_list_search_result.rb +381 -0
  120. data/lib/hubspot/codegen/crm/lists/models/public_or_filter_branch.rb +310 -0
  121. data/lib/hubspot/codegen/crm/lists/models/public_page_view_analytics_filter.rb +319 -0
  122. data/lib/hubspot/codegen/crm/lists/models/public_privacy_analytics_filter.rb +292 -0
  123. data/lib/hubspot/codegen/crm/lists/models/public_property_association_filter_branch.rb +352 -0
  124. data/lib/hubspot/codegen/crm/lists/models/public_property_association_filter_branch_filter_branches_inner.rb +114 -0
  125. data/lib/hubspot/codegen/crm/lists/models/public_property_association_filter_branch_filters_inner.rb +130 -0
  126. data/lib/hubspot/codegen/crm/lists/models/public_property_association_in_list_filter.rb +329 -0
  127. data/lib/hubspot/codegen/crm/lists/models/public_property_filter.rb +292 -0
  128. data/lib/hubspot/codegen/crm/lists/models/public_property_filter_operation.rb +123 -0
  129. data/lib/hubspot/codegen/crm/lists/models/public_property_referenced_time.rb +315 -0
  130. data/lib/hubspot/codegen/crm/lists/models/public_quarter_reference.rb +328 -0
  131. data/lib/hubspot/codegen/crm/lists/models/public_ranged_date_property_operation.rb +334 -0
  132. data/lib/hubspot/codegen/crm/lists/models/public_ranged_number_property_operation.rb +320 -0
  133. data/lib/hubspot/codegen/crm/lists/models/public_ranged_time_operation.rb +361 -0
  134. data/lib/hubspot/codegen/crm/lists/models/public_relative_comparative_timestamp_refine_by.rb +292 -0
  135. data/lib/hubspot/codegen/crm/lists/models/public_relative_ranged_timestamp_refine_by.rb +306 -0
  136. data/lib/hubspot/codegen/crm/lists/models/public_restricted_filter_branch.rb +310 -0
  137. data/lib/hubspot/codegen/crm/lists/models/public_rolling_date_range_property_operation.rb +320 -0
  138. data/lib/hubspot/codegen/crm/lists/models/public_rolling_property_updated_operation.rb +306 -0
  139. data/lib/hubspot/codegen/crm/lists/models/public_set_occurrences_refine_by.rb +278 -0
  140. data/lib/hubspot/codegen/crm/lists/models/public_string_property_operation.rb +306 -0
  141. data/lib/hubspot/codegen/crm/lists/models/public_survey_monkey_filter.rb +292 -0
  142. data/lib/hubspot/codegen/crm/lists/models/public_survey_monkey_value_filter.rb +338 -0
  143. data/lib/hubspot/codegen/crm/lists/models/public_time_offset.rb +256 -0
  144. data/lib/hubspot/codegen/crm/lists/models/public_time_point_operation.rb +338 -0
  145. data/lib/hubspot/codegen/crm/lists/models/public_time_point_operation_time_point.rb +109 -0
  146. data/lib/hubspot/codegen/crm/lists/models/public_today_reference.rb +300 -0
  147. data/lib/hubspot/codegen/crm/lists/models/public_unified_events_filter.rb +307 -0
  148. data/lib/hubspot/codegen/crm/lists/models/public_unified_events_filter_branch.rb +350 -0
  149. data/lib/hubspot/codegen/crm/lists/models/public_unified_events_in_list_filter.rb +310 -0
  150. data/lib/hubspot/codegen/crm/lists/models/public_webinar_filter.rb +287 -0
  151. data/lib/hubspot/codegen/crm/lists/models/public_week_reference.rb +326 -0
  152. data/lib/hubspot/codegen/crm/lists/models/public_year_reference.rb +328 -0
  153. data/lib/hubspot/codegen/crm/objects/goals/api/basic_api.rb +391 -0
  154. data/lib/hubspot/codegen/crm/objects/goals/api/batch_api.rb +295 -0
  155. data/lib/hubspot/codegen/crm/objects/goals/api/gdpr_api.rb +96 -0
  156. data/lib/hubspot/codegen/crm/objects/goals/api/public_object_api.rb +94 -0
  157. data/lib/hubspot/codegen/crm/objects/goals/api/search_api.rb +92 -0
  158. data/lib/hubspot/codegen/crm/objects/goals/api_client.rb +412 -0
  159. data/lib/hubspot/codegen/crm/objects/goals/api_error.rb +63 -0
  160. data/lib/hubspot/codegen/crm/objects/goals/configuration.rb +289 -0
  161. data/lib/hubspot/codegen/crm/objects/goals/models/associated_id.rb +244 -0
  162. data/lib/hubspot/codegen/crm/objects/goals/models/association_spec.rb +278 -0
  163. data/lib/hubspot/codegen/crm/objects/goals/models/batch_input_simple_public_object_batch_input.rb +232 -0
  164. data/lib/hubspot/codegen/crm/objects/goals/models/batch_input_simple_public_object_id.rb +232 -0
  165. data/lib/hubspot/codegen/crm/objects/goals/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  166. data/lib/hubspot/codegen/crm/objects/goals/models/batch_read_input_simple_public_object_id.rb +273 -0
  167. data/lib/hubspot/codegen/crm/objects/goals/models/batch_response_simple_public_object.rb +328 -0
  168. data/lib/hubspot/codegen/crm/objects/goals/models/batch_response_simple_public_object_with_errors.rb +348 -0
  169. data/lib/hubspot/codegen/crm/objects/goals/models/collection_response_associated_id.rb +241 -0
  170. data/lib/hubspot/codegen/crm/objects/goals/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  171. data/lib/hubspot/codegen/crm/objects/goals/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
  172. data/lib/hubspot/codegen/crm/objects/goals/models/error.rb +307 -0
  173. data/lib/hubspot/codegen/crm/objects/goals/models/error_detail.rb +273 -0
  174. data/lib/hubspot/codegen/crm/objects/goals/models/filter.rb +308 -0
  175. data/lib/hubspot/codegen/crm/objects/goals/models/filter_group.rb +232 -0
  176. data/lib/hubspot/codegen/crm/objects/goals/models/forward_paging.rb +225 -0
  177. data/lib/hubspot/codegen/crm/objects/goals/models/next_page.rb +239 -0
  178. data/lib/hubspot/codegen/crm/objects/goals/models/paging.rb +234 -0
  179. data/lib/hubspot/codegen/crm/objects/goals/models/previous_page.rb +239 -0
  180. data/lib/hubspot/codegen/crm/objects/goals/models/public_associations_for_object.rb +246 -0
  181. data/lib/hubspot/codegen/crm/objects/goals/models/public_gdpr_delete_input.rb +239 -0
  182. data/lib/hubspot/codegen/crm/objects/goals/models/public_merge_input.rb +244 -0
  183. data/lib/hubspot/codegen/crm/objects/goals/models/public_object_id.rb +230 -0
  184. data/lib/hubspot/codegen/crm/objects/goals/models/public_object_search_request.rb +301 -0
  185. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object.rb +303 -0
  186. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input.rb +246 -0
  187. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_id.rb +230 -0
  188. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input.rb +232 -0
  189. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input_for_create.rb +248 -0
  190. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_with_associations.rb +314 -0
  191. data/lib/hubspot/codegen/crm/objects/goals/models/standard_error.rb +324 -0
  192. data/lib/hubspot/codegen/crm/objects/goals/models/value_with_timestamp.rb +285 -0
  193. data/lib/hubspot/codegen/crm/objects/taxes/api/basic_api.rb +391 -0
  194. data/lib/hubspot/codegen/crm/objects/taxes/api/batch_api.rb +295 -0
  195. data/lib/hubspot/codegen/crm/objects/taxes/api/gdpr_api.rb +96 -0
  196. data/lib/hubspot/codegen/crm/objects/taxes/api/public_object_api.rb +94 -0
  197. data/lib/hubspot/codegen/crm/objects/taxes/api/search_api.rb +92 -0
  198. data/lib/hubspot/codegen/crm/objects/taxes/api_client.rb +412 -0
  199. data/lib/hubspot/codegen/crm/objects/taxes/api_error.rb +63 -0
  200. data/lib/hubspot/codegen/crm/objects/taxes/configuration.rb +289 -0
  201. data/lib/hubspot/codegen/crm/objects/taxes/models/associated_id.rb +244 -0
  202. data/lib/hubspot/codegen/crm/objects/taxes/models/association_spec.rb +278 -0
  203. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_input_simple_public_object_batch_input.rb +232 -0
  204. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_input_simple_public_object_id.rb +232 -0
  205. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  206. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_read_input_simple_public_object_id.rb +273 -0
  207. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_response_simple_public_object.rb +328 -0
  208. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_response_simple_public_object_with_errors.rb +348 -0
  209. data/lib/hubspot/codegen/crm/objects/taxes/models/collection_response_associated_id.rb +241 -0
  210. data/lib/hubspot/codegen/crm/objects/taxes/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  211. data/lib/hubspot/codegen/crm/objects/taxes/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
  212. data/lib/hubspot/codegen/crm/objects/taxes/models/error.rb +307 -0
  213. data/lib/hubspot/codegen/crm/objects/taxes/models/error_detail.rb +273 -0
  214. data/lib/hubspot/codegen/crm/objects/taxes/models/filter.rb +308 -0
  215. data/lib/hubspot/codegen/crm/objects/taxes/models/filter_group.rb +232 -0
  216. data/lib/hubspot/codegen/crm/objects/taxes/models/forward_paging.rb +225 -0
  217. data/lib/hubspot/codegen/crm/objects/taxes/models/next_page.rb +239 -0
  218. data/lib/hubspot/codegen/crm/objects/taxes/models/paging.rb +234 -0
  219. data/lib/hubspot/codegen/crm/objects/taxes/models/previous_page.rb +239 -0
  220. data/lib/hubspot/codegen/crm/objects/taxes/models/public_associations_for_object.rb +246 -0
  221. data/lib/hubspot/codegen/crm/objects/taxes/models/public_gdpr_delete_input.rb +239 -0
  222. data/lib/hubspot/codegen/crm/objects/taxes/models/public_merge_input.rb +244 -0
  223. data/lib/hubspot/codegen/crm/objects/taxes/models/public_object_id.rb +230 -0
  224. data/lib/hubspot/codegen/crm/objects/taxes/models/public_object_search_request.rb +301 -0
  225. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object.rb +303 -0
  226. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_batch_input.rb +246 -0
  227. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_id.rb +230 -0
  228. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_input.rb +232 -0
  229. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_input_for_create.rb +248 -0
  230. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_with_associations.rb +314 -0
  231. data/lib/hubspot/codegen/crm/objects/taxes/models/standard_error.rb +324 -0
  232. data/lib/hubspot/codegen/crm/objects/taxes/models/value_with_timestamp.rb +285 -0
  233. data/lib/hubspot/codegen/events/send/api/behavioral_events_tracking_api.rb +94 -0
  234. data/lib/hubspot/codegen/events/send/api_client.rb +410 -0
  235. data/lib/hubspot/codegen/events/send/api_error.rb +61 -0
  236. data/lib/hubspot/codegen/events/send/configuration.rb +287 -0
  237. data/lib/hubspot/codegen/events/send/models/behavioral_event_http_completion_request.rb +290 -0
  238. data/lib/hubspot/codegen/events/send/models/error.rb +305 -0
  239. data/lib/hubspot/codegen/events/send/models/error_detail.rb +271 -0
  240. data/lib/hubspot/codegen/settings/business_units/api/business_unit_api.rb +95 -0
  241. data/lib/hubspot/codegen/settings/business_units/api_client.rb +410 -0
  242. data/lib/hubspot/codegen/settings/business_units/api_error.rb +61 -0
  243. data/lib/hubspot/codegen/settings/business_units/configuration.rb +287 -0
  244. data/lib/hubspot/codegen/settings/business_units/models/collection_response_public_business_unit_no_paging.rb +232 -0
  245. data/lib/hubspot/codegen/settings/business_units/models/error.rb +305 -0
  246. data/lib/hubspot/codegen/settings/business_units/models/error_detail.rb +271 -0
  247. data/lib/hubspot/codegen/settings/business_units/models/public_business_unit.rb +254 -0
  248. data/lib/hubspot/codegen/settings/business_units/models/public_business_unit_logo_metadata.rb +245 -0
  249. data/lib/hubspot/discovery/cms/client.rb +1 -0
  250. data/lib/hubspot/discovery/cms/pages/api/landing_pages_api.rb +13 -0
  251. data/lib/hubspot/discovery/cms/pages/api/site_pages_api.rb +13 -0
  252. data/lib/hubspot/discovery/cms/pages/client.rb +20 -0
  253. data/lib/hubspot/discovery/crm/client.rb +1 -0
  254. data/lib/hubspot/discovery/crm/lists/api/lists_api.rb +13 -0
  255. data/lib/hubspot/discovery/crm/lists/api/memberships_api.rb +13 -0
  256. data/lib/hubspot/discovery/crm/lists/client.rb +20 -0
  257. data/lib/hubspot/discovery/crm/objects/client.rb +2 -0
  258. data/lib/hubspot/discovery/crm/objects/goals/api/basic_api.rb +15 -0
  259. data/lib/hubspot/discovery/crm/objects/goals/api/batch_api.rb +15 -0
  260. data/lib/hubspot/discovery/crm/objects/goals/api/gdpr_api.rb +15 -0
  261. data/lib/hubspot/discovery/crm/objects/goals/api/public_object_api.rb +15 -0
  262. data/lib/hubspot/discovery/crm/objects/goals/api/search_api.rb +15 -0
  263. data/lib/hubspot/discovery/crm/objects/goals/client.rb +25 -0
  264. data/lib/hubspot/discovery/crm/objects/taxes/api/basic_api.rb +15 -0
  265. data/lib/hubspot/discovery/crm/objects/taxes/api/batch_api.rb +15 -0
  266. data/lib/hubspot/discovery/crm/objects/taxes/api/gdpr_api.rb +15 -0
  267. data/lib/hubspot/discovery/crm/objects/taxes/api/public_object_api.rb +15 -0
  268. data/lib/hubspot/discovery/crm/objects/taxes/api/search_api.rb +15 -0
  269. data/lib/hubspot/discovery/crm/objects/taxes/client.rb +25 -0
  270. data/lib/hubspot/discovery/events/client.rb +6 -0
  271. data/lib/hubspot/discovery/events/send/api/behavioral_events_tracking_api.rb +13 -0
  272. data/lib/hubspot/discovery/events/send/client.rb +19 -0
  273. data/lib/hubspot/discovery/settings/business_units/api/business_unit_api.rb +13 -0
  274. data/lib/hubspot/discovery/settings/business_units/client.rb +19 -0
  275. data/lib/hubspot/discovery/settings/client.rb +1 -0
  276. data/lib/hubspot/version.rb +1 -1
  277. data/spec/discovery/client_spec.rb +1 -0
  278. data/spec/discovery/cms/client_spec.rb +1 -0
  279. data/spec/discovery/cms/pages/landing_pages_api_spec.rb +45 -0
  280. data/spec/discovery/cms/pages/site_pages_api_spec.rb +33 -0
  281. data/spec/discovery/crm/lists/lists_api_spec.rb +15 -0
  282. data/spec/discovery/crm/lists/memberships_api_spec.rb +12 -0
  283. data/spec/discovery/crm/objects/goals/basic_api_spec.rb +11 -0
  284. data/spec/discovery/crm/objects/goals/batch_api_spec.rb +10 -0
  285. data/spec/discovery/crm/objects/goals/gdpr_api_spec.rb +7 -0
  286. data/spec/discovery/crm/objects/goals/public_object_api_spec.rb +7 -0
  287. data/spec/discovery/crm/objects/goals/search_api_spec.rb +7 -0
  288. data/spec/discovery/crm/objects/taxes/basic_api_spec.rb +11 -0
  289. data/spec/discovery/crm/objects/taxes/batch_api_spec.rb +10 -0
  290. data/spec/discovery/crm/objects/taxes/gdpr_api_spec.rb +7 -0
  291. data/spec/discovery/crm/objects/taxes/public_object_api_spec.rb +7 -0
  292. data/spec/discovery/crm/objects/taxes/search_api_spec.rb +7 -0
  293. data/spec/discovery/events/send/behavioral_events_tracking_api_spec.rb +7 -0
  294. data/spec/discovery/settings/businnes_units/business_unit_api_spec.rb +7 -0
  295. data/spec/integration/contacts_spec.rb +85 -0
  296. metadata +303 -2
@@ -0,0 +1,1165 @@
1
+ =begin
2
+ #Pages
3
+
4
+ #Use these endpoints for interacting with Landing Pages and Site Pages
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hubspot
17
+ module Cms
18
+ module Pages
19
+ class Page
20
+ # The date (ISO8601 format) the page is to be published at.
21
+ attr_accessor :publish_date
22
+
23
+ # The explicitly defined ISO 639 language code of the page. If null, the page will default to the language of the Domain.
24
+ attr_accessor :language
25
+
26
+ # Boolean to determine whether or not the styles from the template should be applied.
27
+ attr_accessor :enable_layout_stylesheets
28
+
29
+ # A description that goes in <meta> tag on the page.
30
+ attr_accessor :meta_description
31
+
32
+ # List of stylesheets to attach to this page. These stylesheets are attached to just this page. Order of precedence is bottom to top, just like in the HTML.
33
+ attr_accessor :attached_stylesheets
34
+
35
+ # Set this to create a password protected page. Entering the password will be required to view the page.
36
+ attr_accessor :password
37
+
38
+ # Set this to true if you want to be published immediately when the schedule publish endpoint is called, and to ignore the publish_date setting.
39
+ attr_accessor :publish_immediately
40
+
41
+ # The html title of this page.
42
+ attr_accessor :html_title
43
+
44
+ attr_accessor :translations
45
+
46
+ # The unique ID of the page.
47
+ attr_accessor :id
48
+
49
+ # An ENUM descibing the current state of this page.
50
+ attr_accessor :state
51
+
52
+ # The path of the this page. This field is appended to the domain to construct the url of this page.
53
+ attr_accessor :slug
54
+
55
+ # The ID of the user that created this page.
56
+ attr_accessor :created_by_id
57
+
58
+ attr_accessor :currently_published
59
+
60
+ # If True, the page will not show up in your dashboard, although the page could still be live.
61
+ attr_accessor :archived_in_dashboard
62
+
63
+ attr_accessor :created
64
+
65
+ # An ENUM descibing the type of this object. Should be either LANDING_PAGE or SITE_PAGE.
66
+ attr_accessor :content_type_category
67
+
68
+ # The ID of the MAB test (or dynamic test) associated with this page, if applicable
69
+ attr_accessor :mab_experiment_id
70
+
71
+ # The ID of the user that updated this page.
72
+ attr_accessor :updated_by_id
73
+
74
+ # ID of the primary page this object was translated from.
75
+ attr_accessor :translated_from_id
76
+
77
+ # The ID of the associated folder this landing page is organized under in the app dashboard.
78
+ attr_accessor :folder_id
79
+
80
+ # A data structure containing the data for all the modules inside the containers for this page. This will only be populated if the page has widget containers.
81
+ attr_accessor :widget_containers
82
+
83
+ # The ID of another page this page's url should redirect to once this page expires. Should only set this or pageExpiryRedirectUrl.
84
+ attr_accessor :page_expiry_redirect_id
85
+
86
+ attr_accessor :dynamic_page_data_source_type
87
+
88
+ # The featuredImage of this page.
89
+ attr_accessor :featured_image
90
+
91
+ # The name of the user that updated this page.
92
+ attr_accessor :author_name
93
+
94
+ # The domain this page will resolve to. If null, the page will default to the primary domain for this content type.
95
+ attr_accessor :domain
96
+
97
+ # The internal name of the page.
98
+ attr_accessor :name
99
+
100
+ # The ID of the HubDB table this page references, if applicable
101
+ attr_accessor :dynamic_page_hub_db_table_id
102
+
103
+ # The GUID of the marketing campaign this page is a part of.
104
+ attr_accessor :campaign
105
+
106
+ attr_accessor :dynamic_page_data_source_id
107
+
108
+ # Boolean to determine whether or not the styles from the template should be applied.
109
+ attr_accessor :enable_domain_stylesheets
110
+
111
+ # Boolean to determine whether or not the Primary CSS Files should be applied.
112
+ attr_accessor :include_default_custom_css
113
+
114
+ # Details the type of page this is. Should always be landing_page or site_page
115
+ attr_accessor :subcategory
116
+
117
+ #
118
+ attr_accessor :layout_sections
119
+
120
+ attr_accessor :updated
121
+
122
+ # Custom HTML for embed codes, javascript that should be placed before the </body> tag of the page.
123
+ attr_accessor :footer_html
124
+
125
+ # A data structure containing the data for all the modules for this page.
126
+ attr_accessor :widgets
127
+
128
+ # Custom HTML for embed codes, javascript, etc. that goes in the <head> tag of the page.
129
+ attr_accessor :head_html
130
+
131
+ # The URL this page's url should redirect to once this page expires. Should only set this or pageExpiryRedirectId.
132
+ attr_accessor :page_expiry_redirect_url
133
+
134
+ # The status of the AB test associated with this page, if applicable
135
+ attr_accessor :ab_status
136
+
137
+ # Boolean to determine if this page should use a featuredImage.
138
+ attr_accessor :use_featured_image
139
+
140
+ # The ID of the AB test associated with this page, if applicable
141
+ attr_accessor :ab_test_id
142
+
143
+ # Alt Text of the featuredImage.
144
+ attr_accessor :featured_image_alt_text
145
+
146
+ attr_accessor :content_group_id
147
+
148
+ # Boolean describing if the page expiration feature is enabled for this page
149
+ attr_accessor :page_expiry_enabled
150
+
151
+ # String detailing the path of the template used for this page.
152
+ attr_accessor :template_path
153
+
154
+ # A generated field representing the URL of this page.
155
+ attr_accessor :url
156
+
157
+ # Rules for require member registration to access private content.
158
+ attr_accessor :public_access_rules
159
+
160
+ # The timestamp (ISO8601 format) when this page was deleted.
161
+ attr_accessor :archived_at
162
+
163
+ #
164
+ attr_accessor :theme_settings_values
165
+
166
+ # The date at which this page should expire and begin redirecting to another url or page.
167
+ attr_accessor :page_expiry_date
168
+
169
+ # Boolean to determine whether or not to respect publicAccessRules.
170
+ attr_accessor :public_access_rules_enabled
171
+
172
+ # A generated Boolean describing whether or not this page is currently expired and being redirected.
173
+ attr_accessor :page_redirected
174
+
175
+ # A generated ENUM descibing the current state of this page.
176
+ attr_accessor :current_state
177
+
178
+ # ID of the type of object this is. Should always .
179
+ attr_accessor :category_id
180
+
181
+ # Optional override to set the URL to be used in the rel=canonical link tag on the page.
182
+ attr_accessor :link_rel_canonical_url
183
+
184
+ class EnumAttributeValidator
185
+ attr_reader :datatype
186
+ attr_reader :allowable_values
187
+
188
+ def initialize(datatype, allowable_values)
189
+ @allowable_values = allowable_values.map do |value|
190
+ case datatype.to_s
191
+ when /Integer/i
192
+ value.to_i
193
+ when /Float/i
194
+ value.to_f
195
+ else
196
+ value
197
+ end
198
+ end
199
+ end
200
+
201
+ def valid?(value)
202
+ !value || allowable_values.include?(value)
203
+ end
204
+ end
205
+
206
+ # Attribute mapping from ruby-style variable name to JSON key.
207
+ def self.attribute_map
208
+ {
209
+ :'publish_date' => :'publishDate',
210
+ :'language' => :'language',
211
+ :'enable_layout_stylesheets' => :'enableLayoutStylesheets',
212
+ :'meta_description' => :'metaDescription',
213
+ :'attached_stylesheets' => :'attachedStylesheets',
214
+ :'password' => :'password',
215
+ :'publish_immediately' => :'publishImmediately',
216
+ :'html_title' => :'htmlTitle',
217
+ :'translations' => :'translations',
218
+ :'id' => :'id',
219
+ :'state' => :'state',
220
+ :'slug' => :'slug',
221
+ :'created_by_id' => :'createdById',
222
+ :'currently_published' => :'currentlyPublished',
223
+ :'archived_in_dashboard' => :'archivedInDashboard',
224
+ :'created' => :'created',
225
+ :'content_type_category' => :'contentTypeCategory',
226
+ :'mab_experiment_id' => :'mabExperimentId',
227
+ :'updated_by_id' => :'updatedById',
228
+ :'translated_from_id' => :'translatedFromId',
229
+ :'folder_id' => :'folderId',
230
+ :'widget_containers' => :'widgetContainers',
231
+ :'page_expiry_redirect_id' => :'pageExpiryRedirectId',
232
+ :'dynamic_page_data_source_type' => :'dynamicPageDataSourceType',
233
+ :'featured_image' => :'featuredImage',
234
+ :'author_name' => :'authorName',
235
+ :'domain' => :'domain',
236
+ :'name' => :'name',
237
+ :'dynamic_page_hub_db_table_id' => :'dynamicPageHubDbTableId',
238
+ :'campaign' => :'campaign',
239
+ :'dynamic_page_data_source_id' => :'dynamicPageDataSourceId',
240
+ :'enable_domain_stylesheets' => :'enableDomainStylesheets',
241
+ :'include_default_custom_css' => :'includeDefaultCustomCss',
242
+ :'subcategory' => :'subcategory',
243
+ :'layout_sections' => :'layoutSections',
244
+ :'updated' => :'updated',
245
+ :'footer_html' => :'footerHtml',
246
+ :'widgets' => :'widgets',
247
+ :'head_html' => :'headHtml',
248
+ :'page_expiry_redirect_url' => :'pageExpiryRedirectUrl',
249
+ :'ab_status' => :'abStatus',
250
+ :'use_featured_image' => :'useFeaturedImage',
251
+ :'ab_test_id' => :'abTestId',
252
+ :'featured_image_alt_text' => :'featuredImageAltText',
253
+ :'content_group_id' => :'contentGroupId',
254
+ :'page_expiry_enabled' => :'pageExpiryEnabled',
255
+ :'template_path' => :'templatePath',
256
+ :'url' => :'url',
257
+ :'public_access_rules' => :'publicAccessRules',
258
+ :'archived_at' => :'archivedAt',
259
+ :'theme_settings_values' => :'themeSettingsValues',
260
+ :'page_expiry_date' => :'pageExpiryDate',
261
+ :'public_access_rules_enabled' => :'publicAccessRulesEnabled',
262
+ :'page_redirected' => :'pageRedirected',
263
+ :'current_state' => :'currentState',
264
+ :'category_id' => :'categoryId',
265
+ :'link_rel_canonical_url' => :'linkRelCanonicalUrl'
266
+ }
267
+ end
268
+
269
+ # Returns all the JSON keys this model knows about
270
+ def self.acceptable_attributes
271
+ attribute_map.values
272
+ end
273
+
274
+ # Attribute type mapping.
275
+ def self.openapi_types
276
+ {
277
+ :'publish_date' => :'Time',
278
+ :'language' => :'String',
279
+ :'enable_layout_stylesheets' => :'Boolean',
280
+ :'meta_description' => :'String',
281
+ :'attached_stylesheets' => :'Array<Hash<String, Object>>',
282
+ :'password' => :'String',
283
+ :'publish_immediately' => :'Boolean',
284
+ :'html_title' => :'String',
285
+ :'translations' => :'Hash<String, ContentLanguageVariation>',
286
+ :'id' => :'String',
287
+ :'state' => :'String',
288
+ :'slug' => :'String',
289
+ :'created_by_id' => :'String',
290
+ :'currently_published' => :'Boolean',
291
+ :'archived_in_dashboard' => :'Boolean',
292
+ :'created' => :'Time',
293
+ :'content_type_category' => :'String',
294
+ :'mab_experiment_id' => :'String',
295
+ :'updated_by_id' => :'String',
296
+ :'translated_from_id' => :'String',
297
+ :'folder_id' => :'String',
298
+ :'widget_containers' => :'Hash<String, Object>',
299
+ :'page_expiry_redirect_id' => :'Integer',
300
+ :'dynamic_page_data_source_type' => :'Integer',
301
+ :'featured_image' => :'String',
302
+ :'author_name' => :'String',
303
+ :'domain' => :'String',
304
+ :'name' => :'String',
305
+ :'dynamic_page_hub_db_table_id' => :'String',
306
+ :'campaign' => :'String',
307
+ :'dynamic_page_data_source_id' => :'String',
308
+ :'enable_domain_stylesheets' => :'Boolean',
309
+ :'include_default_custom_css' => :'Boolean',
310
+ :'subcategory' => :'String',
311
+ :'layout_sections' => :'Hash<String, LayoutSection>',
312
+ :'updated' => :'Time',
313
+ :'footer_html' => :'String',
314
+ :'widgets' => :'Hash<String, Object>',
315
+ :'head_html' => :'String',
316
+ :'page_expiry_redirect_url' => :'String',
317
+ :'ab_status' => :'String',
318
+ :'use_featured_image' => :'Boolean',
319
+ :'ab_test_id' => :'String',
320
+ :'featured_image_alt_text' => :'String',
321
+ :'content_group_id' => :'String',
322
+ :'page_expiry_enabled' => :'Boolean',
323
+ :'template_path' => :'String',
324
+ :'url' => :'String',
325
+ :'public_access_rules' => :'Array<Object>',
326
+ :'archived_at' => :'Time',
327
+ :'theme_settings_values' => :'Hash<String, Object>',
328
+ :'page_expiry_date' => :'Integer',
329
+ :'public_access_rules_enabled' => :'Boolean',
330
+ :'page_redirected' => :'Boolean',
331
+ :'current_state' => :'String',
332
+ :'category_id' => :'Integer',
333
+ :'link_rel_canonical_url' => :'String'
334
+ }
335
+ end
336
+
337
+ # List of attributes with nullable: true
338
+ def self.openapi_nullable
339
+ Set.new([
340
+ ])
341
+ end
342
+
343
+ # Initializes the object
344
+ # @param [Hash] attributes Model attributes in the form of hash
345
+ def initialize(attributes = {})
346
+ if (!attributes.is_a?(Hash))
347
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Cms::Pages::Page` initialize method"
348
+ end
349
+
350
+ # check to see if the attribute exists and convert string to symbol for hash key
351
+ attributes = attributes.each_with_object({}) { |(k, v), h|
352
+ if (!self.class.attribute_map.key?(k.to_sym))
353
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::Pages::Page`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
354
+ end
355
+ h[k.to_sym] = v
356
+ }
357
+
358
+ if attributes.key?(:'publish_date')
359
+ self.publish_date = attributes[:'publish_date']
360
+ end
361
+
362
+ if attributes.key?(:'language')
363
+ self.language = attributes[:'language']
364
+ end
365
+
366
+ if attributes.key?(:'enable_layout_stylesheets')
367
+ self.enable_layout_stylesheets = attributes[:'enable_layout_stylesheets']
368
+ end
369
+
370
+ if attributes.key?(:'meta_description')
371
+ self.meta_description = attributes[:'meta_description']
372
+ end
373
+
374
+ if attributes.key?(:'attached_stylesheets')
375
+ if (value = attributes[:'attached_stylesheets']).is_a?(Array)
376
+ self.attached_stylesheets = value
377
+ end
378
+ end
379
+
380
+ if attributes.key?(:'password')
381
+ self.password = attributes[:'password']
382
+ end
383
+
384
+ if attributes.key?(:'publish_immediately')
385
+ self.publish_immediately = attributes[:'publish_immediately']
386
+ end
387
+
388
+ if attributes.key?(:'html_title')
389
+ self.html_title = attributes[:'html_title']
390
+ end
391
+
392
+ if attributes.key?(:'translations')
393
+ if (value = attributes[:'translations']).is_a?(Hash)
394
+ self.translations = value
395
+ end
396
+ end
397
+
398
+ if attributes.key?(:'id')
399
+ self.id = attributes[:'id']
400
+ end
401
+
402
+ if attributes.key?(:'state')
403
+ self.state = attributes[:'state']
404
+ end
405
+
406
+ if attributes.key?(:'slug')
407
+ self.slug = attributes[:'slug']
408
+ end
409
+
410
+ if attributes.key?(:'created_by_id')
411
+ self.created_by_id = attributes[:'created_by_id']
412
+ end
413
+
414
+ if attributes.key?(:'currently_published')
415
+ self.currently_published = attributes[:'currently_published']
416
+ end
417
+
418
+ if attributes.key?(:'archived_in_dashboard')
419
+ self.archived_in_dashboard = attributes[:'archived_in_dashboard']
420
+ end
421
+
422
+ if attributes.key?(:'created')
423
+ self.created = attributes[:'created']
424
+ end
425
+
426
+ if attributes.key?(:'content_type_category')
427
+ self.content_type_category = attributes[:'content_type_category']
428
+ end
429
+
430
+ if attributes.key?(:'mab_experiment_id')
431
+ self.mab_experiment_id = attributes[:'mab_experiment_id']
432
+ end
433
+
434
+ if attributes.key?(:'updated_by_id')
435
+ self.updated_by_id = attributes[:'updated_by_id']
436
+ end
437
+
438
+ if attributes.key?(:'translated_from_id')
439
+ self.translated_from_id = attributes[:'translated_from_id']
440
+ end
441
+
442
+ if attributes.key?(:'folder_id')
443
+ self.folder_id = attributes[:'folder_id']
444
+ end
445
+
446
+ if attributes.key?(:'widget_containers')
447
+ if (value = attributes[:'widget_containers']).is_a?(Hash)
448
+ self.widget_containers = value
449
+ end
450
+ end
451
+
452
+ if attributes.key?(:'page_expiry_redirect_id')
453
+ self.page_expiry_redirect_id = attributes[:'page_expiry_redirect_id']
454
+ end
455
+
456
+ if attributes.key?(:'dynamic_page_data_source_type')
457
+ self.dynamic_page_data_source_type = attributes[:'dynamic_page_data_source_type']
458
+ end
459
+
460
+ if attributes.key?(:'featured_image')
461
+ self.featured_image = attributes[:'featured_image']
462
+ end
463
+
464
+ if attributes.key?(:'author_name')
465
+ self.author_name = attributes[:'author_name']
466
+ end
467
+
468
+ if attributes.key?(:'domain')
469
+ self.domain = attributes[:'domain']
470
+ end
471
+
472
+ if attributes.key?(:'name')
473
+ self.name = attributes[:'name']
474
+ end
475
+
476
+ if attributes.key?(:'dynamic_page_hub_db_table_id')
477
+ self.dynamic_page_hub_db_table_id = attributes[:'dynamic_page_hub_db_table_id']
478
+ end
479
+
480
+ if attributes.key?(:'campaign')
481
+ self.campaign = attributes[:'campaign']
482
+ end
483
+
484
+ if attributes.key?(:'dynamic_page_data_source_id')
485
+ self.dynamic_page_data_source_id = attributes[:'dynamic_page_data_source_id']
486
+ end
487
+
488
+ if attributes.key?(:'enable_domain_stylesheets')
489
+ self.enable_domain_stylesheets = attributes[:'enable_domain_stylesheets']
490
+ end
491
+
492
+ if attributes.key?(:'include_default_custom_css')
493
+ self.include_default_custom_css = attributes[:'include_default_custom_css']
494
+ end
495
+
496
+ if attributes.key?(:'subcategory')
497
+ self.subcategory = attributes[:'subcategory']
498
+ end
499
+
500
+ if attributes.key?(:'layout_sections')
501
+ if (value = attributes[:'layout_sections']).is_a?(Hash)
502
+ self.layout_sections = value
503
+ end
504
+ end
505
+
506
+ if attributes.key?(:'updated')
507
+ self.updated = attributes[:'updated']
508
+ end
509
+
510
+ if attributes.key?(:'footer_html')
511
+ self.footer_html = attributes[:'footer_html']
512
+ end
513
+
514
+ if attributes.key?(:'widgets')
515
+ if (value = attributes[:'widgets']).is_a?(Hash)
516
+ self.widgets = value
517
+ end
518
+ end
519
+
520
+ if attributes.key?(:'head_html')
521
+ self.head_html = attributes[:'head_html']
522
+ end
523
+
524
+ if attributes.key?(:'page_expiry_redirect_url')
525
+ self.page_expiry_redirect_url = attributes[:'page_expiry_redirect_url']
526
+ end
527
+
528
+ if attributes.key?(:'ab_status')
529
+ self.ab_status = attributes[:'ab_status']
530
+ end
531
+
532
+ if attributes.key?(:'use_featured_image')
533
+ self.use_featured_image = attributes[:'use_featured_image']
534
+ end
535
+
536
+ if attributes.key?(:'ab_test_id')
537
+ self.ab_test_id = attributes[:'ab_test_id']
538
+ end
539
+
540
+ if attributes.key?(:'featured_image_alt_text')
541
+ self.featured_image_alt_text = attributes[:'featured_image_alt_text']
542
+ end
543
+
544
+ if attributes.key?(:'content_group_id')
545
+ self.content_group_id = attributes[:'content_group_id']
546
+ end
547
+
548
+ if attributes.key?(:'page_expiry_enabled')
549
+ self.page_expiry_enabled = attributes[:'page_expiry_enabled']
550
+ end
551
+
552
+ if attributes.key?(:'template_path')
553
+ self.template_path = attributes[:'template_path']
554
+ end
555
+
556
+ if attributes.key?(:'url')
557
+ self.url = attributes[:'url']
558
+ end
559
+
560
+ if attributes.key?(:'public_access_rules')
561
+ if (value = attributes[:'public_access_rules']).is_a?(Array)
562
+ self.public_access_rules = value
563
+ end
564
+ end
565
+
566
+ if attributes.key?(:'archived_at')
567
+ self.archived_at = attributes[:'archived_at']
568
+ end
569
+
570
+ if attributes.key?(:'theme_settings_values')
571
+ if (value = attributes[:'theme_settings_values']).is_a?(Hash)
572
+ self.theme_settings_values = value
573
+ end
574
+ end
575
+
576
+ if attributes.key?(:'page_expiry_date')
577
+ self.page_expiry_date = attributes[:'page_expiry_date']
578
+ end
579
+
580
+ if attributes.key?(:'public_access_rules_enabled')
581
+ self.public_access_rules_enabled = attributes[:'public_access_rules_enabled']
582
+ end
583
+
584
+ if attributes.key?(:'page_redirected')
585
+ self.page_redirected = attributes[:'page_redirected']
586
+ end
587
+
588
+ if attributes.key?(:'current_state')
589
+ self.current_state = attributes[:'current_state']
590
+ end
591
+
592
+ if attributes.key?(:'category_id')
593
+ self.category_id = attributes[:'category_id']
594
+ end
595
+
596
+ if attributes.key?(:'link_rel_canonical_url')
597
+ self.link_rel_canonical_url = attributes[:'link_rel_canonical_url']
598
+ end
599
+ end
600
+
601
+ # Show invalid properties with the reasons. Usually used together with valid?
602
+ # @return Array for valid properties with the reasons
603
+ def list_invalid_properties
604
+ invalid_properties = Array.new
605
+ if @publish_date.nil?
606
+ invalid_properties.push('invalid value for "publish_date", publish_date cannot be nil.')
607
+ end
608
+
609
+ if @language.nil?
610
+ invalid_properties.push('invalid value for "language", language cannot be nil.')
611
+ end
612
+
613
+ if @enable_layout_stylesheets.nil?
614
+ invalid_properties.push('invalid value for "enable_layout_stylesheets", enable_layout_stylesheets cannot be nil.')
615
+ end
616
+
617
+ if @meta_description.nil?
618
+ invalid_properties.push('invalid value for "meta_description", meta_description cannot be nil.')
619
+ end
620
+
621
+ if @attached_stylesheets.nil?
622
+ invalid_properties.push('invalid value for "attached_stylesheets", attached_stylesheets cannot be nil.')
623
+ end
624
+
625
+ if @password.nil?
626
+ invalid_properties.push('invalid value for "password", password cannot be nil.')
627
+ end
628
+
629
+ if @publish_immediately.nil?
630
+ invalid_properties.push('invalid value for "publish_immediately", publish_immediately cannot be nil.')
631
+ end
632
+
633
+ if @html_title.nil?
634
+ invalid_properties.push('invalid value for "html_title", html_title cannot be nil.')
635
+ end
636
+
637
+ if @translations.nil?
638
+ invalid_properties.push('invalid value for "translations", translations cannot be nil.')
639
+ end
640
+
641
+ if @id.nil?
642
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
643
+ end
644
+
645
+ if @state.nil?
646
+ invalid_properties.push('invalid value for "state", state cannot be nil.')
647
+ end
648
+
649
+ if @state.to_s.length > 25
650
+ invalid_properties.push('invalid value for "state", the character length must be smaller than or equal to 25.')
651
+ end
652
+
653
+ if @slug.nil?
654
+ invalid_properties.push('invalid value for "slug", slug cannot be nil.')
655
+ end
656
+
657
+ if @created_by_id.nil?
658
+ invalid_properties.push('invalid value for "created_by_id", created_by_id cannot be nil.')
659
+ end
660
+
661
+ if @currently_published.nil?
662
+ invalid_properties.push('invalid value for "currently_published", currently_published cannot be nil.')
663
+ end
664
+
665
+ if @archived_in_dashboard.nil?
666
+ invalid_properties.push('invalid value for "archived_in_dashboard", archived_in_dashboard cannot be nil.')
667
+ end
668
+
669
+ if @created.nil?
670
+ invalid_properties.push('invalid value for "created", created cannot be nil.')
671
+ end
672
+
673
+ if @content_type_category.nil?
674
+ invalid_properties.push('invalid value for "content_type_category", content_type_category cannot be nil.')
675
+ end
676
+
677
+ if @mab_experiment_id.nil?
678
+ invalid_properties.push('invalid value for "mab_experiment_id", mab_experiment_id cannot be nil.')
679
+ end
680
+
681
+ if @updated_by_id.nil?
682
+ invalid_properties.push('invalid value for "updated_by_id", updated_by_id cannot be nil.')
683
+ end
684
+
685
+ if @translated_from_id.nil?
686
+ invalid_properties.push('invalid value for "translated_from_id", translated_from_id cannot be nil.')
687
+ end
688
+
689
+ if @folder_id.nil?
690
+ invalid_properties.push('invalid value for "folder_id", folder_id cannot be nil.')
691
+ end
692
+
693
+ if @widget_containers.nil?
694
+ invalid_properties.push('invalid value for "widget_containers", widget_containers cannot be nil.')
695
+ end
696
+
697
+ if @page_expiry_redirect_id.nil?
698
+ invalid_properties.push('invalid value for "page_expiry_redirect_id", page_expiry_redirect_id cannot be nil.')
699
+ end
700
+
701
+ if @dynamic_page_data_source_type.nil?
702
+ invalid_properties.push('invalid value for "dynamic_page_data_source_type", dynamic_page_data_source_type cannot be nil.')
703
+ end
704
+
705
+ if @featured_image.nil?
706
+ invalid_properties.push('invalid value for "featured_image", featured_image cannot be nil.')
707
+ end
708
+
709
+ if @author_name.nil?
710
+ invalid_properties.push('invalid value for "author_name", author_name cannot be nil.')
711
+ end
712
+
713
+ if @domain.nil?
714
+ invalid_properties.push('invalid value for "domain", domain cannot be nil.')
715
+ end
716
+
717
+ if @name.nil?
718
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
719
+ end
720
+
721
+ if @dynamic_page_hub_db_table_id.nil?
722
+ invalid_properties.push('invalid value for "dynamic_page_hub_db_table_id", dynamic_page_hub_db_table_id cannot be nil.')
723
+ end
724
+
725
+ if @campaign.nil?
726
+ invalid_properties.push('invalid value for "campaign", campaign cannot be nil.')
727
+ end
728
+
729
+ if @dynamic_page_data_source_id.nil?
730
+ invalid_properties.push('invalid value for "dynamic_page_data_source_id", dynamic_page_data_source_id cannot be nil.')
731
+ end
732
+
733
+ if @enable_domain_stylesheets.nil?
734
+ invalid_properties.push('invalid value for "enable_domain_stylesheets", enable_domain_stylesheets cannot be nil.')
735
+ end
736
+
737
+ if @include_default_custom_css.nil?
738
+ invalid_properties.push('invalid value for "include_default_custom_css", include_default_custom_css cannot be nil.')
739
+ end
740
+
741
+ if @subcategory.nil?
742
+ invalid_properties.push('invalid value for "subcategory", subcategory cannot be nil.')
743
+ end
744
+
745
+ if @layout_sections.nil?
746
+ invalid_properties.push('invalid value for "layout_sections", layout_sections cannot be nil.')
747
+ end
748
+
749
+ if @updated.nil?
750
+ invalid_properties.push('invalid value for "updated", updated cannot be nil.')
751
+ end
752
+
753
+ if @footer_html.nil?
754
+ invalid_properties.push('invalid value for "footer_html", footer_html cannot be nil.')
755
+ end
756
+
757
+ if @widgets.nil?
758
+ invalid_properties.push('invalid value for "widgets", widgets cannot be nil.')
759
+ end
760
+
761
+ if @head_html.nil?
762
+ invalid_properties.push('invalid value for "head_html", head_html cannot be nil.')
763
+ end
764
+
765
+ if @page_expiry_redirect_url.nil?
766
+ invalid_properties.push('invalid value for "page_expiry_redirect_url", page_expiry_redirect_url cannot be nil.')
767
+ end
768
+
769
+ if @ab_status.nil?
770
+ invalid_properties.push('invalid value for "ab_status", ab_status cannot be nil.')
771
+ end
772
+
773
+ if @use_featured_image.nil?
774
+ invalid_properties.push('invalid value for "use_featured_image", use_featured_image cannot be nil.')
775
+ end
776
+
777
+ if @ab_test_id.nil?
778
+ invalid_properties.push('invalid value for "ab_test_id", ab_test_id cannot be nil.')
779
+ end
780
+
781
+ if @featured_image_alt_text.nil?
782
+ invalid_properties.push('invalid value for "featured_image_alt_text", featured_image_alt_text cannot be nil.')
783
+ end
784
+
785
+ if @content_group_id.nil?
786
+ invalid_properties.push('invalid value for "content_group_id", content_group_id cannot be nil.')
787
+ end
788
+
789
+ if @page_expiry_enabled.nil?
790
+ invalid_properties.push('invalid value for "page_expiry_enabled", page_expiry_enabled cannot be nil.')
791
+ end
792
+
793
+ if @template_path.nil?
794
+ invalid_properties.push('invalid value for "template_path", template_path cannot be nil.')
795
+ end
796
+
797
+ if @url.nil?
798
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
799
+ end
800
+
801
+ if @public_access_rules.nil?
802
+ invalid_properties.push('invalid value for "public_access_rules", public_access_rules cannot be nil.')
803
+ end
804
+
805
+ if @archived_at.nil?
806
+ invalid_properties.push('invalid value for "archived_at", archived_at cannot be nil.')
807
+ end
808
+
809
+ if @theme_settings_values.nil?
810
+ invalid_properties.push('invalid value for "theme_settings_values", theme_settings_values cannot be nil.')
811
+ end
812
+
813
+ if @page_expiry_date.nil?
814
+ invalid_properties.push('invalid value for "page_expiry_date", page_expiry_date cannot be nil.')
815
+ end
816
+
817
+ if @public_access_rules_enabled.nil?
818
+ invalid_properties.push('invalid value for "public_access_rules_enabled", public_access_rules_enabled cannot be nil.')
819
+ end
820
+
821
+ if @page_redirected.nil?
822
+ invalid_properties.push('invalid value for "page_redirected", page_redirected cannot be nil.')
823
+ end
824
+
825
+ if @current_state.nil?
826
+ invalid_properties.push('invalid value for "current_state", current_state cannot be nil.')
827
+ end
828
+
829
+ if @category_id.nil?
830
+ invalid_properties.push('invalid value for "category_id", category_id cannot be nil.')
831
+ end
832
+
833
+ if @link_rel_canonical_url.nil?
834
+ invalid_properties.push('invalid value for "link_rel_canonical_url", link_rel_canonical_url cannot be nil.')
835
+ end
836
+
837
+ invalid_properties
838
+ end
839
+
840
+ # Check to see if the all the properties in the model are valid
841
+ # @return true if the model is valid
842
+ def valid?
843
+ return false if @publish_date.nil?
844
+ return false if @language.nil?
845
+ language_validator = EnumAttributeValidator.new('String', ["af", "af-na", "af-za", "agq", "agq-cm", "ak", "ak-gh", "am", "am-et", "ar", "ar-001", "ar-ae", "ar-bh", "ar-dj", "ar-dz", "ar-eg", "ar-eh", "ar-er", "ar-il", "ar-iq", "ar-jo", "ar-km", "ar-kw", "ar-lb", "ar-ly", "ar-ma", "ar-mr", "ar-om", "ar-ps", "ar-qa", "ar-sa", "ar-sd", "ar-so", "ar-ss", "ar-sy", "ar-td", "ar-tn", "ar-ye", "as", "as-in", "asa", "asa-tz", "ast", "ast-es", "az", "az-az", "bas", "bas-cm", "be", "be-by", "bem", "bem-zm", "bez", "bez-tz", "bg", "bg-bg", "bm", "bm-ml", "bn", "bn-bd", "bn-in", "bo", "bo-cn", "bo-in", "br", "br-fr", "brx", "brx-in", "bs", "bs-ba", "ca", "ca-ad", "ca-es", "ca-fr", "ca-it", "ccp", "ccp-bd", "ccp-in", "ce", "ce-ru", "ceb", "ceb-ph", "cgg", "cgg-ug", "chr", "chr-us", "ckb", "ckb-iq", "ckb-ir", "cs", "cs-cz", "cu", "cu-ru", "cy", "cy-gb", "da", "da-dk", "da-gl", "dav", "dav-ke", "de", "de-at", "de-be", "de-ch", "de-de", "de-gr", "de-it", "de-li", "de-lu", "dje", "dje-ne", "doi", "doi-in", "dsb", "dsb-de", "dua", "dua-cm", "dyo", "dyo-sn", "dz", "dz-bt", "ebu", "ebu-ke", "ee", "ee-gh", "ee-tg", "el", "el-cy", "el-gr", "en", "en-001", "en-150", "en-ae", "en-ag", "en-ai", "en-as", "en-at", "en-au", "en-bb", "en-be", "en-bi", "en-bm", "en-bs", "en-bw", "en-bz", "en-ca", "en-cc", "en-ch", "en-ck", "en-cm", "en-cn", "en-cx", "en-cy", "en-de", "en-dg", "en-dk", "en-dm", "en-er", "en-fi", "en-fj", "en-fk", "en-fm", "en-gb", "en-gd", "en-gg", "en-gh", "en-gi", "en-gm", "en-gu", "en-gy", "en-hk", "en-ie", "en-il", "en-im", "en-in", "en-io", "en-je", "en-jm", "en-ke", "en-ki", "en-kn", "en-ky", "en-lc", "en-lr", "en-ls", "en-lu", "en-mg", "en-mh", "en-mo", "en-mp", "en-ms", "en-mt", "en-mu", "en-mw", "en-mx", "en-my", "en-na", "en-nf", "en-ng", "en-nl", "en-nr", "en-nu", "en-nz", "en-pg", "en-ph", "en-pk", "en-pn", "en-pr", "en-pw", "en-rw", "en-sb", "en-sc", "en-sd", "en-se", "en-sg", "en-sh", "en-si", "en-sl", "en-ss", "en-sx", "en-sz", "en-tc", "en-tk", "en-to", "en-tt", "en-tv", "en-tz", "en-ug", "en-um", "en-us", "en-vc", "en-vg", "en-vi", "en-vu", "en-ws", "en-za", "en-zm", "en-zw", "eo", "eo-001", "es", "es-419", "es-ar", "es-bo", "es-br", "es-bz", "es-cl", "es-co", "es-cr", "es-cu", "es-do", "es-ea", "es-ec", "es-es", "es-gq", "es-gt", "es-hn", "es-ic", "es-mx", "es-ni", "es-pa", "es-pe", "es-ph", "es-pr", "es-py", "es-sv", "es-us", "es-uy", "es-ve", "et", "et-ee", "eu", "eu-es", "ewo", "ewo-cm", "fa", "fa-af", "fa-ir", "ff", "ff-bf", "ff-cm", "ff-gh", "ff-gm", "ff-gn", "ff-gw", "ff-lr", "ff-mr", "ff-ne", "ff-ng", "ff-sl", "ff-sn", "fi", "fi-fi", "fil", "fil-ph", "fo", "fo-dk", "fo-fo", "fr", "fr-be", "fr-bf", "fr-bi", "fr-bj", "fr-bl", "fr-ca", "fr-cd", "fr-cf", "fr-cg", "fr-ch", "fr-ci", "fr-cm", "fr-dj", "fr-dz", "fr-fr", "fr-ga", "fr-gf", "fr-gn", "fr-gp", "fr-gq", "fr-ht", "fr-km", "fr-lu", "fr-ma", "fr-mc", "fr-mf", "fr-mg", "fr-ml", "fr-mq", "fr-mr", "fr-mu", "fr-nc", "fr-ne", "fr-pf", "fr-pm", "fr-re", "fr-rw", "fr-sc", "fr-sn", "fr-sy", "fr-td", "fr-tg", "fr-tn", "fr-vu", "fr-wf", "fr-yt", "fur", "fur-it", "fy", "fy-nl", "ga", "ga-gb", "ga-ie", "gd", "gd-gb", "gl", "gl-es", "gsw", "gsw-ch", "gsw-fr", "gsw-li", "gu", "gu-in", "guz", "guz-ke", "gv", "gv-im", "ha", "ha-gh", "ha-ne", "ha-ng", "haw", "haw-us", "he", "hi", "hi-in", "hr", "hr-ba", "hr-hr", "hsb", "hsb-de", "hu", "hu-hu", "hy", "hy-am", "ia", "ia-001", "id", "ig", "ig-ng", "ii", "ii-cn", "id-id", "is", "is-is", "it", "it-ch", "it-it", "it-sm", "it-va", "he-il", "ja", "ja-jp", "jgo", "jgo-cm", "yi", "yi-001", "jmc", "jmc-tz", "jv", "jv-id", "ka", "ka-ge", "kab", "kab-dz", "kam", "kam-ke", "kde", "kde-tz", "kea", "kea-cv", "khq", "khq-ml", "ki", "ki-ke", "kk", "kk-kz", "kkj", "kkj-cm", "kl", "kl-gl", "kln", "kln-ke", "km", "km-kh", "kn", "kn-in", "ko", "ko-kp", "ko-kr", "kok", "kok-in", "ks", "ks-in", "ksb", "ksb-tz", "ksf", "ksf-cm", "ksh", "ksh-de", "kw", "kw-gb", "ku", "ku-tr", "ky", "ky-kg", "lag", "lag-tz", "lb", "lb-lu", "lg", "lg-ug", "lkt", "lkt-us", "ln", "ln-ao", "ln-cd", "ln-cf", "ln-cg", "lo", "lo-la", "lrc", "lrc-iq", "lrc-ir", "lt", "lt-lt", "lu", "lu-cd", "luo", "luo-ke", "luy", "luy-ke", "lv", "lv-lv", "mai", "mai-in", "mas", "mas-ke", "mas-tz", "mer", "mer-ke", "mfe", "mfe-mu", "mg", "mg-mg", "mgh", "mgh-mz", "mgo", "mgo-cm", "mi", "mi-nz", "mk", "mk-mk", "ml", "ml-in", "mn", "mn-mn", "mni", "mni-in", "mr", "mr-in", "ms", "ms-bn", "ms-id", "ms-my", "ms-sg", "mt", "mt-mt", "mua", "mua-cm", "my", "my-mm", "mzn", "mzn-ir", "naq", "naq-na", "nb", "nb-no", "nb-sj", "nd", "nd-zw", "nds", "nds-de", "nds-nl", "ne", "ne-in", "ne-np", "nl", "nl-aw", "nl-be", "nl-ch", "nl-bq", "nl-cw", "nl-lu", "nl-nl", "nl-sr", "nl-sx", "nmg", "nmg-cm", "nn", "nn-no", "nnh", "nnh-cm", "no", "no-no", "nus", "nus-ss", "nyn", "nyn-ug", "om", "om-et", "om-ke", "or", "or-in", "os", "os-ge", "os-ru", "pa", "pa-in", "pa-pk", "pcm", "pcm-ng", "pl", "pl-pl", "prg", "prg-001", "ps", "ps-af", "ps-pk", "pt", "pt-ao", "pt-br", "pt-ch", "pt-cv", "pt-gq", "pt-gw", "pt-lu", "pt-mo", "pt-mz", "pt-pt", "pt-st", "pt-tl", "qu", "qu-bo", "qu-ec", "qu-pe", "rm", "rm-ch", "rn", "rn-bi", "ro", "ro-md", "ro-ro", "rof", "rof-tz", "ru", "ru-by", "ru-kg", "ru-kz", "ru-md", "ru-ru", "ru-ua", "rw", "rw-rw", "rwk", "rwk-tz", "sa", "sa-in", "sah", "sah-ru", "saq", "saq-ke", "sat", "sat-in", "sbp", "sbp-tz", "sd", "sd-in", "sd-pk", "se", "se-fi", "se-no", "se-se", "seh", "seh-mz", "ses", "ses-ml", "sg", "sg-cf", "shi", "shi-ma", "si", "si-lk", "sk", "sk-sk", "sl", "sl-si", "smn", "smn-fi", "sn", "sn-zw", "so", "so-dj", "so-et", "so-ke", "so-so", "sq", "sq-al", "sq-mk", "sq-xk", "sr", "sr-ba", "sr-cs", "sr-me", "sr-rs", "sr-xk", "su", "su-id", "sv", "sv-ax", "sv-fi", "sv-se", "sw", "sw-cd", "sw-ke", "sw-tz", "sw-ug", "sy", "ta", "ta-in", "ta-lk", "ta-my", "ta-sg", "te", "te-in", "teo", "teo-ke", "teo-ug", "tg", "tg-tj", "th", "th-th", "ti", "ti-er", "ti-et", "tk", "tk-tm", "tl", "to", "to-to", "tr", "tr-cy", "tr-tr", "tt", "tt-ru", "twq", "twq-ne", "tzm", "tzm-ma", "ug", "ug-cn", "uk", "uk-ua", "ur", "ur-in", "ur-pk", "uz", "uz-af", "uz-uz", "vai", "vai-lr", "vi", "vi-vn", "vo", "vo-001", "vun", "vun-tz", "wae", "wae-ch", "wo", "wo-sn", "xh", "xh-za", "xog", "xog-ug", "yav", "yav-cm", "yo", "yo-bj", "yo-ng", "yue", "yue-cn", "yue-hk", "zgh", "zgh-ma", "zh", "zh-cn", "zh-hk", "zh-mo", "zh-sg", "zh-tw", "zh-hans", "zh-hant", "zu", "zu-za"])
846
+ return false unless language_validator.valid?(@language)
847
+ return false if @enable_layout_stylesheets.nil?
848
+ return false if @meta_description.nil?
849
+ return false if @attached_stylesheets.nil?
850
+ return false if @password.nil?
851
+ return false if @publish_immediately.nil?
852
+ return false if @html_title.nil?
853
+ return false if @translations.nil?
854
+ return false if @id.nil?
855
+ return false if @state.nil?
856
+ return false if @state.to_s.length > 25
857
+ return false if @slug.nil?
858
+ return false if @created_by_id.nil?
859
+ return false if @currently_published.nil?
860
+ return false if @archived_in_dashboard.nil?
861
+ return false if @created.nil?
862
+ return false if @content_type_category.nil?
863
+ content_type_category_validator = EnumAttributeValidator.new('String', ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"])
864
+ return false unless content_type_category_validator.valid?(@content_type_category)
865
+ return false if @mab_experiment_id.nil?
866
+ return false if @updated_by_id.nil?
867
+ return false if @translated_from_id.nil?
868
+ return false if @folder_id.nil?
869
+ return false if @widget_containers.nil?
870
+ return false if @page_expiry_redirect_id.nil?
871
+ return false if @dynamic_page_data_source_type.nil?
872
+ return false if @featured_image.nil?
873
+ return false if @author_name.nil?
874
+ return false if @domain.nil?
875
+ return false if @name.nil?
876
+ return false if @dynamic_page_hub_db_table_id.nil?
877
+ return false if @campaign.nil?
878
+ return false if @dynamic_page_data_source_id.nil?
879
+ return false if @enable_domain_stylesheets.nil?
880
+ return false if @include_default_custom_css.nil?
881
+ return false if @subcategory.nil?
882
+ return false if @layout_sections.nil?
883
+ return false if @updated.nil?
884
+ return false if @footer_html.nil?
885
+ return false if @widgets.nil?
886
+ return false if @head_html.nil?
887
+ return false if @page_expiry_redirect_url.nil?
888
+ return false if @ab_status.nil?
889
+ ab_status_validator = EnumAttributeValidator.new('String', ["master", "variant", "loser_variant", "mab_master", "mab_variant", "automated_master", "automated_variant", "automated_loser_variant"])
890
+ return false unless ab_status_validator.valid?(@ab_status)
891
+ return false if @use_featured_image.nil?
892
+ return false if @ab_test_id.nil?
893
+ return false if @featured_image_alt_text.nil?
894
+ return false if @content_group_id.nil?
895
+ return false if @page_expiry_enabled.nil?
896
+ return false if @template_path.nil?
897
+ return false if @url.nil?
898
+ return false if @public_access_rules.nil?
899
+ return false if @archived_at.nil?
900
+ return false if @theme_settings_values.nil?
901
+ return false if @page_expiry_date.nil?
902
+ return false if @public_access_rules_enabled.nil?
903
+ return false if @page_redirected.nil?
904
+ return false if @current_state.nil?
905
+ current_state_validator = EnumAttributeValidator.new('String', ["AUTOMATED", "AUTOMATED_DRAFT", "AUTOMATED_SENDING", "AUTOMATED_FOR_FORM", "AUTOMATED_FOR_FORM_BUFFER", "AUTOMATED_FOR_FORM_DRAFT", "AUTOMATED_FOR_FORM_LEGACY", "BLOG_EMAIL_DRAFT", "BLOG_EMAIL_PUBLISHED", "DRAFT", "DRAFT_AB", "DRAFT_AB_VARIANT", "ERROR", "LOSER_AB_VARIANT", "PAGE_STUB", "PRE_PROCESSING", "PROCESSING", "PUBLISHED", "PUBLISHED_AB", "PUBLISHED_AB_VARIANT", "PUBLISHED_OR_SCHEDULED", "RSS_TO_EMAIL_DRAFT", "RSS_TO_EMAIL_PUBLISHED", "SCHEDULED", "SCHEDULED_AB", "SCHEDULED_OR_PUBLISHED", "AUTOMATED_AB", "AUTOMATED_AB_VARIANT", "AUTOMATED_DRAFT_AB", "AUTOMATED_DRAFT_ABVARIANT", "AUTOMATED_LOSER_ABVARIANT"])
906
+ return false unless current_state_validator.valid?(@current_state)
907
+ return false if @category_id.nil?
908
+ return false if @link_rel_canonical_url.nil?
909
+ true
910
+ end
911
+
912
+ # Custom attribute writer method checking allowed values (enum).
913
+ # @param [Object] language Object to be assigned
914
+ def language=(language)
915
+ validator = EnumAttributeValidator.new('String', ["af", "af-na", "af-za", "agq", "agq-cm", "ak", "ak-gh", "am", "am-et", "ar", "ar-001", "ar-ae", "ar-bh", "ar-dj", "ar-dz", "ar-eg", "ar-eh", "ar-er", "ar-il", "ar-iq", "ar-jo", "ar-km", "ar-kw", "ar-lb", "ar-ly", "ar-ma", "ar-mr", "ar-om", "ar-ps", "ar-qa", "ar-sa", "ar-sd", "ar-so", "ar-ss", "ar-sy", "ar-td", "ar-tn", "ar-ye", "as", "as-in", "asa", "asa-tz", "ast", "ast-es", "az", "az-az", "bas", "bas-cm", "be", "be-by", "bem", "bem-zm", "bez", "bez-tz", "bg", "bg-bg", "bm", "bm-ml", "bn", "bn-bd", "bn-in", "bo", "bo-cn", "bo-in", "br", "br-fr", "brx", "brx-in", "bs", "bs-ba", "ca", "ca-ad", "ca-es", "ca-fr", "ca-it", "ccp", "ccp-bd", "ccp-in", "ce", "ce-ru", "ceb", "ceb-ph", "cgg", "cgg-ug", "chr", "chr-us", "ckb", "ckb-iq", "ckb-ir", "cs", "cs-cz", "cu", "cu-ru", "cy", "cy-gb", "da", "da-dk", "da-gl", "dav", "dav-ke", "de", "de-at", "de-be", "de-ch", "de-de", "de-gr", "de-it", "de-li", "de-lu", "dje", "dje-ne", "doi", "doi-in", "dsb", "dsb-de", "dua", "dua-cm", "dyo", "dyo-sn", "dz", "dz-bt", "ebu", "ebu-ke", "ee", "ee-gh", "ee-tg", "el", "el-cy", "el-gr", "en", "en-001", "en-150", "en-ae", "en-ag", "en-ai", "en-as", "en-at", "en-au", "en-bb", "en-be", "en-bi", "en-bm", "en-bs", "en-bw", "en-bz", "en-ca", "en-cc", "en-ch", "en-ck", "en-cm", "en-cn", "en-cx", "en-cy", "en-de", "en-dg", "en-dk", "en-dm", "en-er", "en-fi", "en-fj", "en-fk", "en-fm", "en-gb", "en-gd", "en-gg", "en-gh", "en-gi", "en-gm", "en-gu", "en-gy", "en-hk", "en-ie", "en-il", "en-im", "en-in", "en-io", "en-je", "en-jm", "en-ke", "en-ki", "en-kn", "en-ky", "en-lc", "en-lr", "en-ls", "en-lu", "en-mg", "en-mh", "en-mo", "en-mp", "en-ms", "en-mt", "en-mu", "en-mw", "en-mx", "en-my", "en-na", "en-nf", "en-ng", "en-nl", "en-nr", "en-nu", "en-nz", "en-pg", "en-ph", "en-pk", "en-pn", "en-pr", "en-pw", "en-rw", "en-sb", "en-sc", "en-sd", "en-se", "en-sg", "en-sh", "en-si", "en-sl", "en-ss", "en-sx", "en-sz", "en-tc", "en-tk", "en-to", "en-tt", "en-tv", "en-tz", "en-ug", "en-um", "en-us", "en-vc", "en-vg", "en-vi", "en-vu", "en-ws", "en-za", "en-zm", "en-zw", "eo", "eo-001", "es", "es-419", "es-ar", "es-bo", "es-br", "es-bz", "es-cl", "es-co", "es-cr", "es-cu", "es-do", "es-ea", "es-ec", "es-es", "es-gq", "es-gt", "es-hn", "es-ic", "es-mx", "es-ni", "es-pa", "es-pe", "es-ph", "es-pr", "es-py", "es-sv", "es-us", "es-uy", "es-ve", "et", "et-ee", "eu", "eu-es", "ewo", "ewo-cm", "fa", "fa-af", "fa-ir", "ff", "ff-bf", "ff-cm", "ff-gh", "ff-gm", "ff-gn", "ff-gw", "ff-lr", "ff-mr", "ff-ne", "ff-ng", "ff-sl", "ff-sn", "fi", "fi-fi", "fil", "fil-ph", "fo", "fo-dk", "fo-fo", "fr", "fr-be", "fr-bf", "fr-bi", "fr-bj", "fr-bl", "fr-ca", "fr-cd", "fr-cf", "fr-cg", "fr-ch", "fr-ci", "fr-cm", "fr-dj", "fr-dz", "fr-fr", "fr-ga", "fr-gf", "fr-gn", "fr-gp", "fr-gq", "fr-ht", "fr-km", "fr-lu", "fr-ma", "fr-mc", "fr-mf", "fr-mg", "fr-ml", "fr-mq", "fr-mr", "fr-mu", "fr-nc", "fr-ne", "fr-pf", "fr-pm", "fr-re", "fr-rw", "fr-sc", "fr-sn", "fr-sy", "fr-td", "fr-tg", "fr-tn", "fr-vu", "fr-wf", "fr-yt", "fur", "fur-it", "fy", "fy-nl", "ga", "ga-gb", "ga-ie", "gd", "gd-gb", "gl", "gl-es", "gsw", "gsw-ch", "gsw-fr", "gsw-li", "gu", "gu-in", "guz", "guz-ke", "gv", "gv-im", "ha", "ha-gh", "ha-ne", "ha-ng", "haw", "haw-us", "he", "hi", "hi-in", "hr", "hr-ba", "hr-hr", "hsb", "hsb-de", "hu", "hu-hu", "hy", "hy-am", "ia", "ia-001", "id", "ig", "ig-ng", "ii", "ii-cn", "id-id", "is", "is-is", "it", "it-ch", "it-it", "it-sm", "it-va", "he-il", "ja", "ja-jp", "jgo", "jgo-cm", "yi", "yi-001", "jmc", "jmc-tz", "jv", "jv-id", "ka", "ka-ge", "kab", "kab-dz", "kam", "kam-ke", "kde", "kde-tz", "kea", "kea-cv", "khq", "khq-ml", "ki", "ki-ke", "kk", "kk-kz", "kkj", "kkj-cm", "kl", "kl-gl", "kln", "kln-ke", "km", "km-kh", "kn", "kn-in", "ko", "ko-kp", "ko-kr", "kok", "kok-in", "ks", "ks-in", "ksb", "ksb-tz", "ksf", "ksf-cm", "ksh", "ksh-de", "kw", "kw-gb", "ku", "ku-tr", "ky", "ky-kg", "lag", "lag-tz", "lb", "lb-lu", "lg", "lg-ug", "lkt", "lkt-us", "ln", "ln-ao", "ln-cd", "ln-cf", "ln-cg", "lo", "lo-la", "lrc", "lrc-iq", "lrc-ir", "lt", "lt-lt", "lu", "lu-cd", "luo", "luo-ke", "luy", "luy-ke", "lv", "lv-lv", "mai", "mai-in", "mas", "mas-ke", "mas-tz", "mer", "mer-ke", "mfe", "mfe-mu", "mg", "mg-mg", "mgh", "mgh-mz", "mgo", "mgo-cm", "mi", "mi-nz", "mk", "mk-mk", "ml", "ml-in", "mn", "mn-mn", "mni", "mni-in", "mr", "mr-in", "ms", "ms-bn", "ms-id", "ms-my", "ms-sg", "mt", "mt-mt", "mua", "mua-cm", "my", "my-mm", "mzn", "mzn-ir", "naq", "naq-na", "nb", "nb-no", "nb-sj", "nd", "nd-zw", "nds", "nds-de", "nds-nl", "ne", "ne-in", "ne-np", "nl", "nl-aw", "nl-be", "nl-ch", "nl-bq", "nl-cw", "nl-lu", "nl-nl", "nl-sr", "nl-sx", "nmg", "nmg-cm", "nn", "nn-no", "nnh", "nnh-cm", "no", "no-no", "nus", "nus-ss", "nyn", "nyn-ug", "om", "om-et", "om-ke", "or", "or-in", "os", "os-ge", "os-ru", "pa", "pa-in", "pa-pk", "pcm", "pcm-ng", "pl", "pl-pl", "prg", "prg-001", "ps", "ps-af", "ps-pk", "pt", "pt-ao", "pt-br", "pt-ch", "pt-cv", "pt-gq", "pt-gw", "pt-lu", "pt-mo", "pt-mz", "pt-pt", "pt-st", "pt-tl", "qu", "qu-bo", "qu-ec", "qu-pe", "rm", "rm-ch", "rn", "rn-bi", "ro", "ro-md", "ro-ro", "rof", "rof-tz", "ru", "ru-by", "ru-kg", "ru-kz", "ru-md", "ru-ru", "ru-ua", "rw", "rw-rw", "rwk", "rwk-tz", "sa", "sa-in", "sah", "sah-ru", "saq", "saq-ke", "sat", "sat-in", "sbp", "sbp-tz", "sd", "sd-in", "sd-pk", "se", "se-fi", "se-no", "se-se", "seh", "seh-mz", "ses", "ses-ml", "sg", "sg-cf", "shi", "shi-ma", "si", "si-lk", "sk", "sk-sk", "sl", "sl-si", "smn", "smn-fi", "sn", "sn-zw", "so", "so-dj", "so-et", "so-ke", "so-so", "sq", "sq-al", "sq-mk", "sq-xk", "sr", "sr-ba", "sr-cs", "sr-me", "sr-rs", "sr-xk", "su", "su-id", "sv", "sv-ax", "sv-fi", "sv-se", "sw", "sw-cd", "sw-ke", "sw-tz", "sw-ug", "sy", "ta", "ta-in", "ta-lk", "ta-my", "ta-sg", "te", "te-in", "teo", "teo-ke", "teo-ug", "tg", "tg-tj", "th", "th-th", "ti", "ti-er", "ti-et", "tk", "tk-tm", "tl", "to", "to-to", "tr", "tr-cy", "tr-tr", "tt", "tt-ru", "twq", "twq-ne", "tzm", "tzm-ma", "ug", "ug-cn", "uk", "uk-ua", "ur", "ur-in", "ur-pk", "uz", "uz-af", "uz-uz", "vai", "vai-lr", "vi", "vi-vn", "vo", "vo-001", "vun", "vun-tz", "wae", "wae-ch", "wo", "wo-sn", "xh", "xh-za", "xog", "xog-ug", "yav", "yav-cm", "yo", "yo-bj", "yo-ng", "yue", "yue-cn", "yue-hk", "zgh", "zgh-ma", "zh", "zh-cn", "zh-hk", "zh-mo", "zh-sg", "zh-tw", "zh-hans", "zh-hant", "zu", "zu-za"])
916
+ unless validator.valid?(language)
917
+ fail ArgumentError, "invalid value for \"language\", must be one of #{validator.allowable_values}."
918
+ end
919
+ @language = language
920
+ end
921
+
922
+ # Custom attribute writer method with validation
923
+ # @param [Object] state Value to be assigned
924
+ def state=(state)
925
+ if state.nil?
926
+ fail ArgumentError, 'state cannot be nil'
927
+ end
928
+
929
+ if state.to_s.length > 25
930
+ fail ArgumentError, 'invalid value for "state", the character length must be smaller than or equal to 25.'
931
+ end
932
+
933
+ @state = state
934
+ end
935
+
936
+ # Custom attribute writer method checking allowed values (enum).
937
+ # @param [Object] content_type_category Object to be assigned
938
+ def content_type_category=(content_type_category)
939
+ validator = EnumAttributeValidator.new('String', ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"])
940
+ unless validator.valid?(content_type_category)
941
+ fail ArgumentError, "invalid value for \"content_type_category\", must be one of #{validator.allowable_values}."
942
+ end
943
+ @content_type_category = content_type_category
944
+ end
945
+
946
+ # Custom attribute writer method checking allowed values (enum).
947
+ # @param [Object] ab_status Object to be assigned
948
+ def ab_status=(ab_status)
949
+ validator = EnumAttributeValidator.new('String', ["master", "variant", "loser_variant", "mab_master", "mab_variant", "automated_master", "automated_variant", "automated_loser_variant"])
950
+ unless validator.valid?(ab_status)
951
+ fail ArgumentError, "invalid value for \"ab_status\", must be one of #{validator.allowable_values}."
952
+ end
953
+ @ab_status = ab_status
954
+ end
955
+
956
+ # Custom attribute writer method checking allowed values (enum).
957
+ # @param [Object] current_state Object to be assigned
958
+ def current_state=(current_state)
959
+ validator = EnumAttributeValidator.new('String', ["AUTOMATED", "AUTOMATED_DRAFT", "AUTOMATED_SENDING", "AUTOMATED_FOR_FORM", "AUTOMATED_FOR_FORM_BUFFER", "AUTOMATED_FOR_FORM_DRAFT", "AUTOMATED_FOR_FORM_LEGACY", "BLOG_EMAIL_DRAFT", "BLOG_EMAIL_PUBLISHED", "DRAFT", "DRAFT_AB", "DRAFT_AB_VARIANT", "ERROR", "LOSER_AB_VARIANT", "PAGE_STUB", "PRE_PROCESSING", "PROCESSING", "PUBLISHED", "PUBLISHED_AB", "PUBLISHED_AB_VARIANT", "PUBLISHED_OR_SCHEDULED", "RSS_TO_EMAIL_DRAFT", "RSS_TO_EMAIL_PUBLISHED", "SCHEDULED", "SCHEDULED_AB", "SCHEDULED_OR_PUBLISHED", "AUTOMATED_AB", "AUTOMATED_AB_VARIANT", "AUTOMATED_DRAFT_AB", "AUTOMATED_DRAFT_ABVARIANT", "AUTOMATED_LOSER_ABVARIANT"])
960
+ unless validator.valid?(current_state)
961
+ fail ArgumentError, "invalid value for \"current_state\", must be one of #{validator.allowable_values}."
962
+ end
963
+ @current_state = current_state
964
+ end
965
+
966
+ # Checks equality by comparing each attribute.
967
+ # @param [Object] Object to be compared
968
+ def ==(o)
969
+ return true if self.equal?(o)
970
+ self.class == o.class &&
971
+ publish_date == o.publish_date &&
972
+ language == o.language &&
973
+ enable_layout_stylesheets == o.enable_layout_stylesheets &&
974
+ meta_description == o.meta_description &&
975
+ attached_stylesheets == o.attached_stylesheets &&
976
+ password == o.password &&
977
+ publish_immediately == o.publish_immediately &&
978
+ html_title == o.html_title &&
979
+ translations == o.translations &&
980
+ id == o.id &&
981
+ state == o.state &&
982
+ slug == o.slug &&
983
+ created_by_id == o.created_by_id &&
984
+ currently_published == o.currently_published &&
985
+ archived_in_dashboard == o.archived_in_dashboard &&
986
+ created == o.created &&
987
+ content_type_category == o.content_type_category &&
988
+ mab_experiment_id == o.mab_experiment_id &&
989
+ updated_by_id == o.updated_by_id &&
990
+ translated_from_id == o.translated_from_id &&
991
+ folder_id == o.folder_id &&
992
+ widget_containers == o.widget_containers &&
993
+ page_expiry_redirect_id == o.page_expiry_redirect_id &&
994
+ dynamic_page_data_source_type == o.dynamic_page_data_source_type &&
995
+ featured_image == o.featured_image &&
996
+ author_name == o.author_name &&
997
+ domain == o.domain &&
998
+ name == o.name &&
999
+ dynamic_page_hub_db_table_id == o.dynamic_page_hub_db_table_id &&
1000
+ campaign == o.campaign &&
1001
+ dynamic_page_data_source_id == o.dynamic_page_data_source_id &&
1002
+ enable_domain_stylesheets == o.enable_domain_stylesheets &&
1003
+ include_default_custom_css == o.include_default_custom_css &&
1004
+ subcategory == o.subcategory &&
1005
+ layout_sections == o.layout_sections &&
1006
+ updated == o.updated &&
1007
+ footer_html == o.footer_html &&
1008
+ widgets == o.widgets &&
1009
+ head_html == o.head_html &&
1010
+ page_expiry_redirect_url == o.page_expiry_redirect_url &&
1011
+ ab_status == o.ab_status &&
1012
+ use_featured_image == o.use_featured_image &&
1013
+ ab_test_id == o.ab_test_id &&
1014
+ featured_image_alt_text == o.featured_image_alt_text &&
1015
+ content_group_id == o.content_group_id &&
1016
+ page_expiry_enabled == o.page_expiry_enabled &&
1017
+ template_path == o.template_path &&
1018
+ url == o.url &&
1019
+ public_access_rules == o.public_access_rules &&
1020
+ archived_at == o.archived_at &&
1021
+ theme_settings_values == o.theme_settings_values &&
1022
+ page_expiry_date == o.page_expiry_date &&
1023
+ public_access_rules_enabled == o.public_access_rules_enabled &&
1024
+ page_redirected == o.page_redirected &&
1025
+ current_state == o.current_state &&
1026
+ category_id == o.category_id &&
1027
+ link_rel_canonical_url == o.link_rel_canonical_url
1028
+ end
1029
+
1030
+ # @see the `==` method
1031
+ # @param [Object] Object to be compared
1032
+ def eql?(o)
1033
+ self == o
1034
+ end
1035
+
1036
+ # Calculates hash code according to all attributes.
1037
+ # @return [Integer] Hash code
1038
+ def hash
1039
+ [publish_date, language, enable_layout_stylesheets, meta_description, attached_stylesheets, password, publish_immediately, html_title, translations, id, state, slug, created_by_id, currently_published, archived_in_dashboard, created, content_type_category, mab_experiment_id, updated_by_id, translated_from_id, folder_id, widget_containers, page_expiry_redirect_id, dynamic_page_data_source_type, featured_image, author_name, domain, name, dynamic_page_hub_db_table_id, campaign, dynamic_page_data_source_id, enable_domain_stylesheets, include_default_custom_css, subcategory, layout_sections, updated, footer_html, widgets, head_html, page_expiry_redirect_url, ab_status, use_featured_image, ab_test_id, featured_image_alt_text, content_group_id, page_expiry_enabled, template_path, url, public_access_rules, archived_at, theme_settings_values, page_expiry_date, public_access_rules_enabled, page_redirected, current_state, category_id, link_rel_canonical_url].hash
1040
+ end
1041
+
1042
+ # Builds the object from hash
1043
+ # @param [Hash] attributes Model attributes in the form of hash
1044
+ # @return [Object] Returns the model itself
1045
+ def self.build_from_hash(attributes)
1046
+ new.build_from_hash(attributes)
1047
+ end
1048
+
1049
+ # Builds the object from hash
1050
+ # @param [Hash] attributes Model attributes in the form of hash
1051
+ # @return [Object] Returns the model itself
1052
+ def build_from_hash(attributes)
1053
+ return nil unless attributes.is_a?(Hash)
1054
+ attributes = attributes.transform_keys(&:to_sym)
1055
+ self.class.openapi_types.each_pair do |key, type|
1056
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
1057
+ self.send("#{key}=", nil)
1058
+ elsif type =~ /\AArray<(.*)>/i
1059
+ # check to ensure the input is an array given that the attribute
1060
+ # is documented as an array but the input is not
1061
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
1062
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
1063
+ end
1064
+ elsif !attributes[self.class.attribute_map[key]].nil?
1065
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
1066
+ end
1067
+ end
1068
+
1069
+ self
1070
+ end
1071
+
1072
+ # Deserializes the data based on type
1073
+ # @param string type Data type
1074
+ # @param string value Value to be deserialized
1075
+ # @return [Object] Deserialized data
1076
+ def _deserialize(type, value)
1077
+ case type.to_sym
1078
+ when :Time
1079
+ Time.parse(value)
1080
+ when :Date
1081
+ Date.parse(value)
1082
+ when :String
1083
+ value.to_s
1084
+ when :Integer
1085
+ value.to_i
1086
+ when :Float
1087
+ value.to_f
1088
+ when :Boolean
1089
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1090
+ true
1091
+ else
1092
+ false
1093
+ end
1094
+ when :Object
1095
+ # generic object (usually a Hash), return directly
1096
+ value
1097
+ when /\AArray<(?<inner_type>.+)>\z/
1098
+ inner_type = Regexp.last_match[:inner_type]
1099
+ value.map { |v| _deserialize(inner_type, v) }
1100
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
1101
+ k_type = Regexp.last_match[:k_type]
1102
+ v_type = Regexp.last_match[:v_type]
1103
+ {}.tap do |hash|
1104
+ value.each do |k, v|
1105
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1106
+ end
1107
+ end
1108
+ else # model
1109
+ # models (e.g. Pet) or oneOf
1110
+ klass = Hubspot::Cms::Pages.const_get(type)
1111
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
1112
+ end
1113
+ end
1114
+
1115
+ # Returns the string representation of the object
1116
+ # @return [String] String presentation of the object
1117
+ def to_s
1118
+ to_hash.to_s
1119
+ end
1120
+
1121
+ # to_body is an alias to to_hash (backward compatibility)
1122
+ # @return [Hash] Returns the object in the form of hash
1123
+ def to_body
1124
+ to_hash
1125
+ end
1126
+
1127
+ # Returns the object in the form of hash
1128
+ # @return [Hash] Returns the object in the form of hash
1129
+ def to_hash
1130
+ hash = {}
1131
+ self.class.attribute_map.each_pair do |attr, param|
1132
+ value = self.send(attr)
1133
+ if value.nil?
1134
+ is_nullable = self.class.openapi_nullable.include?(attr)
1135
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
1136
+ end
1137
+
1138
+ hash[param] = _to_hash(value)
1139
+ end
1140
+ hash
1141
+ end
1142
+
1143
+ # Outputs non-array value in the form of hash
1144
+ # For object, use to_hash. Otherwise, just return the value
1145
+ # @param [Object] value Any valid value
1146
+ # @return [Hash] Returns the value in the form of hash
1147
+ def _to_hash(value)
1148
+ if value.is_a?(Array)
1149
+ value.compact.map { |v| _to_hash(v) }
1150
+ elsif value.is_a?(Hash)
1151
+ {}.tap do |hash|
1152
+ value.each { |k, v| hash[k] = _to_hash(v) }
1153
+ end
1154
+ elsif value.respond_to? :to_hash
1155
+ value.to_hash
1156
+ else
1157
+ value
1158
+ end
1159
+ end
1160
+
1161
+ end
1162
+
1163
+ end
1164
+ end
1165
+ end