ezero-apimatic-sdk 0.0.1

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 (312) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +180 -0
  4. data/bin/console +15 -0
  5. data/lib/env_zero_api/api_helper.rb +10 -0
  6. data/lib/env_zero_api/apis/approval_policy_api.rb +107 -0
  7. data/lib/env_zero_api/apis/base_api.rb +67 -0
  8. data/lib/env_zero_api/apis/bulk_operations_api.rb +297 -0
  9. data/lib/env_zero_api/apis/configuration_api.rb +311 -0
  10. data/lib/env_zero_api/apis/credentials_api.rb +72 -0
  11. data/lib/env_zero_api/apis/deployment_logs_api.rb +79 -0
  12. data/lib/env_zero_api/apis/drift_api.rb +201 -0
  13. data/lib/env_zero_api/apis/environment_outputs_api.rb +39 -0
  14. data/lib/env_zero_api/apis/environments_api.rb +1082 -0
  15. data/lib/env_zero_api/apis/notifications_api.rb +149 -0
  16. data/lib/env_zero_api/apis/organization_api.rb +132 -0
  17. data/lib/env_zero_api/apis/projects_api.rb +202 -0
  18. data/lib/env_zero_api/apis/scheduling_api.rb +175 -0
  19. data/lib/env_zero_api/apis/templates_api.rb +206 -0
  20. data/lib/env_zero_api/client.rb +145 -0
  21. data/lib/env_zero_api/configuration.rb +166 -0
  22. data/lib/env_zero_api/exceptions/api_exception.rb +21 -0
  23. data/lib/env_zero_api/exceptions/error_exception.rb +46 -0
  24. data/lib/env_zero_api/http/api_response.rb +19 -0
  25. data/lib/env_zero_api/http/auth/basic_auth.rb +62 -0
  26. data/lib/env_zero_api/http/http_call_back.rb +10 -0
  27. data/lib/env_zero_api/http/http_method_enum.rb +10 -0
  28. data/lib/env_zero_api/http/http_request.rb +10 -0
  29. data/lib/env_zero_api/http/http_response.rb +10 -0
  30. data/lib/env_zero_api/http/proxy_settings.rb +22 -0
  31. data/lib/env_zero_api/logging/configuration/api_logging_configuration.rb +186 -0
  32. data/lib/env_zero_api/logging/sdk_logger.rb +17 -0
  33. data/lib/env_zero_api/models/action.rb +36 -0
  34. data/lib/env_zero_api/models/action_reason.rb +68 -0
  35. data/lib/env_zero_api/models/api_key_type.rb +26 -0
  36. data/lib/env_zero_api/models/api_key_user.rb +150 -0
  37. data/lib/env_zero_api/models/api_key_user_identity.rb +82 -0
  38. data/lib/env_zero_api/models/app_metadata.rb +175 -0
  39. data/lib/env_zero_api/models/app_metadata1.rb +60 -0
  40. data/lib/env_zero_api/models/approval_policy_type.rb +26 -0
  41. data/lib/env_zero_api/models/auto_destroy_status.rb +26 -0
  42. data/lib/env_zero_api/models/auto_destroy_status1.rb +26 -0
  43. data/lib/env_zero_api/models/auto_destroy_status2.rb +26 -0
  44. data/lib/env_zero_api/models/auto_destroy_status3.rb +26 -0
  45. data/lib/env_zero_api/models/base_model.rb +110 -0
  46. data/lib/env_zero_api/models/blueprint_api_add_blueprint_to_project_request_body.rb +60 -0
  47. data/lib/env_zero_api/models/blueprint_api_add_blueprint_to_project_response.rb +675 -0
  48. data/lib/env_zero_api/models/blueprint_api_approval_policy_assignment.rb +98 -0
  49. data/lib/env_zero_api/models/blueprint_api_approval_policy_assignment_request.rb +77 -0
  50. data/lib/env_zero_api/models/blueprint_api_approval_policy_scope.rb +44 -0
  51. data/lib/env_zero_api/models/blueprint_api_approval_policy_template.rb +375 -0
  52. data/lib/env_zero_api/models/blueprint_api_approval_policy_template_with_scope.rb +96 -0
  53. data/lib/env_zero_api/models/blueprint_api_approval_policy_type.rb +26 -0
  54. data/lib/env_zero_api/models/blueprint_api_assign_approval_policy_request_body.rb +77 -0
  55. data/lib/env_zero_api/models/blueprint_api_assign_approval_policy_response.rb +98 -0
  56. data/lib/env_zero_api/models/blueprint_api_blueprint.rb +675 -0
  57. data/lib/env_zero_api/models/blueprint_api_blueprint_type.rb +26 -0
  58. data/lib/env_zero_api/models/blueprint_api_blueprint_type1.rb +26 -0
  59. data/lib/env_zero_api/models/blueprint_api_create_blueprint_request_body.rb +544 -0
  60. data/lib/env_zero_api/models/blueprint_api_create_blueprint_response.rb +675 -0
  61. data/lib/env_zero_api/models/blueprint_api_creation_scope.rb +36 -0
  62. data/lib/env_zero_api/models/blueprint_api_custom_flow_type.rb +26 -0
  63. data/lib/env_zero_api/models/blueprint_api_deployable_type.rb +26 -0
  64. data/lib/env_zero_api/models/blueprint_api_find_all_approval_policies_response.rb +77 -0
  65. data/lib/env_zero_api/models/blueprint_api_get_blueprint_by_id_response.rb +675 -0
  66. data/lib/env_zero_api/models/blueprint_api_retry.rb +85 -0
  67. data/lib/env_zero_api/models/blueprint_api_retry_deploy_or_destroy_config.rb +98 -0
  68. data/lib/env_zero_api/models/blueprint_api_ssh_key.rb +90 -0
  69. data/lib/env_zero_api/models/blueprint_api_terragrunt_tf_binary.rb +36 -0
  70. data/lib/env_zero_api/models/blueprint_api_update_blueprint_request_body.rb +483 -0
  71. data/lib/env_zero_api/models/blueprint_api_update_blueprint_response.rb +675 -0
  72. data/lib/env_zero_api/models/bulk_operation_type.rb +72 -0
  73. data/lib/env_zero_api/models/bulk_operations_api_base_payload.rb +72 -0
  74. data/lib/env_zero_api/models/bulk_operations_api_base_response.rb +91 -0
  75. data/lib/env_zero_api/models/bulk_operations_api_bulk_add_tags_request_body.rb +82 -0
  76. data/lib/env_zero_api/models/bulk_operations_api_bulk_add_tags_response.rb +91 -0
  77. data/lib/env_zero_api/models/bulk_operations_api_bulk_archive_request_body.rb +72 -0
  78. data/lib/env_zero_api/models/bulk_operations_api_bulk_archive_response.rb +91 -0
  79. data/lib/env_zero_api/models/bulk_operations_api_bulk_deploy_request_body.rb +80 -0
  80. data/lib/env_zero_api/models/bulk_operations_api_bulk_deploy_response.rb +91 -0
  81. data/lib/env_zero_api/models/bulk_operations_api_bulk_destroy_request_body.rb +80 -0
  82. data/lib/env_zero_api/models/bulk_operations_api_bulk_destroy_response.rb +91 -0
  83. data/lib/env_zero_api/models/bulk_operations_api_bulk_lock_request_body.rb +80 -0
  84. data/lib/env_zero_api/models/bulk_operations_api_bulk_lock_response.rb +91 -0
  85. data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status.rb +26 -0
  86. data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status1.rb +26 -0
  87. data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status2.rb +26 -0
  88. data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status3.rb +26 -0
  89. data/lib/env_zero_api/models/bulk_operations_api_bulk_remove_tags_request_body.rb +81 -0
  90. data/lib/env_zero_api/models/bulk_operations_api_bulk_remove_tags_response.rb +91 -0
  91. data/lib/env_zero_api/models/bulk_operations_api_bulk_run_task_request_body.rb +80 -0
  92. data/lib/env_zero_api/models/bulk_operations_api_bulk_run_task_response.rb +91 -0
  93. data/lib/env_zero_api/models/bulk_operations_api_bulk_unlock_request_body.rb +72 -0
  94. data/lib/env_zero_api/models/bulk_operations_api_bulk_unlock_response.rb +91 -0
  95. data/lib/env_zero_api/models/bulk_operations_api_get_bulk_operation_item.rb +128 -0
  96. data/lib/env_zero_api/models/bulk_operations_api_get_bulk_operation_response.rb +106 -0
  97. data/lib/env_zero_api/models/bulk_operations_api_single_result.rb +79 -0
  98. data/lib/env_zero_api/models/cause_key_parts.rb +104 -0
  99. data/lib/env_zero_api/models/cause_key_parts1.rb +74 -0
  100. data/lib/env_zero_api/models/cause_key_parts2.rb +91 -0
  101. data/lib/env_zero_api/models/cause_key_parts4.rb +132 -0
  102. data/lib/env_zero_api/models/cause_key_parts5.rb +92 -0
  103. data/lib/env_zero_api/models/checkout_updated_code.rb +36 -0
  104. data/lib/env_zero_api/models/cloud_resource_api_change_event.rb +199 -0
  105. data/lib/env_zero_api/models/cloud_resource_api_change_event_source.rb +40 -0
  106. data/lib/env_zero_api/models/cloud_resource_api_management_type.rb +40 -0
  107. data/lib/env_zero_api/models/configuration_api_create_configuration_set_request_body.rb +108 -0
  108. data/lib/env_zero_api/models/configuration_api_create_configuration_set_response.rb +200 -0
  109. data/lib/env_zero_api/models/configuration_api_find_variable_by_id_response.rb +305 -0
  110. data/lib/env_zero_api/models/configuration_api_find_variables_by_scope_overriding_configuration_property.rb +342 -0
  111. data/lib/env_zero_api/models/configuration_property_request.rb +284 -0
  112. data/lib/env_zero_api/models/configuration_property_response.rb +305 -0
  113. data/lib/env_zero_api/models/configuration_scope.rb +60 -0
  114. data/lib/env_zero_api/models/configuration_set.rb +200 -0
  115. data/lib/env_zero_api/models/configuration_set_assignment_scope.rb +52 -0
  116. data/lib/env_zero_api/models/configuration_type.rb +27 -0
  117. data/lib/env_zero_api/models/configuration_type1.rb +27 -0
  118. data/lib/env_zero_api/models/credentials_api_api_key.rb +167 -0
  119. data/lib/env_zero_api/models/credentials_api_create_api_key_request_body.rb +91 -0
  120. data/lib/env_zero_api/models/credentials_api_create_api_key_response.rb +167 -0
  121. data/lib/env_zero_api/models/custom_env0_environment_variables.rb +537 -0
  122. data/lib/env_zero_api/models/custom_flow_type.rb +26 -0
  123. data/lib/env_zero_api/models/data.rb +65 -0
  124. data/lib/env_zero_api/models/data1.rb +73 -0
  125. data/lib/env_zero_api/models/data2.rb +73 -0
  126. data/lib/env_zero_api/models/data3.rb +62 -0
  127. data/lib/env_zero_api/models/data4.rb +61 -0
  128. data/lib/env_zero_api/models/data5.rb +71 -0
  129. data/lib/env_zero_api/models/deploy_request.rb +343 -0
  130. data/lib/env_zero_api/models/deployment_api_plan_attribute_change.rb +94 -0
  131. data/lib/env_zero_api/models/deployment_api_plan_change_action.rb +48 -0
  132. data/lib/env_zero_api/models/deployment_api_plan_plan.rb +118 -0
  133. data/lib/env_zero_api/models/deployment_api_plan_plan_output_change.rb +127 -0
  134. data/lib/env_zero_api/models/deployment_api_plan_plan_resource_change.rb +240 -0
  135. data/lib/env_zero_api/models/deployment_api_plan_plan_summary.rb +114 -0
  136. data/lib/env_zero_api/models/deployment_api_plan_resource_import_data.rb +74 -0
  137. data/lib/env_zero_api/models/deployment_command.rb +68 -0
  138. data/lib/env_zero_api/models/deployment_step_api_deployment_step_status.rb +64 -0
  139. data/lib/env_zero_api/models/deployment_step_api_find_by_deployment_log_id_response.rb +195 -0
  140. data/lib/env_zero_api/models/deployment_step_api_find_step_log_response.rb +117 -0
  141. data/lib/env_zero_api/models/deployment_step_api_log_event.rb +131 -0
  142. data/lib/env_zero_api/models/deployment_type.rb +40 -0
  143. data/lib/env_zero_api/models/deployment_type1.rb +56 -0
  144. data/lib/env_zero_api/models/diff.rb +75 -0
  145. data/lib/env_zero_api/models/drift_api_drift_cause_environment.rb +117 -0
  146. data/lib/env_zero_api/models/drift_api_drift_cause_group.rb +169 -0
  147. data/lib/env_zero_api/models/drift_api_drift_cause_group1.rb +169 -0
  148. data/lib/env_zero_api/models/drift_api_drift_cause_group2.rb +169 -0
  149. data/lib/env_zero_api/models/drift_api_drift_cause_group4.rb +169 -0
  150. data/lib/env_zero_api/models/drift_api_drift_cause_group5.rb +169 -0
  151. data/lib/env_zero_api/models/drift_api_drift_cause_skip.rb +68 -0
  152. data/lib/env_zero_api/models/drift_api_drift_cause_skip_reason.rb +40 -0
  153. data/lib/env_zero_api/models/drift_api_get_drift_causes_response.rb +76 -0
  154. data/lib/env_zero_api/models/drift_api_get_drift_causes_response1.rb +76 -0
  155. data/lib/env_zero_api/models/drift_api_get_drift_fix_stats_response.rb +81 -0
  156. data/lib/env_zero_api/models/drift_api_get_drift_fix_stats_response1.rb +81 -0
  157. data/lib/env_zero_api/models/drift_api_get_ignored_drift_causes_response.rb +76 -0
  158. data/lib/env_zero_api/models/drift_api_ignore_drift_cause_body.rb +72 -0
  159. data/lib/env_zero_api/models/drift_api_ignore_drift_cause_request_body.rb +72 -0
  160. data/lib/env_zero_api/models/drift_api_ignore_drift_cause_response.rb +77 -0
  161. data/lib/env_zero_api/models/drift_api_ignored_drift_cause_environment.rb +140 -0
  162. data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group.rb +157 -0
  163. data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group1.rb +157 -0
  164. data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group2.rb +157 -0
  165. data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group4.rb +157 -0
  166. data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group5.rb +157 -0
  167. data/lib/env_zero_api/models/drift_api_state_modifying_deployment_type.rb +40 -0
  168. data/lib/env_zero_api/models/drift_api_un_ignore_drift_cause_request_body.rb +72 -0
  169. data/lib/env_zero_api/models/drift_api_un_ignore_drift_cause_response.rb +77 -0
  170. data/lib/env_zero_api/models/drift_api_variable_change_type.rb +40 -0
  171. data/lib/env_zero_api/models/drift_cause.rb +87 -0
  172. data/lib/env_zero_api/models/environment_api_auto_drift_remediation_strategy.rb +44 -0
  173. data/lib/env_zero_api/models/environment_api_cancel_response.rb +60 -0
  174. data/lib/env_zero_api/models/environment_api_configuration_property_change.rb +255 -0
  175. data/lib/env_zero_api/models/environment_api_configuration_set_changes.rb +81 -0
  176. data/lib/env_zero_api/models/environment_api_create_environment_request.rb +356 -0
  177. data/lib/env_zero_api/models/environment_api_create_request_body.rb +356 -0
  178. data/lib/env_zero_api/models/environment_api_create_response.rb +539 -0
  179. data/lib/env_zero_api/models/environment_api_deploy_request_body.rb +343 -0
  180. data/lib/env_zero_api/models/environment_api_deploy_request_on_create_flow.rb +154 -0
  181. data/lib/env_zero_api/models/environment_api_deploy_response.rb +796 -0
  182. data/lib/env_zero_api/models/environment_api_deployment_log.rb +792 -0
  183. data/lib/env_zero_api/models/environment_api_deployment_log_status.rb +76 -0
  184. data/lib/env_zero_api/models/environment_api_deployment_type.rb +60 -0
  185. data/lib/env_zero_api/models/environment_api_destroy_request_body.rb +108 -0
  186. data/lib/env_zero_api/models/environment_api_destroy_response.rb +60 -0
  187. data/lib/env_zero_api/models/environment_api_drift_cause_compass_scan_status.rb +48 -0
  188. data/lib/env_zero_api/models/environment_api_drift_cause_unapplied_commit.rb +111 -0
  189. data/lib/env_zero_api/models/environment_api_drift_cause_unmanaged_change_type.rb +36 -0
  190. data/lib/env_zero_api/models/environment_api_drift_detection_request.rb +81 -0
  191. data/lib/env_zero_api/models/environment_api_drift_status.rb +48 -0
  192. data/lib/env_zero_api/models/environment_api_environment.rb +539 -0
  193. data/lib/env_zero_api/models/environment_api_environment_lock_status.rb +119 -0
  194. data/lib/env_zero_api/models/environment_api_environment_next_scheduled_dates.rb +98 -0
  195. data/lib/env_zero_api/models/environment_api_environment_resource.rb +123 -0
  196. data/lib/env_zero_api/models/environment_api_environment_status.rb +84 -0
  197. data/lib/env_zero_api/models/environment_api_find_by_id_response.rb +539 -0
  198. data/lib/env_zero_api/models/environment_api_find_deployment_drift_status_response.rb +92 -0
  199. data/lib/env_zero_api/models/environment_api_find_deployment_log_by_id_response.rb +792 -0
  200. data/lib/env_zero_api/models/environment_api_get_deployment_plan_json_response.rb +86 -0
  201. data/lib/env_zero_api/models/environment_api_get_drifted_resource_event_details_response.rb +60 -0
  202. data/lib/env_zero_api/models/environment_api_get_drifted_resource_events_response.rb +98 -0
  203. data/lib/env_zero_api/models/environment_api_get_environments_outputs_response.rb +69 -0
  204. data/lib/env_zero_api/models/environment_api_get_plan_impact_destructive_change.rb +98 -0
  205. data/lib/env_zero_api/models/environment_api_get_plan_impact_plan_impact.rb +163 -0
  206. data/lib/env_zero_api/models/environment_api_get_policies_response.rb +298 -0
  207. data/lib/env_zero_api/models/environment_api_git_metadata.rb +110 -0
  208. data/lib/env_zero_api/models/environment_api_output_data.rb +103 -0
  209. data/lib/env_zero_api/models/environment_api_policy.rb +298 -0
  210. data/lib/env_zero_api/models/environment_api_remediate_drift_response.rb +792 -0
  211. data/lib/env_zero_api/models/environment_api_resume_response.rb +60 -0
  212. data/lib/env_zero_api/models/environment_api_reviewer.rb +90 -0
  213. data/lib/env_zero_api/models/environment_api_reviewer_user.rb +92 -0
  214. data/lib/env_zero_api/models/environment_api_state_file_hash.rb +87 -0
  215. data/lib/env_zero_api/models/environment_api_stopped_by_timeout_reason.rb +40 -0
  216. data/lib/env_zero_api/models/environment_api_terragrunt_run_all_output.rb +96 -0
  217. data/lib/env_zero_api/models/environment_api_ttl_request.rb +86 -0
  218. data/lib/env_zero_api/models/environment_api_ttl_request_body.rb +72 -0
  219. data/lib/env_zero_api/models/environment_api_ttl_response.rb +539 -0
  220. data/lib/env_zero_api/models/environment_api_ttl_type.rb +40 -0
  221. data/lib/env_zero_api/models/environment_api_update_environment_lock_request_body.rb +70 -0
  222. data/lib/env_zero_api/models/environment_api_update_environment_lock_response.rb +97 -0
  223. data/lib/env_zero_api/models/environment_api_update_policies_request_body.rb +334 -0
  224. data/lib/env_zero_api/models/environment_api_update_policies_response.rb +298 -0
  225. data/lib/env_zero_api/models/environment_api_update_request_body.rb +191 -0
  226. data/lib/env_zero_api/models/environment_api_update_response.rb +539 -0
  227. data/lib/env_zero_api/models/environment_api_update_tags_response.rb +539 -0
  228. data/lib/env_zero_api/models/environment_api_variable.rb +241 -0
  229. data/lib/env_zero_api/models/environment_api_vcs_provider.rb +56 -0
  230. data/lib/env_zero_api/models/environment_api_vcs_provider1.rb +56 -0
  231. data/lib/env_zero_api/models/environment_api_vcs_provider3.rb +56 -0
  232. data/lib/env_zero_api/models/environment_api_workflow_environments_workflow_file.rb +92 -0
  233. data/lib/env_zero_api/models/environment_api_workflow_environments_workflow_sub_environment.rb +226 -0
  234. data/lib/env_zero_api/models/environment_discovery_type.rb +26 -0
  235. data/lib/env_zero_api/models/environment_outputs_api_environment_state_access.rb +154 -0
  236. data/lib/env_zero_api/models/environment_outputs_api_get_state_access_config_response.rb +154 -0
  237. data/lib/env_zero_api/models/environment_removal_strategy.rb +36 -0
  238. data/lib/env_zero_api/models/environments.rb +80 -0
  239. data/lib/env_zero_api/models/event_name_type.rb +92 -0
  240. data/lib/env_zero_api/models/external_trigger_name.rb +40 -0
  241. data/lib/env_zero_api/models/family.rb +36 -0
  242. data/lib/env_zero_api/models/format.rb +40 -0
  243. data/lib/env_zero_api/models/git_user_data.rb +92 -0
  244. data/lib/env_zero_api/models/iac_type.rb +60 -0
  245. data/lib/env_zero_api/models/infracost_cost_estimation.rb +119 -0
  246. data/lib/env_zero_api/models/infracost_cost_estimation_project.rb +76 -0
  247. data/lib/env_zero_api/models/internal_trigger_name.rb +60 -0
  248. data/lib/env_zero_api/models/is_scheduled_run.rb +36 -0
  249. data/lib/env_zero_api/models/mode.rb +36 -0
  250. data/lib/env_zero_api/models/module_type.rb +26 -0
  251. data/lib/env_zero_api/models/notification_endpoint_type.rb +44 -0
  252. data/lib/env_zero_api/models/notifications_api_create_notification_endpoint_request_body.rb +122 -0
  253. data/lib/env_zero_api/models/notifications_api_create_notification_endpoint_response.rb +124 -0
  254. data/lib/env_zero_api/models/notifications_api_notification_endpoint_without_secret.rb +124 -0
  255. data/lib/env_zero_api/models/notifications_api_project_notification_setting.rb +102 -0
  256. data/lib/env_zero_api/models/notifications_api_update_project_notification_settings_request_body.rb +60 -0
  257. data/lib/env_zero_api/models/notifications_api_update_project_notification_settings_response.rb +102 -0
  258. data/lib/env_zero_api/models/organization_api_find_organization_by_id_response.rb +393 -0
  259. data/lib/env_zero_api/models/organization_api_get_organization_limits_response.rb +60 -0
  260. data/lib/env_zero_api/models/organization_api_ip_allowlist_rule.rb +119 -0
  261. data/lib/env_zero_api/models/organization_api_ip_allowlist_rule_type.rb +40 -0
  262. data/lib/env_zero_api/models/organization_api_ip_allowlist_rule_type2.rb +40 -0
  263. data/lib/env_zero_api/models/organization_api_organization.rb +393 -0
  264. data/lib/env_zero_api/models/organization_api_organization_limits.rb +60 -0
  265. data/lib/env_zero_api/models/organization_api_organization_mode.rb +36 -0
  266. data/lib/env_zero_api/models/organization_api_permissions.rb +82 -0
  267. data/lib/env_zero_api/models/organization_api_project_custom_flows_policy.rb +36 -0
  268. data/lib/env_zero_api/models/organization_api_project_permission.rb +69 -0
  269. data/lib/env_zero_api/models/organization_role.rb +36 -0
  270. data/lib/env_zero_api/models/organization_user.rb +77 -0
  271. data/lib/env_zero_api/models/organization_user_status.rb +36 -0
  272. data/lib/env_zero_api/models/output.rb +153 -0
  273. data/lib/env_zero_api/models/overwrites.rb +206 -0
  274. data/lib/env_zero_api/models/partial_json_schema7.rb +81 -0
  275. data/lib/env_zero_api/models/partial_json_schema72.rb +97 -0
  276. data/lib/env_zero_api/models/profile_data.rb +81 -0
  277. data/lib/env_zero_api/models/project_api_create_project_request.rb +102 -0
  278. data/lib/env_zero_api/models/project_api_create_project_request_body.rb +102 -0
  279. data/lib/env_zero_api/models/project_api_create_project_response.rb +150 -0
  280. data/lib/env_zero_api/models/project_api_find_by_id_response.rb +150 -0
  281. data/lib/env_zero_api/models/project_api_project.rb +150 -0
  282. data/lib/env_zero_api/models/project_api_user_access_source.rb +40 -0
  283. data/lib/env_zero_api/models/project_api_user_with_access.rb +148 -0
  284. data/lib/env_zero_api/models/requires_approval.rb +36 -0
  285. data/lib/env_zero_api/models/scheduling_api_disabled_reason.rb +36 -0
  286. data/lib/env_zero_api/models/scheduling_api_get_drift_detection_by_environment_id_response.rb +231 -0
  287. data/lib/env_zero_api/models/scheduling_api_get_schedule_by_environment_id_response.rb +71 -0
  288. data/lib/env_zero_api/models/scheduling_api_scheduled_action.rb +219 -0
  289. data/lib/env_zero_api/models/scheduling_api_set_drift_detection_request_body.rb +82 -0
  290. data/lib/env_zero_api/models/scheduling_api_set_drift_detection_response.rb +231 -0
  291. data/lib/env_zero_api/models/scheduling_api_set_environment_schedule_request_body.rb +75 -0
  292. data/lib/env_zero_api/models/scheduling_api_set_environment_schedule_request_scheduled_action.rb +70 -0
  293. data/lib/env_zero_api/models/scheduling_api_set_environment_schedule_response.rb +71 -0
  294. data/lib/env_zero_api/models/scope.rb +44 -0
  295. data/lib/env_zero_api/models/set_creation_scope.rb +36 -0
  296. data/lib/env_zero_api/models/settings.rb +76 -0
  297. data/lib/env_zero_api/models/skip_state_refresh.rb +36 -0
  298. data/lib/env_zero_api/models/status.rb +36 -0
  299. data/lib/env_zero_api/models/type.rb +36 -0
  300. data/lib/env_zero_api/models/user.rb +182 -0
  301. data/lib/env_zero_api/models/user1.rb +132 -0
  302. data/lib/env_zero_api/models/user_organization.rb +93 -0
  303. data/lib/env_zero_api/models/vcs.rb +368 -0
  304. data/lib/env_zero_api/models/workflow_deployment_options.rb +90 -0
  305. data/lib/env_zero_api/models/workflow_deployment_options1.rb +92 -0
  306. data/lib/env_zero_api/models/workflow_partial_deploy_operation.rb +40 -0
  307. data/lib/env_zero_api/models/workflow_sub_environment_request.rb +164 -0
  308. data/lib/env_zero_api/utilities/date_time_helper.rb +11 -0
  309. data/lib/env_zero_api/utilities/file_wrapper.rb +28 -0
  310. data/lib/env_zero_api/utilities/union_type_lookup.rb +379 -0
  311. data/lib/env_zero_api.rb +414 -0
  312. metadata +395 -0
@@ -0,0 +1,305 @@
1
+ # env_zero_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module EnvZeroApi
8
+ # ConfigurationApiFindVariableByIdResponse Model.
9
+ class ConfigurationApiFindVariableByIdResponse < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [DateTime]
15
+ attr_accessor :created_at
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [DateTime]
19
+ attr_accessor :updated_at
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [String]
23
+ attr_accessor :name
24
+
25
+ # TODO: Write general description for this method
26
+ # @return [String]
27
+ attr_accessor :value
28
+
29
+ # The ID of the configuration property. If provided, will act as an update.
30
+ # Otherwise, a new configuration property will be created.
31
+ # @return [String]
32
+ attr_accessor :id
33
+
34
+ # The ID of the configuration property. If provided, will act as an update.
35
+ # Otherwise, a new configuration property will be created.
36
+ # @return [String]
37
+ attr_accessor :user_id
38
+
39
+ # The ID of the configuration property. If provided, will act as an update.
40
+ # Otherwise, a new configuration property will be created.
41
+ # @return [TrueClass | FalseClass]
42
+ attr_accessor :is_sensitive
43
+
44
+ # The ID of the configuration property. If provided, will act as an update.
45
+ # Otherwise, a new configuration property will be created.
46
+ # @return [TrueClass | FalseClass]
47
+ attr_accessor :is_readonly
48
+
49
+ # The ID of the configuration property. If provided, will act as an update.
50
+ # Otherwise, a new configuration property will be created.
51
+ # @return [TrueClass | FalseClass]
52
+ attr_accessor :is_required
53
+
54
+ # The ID of the configuration property. If provided, will act as an update.
55
+ # Otherwise, a new configuration property will be created.
56
+ # @return [String]
57
+ attr_accessor :regex
58
+
59
+ # The ID of the entity of the provided `scope`. e.g. a project's ID when the
60
+ # provided `scope` is `PROJECT`.
61
+ # Inapplicable for `GLOBAL` scope, as it has no specific entity.
62
+ # @return [String]
63
+ attr_accessor :scope_id
64
+
65
+ # The ID of the entity of the provided `scope`. e.g. a project's ID when the
66
+ # provided `scope` is `PROJECT`.
67
+ # Inapplicable for `GLOBAL` scope, as it has no specific entity.
68
+ # @return [ConfigurationScope]
69
+ attr_accessor :scope
70
+
71
+ # Whether it is an Environment or Terraform variable
72
+ # 0 value maps to an Environment variable
73
+ # 1 value maps to an Terraform variable
74
+ # @return [Object]
75
+ attr_accessor :type
76
+
77
+ # Whether it is an Environment or Terraform variable
78
+ # 0 value maps to an Environment variable
79
+ # 1 value maps to an Terraform variable
80
+ # @return [String]
81
+ attr_accessor :project_id
82
+
83
+ # Whether it is an Environment or Terraform variable
84
+ # 0 value maps to an Environment variable
85
+ # 1 value maps to an Terraform variable
86
+ # @return [String]
87
+ attr_accessor :organization_id
88
+
89
+ # * type?: "string"
90
+ # * format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
91
+ # * ENVIRONMENT_OUTPUT is a special type used to indicate that the value
92
+ # is an output from the environment.
93
+ # The value format is: ${env0:<environmentId>:<outputName>} it will be
94
+ # resolved before deployment.
95
+ # * enum?: ["option1", "option2"]
96
+ # * Optional, for UI dropdown, works only without format. Note that if
97
+ # you want to update this list, you must provide the full updated list each
98
+ # time.
99
+ # @return [PartialJsonSchema72]
100
+ attr_accessor :schema
101
+
102
+ # * type?: "string"
103
+ # * format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
104
+ # * ENVIRONMENT_OUTPUT is a special type used to indicate that the value
105
+ # is an output from the environment.
106
+ # The value format is: ${env0:<environmentId>:<outputName>} it will be
107
+ # resolved before deployment.
108
+ # * enum?: ["option1", "option2"]
109
+ # * Optional, for UI dropdown, works only without format. Note that if
110
+ # you want to update this list, you must provide the full updated list each
111
+ # time.
112
+ # @return [String]
113
+ attr_accessor :description
114
+
115
+ # * type?: "string"
116
+ # * format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
117
+ # * ENVIRONMENT_OUTPUT is a special type used to indicate that the value
118
+ # is an output from the environment.
119
+ # The value format is: ${env0:<environmentId>:<outputName>} it will be
120
+ # resolved before deployment.
121
+ # * enum?: ["option1", "option2"]
122
+ # * Optional, for UI dropdown, works only without format. Note that if
123
+ # you want to update this list, you must provide the full updated list each
124
+ # time.
125
+ # @return [TrueClass | FalseClass]
126
+ attr_accessor :is_output
127
+
128
+ # A mapping from model property names to API property names.
129
+ def self.names
130
+ @_hash = {} if @_hash.nil?
131
+ @_hash['created_at'] = 'createdAt'
132
+ @_hash['updated_at'] = 'updatedAt'
133
+ @_hash['name'] = 'name'
134
+ @_hash['value'] = 'value'
135
+ @_hash['id'] = 'id'
136
+ @_hash['user_id'] = 'userId'
137
+ @_hash['is_sensitive'] = 'isSensitive'
138
+ @_hash['is_readonly'] = 'isReadonly'
139
+ @_hash['is_required'] = 'isRequired'
140
+ @_hash['regex'] = 'regex'
141
+ @_hash['scope_id'] = 'scopeId'
142
+ @_hash['scope'] = 'scope'
143
+ @_hash['type'] = 'type'
144
+ @_hash['project_id'] = 'projectId'
145
+ @_hash['organization_id'] = 'organizationId'
146
+ @_hash['schema'] = 'schema'
147
+ @_hash['description'] = 'description'
148
+ @_hash['is_output'] = 'isOutput'
149
+ @_hash
150
+ end
151
+
152
+ # An array for optional fields
153
+ def self.optionals
154
+ %w[
155
+ created_at
156
+ updated_at
157
+ name
158
+ value
159
+ id
160
+ user_id
161
+ is_sensitive
162
+ is_readonly
163
+ is_required
164
+ regex
165
+ scope_id
166
+ scope
167
+ type
168
+ project_id
169
+ organization_id
170
+ schema
171
+ description
172
+ is_output
173
+ ]
174
+ end
175
+
176
+ # An array for nullable fields
177
+ def self.nullables
178
+ []
179
+ end
180
+
181
+ def initialize(created_at: SKIP, updated_at: SKIP, name: SKIP, value: SKIP,
182
+ id: SKIP, user_id: SKIP, is_sensitive: SKIP,
183
+ is_readonly: SKIP, is_required: SKIP, regex: SKIP,
184
+ scope_id: SKIP, scope: SKIP, type: SKIP, project_id: SKIP,
185
+ organization_id: SKIP, schema: SKIP, description: SKIP,
186
+ is_output: SKIP)
187
+ @created_at = created_at unless created_at == SKIP
188
+ @updated_at = updated_at unless updated_at == SKIP
189
+ @name = name unless name == SKIP
190
+ @value = value unless value == SKIP
191
+ @id = id unless id == SKIP
192
+ @user_id = user_id unless user_id == SKIP
193
+ @is_sensitive = is_sensitive unless is_sensitive == SKIP
194
+ @is_readonly = is_readonly unless is_readonly == SKIP
195
+ @is_required = is_required unless is_required == SKIP
196
+ @regex = regex unless regex == SKIP
197
+ @scope_id = scope_id unless scope_id == SKIP
198
+ @scope = scope unless scope == SKIP
199
+ @type = type unless type == SKIP
200
+ @project_id = project_id unless project_id == SKIP
201
+ @organization_id = organization_id unless organization_id == SKIP
202
+ @schema = schema unless schema == SKIP
203
+ @description = description unless description == SKIP
204
+ @is_output = is_output unless is_output == SKIP
205
+ end
206
+
207
+ # Creates an instance of the object from a hash.
208
+ def self.from_hash(hash)
209
+ return nil unless hash
210
+
211
+ # Extract variables from the hash.
212
+ created_at = if hash.key?('createdAt')
213
+ (DateTimeHelper.from_rfc3339(hash['createdAt']) if hash['createdAt'])
214
+ else
215
+ SKIP
216
+ end
217
+ updated_at = if hash.key?('updatedAt')
218
+ (DateTimeHelper.from_rfc3339(hash['updatedAt']) if hash['updatedAt'])
219
+ else
220
+ SKIP
221
+ end
222
+ name = hash.key?('name') ? hash['name'] : SKIP
223
+ value = hash.key?('value') ? hash['value'] : SKIP
224
+ id = hash.key?('id') ? hash['id'] : SKIP
225
+ user_id = hash.key?('userId') ? hash['userId'] : SKIP
226
+ is_sensitive = hash.key?('isSensitive') ? hash['isSensitive'] : SKIP
227
+ is_readonly = hash.key?('isReadonly') ? hash['isReadonly'] : SKIP
228
+ is_required = hash.key?('isRequired') ? hash['isRequired'] : SKIP
229
+ regex = hash.key?('regex') ? hash['regex'] : SKIP
230
+ scope_id = hash.key?('scopeId') ? hash['scopeId'] : SKIP
231
+ scope = hash.key?('scope') ? hash['scope'] : SKIP
232
+ type = hash.key?('type') ? APIHelper.deserialize_union_type(
233
+ UnionTypeLookUp.get(:ConfigurationApiFindVariableByIdResponseType), hash['type']
234
+ ) : SKIP
235
+ project_id = hash.key?('projectId') ? hash['projectId'] : SKIP
236
+ organization_id =
237
+ hash.key?('organizationId') ? hash['organizationId'] : SKIP
238
+ schema = PartialJsonSchema72.from_hash(hash['schema']) if hash['schema']
239
+ description = hash.key?('description') ? hash['description'] : SKIP
240
+ is_output = hash.key?('isOutput') ? hash['isOutput'] : SKIP
241
+
242
+ # Create object from extracted values.
243
+ ConfigurationApiFindVariableByIdResponse.new(created_at: created_at,
244
+ updated_at: updated_at,
245
+ name: name,
246
+ value: value,
247
+ id: id,
248
+ user_id: user_id,
249
+ is_sensitive: is_sensitive,
250
+ is_readonly: is_readonly,
251
+ is_required: is_required,
252
+ regex: regex,
253
+ scope_id: scope_id,
254
+ scope: scope,
255
+ type: type,
256
+ project_id: project_id,
257
+ organization_id: organization_id,
258
+ schema: schema,
259
+ description: description,
260
+ is_output: is_output)
261
+ end
262
+
263
+ def to_custom_created_at
264
+ DateTimeHelper.to_rfc3339(created_at)
265
+ end
266
+
267
+ def to_custom_updated_at
268
+ DateTimeHelper.to_rfc3339(updated_at)
269
+ end
270
+
271
+ # Validates an instance of the object from a given value.
272
+ # @param [ConfigurationApiFindVariableByIdResponse | Hash] The value against the validation is performed.
273
+ def self.validate(value)
274
+ return true if value.instance_of? self
275
+
276
+ return false unless value.instance_of? Hash
277
+
278
+ true
279
+ end
280
+
281
+ # Provides a human-readable string representation of the object.
282
+ def to_s
283
+ class_name = self.class.name.split('::').last
284
+ "<#{class_name} created_at: #{@created_at}, updated_at: #{@updated_at}, name: #{@name},"\
285
+ " value: #{@value}, id: #{@id}, user_id: #{@user_id}, is_sensitive: #{@is_sensitive},"\
286
+ " is_readonly: #{@is_readonly}, is_required: #{@is_required}, regex: #{@regex}, scope_id:"\
287
+ " #{@scope_id}, scope: #{@scope}, type: #{@type}, project_id: #{@project_id},"\
288
+ " organization_id: #{@organization_id}, schema: #{@schema}, description: #{@description},"\
289
+ " is_output: #{@is_output}>"
290
+ end
291
+
292
+ # Provides a debugging-friendly string with detailed object information.
293
+ def inspect
294
+ class_name = self.class.name.split('::').last
295
+ "<#{class_name} created_at: #{@created_at.inspect}, updated_at: #{@updated_at.inspect},"\
296
+ " name: #{@name.inspect}, value: #{@value.inspect}, id: #{@id.inspect}, user_id:"\
297
+ " #{@user_id.inspect}, is_sensitive: #{@is_sensitive.inspect}, is_readonly:"\
298
+ " #{@is_readonly.inspect}, is_required: #{@is_required.inspect}, regex: #{@regex.inspect},"\
299
+ " scope_id: #{@scope_id.inspect}, scope: #{@scope.inspect}, type: #{@type.inspect},"\
300
+ " project_id: #{@project_id.inspect}, organization_id: #{@organization_id.inspect}, schema:"\
301
+ " #{@schema.inspect}, description: #{@description.inspect}, is_output:"\
302
+ " #{@is_output.inspect}>"
303
+ end
304
+ end
305
+ end
@@ -0,0 +1,342 @@
1
+ # env_zero_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module EnvZeroApi
8
+ # ConfigurationApiFindVariablesByScopeOverridingConfigurationProperty Model.
9
+ class ConfigurationApiFindVariablesByScopeOverridingConfigurationProperty < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [Overwrites]
15
+ attr_accessor :overwrites
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [DateTime]
19
+ attr_accessor :created_at
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [DateTime]
23
+ attr_accessor :updated_at
24
+
25
+ # TODO: Write general description for this method
26
+ # @return [String]
27
+ attr_accessor :name
28
+
29
+ # TODO: Write general description for this method
30
+ # @return [String]
31
+ attr_accessor :value
32
+
33
+ # The ID of the configuration property. If provided, will act as an update.
34
+ # Otherwise, a new configuration property will be created.
35
+ # @return [String]
36
+ attr_accessor :id
37
+
38
+ # The ID of the configuration property. If provided, will act as an update.
39
+ # Otherwise, a new configuration property will be created.
40
+ # @return [String]
41
+ attr_accessor :user_id
42
+
43
+ # The ID of the configuration property. If provided, will act as an update.
44
+ # Otherwise, a new configuration property will be created.
45
+ # @return [TrueClass | FalseClass]
46
+ attr_accessor :is_sensitive
47
+
48
+ # The ID of the configuration property. If provided, will act as an update.
49
+ # Otherwise, a new configuration property will be created.
50
+ # @return [TrueClass | FalseClass]
51
+ attr_accessor :is_readonly
52
+
53
+ # The ID of the configuration property. If provided, will act as an update.
54
+ # Otherwise, a new configuration property will be created.
55
+ # @return [TrueClass | FalseClass]
56
+ attr_accessor :is_required
57
+
58
+ # The ID of the configuration property. If provided, will act as an update.
59
+ # Otherwise, a new configuration property will be created.
60
+ # @return [String]
61
+ attr_accessor :regex
62
+
63
+ # The ID of the entity of the provided `scope`. e.g. a project's ID when the
64
+ # provided `scope` is `PROJECT`.
65
+ # Inapplicable for `GLOBAL` scope, as it has no specific entity.
66
+ # @return [String]
67
+ attr_accessor :scope_id
68
+
69
+ # The ID of the entity of the provided `scope`. e.g. a project's ID when the
70
+ # provided `scope` is `PROJECT`.
71
+ # Inapplicable for `GLOBAL` scope, as it has no specific entity.
72
+ # @return [ConfigurationScope]
73
+ attr_accessor :scope
74
+
75
+ # Whether it is an Environment or Terraform variable
76
+ # 0 value maps to an Environment variable
77
+ # 1 value maps to an Terraform variable
78
+ # @return [Object]
79
+ attr_accessor :type
80
+
81
+ # Whether it is an Environment or Terraform variable
82
+ # 0 value maps to an Environment variable
83
+ # 1 value maps to an Terraform variable
84
+ # @return [TrueClass | FalseClass]
85
+ attr_accessor :to_delete
86
+
87
+ # Whether it is an Environment or Terraform variable
88
+ # 0 value maps to an Environment variable
89
+ # 1 value maps to an Terraform variable
90
+ # @return [String]
91
+ attr_accessor :project_id
92
+
93
+ # Whether it is an Environment or Terraform variable
94
+ # 0 value maps to an Environment variable
95
+ # 1 value maps to an Terraform variable
96
+ # @return [String]
97
+ attr_accessor :organization_id
98
+
99
+ # * type?: "string"
100
+ # * format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
101
+ # * ENVIRONMENT_OUTPUT is a special type used to indicate that the value
102
+ # is an output from the environment.
103
+ # The value format is: ${env0:<environmentId>:<outputName>} it will be
104
+ # resolved before deployment.
105
+ # * enum?: ["option1", "option2"]
106
+ # * Optional, for UI dropdown, works only without format. Note that if
107
+ # you want to update this list, you must provide the full updated list each
108
+ # time.
109
+ # @return [PartialJsonSchema72]
110
+ attr_accessor :schema
111
+
112
+ # * type?: "string"
113
+ # * format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
114
+ # * ENVIRONMENT_OUTPUT is a special type used to indicate that the value
115
+ # is an output from the environment.
116
+ # The value format is: ${env0:<environmentId>:<outputName>} it will be
117
+ # resolved before deployment.
118
+ # * enum?: ["option1", "option2"]
119
+ # * Optional, for UI dropdown, works only without format. Note that if
120
+ # you want to update this list, you must provide the full updated list each
121
+ # time.
122
+ # @return [String]
123
+ attr_accessor :description
124
+
125
+ # * type?: "string"
126
+ # * format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
127
+ # * ENVIRONMENT_OUTPUT is a special type used to indicate that the value
128
+ # is an output from the environment.
129
+ # The value format is: ${env0:<environmentId>:<outputName>} it will be
130
+ # resolved before deployment.
131
+ # * enum?: ["option1", "option2"]
132
+ # * Optional, for UI dropdown, works only without format. Note that if
133
+ # you want to update this list, you must provide the full updated list each
134
+ # time.
135
+ # @return [TrueClass | FalseClass]
136
+ attr_accessor :is_output
137
+
138
+ # A mapping from model property names to API property names.
139
+ def self.names
140
+ @_hash = {} if @_hash.nil?
141
+ @_hash['overwrites'] = 'overwrites'
142
+ @_hash['created_at'] = 'createdAt'
143
+ @_hash['updated_at'] = 'updatedAt'
144
+ @_hash['name'] = 'name'
145
+ @_hash['value'] = 'value'
146
+ @_hash['id'] = 'id'
147
+ @_hash['user_id'] = 'userId'
148
+ @_hash['is_sensitive'] = 'isSensitive'
149
+ @_hash['is_readonly'] = 'isReadonly'
150
+ @_hash['is_required'] = 'isRequired'
151
+ @_hash['regex'] = 'regex'
152
+ @_hash['scope_id'] = 'scopeId'
153
+ @_hash['scope'] = 'scope'
154
+ @_hash['type'] = 'type'
155
+ @_hash['to_delete'] = 'toDelete'
156
+ @_hash['project_id'] = 'projectId'
157
+ @_hash['organization_id'] = 'organizationId'
158
+ @_hash['schema'] = 'schema'
159
+ @_hash['description'] = 'description'
160
+ @_hash['is_output'] = 'isOutput'
161
+ @_hash
162
+ end
163
+
164
+ # An array for optional fields
165
+ def self.optionals
166
+ %w[
167
+ overwrites
168
+ created_at
169
+ updated_at
170
+ value
171
+ id
172
+ user_id
173
+ is_sensitive
174
+ is_readonly
175
+ is_required
176
+ regex
177
+ scope_id
178
+ to_delete
179
+ project_id
180
+ schema
181
+ description
182
+ is_output
183
+ ]
184
+ end
185
+
186
+ # An array for nullable fields
187
+ def self.nullables
188
+ []
189
+ end
190
+
191
+ def initialize(name:, scope:, type:, organization_id:, overwrites: SKIP,
192
+ created_at: SKIP, updated_at: SKIP, value: SKIP, id: SKIP,
193
+ user_id: SKIP, is_sensitive: SKIP, is_readonly: SKIP,
194
+ is_required: SKIP, regex: SKIP, scope_id: SKIP,
195
+ to_delete: SKIP, project_id: SKIP, schema: SKIP,
196
+ description: SKIP, is_output: SKIP)
197
+ @overwrites = overwrites unless overwrites == SKIP
198
+ @created_at = created_at unless created_at == SKIP
199
+ @updated_at = updated_at unless updated_at == SKIP
200
+ @name = name
201
+ @value = value unless value == SKIP
202
+ @id = id unless id == SKIP
203
+ @user_id = user_id unless user_id == SKIP
204
+ @is_sensitive = is_sensitive unless is_sensitive == SKIP
205
+ @is_readonly = is_readonly unless is_readonly == SKIP
206
+ @is_required = is_required unless is_required == SKIP
207
+ @regex = regex unless regex == SKIP
208
+ @scope_id = scope_id unless scope_id == SKIP
209
+ @scope = scope
210
+ @type = type
211
+ @to_delete = to_delete unless to_delete == SKIP
212
+ @project_id = project_id unless project_id == SKIP
213
+ @organization_id = organization_id
214
+ @schema = schema unless schema == SKIP
215
+ @description = description unless description == SKIP
216
+ @is_output = is_output unless is_output == SKIP
217
+ end
218
+
219
+ # Creates an instance of the object from a hash.
220
+ def self.from_hash(hash)
221
+ return nil unless hash
222
+
223
+ # Extract variables from the hash.
224
+ name = hash.key?('name') ? hash['name'] : nil
225
+ scope = hash.key?('scope') ? hash['scope'] : nil
226
+ type = hash.key?('type') ? APIHelper.deserialize_union_type(
227
+ UnionTypeLookUp.get(:ConfigurationApiFindVariablesByScopeOverridingConfigurationPropertyType), hash['type']
228
+ ) : nil
229
+ organization_id =
230
+ hash.key?('organizationId') ? hash['organizationId'] : nil
231
+ overwrites = Overwrites.from_hash(hash['overwrites']) if hash['overwrites']
232
+ created_at = if hash.key?('createdAt')
233
+ (DateTimeHelper.from_rfc3339(hash['createdAt']) if hash['createdAt'])
234
+ else
235
+ SKIP
236
+ end
237
+ updated_at = if hash.key?('updatedAt')
238
+ (DateTimeHelper.from_rfc3339(hash['updatedAt']) if hash['updatedAt'])
239
+ else
240
+ SKIP
241
+ end
242
+ value = hash.key?('value') ? hash['value'] : SKIP
243
+ id = hash.key?('id') ? hash['id'] : SKIP
244
+ user_id = hash.key?('userId') ? hash['userId'] : SKIP
245
+ is_sensitive = hash.key?('isSensitive') ? hash['isSensitive'] : SKIP
246
+ is_readonly = hash.key?('isReadonly') ? hash['isReadonly'] : SKIP
247
+ is_required = hash.key?('isRequired') ? hash['isRequired'] : SKIP
248
+ regex = hash.key?('regex') ? hash['regex'] : SKIP
249
+ scope_id = hash.key?('scopeId') ? hash['scopeId'] : SKIP
250
+ to_delete = hash.key?('toDelete') ? hash['toDelete'] : SKIP
251
+ project_id = hash.key?('projectId') ? hash['projectId'] : SKIP
252
+ schema = PartialJsonSchema72.from_hash(hash['schema']) if hash['schema']
253
+ description = hash.key?('description') ? hash['description'] : SKIP
254
+ is_output = hash.key?('isOutput') ? hash['isOutput'] : SKIP
255
+
256
+ # Create object from extracted values.
257
+ ConfigurationApiFindVariablesByScopeOverridingConfigurationProperty.new(name: name,
258
+ scope: scope,
259
+ type: type,
260
+ organization_id: organization_id,
261
+ overwrites: overwrites,
262
+ created_at: created_at,
263
+ updated_at: updated_at,
264
+ value: value,
265
+ id: id,
266
+ user_id: user_id,
267
+ is_sensitive: is_sensitive,
268
+ is_readonly: is_readonly,
269
+ is_required: is_required,
270
+ regex: regex,
271
+ scope_id: scope_id,
272
+ to_delete: to_delete,
273
+ project_id: project_id,
274
+ schema: schema,
275
+ description: description,
276
+ is_output: is_output)
277
+ end
278
+
279
+ def to_custom_created_at
280
+ DateTimeHelper.to_rfc3339(created_at)
281
+ end
282
+
283
+ def to_custom_updated_at
284
+ DateTimeHelper.to_rfc3339(updated_at)
285
+ end
286
+
287
+ # Validates an instance of the object from a given value.
288
+ # @param [ConfigurationApiFindVariablesByScopeOverridingConfigurationProperty | Hash] The value against the validation is performed.
289
+ def self.validate(value)
290
+ if value.instance_of? self
291
+ return (
292
+ APIHelper.valid_type?(value.name,
293
+ ->(val) { val.instance_of? String }) and
294
+ APIHelper.valid_type?(value.scope,
295
+ ->(val) { ConfigurationScope.validate(val) }) and
296
+ UnionTypeLookUp.get(:ConfigurationApiFindVariablesByScopeOverridingConfigurationPropertyType)
297
+ .validate(value.type) and
298
+ APIHelper.valid_type?(value.organization_id,
299
+ ->(val) { val.instance_of? String })
300
+ )
301
+ end
302
+
303
+ return false unless value.instance_of? Hash
304
+
305
+ (
306
+ APIHelper.valid_type?(value['name'],
307
+ ->(val) { val.instance_of? String }) and
308
+ APIHelper.valid_type?(value['scope'],
309
+ ->(val) { ConfigurationScope.validate(val) }) and
310
+ UnionTypeLookUp.get(:ConfigurationApiFindVariablesByScopeOverridingConfigurationPropertyType)
311
+ .validate(value['type']) and
312
+ APIHelper.valid_type?(value['organizationId'],
313
+ ->(val) { val.instance_of? String })
314
+ )
315
+ end
316
+
317
+ # Provides a human-readable string representation of the object.
318
+ def to_s
319
+ class_name = self.class.name.split('::').last
320
+ "<#{class_name} overwrites: #{@overwrites}, created_at: #{@created_at}, updated_at:"\
321
+ " #{@updated_at}, name: #{@name}, value: #{@value}, id: #{@id}, user_id: #{@user_id},"\
322
+ " is_sensitive: #{@is_sensitive}, is_readonly: #{@is_readonly}, is_required:"\
323
+ " #{@is_required}, regex: #{@regex}, scope_id: #{@scope_id}, scope: #{@scope}, type:"\
324
+ " #{@type}, to_delete: #{@to_delete}, project_id: #{@project_id}, organization_id:"\
325
+ " #{@organization_id}, schema: #{@schema}, description: #{@description}, is_output:"\
326
+ " #{@is_output}>"
327
+ end
328
+
329
+ # Provides a debugging-friendly string with detailed object information.
330
+ def inspect
331
+ class_name = self.class.name.split('::').last
332
+ "<#{class_name} overwrites: #{@overwrites.inspect}, created_at: #{@created_at.inspect},"\
333
+ " updated_at: #{@updated_at.inspect}, name: #{@name.inspect}, value: #{@value.inspect}, id:"\
334
+ " #{@id.inspect}, user_id: #{@user_id.inspect}, is_sensitive: #{@is_sensitive.inspect},"\
335
+ " is_readonly: #{@is_readonly.inspect}, is_required: #{@is_required.inspect}, regex:"\
336
+ " #{@regex.inspect}, scope_id: #{@scope_id.inspect}, scope: #{@scope.inspect}, type:"\
337
+ " #{@type.inspect}, to_delete: #{@to_delete.inspect}, project_id: #{@project_id.inspect},"\
338
+ " organization_id: #{@organization_id.inspect}, schema: #{@schema.inspect}, description:"\
339
+ " #{@description.inspect}, is_output: #{@is_output.inspect}>"
340
+ end
341
+ end
342
+ end