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,284 @@
1
+ # env_zero_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module EnvZeroApi
7
+ # ConfigurationPropertyRequest Model.
8
+ class ConfigurationPropertyRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :name
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :value
19
+
20
+ # The ID of the configuration property. If provided, will act as an update.
21
+ # Otherwise, a new configuration property will be created.
22
+ # @return [String]
23
+ attr_accessor :id
24
+
25
+ # The ID of the configuration property. If provided, will act as an update.
26
+ # Otherwise, a new configuration property will be created.
27
+ # @return [TrueClass | FalseClass]
28
+ attr_accessor :is_sensitive
29
+
30
+ # The ID of the configuration property. If provided, will act as an update.
31
+ # Otherwise, a new configuration property will be created.
32
+ # @return [TrueClass | FalseClass]
33
+ attr_accessor :is_readonly
34
+
35
+ # The ID of the configuration property. If provided, will act as an update.
36
+ # Otherwise, a new configuration property will be created.
37
+ # @return [TrueClass | FalseClass]
38
+ attr_accessor :is_required
39
+
40
+ # The ID of the configuration property. If provided, will act as an update.
41
+ # Otherwise, a new configuration property will be created.
42
+ # @return [String]
43
+ attr_accessor :regex
44
+
45
+ # The ID of the entity of the provided `scope`. e.g. a project's ID when the
46
+ # provided `scope` is `PROJECT`.
47
+ # Inapplicable for `GLOBAL` scope, as it has no specific entity.
48
+ # @return [String]
49
+ attr_accessor :scope_id
50
+
51
+ # The ID of the entity of the provided `scope`. e.g. a project's ID when the
52
+ # provided `scope` is `PROJECT`.
53
+ # Inapplicable for `GLOBAL` scope, as it has no specific entity.
54
+ # @return [ConfigurationScope]
55
+ attr_accessor :scope
56
+
57
+ # Whether it is an Environment or Terraform variable
58
+ # 0 value maps to an Environment variable
59
+ # 1 value maps to an Terraform variable
60
+ # @return [Object]
61
+ attr_accessor :type
62
+
63
+ # Whether it is an Environment or Terraform variable
64
+ # 0 value maps to an Environment variable
65
+ # 1 value maps to an Terraform variable
66
+ # @return [TrueClass | FalseClass]
67
+ attr_accessor :to_delete
68
+
69
+ # Whether it is an Environment or Terraform variable
70
+ # 0 value maps to an Environment variable
71
+ # 1 value maps to an Terraform variable
72
+ # @return [String]
73
+ attr_accessor :project_id
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 [String]
79
+ attr_accessor :organization_id
80
+
81
+ # * type?: "string"
82
+ # * format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
83
+ # * ENVIRONMENT_OUTPUT is a special type used to indicate that the value
84
+ # is an output from the environment.
85
+ # The value format is: ${env0:<environmentId>:<outputName>} it will be
86
+ # resolved before deployment.
87
+ # * enum?: ["option1", "option2"]
88
+ # * Optional, for UI dropdown, works only without format. Note that if
89
+ # you want to update this list, you must provide the full updated list each
90
+ # time.
91
+ # @return [PartialJsonSchema72]
92
+ attr_accessor :schema
93
+
94
+ # * type?: "string"
95
+ # * format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
96
+ # * ENVIRONMENT_OUTPUT is a special type used to indicate that the value
97
+ # is an output from the environment.
98
+ # The value format is: ${env0:<environmentId>:<outputName>} it will be
99
+ # resolved before deployment.
100
+ # * enum?: ["option1", "option2"]
101
+ # * Optional, for UI dropdown, works only without format. Note that if
102
+ # you want to update this list, you must provide the full updated list each
103
+ # time.
104
+ # @return [String]
105
+ attr_accessor :description
106
+
107
+ # * type?: "string"
108
+ # * format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
109
+ # * ENVIRONMENT_OUTPUT is a special type used to indicate that the value
110
+ # is an output from the environment.
111
+ # The value format is: ${env0:<environmentId>:<outputName>} it will be
112
+ # resolved before deployment.
113
+ # * enum?: ["option1", "option2"]
114
+ # * Optional, for UI dropdown, works only without format. Note that if
115
+ # you want to update this list, you must provide the full updated list each
116
+ # time.
117
+ # @return [TrueClass | FalseClass]
118
+ attr_accessor :is_output
119
+
120
+ # A mapping from model property names to API property names.
121
+ def self.names
122
+ @_hash = {} if @_hash.nil?
123
+ @_hash['name'] = 'name'
124
+ @_hash['value'] = 'value'
125
+ @_hash['id'] = 'id'
126
+ @_hash['is_sensitive'] = 'isSensitive'
127
+ @_hash['is_readonly'] = 'isReadonly'
128
+ @_hash['is_required'] = 'isRequired'
129
+ @_hash['regex'] = 'regex'
130
+ @_hash['scope_id'] = 'scopeId'
131
+ @_hash['scope'] = 'scope'
132
+ @_hash['type'] = 'type'
133
+ @_hash['to_delete'] = 'toDelete'
134
+ @_hash['project_id'] = 'projectId'
135
+ @_hash['organization_id'] = 'organizationId'
136
+ @_hash['schema'] = 'schema'
137
+ @_hash['description'] = 'description'
138
+ @_hash['is_output'] = 'isOutput'
139
+ @_hash
140
+ end
141
+
142
+ # An array for optional fields
143
+ def self.optionals
144
+ %w[
145
+ value
146
+ id
147
+ is_sensitive
148
+ is_readonly
149
+ is_required
150
+ regex
151
+ scope_id
152
+ to_delete
153
+ project_id
154
+ schema
155
+ description
156
+ is_output
157
+ ]
158
+ end
159
+
160
+ # An array for nullable fields
161
+ def self.nullables
162
+ []
163
+ end
164
+
165
+ def initialize(name:, scope:, type:, organization_id:, value: SKIP,
166
+ id: SKIP, is_sensitive: SKIP, is_readonly: SKIP,
167
+ is_required: SKIP, regex: SKIP, scope_id: SKIP,
168
+ to_delete: SKIP, project_id: SKIP, schema: SKIP,
169
+ description: SKIP, is_output: SKIP)
170
+ @name = name
171
+ @value = value unless value == SKIP
172
+ @id = id unless id == SKIP
173
+ @is_sensitive = is_sensitive unless is_sensitive == SKIP
174
+ @is_readonly = is_readonly unless is_readonly == SKIP
175
+ @is_required = is_required unless is_required == SKIP
176
+ @regex = regex unless regex == SKIP
177
+ @scope_id = scope_id unless scope_id == SKIP
178
+ @scope = scope
179
+ @type = type
180
+ @to_delete = to_delete unless to_delete == SKIP
181
+ @project_id = project_id unless project_id == SKIP
182
+ @organization_id = organization_id
183
+ @schema = schema unless schema == SKIP
184
+ @description = description unless description == SKIP
185
+ @is_output = is_output unless is_output == SKIP
186
+ end
187
+
188
+ # Creates an instance of the object from a hash.
189
+ def self.from_hash(hash)
190
+ return nil unless hash
191
+
192
+ # Extract variables from the hash.
193
+ name = hash.key?('name') ? hash['name'] : nil
194
+ scope = hash.key?('scope') ? hash['scope'] : nil
195
+ type = hash.key?('type') ? APIHelper.deserialize_union_type(
196
+ UnionTypeLookUp.get(:ConfigurationPropertyRequestType), hash['type']
197
+ ) : nil
198
+ organization_id =
199
+ hash.key?('organizationId') ? hash['organizationId'] : nil
200
+ value = hash.key?('value') ? hash['value'] : SKIP
201
+ id = hash.key?('id') ? hash['id'] : SKIP
202
+ is_sensitive = hash.key?('isSensitive') ? hash['isSensitive'] : SKIP
203
+ is_readonly = hash.key?('isReadonly') ? hash['isReadonly'] : SKIP
204
+ is_required = hash.key?('isRequired') ? hash['isRequired'] : SKIP
205
+ regex = hash.key?('regex') ? hash['regex'] : SKIP
206
+ scope_id = hash.key?('scopeId') ? hash['scopeId'] : SKIP
207
+ to_delete = hash.key?('toDelete') ? hash['toDelete'] : SKIP
208
+ project_id = hash.key?('projectId') ? hash['projectId'] : SKIP
209
+ schema = PartialJsonSchema72.from_hash(hash['schema']) if hash['schema']
210
+ description = hash.key?('description') ? hash['description'] : SKIP
211
+ is_output = hash.key?('isOutput') ? hash['isOutput'] : SKIP
212
+
213
+ # Create object from extracted values.
214
+ ConfigurationPropertyRequest.new(name: name,
215
+ scope: scope,
216
+ type: type,
217
+ organization_id: organization_id,
218
+ value: value,
219
+ id: id,
220
+ is_sensitive: is_sensitive,
221
+ is_readonly: is_readonly,
222
+ is_required: is_required,
223
+ regex: regex,
224
+ scope_id: scope_id,
225
+ to_delete: to_delete,
226
+ project_id: project_id,
227
+ schema: schema,
228
+ description: description,
229
+ is_output: is_output)
230
+ end
231
+
232
+ # Validates an instance of the object from a given value.
233
+ # @param [ConfigurationPropertyRequest | Hash] The value against the validation is performed.
234
+ def self.validate(value)
235
+ if value.instance_of? self
236
+ return (
237
+ APIHelper.valid_type?(value.name,
238
+ ->(val) { val.instance_of? String }) and
239
+ APIHelper.valid_type?(value.scope,
240
+ ->(val) { ConfigurationScope.validate(val) }) and
241
+ UnionTypeLookUp.get(:ConfigurationPropertyRequestType)
242
+ .validate(value.type) and
243
+ APIHelper.valid_type?(value.organization_id,
244
+ ->(val) { val.instance_of? String })
245
+ )
246
+ end
247
+
248
+ return false unless value.instance_of? Hash
249
+
250
+ (
251
+ APIHelper.valid_type?(value['name'],
252
+ ->(val) { val.instance_of? String }) and
253
+ APIHelper.valid_type?(value['scope'],
254
+ ->(val) { ConfigurationScope.validate(val) }) and
255
+ UnionTypeLookUp.get(:ConfigurationPropertyRequestType)
256
+ .validate(value['type']) and
257
+ APIHelper.valid_type?(value['organizationId'],
258
+ ->(val) { val.instance_of? String })
259
+ )
260
+ end
261
+
262
+ # Provides a human-readable string representation of the object.
263
+ def to_s
264
+ class_name = self.class.name.split('::').last
265
+ "<#{class_name} name: #{@name}, value: #{@value}, id: #{@id}, is_sensitive:"\
266
+ " #{@is_sensitive}, is_readonly: #{@is_readonly}, is_required: #{@is_required}, regex:"\
267
+ " #{@regex}, scope_id: #{@scope_id}, scope: #{@scope}, type: #{@type}, to_delete:"\
268
+ " #{@to_delete}, project_id: #{@project_id}, organization_id: #{@organization_id}, schema:"\
269
+ " #{@schema}, description: #{@description}, is_output: #{@is_output}>"
270
+ end
271
+
272
+ # Provides a debugging-friendly string with detailed object information.
273
+ def inspect
274
+ class_name = self.class.name.split('::').last
275
+ "<#{class_name} name: #{@name.inspect}, value: #{@value.inspect}, id: #{@id.inspect},"\
276
+ " is_sensitive: #{@is_sensitive.inspect}, is_readonly: #{@is_readonly.inspect}, is_required:"\
277
+ " #{@is_required.inspect}, regex: #{@regex.inspect}, scope_id: #{@scope_id.inspect}, scope:"\
278
+ " #{@scope.inspect}, type: #{@type.inspect}, to_delete: #{@to_delete.inspect}, project_id:"\
279
+ " #{@project_id.inspect}, organization_id: #{@organization_id.inspect}, schema:"\
280
+ " #{@schema.inspect}, description: #{@description.inspect}, is_output:"\
281
+ " #{@is_output.inspect}>"
282
+ end
283
+ end
284
+ end
@@ -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
+ # ConfigurationPropertyResponse Model.
9
+ class ConfigurationPropertyResponse < 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(:ConfigurationPropertyResponseType), 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
+ ConfigurationPropertyResponse.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 [ConfigurationPropertyResponse | 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,60 @@
1
+ # env_zero_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module EnvZeroApi
7
+ # ConfigurationScope.
8
+ class ConfigurationScope
9
+ CONFIGURATION_SCOPE = [
10
+ # TODO: Write general description for SET
11
+ SET = 'SET'.freeze,
12
+
13
+ # TODO: Write general description for GLOBAL
14
+ GLOBAL = 'GLOBAL'.freeze,
15
+
16
+ # TODO: Write general description for BLUEPRINT
17
+ BLUEPRINT = 'BLUEPRINT'.freeze,
18
+
19
+ # TODO: Write general description for SUB_ENVIRONMENT_BLUEPRINT
20
+ SUB_ENVIRONMENT_BLUEPRINT = 'SUB_ENVIRONMENT_BLUEPRINT'.freeze,
21
+
22
+ # TODO: Write general description for PROJECT
23
+ PROJECT = 'PROJECT'.freeze,
24
+
25
+ # TODO: Write general description for WORKFLOW
26
+ WORKFLOW = 'WORKFLOW'.freeze,
27
+
28
+ # TODO: Write general description for ENVIRONMENT
29
+ ENVIRONMENT = 'ENVIRONMENT'.freeze,
30
+
31
+ # TODO: Write general description for DEPLOYMENT
32
+ DEPLOYMENT = 'DEPLOYMENT'.freeze
33
+ ].freeze
34
+
35
+ def self.validate(value)
36
+ return false if value.nil?
37
+
38
+ CONFIGURATION_SCOPE.include?(value)
39
+ end
40
+
41
+ def self.from_value(value, default_value = SET)
42
+ return default_value if value.nil?
43
+
44
+ str = value.to_s.strip
45
+
46
+ case str.downcase
47
+ when 'set' then SET
48
+ when 'global' then GLOBAL
49
+ when 'blueprint' then BLUEPRINT
50
+ when 'sub_environment_blueprint' then SUB_ENVIRONMENT_BLUEPRINT
51
+ when 'project' then PROJECT
52
+ when 'workflow' then WORKFLOW
53
+ when 'environment' then ENVIRONMENT
54
+ when 'deployment' then DEPLOYMENT
55
+ else
56
+ default_value
57
+ end
58
+ end
59
+ end
60
+ end