From f0ae87755852092ffddfc12d3aaf19c22bbb5158 Mon Sep 17 00:00:00 2001 From: Janos Miko Date: Mon, 29 Apr 2024 13:27:52 +0200 Subject: [PATCH] init --- .goreleaser.dev.yml => .dev.goreleaser.yml | 38 +- .env.sample | 1 + .envrc | 1 + .github/workflows/dev-release.yml | 2 +- .gitignore | 1 + .goreleaser.yml | 39 +- .local.goreleaser.yml | 28 + Makefile | 22 +- assets/assets.go | 6 + assets/templates/build/Dockerfile.tpl | 28 + assets/templates/build/_common.tpl | 7 + assets/templates/build/_magento.tpl | 75 + assets/templates/build/_magentopwa.tpl | 78 + assets/templates/build/_shopware.tpl | 33 + assets/templates/build/_shopwarepwa.tpl | 33 + assets/templates/build/_wordpress.tpl | 32 + cmd/cloud/main.go | 14 +- cmd/env/env.go | 106 +- cmd/local/local.go | 88 + cmd/root/root.go | 6 +- go.mod | 14 +- go.sum | 56 +- hack/main.py | 41 + hack/requirements.txt | 1 + internal/config/app.go | 66 +- internal/globals/globals.go | 8 + internal/logic/client.go | 212 +- internal/logic/context.go | 20 +- internal/logic/env.go | 124 +- internal/logic/info.go | 23 +- internal/logic/local.go | 121 + internal/logic/login.go | 32 +- internal/logic/portForward.go | 19 +- internal/logic/prerequisites.go | 26 + internal/logic/shell.go | 27 +- internal/logic/util.go | 20 +- internal/shell/shell.go | 3 + internal/templates/templates.go | 139 + pkg/api/config.yaml | 9 + pkg/api/gitignore | 1 + pkg/api/reward-cloud-api-no-jsonld.yaml | 21336 +++++++++++ pkg/api/reward-cloud-api.yaml | 29533 ++++++++++++++++ pkg/api/rewardcloud/.gitignore | 24 + pkg/api/rewardcloud/.openapi-generator-ignore | 23 + pkg/api/rewardcloud/.openapi-generator/FILES | 194 + .../rewardcloud/.openapi-generator/VERSION | 1 + pkg/api/rewardcloud/.travis.yml | 8 + pkg/api/rewardcloud/README.md | 635 + pkg/api/rewardcloud/api/openapi.yaml | 21403 +++++++++++ pkg/api/rewardcloud/api_access_code.go | 800 + pkg/api/rewardcloud/api_cluster.go | 1084 + pkg/api/rewardcloud/api_component.go | 809 + .../api_component_resource_limit.go | 852 + pkg/api/rewardcloud/api_component_version.go | 835 + .../api_component_version_env_var.go | 826 + .../api_component_version_env_var_example.go | 773 + pkg/api/rewardcloud/api_credential_type.go | 773 + pkg/api/rewardcloud/api_crypto_key_type.go | 141 + .../api_data_transfer_data_type.go | 773 + pkg/api/rewardcloud/api_data_transfer_type.go | 773 + pkg/api/rewardcloud/api_env_var_type.go | 773 + pkg/api/rewardcloud/api_env_var_validation.go | 773 + pkg/api/rewardcloud/api_environment.go | 2011 ++ pkg/api/rewardcloud/api_environment_access.go | 1126 + .../api_environment_access_backend.go | 773 + .../api_environment_access_database.go | 773 + .../api_environment_access_dev_tools.go | 773 + .../api_environment_access_frontend.go | 773 + .../api_environment_access_mailbox.go | 773 + .../api_environment_access_rabbit.go | 773 + .../api_environment_access_redis.go | 773 + .../api_environment_access_webshell.go | 773 + .../rewardcloud/api_environment_component.go | 826 + .../api_environment_custom_domain.go | 800 + .../rewardcloud/api_environment_env_var.go | 826 + .../api_environment_magento_host_mapping.go | 800 + .../api_environment_message_history.go | 281 + pkg/api/rewardcloud/api_exported_data.go | 870 + pkg/api/rewardcloud/api_git.go | 996 + pkg/api/rewardcloud/api_git_type.go | 773 + pkg/api/rewardcloud/api_imported_data.go | 870 + pkg/api/rewardcloud/api_invitation.go | 887 + pkg/api/rewardcloud/api_miscellaneous.go | 240 + pkg/api/rewardcloud/api_organisation.go | 852 + .../rewardcloud/api_organisation_env_var.go | 826 + pkg/api/rewardcloud/api_price.go | 800 + pkg/api/rewardcloud/api_product.go | 826 + pkg/api/rewardcloud/api_project.go | 1093 + pkg/api/rewardcloud/api_project_access.go | 852 + pkg/api/rewardcloud/api_project_access_git.go | 800 + .../api_project_access_registry.go | 800 + .../api_project_access_service_account.go | 800 + pkg/api/rewardcloud/api_project_env_var.go | 826 + pkg/api/rewardcloud/api_project_type.go | 782 + .../rewardcloud/api_project_type_version.go | 800 + .../api_project_type_version_env_var.go | 826 + ...pi_project_type_version_env_var_example.go | 800 + pkg/api/rewardcloud/api_provider.go | 773 + pkg/api/rewardcloud/api_resource_type.go | 800 + .../rewardcloud/api_resource_type_limit.go | 773 + pkg/api/rewardcloud/api_role_group.go | 782 + pkg/api/rewardcloud/api_state.go | 835 + pkg/api/rewardcloud/api_state_by_infra.go | 773 + pkg/api/rewardcloud/api_team.go | 1000 + pkg/api/rewardcloud/api_team_env_var.go | 826 + .../rewardcloud/api_template_environment.go | 835 + pkg/api/rewardcloud/api_template_project.go | 809 + pkg/api/rewardcloud/api_user.go | 2535 ++ pkg/api/rewardcloud/client.go | 840 + pkg/api/rewardcloud/configuration.go | 220 + pkg/api/rewardcloud/git_push.sh | 57 + ...gits__id__connect_test_get_200_response.go | 124 + ...finance_subscribe_info_get_200_response.go | 124 + ..._api_users_check_email_get_200_response.go | 124 + ..._users_forgot_password_put_200_response.go | 160 + ...__api_users_forgot_password_put_request.go | 124 + pkg/api/rewardcloud/model_abstract_env_var.go | 573 + .../rewardcloud/model_abstract_environment.go | 880 + pkg/api/rewardcloud/model_abstract_project.go | 775 + pkg/api/rewardcloud/model_access_code.go | 526 + .../model_authentication_credentials.go | 160 + .../rewardcloud/model_authentication_token.go | 160 + .../model_authentication_token_data.go | 232 + ...l_authentication_token_data_teams_inner.go | 124 + pkg/api/rewardcloud/model_cluster.go | 1001 + .../model_cluster_cluster_with_provider.go | 172 + pkg/api/rewardcloud/model_component.go | 504 + .../model_component_resource_limit.go | 573 + .../rewardcloud/model_component_version.go | 612 + .../model_component_version_env_var.go | 645 + ...model_component_version_env_var_example.go | 479 + pkg/api/rewardcloud/model_credential_type.go | 468 + pkg/api/rewardcloud/model_crypto_key_type.go | 410 + .../model_data_transfer_data_type.go | 457 + .../rewardcloud/model_data_transfer_type.go | 432 + pkg/api/rewardcloud/model_env_var_type.go | 515 + .../rewardcloud/model_env_var_validation.go | 479 + .../rewardcloud/model_environment_access.go | 761 + ...el_environment_access_all_data_response.go | 88 + .../model_environment_access_backend.go | 526 + .../model_environment_access_database.go | 714 + .../model_environment_access_dev_tools.go | 526 + .../model_environment_access_frontend.go | 526 + .../model_environment_access_mailbox.go | 432 + .../model_environment_access_rabbit.go | 620 + .../model_environment_access_redis.go | 573 + .../model_environment_access_webshell.go | 526 + .../model_environment_component.go | 620 + ...environment_component_environment_input.go | 323 + ...nvironment_component_environment_output.go | 323 + ...nt_component_template_environment_input.go | 323 + ...t_component_template_environment_output.go | 323 + .../rewardcloud/model_environment_costs.go | 124 + .../model_environment_costs_uuid.go | 160 + .../model_environment_custom_domain.go | 526 + ...ronment_custom_domain_environment_input.go | 229 + ...onment_custom_domain_environment_output.go | 229 + .../rewardcloud/model_environment_env_var.go | 620 + ...l_environment_env_var_environment_input.go | 276 + ..._environment_env_var_environment_output.go | 276 + ...ment_env_var_template_environment_input.go | 229 + ...ent_env_var_template_environment_output.go | 229 + .../model_environment_environment_input.go | 1009 + .../model_environment_environment_output.go | 1306 + .../model_environment_log_stream_response.go | 160 + .../model_environment_magento_host_mapping.go | 526 + ..._magento_host_mapping_environment_input.go | 229 + ...magento_host_mapping_environment_output.go | 229 + .../model_environment_message_history.go | 761 + pkg/api/rewardcloud/model_exported_data.go | 573 + .../model_finance_api_token_response.go | 160 + .../model_finance_costs_response.go | 124 + .../model_finance_costs_response_summary.go | 304 + .../model_finance_invoices_response.go | 196 + pkg/api/rewardcloud/model_git_git_input.go | 417 + pkg/api/rewardcloud/model_git_git_output.go | 547 + pkg/api/rewardcloud/model_git_type.go | 421 + pkg/api/rewardcloud/model_imported_data.go | 479 + .../model_invitation_invitation_input.go | 229 + .../model_invitation_invitation_output.go | 432 + .../model_mercure_discover_response.go | 124 + .../rewardcloud/model_organisation_env_var.go | 620 + ...organisation_env_var_organisation_input.go | 276 + ...rganisation_env_var_organisation_output.go | 276 + .../model_organisation_organisation_input.go | 302 + .../model_organisation_organisation_output.go | 515 + pkg/api/rewardcloud/model_price.go | 609 + .../rewardcloud/model_price_product_input.go | 359 + .../rewardcloud/model_price_product_output.go | 276 + pkg/api/rewardcloud/model_product.go | 692 + .../model_product_product_input.go | 525 + .../model_product_product_output.go | 442 + pkg/api/rewardcloud/model_project_access.go | 526 + .../rewardcloud/model_project_access_git.go | 703 + ...model_project_access_git_project_output.go | 417 + .../model_project_access_project_output.go | 312 + .../model_project_access_registry.go | 656 + ..._project_access_registry_project_output.go | 370 + .../model_project_access_service_account.go | 515 + ...t_access_service_account_project_output.go | 229 + pkg/api/rewardcloud/model_project_env_var.go | 620 + .../model_project_env_var_project_input.go | 276 + .../model_project_env_var_project_output.go | 276 + ..._project_env_var_template_project_input.go | 229 + ...project_env_var_template_project_output.go | 229 + .../model_project_project_input.go | 760 + .../model_project_project_output.go | 1093 + pkg/api/rewardcloud/model_project_type.go | 515 + .../rewardcloud/model_project_type_version.go | 576 + .../model_project_type_version_env_var.go | 645 + ...el_project_type_version_env_var_example.go | 479 + pkg/api/rewardcloud/model_provider.go | 551 + .../model_provider_cluster_with_provider.go | 135 + .../rewardcloud/model_resource_type_limit.go | 620 + ...resource_type_limit_resource_type_input.go | 370 + ...esource_type_limit_resource_type_output.go | 370 + ...model_resource_type_resource_type_input.go | 182 + ...odel_resource_type_resource_type_output.go | 182 + pkg/api/rewardcloud/model_role_group.go | 446 + pkg/api/rewardcloud/model_state.go | 540 + pkg/api/rewardcloud/model_state_by_infra.go | 761 + pkg/api/rewardcloud/model_team_env_var.go | 620 + .../model_team_env_var_team_input.go | 276 + .../model_team_env_var_team_output.go | 276 + pkg/api/rewardcloud/model_team_team_input.go | 421 + .../model_team_team_input_team_users_inner.go | 160 + pkg/api/rewardcloud/model_team_team_output.go | 634 + ..._environment_template_environment_input.go | 630 + ...environment_template_environment_output.go | 833 + ...template_project_template_project_input.go | 666 + ...emplate_project_template_project_output.go | 858 + pkg/api/rewardcloud/model_user.go | 1119 + .../model_user_team_roles_inner.go | 160 + .../model_validate_env_var_request.go | 160 + .../model_validate_env_var_response.go | 160 + pkg/api/rewardcloud/response.go | 47 + pkg/api/rewardcloud/utils.go | 347 + 237 files changed, 180608 insertions(+), 168 deletions(-) rename .goreleaser.dev.yml => .dev.goreleaser.yml (61%) create mode 100644 .env.sample create mode 100644 .envrc create mode 100644 .local.goreleaser.yml create mode 100644 assets/assets.go create mode 100644 assets/templates/build/Dockerfile.tpl create mode 100644 assets/templates/build/_common.tpl create mode 100644 assets/templates/build/_magento.tpl create mode 100644 assets/templates/build/_magentopwa.tpl create mode 100644 assets/templates/build/_shopware.tpl create mode 100644 assets/templates/build/_shopwarepwa.tpl create mode 100644 assets/templates/build/_wordpress.tpl create mode 100644 cmd/local/local.go create mode 100644 hack/main.py create mode 100644 hack/requirements.txt create mode 100644 internal/globals/globals.go create mode 100644 internal/logic/local.go create mode 100644 internal/logic/prerequisites.go create mode 100644 internal/templates/templates.go create mode 100644 pkg/api/config.yaml create mode 100644 pkg/api/gitignore create mode 100644 pkg/api/reward-cloud-api-no-jsonld.yaml create mode 100644 pkg/api/reward-cloud-api.yaml create mode 100644 pkg/api/rewardcloud/.gitignore create mode 100644 pkg/api/rewardcloud/.openapi-generator-ignore create mode 100644 pkg/api/rewardcloud/.openapi-generator/FILES create mode 100644 pkg/api/rewardcloud/.openapi-generator/VERSION create mode 100644 pkg/api/rewardcloud/.travis.yml create mode 100644 pkg/api/rewardcloud/README.md create mode 100644 pkg/api/rewardcloud/api/openapi.yaml create mode 100644 pkg/api/rewardcloud/api_access_code.go create mode 100644 pkg/api/rewardcloud/api_cluster.go create mode 100644 pkg/api/rewardcloud/api_component.go create mode 100644 pkg/api/rewardcloud/api_component_resource_limit.go create mode 100644 pkg/api/rewardcloud/api_component_version.go create mode 100644 pkg/api/rewardcloud/api_component_version_env_var.go create mode 100644 pkg/api/rewardcloud/api_component_version_env_var_example.go create mode 100644 pkg/api/rewardcloud/api_credential_type.go create mode 100644 pkg/api/rewardcloud/api_crypto_key_type.go create mode 100644 pkg/api/rewardcloud/api_data_transfer_data_type.go create mode 100644 pkg/api/rewardcloud/api_data_transfer_type.go create mode 100644 pkg/api/rewardcloud/api_env_var_type.go create mode 100644 pkg/api/rewardcloud/api_env_var_validation.go create mode 100644 pkg/api/rewardcloud/api_environment.go create mode 100644 pkg/api/rewardcloud/api_environment_access.go create mode 100644 pkg/api/rewardcloud/api_environment_access_backend.go create mode 100644 pkg/api/rewardcloud/api_environment_access_database.go create mode 100644 pkg/api/rewardcloud/api_environment_access_dev_tools.go create mode 100644 pkg/api/rewardcloud/api_environment_access_frontend.go create mode 100644 pkg/api/rewardcloud/api_environment_access_mailbox.go create mode 100644 pkg/api/rewardcloud/api_environment_access_rabbit.go create mode 100644 pkg/api/rewardcloud/api_environment_access_redis.go create mode 100644 pkg/api/rewardcloud/api_environment_access_webshell.go create mode 100644 pkg/api/rewardcloud/api_environment_component.go create mode 100644 pkg/api/rewardcloud/api_environment_custom_domain.go create mode 100644 pkg/api/rewardcloud/api_environment_env_var.go create mode 100644 pkg/api/rewardcloud/api_environment_magento_host_mapping.go create mode 100644 pkg/api/rewardcloud/api_environment_message_history.go create mode 100644 pkg/api/rewardcloud/api_exported_data.go create mode 100644 pkg/api/rewardcloud/api_git.go create mode 100644 pkg/api/rewardcloud/api_git_type.go create mode 100644 pkg/api/rewardcloud/api_imported_data.go create mode 100644 pkg/api/rewardcloud/api_invitation.go create mode 100644 pkg/api/rewardcloud/api_miscellaneous.go create mode 100644 pkg/api/rewardcloud/api_organisation.go create mode 100644 pkg/api/rewardcloud/api_organisation_env_var.go create mode 100644 pkg/api/rewardcloud/api_price.go create mode 100644 pkg/api/rewardcloud/api_product.go create mode 100644 pkg/api/rewardcloud/api_project.go create mode 100644 pkg/api/rewardcloud/api_project_access.go create mode 100644 pkg/api/rewardcloud/api_project_access_git.go create mode 100644 pkg/api/rewardcloud/api_project_access_registry.go create mode 100644 pkg/api/rewardcloud/api_project_access_service_account.go create mode 100644 pkg/api/rewardcloud/api_project_env_var.go create mode 100644 pkg/api/rewardcloud/api_project_type.go create mode 100644 pkg/api/rewardcloud/api_project_type_version.go create mode 100644 pkg/api/rewardcloud/api_project_type_version_env_var.go create mode 100644 pkg/api/rewardcloud/api_project_type_version_env_var_example.go create mode 100644 pkg/api/rewardcloud/api_provider.go create mode 100644 pkg/api/rewardcloud/api_resource_type.go create mode 100644 pkg/api/rewardcloud/api_resource_type_limit.go create mode 100644 pkg/api/rewardcloud/api_role_group.go create mode 100644 pkg/api/rewardcloud/api_state.go create mode 100644 pkg/api/rewardcloud/api_state_by_infra.go create mode 100644 pkg/api/rewardcloud/api_team.go create mode 100644 pkg/api/rewardcloud/api_team_env_var.go create mode 100644 pkg/api/rewardcloud/api_template_environment.go create mode 100644 pkg/api/rewardcloud/api_template_project.go create mode 100644 pkg/api/rewardcloud/api_user.go create mode 100644 pkg/api/rewardcloud/client.go create mode 100644 pkg/api/rewardcloud/configuration.go create mode 100644 pkg/api/rewardcloud/git_push.sh create mode 100644 pkg/api/rewardcloud/model__api_gits__id__connect_test_get_200_response.go create mode 100644 pkg/api/rewardcloud/model__api_users__id__finance_subscribe_info_get_200_response.go create mode 100644 pkg/api/rewardcloud/model__api_users_check_email_get_200_response.go create mode 100644 pkg/api/rewardcloud/model__api_users_forgot_password_put_200_response.go create mode 100644 pkg/api/rewardcloud/model__api_users_forgot_password_put_request.go create mode 100644 pkg/api/rewardcloud/model_abstract_env_var.go create mode 100644 pkg/api/rewardcloud/model_abstract_environment.go create mode 100644 pkg/api/rewardcloud/model_abstract_project.go create mode 100644 pkg/api/rewardcloud/model_access_code.go create mode 100644 pkg/api/rewardcloud/model_authentication_credentials.go create mode 100644 pkg/api/rewardcloud/model_authentication_token.go create mode 100644 pkg/api/rewardcloud/model_authentication_token_data.go create mode 100644 pkg/api/rewardcloud/model_authentication_token_data_teams_inner.go create mode 100644 pkg/api/rewardcloud/model_cluster.go create mode 100644 pkg/api/rewardcloud/model_cluster_cluster_with_provider.go create mode 100644 pkg/api/rewardcloud/model_component.go create mode 100644 pkg/api/rewardcloud/model_component_resource_limit.go create mode 100644 pkg/api/rewardcloud/model_component_version.go create mode 100644 pkg/api/rewardcloud/model_component_version_env_var.go create mode 100644 pkg/api/rewardcloud/model_component_version_env_var_example.go create mode 100644 pkg/api/rewardcloud/model_credential_type.go create mode 100644 pkg/api/rewardcloud/model_crypto_key_type.go create mode 100644 pkg/api/rewardcloud/model_data_transfer_data_type.go create mode 100644 pkg/api/rewardcloud/model_data_transfer_type.go create mode 100644 pkg/api/rewardcloud/model_env_var_type.go create mode 100644 pkg/api/rewardcloud/model_env_var_validation.go create mode 100644 pkg/api/rewardcloud/model_environment_access.go create mode 100644 pkg/api/rewardcloud/model_environment_access_all_data_response.go create mode 100644 pkg/api/rewardcloud/model_environment_access_backend.go create mode 100644 pkg/api/rewardcloud/model_environment_access_database.go create mode 100644 pkg/api/rewardcloud/model_environment_access_dev_tools.go create mode 100644 pkg/api/rewardcloud/model_environment_access_frontend.go create mode 100644 pkg/api/rewardcloud/model_environment_access_mailbox.go create mode 100644 pkg/api/rewardcloud/model_environment_access_rabbit.go create mode 100644 pkg/api/rewardcloud/model_environment_access_redis.go create mode 100644 pkg/api/rewardcloud/model_environment_access_webshell.go create mode 100644 pkg/api/rewardcloud/model_environment_component.go create mode 100644 pkg/api/rewardcloud/model_environment_component_environment_input.go create mode 100644 pkg/api/rewardcloud/model_environment_component_environment_output.go create mode 100644 pkg/api/rewardcloud/model_environment_component_template_environment_input.go create mode 100644 pkg/api/rewardcloud/model_environment_component_template_environment_output.go create mode 100644 pkg/api/rewardcloud/model_environment_costs.go create mode 100644 pkg/api/rewardcloud/model_environment_costs_uuid.go create mode 100644 pkg/api/rewardcloud/model_environment_custom_domain.go create mode 100644 pkg/api/rewardcloud/model_environment_custom_domain_environment_input.go create mode 100644 pkg/api/rewardcloud/model_environment_custom_domain_environment_output.go create mode 100644 pkg/api/rewardcloud/model_environment_env_var.go create mode 100644 pkg/api/rewardcloud/model_environment_env_var_environment_input.go create mode 100644 pkg/api/rewardcloud/model_environment_env_var_environment_output.go create mode 100644 pkg/api/rewardcloud/model_environment_env_var_template_environment_input.go create mode 100644 pkg/api/rewardcloud/model_environment_env_var_template_environment_output.go create mode 100644 pkg/api/rewardcloud/model_environment_environment_input.go create mode 100644 pkg/api/rewardcloud/model_environment_environment_output.go create mode 100644 pkg/api/rewardcloud/model_environment_log_stream_response.go create mode 100644 pkg/api/rewardcloud/model_environment_magento_host_mapping.go create mode 100644 pkg/api/rewardcloud/model_environment_magento_host_mapping_environment_input.go create mode 100644 pkg/api/rewardcloud/model_environment_magento_host_mapping_environment_output.go create mode 100644 pkg/api/rewardcloud/model_environment_message_history.go create mode 100644 pkg/api/rewardcloud/model_exported_data.go create mode 100644 pkg/api/rewardcloud/model_finance_api_token_response.go create mode 100644 pkg/api/rewardcloud/model_finance_costs_response.go create mode 100644 pkg/api/rewardcloud/model_finance_costs_response_summary.go create mode 100644 pkg/api/rewardcloud/model_finance_invoices_response.go create mode 100644 pkg/api/rewardcloud/model_git_git_input.go create mode 100644 pkg/api/rewardcloud/model_git_git_output.go create mode 100644 pkg/api/rewardcloud/model_git_type.go create mode 100644 pkg/api/rewardcloud/model_imported_data.go create mode 100644 pkg/api/rewardcloud/model_invitation_invitation_input.go create mode 100644 pkg/api/rewardcloud/model_invitation_invitation_output.go create mode 100644 pkg/api/rewardcloud/model_mercure_discover_response.go create mode 100644 pkg/api/rewardcloud/model_organisation_env_var.go create mode 100644 pkg/api/rewardcloud/model_organisation_env_var_organisation_input.go create mode 100644 pkg/api/rewardcloud/model_organisation_env_var_organisation_output.go create mode 100644 pkg/api/rewardcloud/model_organisation_organisation_input.go create mode 100644 pkg/api/rewardcloud/model_organisation_organisation_output.go create mode 100644 pkg/api/rewardcloud/model_price.go create mode 100644 pkg/api/rewardcloud/model_price_product_input.go create mode 100644 pkg/api/rewardcloud/model_price_product_output.go create mode 100644 pkg/api/rewardcloud/model_product.go create mode 100644 pkg/api/rewardcloud/model_product_product_input.go create mode 100644 pkg/api/rewardcloud/model_product_product_output.go create mode 100644 pkg/api/rewardcloud/model_project_access.go create mode 100644 pkg/api/rewardcloud/model_project_access_git.go create mode 100644 pkg/api/rewardcloud/model_project_access_git_project_output.go create mode 100644 pkg/api/rewardcloud/model_project_access_project_output.go create mode 100644 pkg/api/rewardcloud/model_project_access_registry.go create mode 100644 pkg/api/rewardcloud/model_project_access_registry_project_output.go create mode 100644 pkg/api/rewardcloud/model_project_access_service_account.go create mode 100644 pkg/api/rewardcloud/model_project_access_service_account_project_output.go create mode 100644 pkg/api/rewardcloud/model_project_env_var.go create mode 100644 pkg/api/rewardcloud/model_project_env_var_project_input.go create mode 100644 pkg/api/rewardcloud/model_project_env_var_project_output.go create mode 100644 pkg/api/rewardcloud/model_project_env_var_template_project_input.go create mode 100644 pkg/api/rewardcloud/model_project_env_var_template_project_output.go create mode 100644 pkg/api/rewardcloud/model_project_project_input.go create mode 100644 pkg/api/rewardcloud/model_project_project_output.go create mode 100644 pkg/api/rewardcloud/model_project_type.go create mode 100644 pkg/api/rewardcloud/model_project_type_version.go create mode 100644 pkg/api/rewardcloud/model_project_type_version_env_var.go create mode 100644 pkg/api/rewardcloud/model_project_type_version_env_var_example.go create mode 100644 pkg/api/rewardcloud/model_provider.go create mode 100644 pkg/api/rewardcloud/model_provider_cluster_with_provider.go create mode 100644 pkg/api/rewardcloud/model_resource_type_limit.go create mode 100644 pkg/api/rewardcloud/model_resource_type_limit_resource_type_input.go create mode 100644 pkg/api/rewardcloud/model_resource_type_limit_resource_type_output.go create mode 100644 pkg/api/rewardcloud/model_resource_type_resource_type_input.go create mode 100644 pkg/api/rewardcloud/model_resource_type_resource_type_output.go create mode 100644 pkg/api/rewardcloud/model_role_group.go create mode 100644 pkg/api/rewardcloud/model_state.go create mode 100644 pkg/api/rewardcloud/model_state_by_infra.go create mode 100644 pkg/api/rewardcloud/model_team_env_var.go create mode 100644 pkg/api/rewardcloud/model_team_env_var_team_input.go create mode 100644 pkg/api/rewardcloud/model_team_env_var_team_output.go create mode 100644 pkg/api/rewardcloud/model_team_team_input.go create mode 100644 pkg/api/rewardcloud/model_team_team_input_team_users_inner.go create mode 100644 pkg/api/rewardcloud/model_team_team_output.go create mode 100644 pkg/api/rewardcloud/model_template_environment_template_environment_input.go create mode 100644 pkg/api/rewardcloud/model_template_environment_template_environment_output.go create mode 100644 pkg/api/rewardcloud/model_template_project_template_project_input.go create mode 100644 pkg/api/rewardcloud/model_template_project_template_project_output.go create mode 100644 pkg/api/rewardcloud/model_user.go create mode 100644 pkg/api/rewardcloud/model_user_team_roles_inner.go create mode 100644 pkg/api/rewardcloud/model_validate_env_var_request.go create mode 100644 pkg/api/rewardcloud/model_validate_env_var_response.go create mode 100644 pkg/api/rewardcloud/response.go create mode 100644 pkg/api/rewardcloud/utils.go diff --git a/.goreleaser.dev.yml b/.dev.goreleaser.yml similarity index 61% rename from .goreleaser.dev.yml rename to .dev.goreleaser.yml index ff76606..57636a0 100644 --- a/.goreleaser.dev.yml +++ b/.dev.goreleaser.yml @@ -9,7 +9,7 @@ builds: - CGO_ENABLED=0 main: ./cmd/cloud ldflags: - - -s -w -X main.VERSION={{.Tag}}-{{ time "200601021504" }} + - -s -w -X main.github.com/rewardenv/reward-cloud-cli/internal/globals.CLITOKEN={{ .Env.REWARD_CLOUD_CLI_TOKEN }} -X main.github.com/rewardenv/reward-cloud-cli/internal/globals.VERSION={{.Tag}}-{{ time "200601021504" }} goos: - linux - windows @@ -19,16 +19,17 @@ builds: - amd64 - "386" archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 - format_overrides: + - format_overrides: - goos: windows format: zip - name_template: '{{- .ProjectName -}}_{{- .Os -}}_{{- if and (eq .Os "Linux") (eq .Arch "arm64") -}}aarch64{{- else -}}{{- .Arch -}}{{- end -}}' + name_template: | + {{- .ProjectName -}}_ + {{- title .Os -}}_ + {{- if and (eq .Os "linux") (eq .Arch "arm64") -}}aarch64 + {{- else if eq .Arch "amd64" -}}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{- .Arch -}} + {{- end -}} files: - none* release: @@ -46,13 +47,14 @@ changelog: - '^test:' nfpms: - package_name: reward-cloud - file_name_template: '{{- .ProjectName -}}_{{- .Os -}}_{{- if and (eq .Os "Linux") (eq .Arch "arm64") -}}aarch64{{- else -}}{{- .Arch -}}{{- end -}}' - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + file_name_template: | + {{- .ProjectName -}}_ + {{- title .Os -}}_ + {{- if and (eq .Os "linux") (eq .Arch "arm64") -}}aarch64 + {{- else if eq .Arch "amd64" -}}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{- .Arch -}} + {{- end -}} maintainer: Janos Miko description: Reward-Cloud is a plugin for Reward to manipulate Cloud environments. license: MIT @@ -67,7 +69,7 @@ nfpms: rpm: compression: lzma brews: - - tap: + - repository: owner: rewardenv name: homebrew-tap token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" @@ -78,7 +80,7 @@ brews: folder: Formula description: Reward-Cloud is a plugin for Reward to manipulate Cloud environments. license: MIT - skip_upload: "true" + skip_upload: "false" dependencies: - name: reward-beta type: optional diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..5ad5ee4 --- /dev/null +++ b/.env.sample @@ -0,0 +1 @@ +REWARD_CLOUD_CLI_TOKEN= diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..fe7c01a --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +dotenv diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index 24fcf1e..56bff58 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -22,7 +22,7 @@ jobs: uses: goreleaser/goreleaser-action@v2 with: version: latest - args: release --clean --config .goreleaser.dev.yml + args: release --clean --config .dev.goreleaser.yml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 43b6618..f00f553 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,4 @@ Network Trash Folder Temporary Items .apdisk +.env \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index 0ebcf28..0f0ad33 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -9,7 +9,7 @@ builds: - CGO_ENABLED=0 main: ./cmd/cloud ldflags: - - -s -w -X main.VERSION={{.Tag}} + - -s -w -X github.com/rewardenv/reward-cloud-cli/internal/globals.CLITOKEN={{ .Env.REWARD_CLOUD_CLI_TOKEN }} -X github.com/rewardenv/reward-cloud-cli/internal/globals.VERSION={{.Tag}}-{{ time "200601021504" }} goos: - linux - windows @@ -19,16 +19,17 @@ builds: - amd64 - "386" archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 - format_overrides: + - format_overrides: - goos: windows format: zip - name_template: '{{- .ProjectName -}}_{{- .Os -}}_{{- if and (eq .Os "Linux") (eq .Arch "arm64") -}}aarch64{{- else -}}{{- .Arch -}}{{- end -}}' + name_template: | + {{- .ProjectName -}}_ + {{- title .Os -}}_ + {{- if and (eq .Os "linux") (eq .Arch "arm64") -}}aarch64 + {{- else if eq .Arch "amd64" -}}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{- .Arch -}} + {{- end -}} files: - none* release: @@ -44,13 +45,15 @@ changelog: - '^test:' nfpms: - package_name: reward-cloud - file_name_template: '{{- .ProjectName -}}_{{- .Os -}}_{{- if and (eq .Os "Linux") (eq .Arch "arm64") -}}aarch64{{- else -}}{{- .Arch -}}{{- end -}}' - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + file_name_template: | + {{- .ProjectName -}}_ + {{- title .Os -}}_ + {{- if and (eq .Os "linux") (eq .Arch "arm64") -}}aarch64 + {{- else if eq .Arch "amd64" -}}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{- .Arch -}} + {{- end -}} + maintainer: Janos Miko description: Reward-Cloud is a plugin for Reward to manipulate Cloud environments. license: MIT @@ -65,7 +68,7 @@ nfpms: rpm: compression: lzma brews: - - tap: + - repository: owner: rewardenv name: homebrew-tap token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" @@ -76,7 +79,7 @@ brews: folder: Formula description: Reward-Cloud is a plugin for Reward to manipulate Cloud environments. license: MIT - skip_upload: "true" + skip_upload: "false" dependencies: - name: reward type: optional diff --git a/.local.goreleaser.yml b/.local.goreleaser.yml new file mode 100644 index 0000000..1c80404 --- /dev/null +++ b/.local.goreleaser.yml @@ -0,0 +1,28 @@ +--- +project_name: reward-cloud +before: + hooks: + - go mod download + - go generate ./... +builds: + - env: + - CGO_ENABLED=0 + main: ./cmd/cloud + ldflags: + - -s -w -X github.com/rewardenv/reward-cloud-cli/internal/globals.CLITOKEN={{ .Env.REWARD_CLOUD_CLI_TOKEN }} -X github.com/rewardenv/reward-cloud-cli/internal/globals.VERSION={{.Tag}}-{{ time "200601021504" }} + goos: + - linux + - windows + - darwin + goarch: + - arm64 + - amd64 + - "386" +archives: + - format: binary +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/Makefile b/Makefile index ffd9bd0..67eff6f 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ ifeq (gen,$(firstword $(MAKECMDGOALS))) $(eval $(GEN_ARGS):;@:) endif -## —— Commands ————————————————————————————————————————————————————————— +## —— Commands ————————————————————————————————————————————————————————————————— build: ## Build the command to ./dist go mod download go generate ./... @@ -25,9 +25,9 @@ package: ## Build the binaries and packages using goreleaser (without releasing goreleaser --clean --snapshot --skip-publish build-local: ## Build the binaries only using goreleaser (without releasing it) - goreleaser --clean --snapshot --skip-publish + goreleaser --clean --snapshot --skip-publish --config .local.goreleaser.yml -## —— Go Commands ————————————————————————————————————————————————————————— +## —— Go Commands —————————————————————————————————————————————————————————————— gomod: ## Update Go Dependencies go mod tidy @@ -39,3 +39,19 @@ lint-fix: ## Lint Go Code test: ## Run Go tests go test -race -v ./... + +## —— API Generation Commands —————————————————————————————————————————————————— +api-remove-jsonld: ## Remove JSON-LD files + docker run --rm -v "$${PWD}:/app" -w /app python:3 /bin/bash -c 'pip3 install -r hack/requirements.txt && python3 hack/main.py --input pkg/api/reward-cloud-api.yaml --output pkg/api/reward-cloud-api-no-jsonld.yaml' + +.PHONY: generate +api-generate: ## Generate Go code from OpenAPI spec + #docker run --rm -v "$${PWD}/pkg/api/:/app" -w /app openapitools/openapi-generator-cli:v7.4.0 generate -i reward-cloud-api.yaml -c config.yaml -g go --global-property apiTests=false,apiDocs=false,modelTests=false,modelDocs=false -o rewardcloud + docker run --rm -v "$${PWD}/pkg/api/:/app" -w /app openapitools/openapi-generator-cli:v7.0.1 generate -i reward-cloud-api-no-jsonld.yaml -c config.yaml -g go --global-property apiTests=false,apiDocs=false,modelTests=false,modelDocs=false -o rewardcloud + rm -f pkg/api/rewardcloud/go.mod && rm -f pkg/api/rewardcloud/go.sum + go fmt ./pkg/api/... + +.PHONY: all +api: ## Generate Go code from OpenAPI spec + make api-remove-jsonld + make api-generate diff --git a/assets/assets.go b/assets/assets.go new file mode 100644 index 0000000..5a83ec2 --- /dev/null +++ b/assets/assets.go @@ -0,0 +1,6 @@ +package assets + +import "embed" + +//go:embed all:* +var Assets embed.FS diff --git a/assets/templates/build/Dockerfile.tpl b/assets/templates/build/Dockerfile.tpl new file mode 100644 index 0000000..7f8a5d2 --- /dev/null +++ b/assets/templates/build/Dockerfile.tpl @@ -0,0 +1,28 @@ +{{- if eq .Values.projectType "magento" -}} +{{- include "magento-dockerfile-start" . | nindent 0 -}} +{{- else if eq .Values.projectType "wordpress" -}} +{{- include "wordpress-dockerfile-start" . | nindent 0 -}} +{{- else if eq .Values.projectType "shopware" -}} +{{- include "shopware-dockerfile-start" . | nindent 0 -}} +{{- else if eq .Values.projectType "magento-pwa" -}} +{{- include "magento-pwa-dockerfile-start" . | nindent 0 -}} +{{- else if eq .Values.projectType "shopware-pwa" -}} +{{- include "shopware-pwa-dockerfile-start" . | nindent 0 -}} +{{- end }} + +{{- range $key, $value := .Values.envVars }} +ARG {{ printf "%s=%s" $key $value }} +ENV {{ printf "%s $%s" $key $key }} +{{- end }} + +{{- if eq .Values.projectType "magento" -}} +{{- include "magento-dockerfile-end" . | nindent 0 -}} +{{- else if eq .Values.projectType "wordpress" -}} +{{- include "wordpress-dockerfile-end" . | nindent 0 -}} +{{- else if eq .Values.projectType "shopware" -}} +{{- include "shopware-dockerfile-end" . | nindent 0 -}} +{{- else if eq .Values.projectType "magento-pwa" -}} +{{- include "magento-pwa-dockerfile-end" . | nindent 0 -}} +{{- else if eq .Values.projectType "shopware-pwa" -}} +{{- include "shopware-pwa-dockerfile-end" . | nindent 0 -}} +{{- end }} diff --git a/assets/templates/build/_common.tpl b/assets/templates/build/_common.tpl new file mode 100644 index 0000000..c370f12 --- /dev/null +++ b/assets/templates/build/_common.tpl @@ -0,0 +1,7 @@ +{{- define "php-version" -}} +{{- printf "%s" .Values.phpVersion -}} +{{- end -}} + +{{- define "build-image-suffix" -}} +-debian-bullseye-rootless +{{- end -}} \ No newline at end of file diff --git a/assets/templates/build/_magento.tpl b/assets/templates/build/_magento.tpl new file mode 100644 index 0000000..b1eea37 --- /dev/null +++ b/assets/templates/build/_magento.tpl @@ -0,0 +1,75 @@ +{{- define "magento-dockerfile-start" -}} +FROM rewardenv/php-fpm:{{ include "php-version" . }}-magento2-web{{ include "build-image-suffix" . }} + +ARG COMPOSER_INSTALL +ARG COMPOSER_VERSION=2.2.19 +ARG COMPOSER_AUTH +ARG COMPOSER_GITHUB_USER +ARG COMPOSER_GITHUB_TOKEN +ARG COMPOSER_BITBUCKET_PUBLIC_KEY +ARG COMPOSER_BITBUCKET_PRIVATE_KEY +ARG COMPOSER_GITLAB_HOST +ARG COMPOSER_GITLAB_OAUTH_TOKEN +ARG COMPOSER_GITLAB_TOKEN +ARG MAGENTO_PUBLIC_KEY +ARG MAGENTO_PRIVATE_KEY +ARG MAGENTO_LANGUAGES +ARG MAGENTO_DI_COMPILE=true +ARG MAGENTO_STATIC_CONTENT_DEPLOY=false +ARG MAGENTO_DEV_STATIC_SIGN=true +ARG MAGENTO_DEV_JS_MERGE=true +ARG MAGENTO_DEV_JS_MINIFY=true +ARG MAGENTO_DEV_JS_BUNDLING=false +ARG MAGENTO_DEV_CSS_MERGE=true +ARG MAGENTO_DEV_CSS_MINIFY=true +ARG MAGENTO_DEV_HTML_MINIFY=false +ARG COMMAND_BEFORE_COMPOSER_INSTALL +ARG COMMAND_AFTER_COMPOSER_INSTALL +ARG COMMAND_BEFORE_DI_COMPILE +ARG COMMAND_AFTER_DI_COMPILE +ARG COMPOSER_DUMP_AUTOLOAD=true +{{- end -}} + +{{- define "magento-dockerfile-end" -}} +COPY --chown=www-data:www-data . . + +RUN <<-EOF + set -eux + if [ "${COMPOSER_VERSION:-2}" = "1" ]; then + alternatives --altdir ~/.local/etc/alternatives --admindir ~/.local/var/lib/alternatives --set composer "${HOME}/.local/bin/composer1"; + else + alternatives --altdir ~/.local/etc/alternatives --admindir ~/.local/var/lib/alternatives --set composer "${HOME}/.local/bin/composer2"; + if [ "${COMPOSER_VERSION:-2}" = "2" ]; then + composer self-update --stable; + else + composer self-update "${COMPOSER_VERSION:-2}"; + fi + fi + if [ -n "${MAGENTO_PUBLIC_KEY-}" ]; then composer global config http-basic.repo.magento.com ${MAGENTO_PUBLIC_KEY-} ${MAGENTO_PRIVATE_KEY-}; fi + if [ -n "${COMPOSER_GITHUB_USER-}" ]; then composer global config http-basic.github.com ${COMPOSER_GITHUB_USER-} ${COMPOSER_GITHUB_TOKEN-}; fi + if [ -n "${COMPOSER_BITBUCKET_PUBLIC_KEY-}" ]; then composer global config bitbucket-oauth.bitbucket.org ${COMPOSER_BITBUCKET_PUBLIC_KEY-} ${COMPOSER_BITBUCKET_PRIVATE_KEY-}; fi + if [ -n "${COMPOSER_GITLAB_OAUTH_TOKEN-}" ]; then composer global config gitlab-oauth.${COMPOSER_GITLAB_HOST:-gitlab.com} ${COMPOSER_GITLAB_OAUTH_TOKEN-}; fi + if [ -n "${COMPOSER_GITLAB_TOKEN-}" ]; then composer global config gitlab-oauth.${COMPOSER_GITLAB_HOST:-gitlab.com} ${COMPOSER_GITLAB_TOKEN-}; fi + if [ -n "${COMMAND_BEFORE_COMPOSER_INSTALL-}" ]; then eval "${COMMAND_BEFORE_COMPOSER_INSTALL-}"; fi + if [ "${COMPOSER_VERSION:-2}" != "1" ]; then composer config --no-plugins allow-plugins.magento/* true; fi + if [ "${COMPOSER_VERSION:-2}" != "1" ]; then composer config --no-plugins allow-plugins.laminas/laminas-dependency-plugin true; fi + if [ "${COMPOSER_VERSION:-2}" != "1" ]; then composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true; fi + if [ "${COMPOSER_VERSION:-2}" != "1" ]; then composer config --no-plugins allow-plugins.cweagans/composer-patches true; fi + if [ "${COMPOSER_INSTALL:-true}" = "true" ]; then composer install --no-interaction --no-progress; fi + if [ -n "${COMMAND_AFTER_COMPOSER_INSTALL-}" ]; then eval "${COMMAND_AFTER_COMPOSER_INSTALL-}"; fi + composer --no-interaction clear-cache + if [ -n "${COMMAND_BEFORE_DI_COMPILE-}" ]; then eval "${COMMAND_BEFORE_DI_COMPILE}"; fi + if [ ! -f app/etc/config.php ]; then + php bin/magento module:enable --no-interaction --all; + fi + if [ "${MAGENTO_DI_COMPILE-}" = "true" ] && [ "${MAGENTO_DI_COMPILE_ON_DEMAND:-false}" != "true" ]; then + php bin/magento setup:di:compile --no-interaction; + fi + if [ -n "${COMMAND_AFTER_DI_COMPILE-}" ]; then eval "${COMMAND_AFTER_DI_COMPILE-}"; fi + if [ "${COMPOSER_DUMP_AUTOLOAD-}" = "true" ]; then composer dump-autoload -o; fi + if [ "${MAGENTO_STATIC_CONTENT_DEPLOY-}" = "true" ] && [ "${MAGENTO_SCD_ON_DEMAND:-false}" != "true" ]; + then bin/magento setup:static-content:deploy --no-interaction --jobs=$(nproc) -fv ${MAGENTO_LANGUAGES:-}; + fi + printf "\", phpversion());\nprintf(\"build-date: $(date '+%Y/%m/%d %H:%M:%S')\");\n?>\n" > pub/version.php +EOF +{{- end -}} diff --git a/assets/templates/build/_magentopwa.tpl b/assets/templates/build/_magentopwa.tpl new file mode 100644 index 0000000..190511c --- /dev/null +++ b/assets/templates/build/_magentopwa.tpl @@ -0,0 +1,78 @@ +{{- define "magento-pwa-base-image" -}} +{{- if eq (include "node-version" .) "16" -}} +alpine3.18 +{{- else if eq (include "node-version" .) "18" -}} +alpine3.18 +{{- else if eq (include "node-version" .) "20" -}} +alpine3.18 +{{- else -}} +alpine +{{- end -}} +{{- end -}} + +{{- define "magento-pwa-dockerfile-start" -}} +ARG NODE_VERSION={{ include "node-version" . }} +ARG BASE_IMAGE={{ include "magento-pwa-base-image" . }} +FROM node:${NODE_VERSION}-${BASE_IMAGE} as build +{{- end -}} + +{{- define "magento-pwa-dockerfile-end" -}} +RUN apk --no-cache --virtual add \ + python3 \ + make \ + g++ \ + yarn + +USER node +WORKDIR /app + +COPY --chown=node:node . . + +ENV CI=true + +RUN <<-EOF + set -eux + if [ -n "${COMMAND_BEFORE_YARN_INSTALL-}" ]; then eval "${COMMAND_BEFORE_YARN_INSTALL}"; fi + yarn install --frozen-lockfile + if [ -n "${COMMAND_AFTER_YARN_INSTALL-}" ]; then eval "${COMMAND_AFTER_YARN_INSTALL}"; fi +EOF + +ENV NODE_ENV=production +ENV BABEL_KEEP_ATTRIBUTES=true + +RUN <<-EOF + set -eux + if [ -n "${COMMAND_BEFORE_YARN_BUILD-}" ]; then eval "${COMMAND_BEFORE_YARN_BUILD}"; fi + yarn run build + if [ -n "${COMMAND_AFTER_YARN_BUILD-}" ]; then eval "${COMMAND_AFTER_YARN_BUILD}"; fi +EOF + +# MULTI-STAGE BUILD +FROM node:${NODE_VERSION}-${BASE_IMAGE} + +USER node +WORKDIR /app + +COPY --from=build /app . + +EXPOSE 8080 + +ARG YARN_RUN_COMMAND="stage:venia" +ENV YARN_RUN_COMMAND=${YARN_RUN_COMMAND} + +ENV NODE_ENV=production +ENV STAGING_SERVER_HOST=0.0.0.0 +ENV STAGING_SERVER_PORT=8080 +ENV UPWARD_JS_UPWARD_PATH=upward.yml +ENV CUSTOM_ORIGIN_ENABLED=0 +ENV UPWARD_JS_BIND_LOCAL=1 +ENV UPWARD_JS_LOG_URL=1 +ENV ENABLE_EXPRESS_SERVER_COMPRESSION=true +ENV MAGENTO_BACKEND_EDITION=AC +ENV MAGENTO_BACKEND_URL=redacted +ENV CHECKOUT_BRAINTREE_TOKEN=redacted +ENV GOOGLE_MAPS_API_KEY=redacted + +CMD [ "/bin/sh", "-c", "yarn ${YARN_RUN_COMMAND}" ] + +{{- end -}} diff --git a/assets/templates/build/_shopware.tpl b/assets/templates/build/_shopware.tpl new file mode 100644 index 0000000..5f3e974 --- /dev/null +++ b/assets/templates/build/_shopware.tpl @@ -0,0 +1,33 @@ +{{- define "shopware-dockerfile-start" -}} +FROM rewardenv/php-fpm:{{ include "php-version" . }}-shopware-web{{ include "build-image-suffix" . }} + +ARG COMPOSER_VERSION=2.4.4 +{{- end -}} + +{{- define "shopware-dockerfile-end" -}} +COPY --chown=www-data:www-data . . + +RUN <<-EOF + set -eux + if [ "${COMPOSER_VERSION:-2}" = "1" ]; then + alternatives --altdir ~/.local/etc/alternatives --admindir ~/.local/var/lib/alternatives --set composer "${HOME}/.local/bin/composer1" + else + alternatives --altdir ~/.local/etc/alternatives --admindir ~/.local/var/lib/alternatives --set composer "${HOME}/.local/bin/composer2" + if [ "${COMPOSER_VERSION:-2}" = "2" ]; then + composer self-update --stable; + else + composer self-update "${COMPOSER_VERSION:-2}"; + fi + fi + if [ -n "${COMPOSER_GITHUB_USER-}" ]; then composer global config http-basic.github.com ${COMPOSER_GITHUB_USER-} ${COMPOSER_GITHUB_TOKEN-}; fi + if [ -n "${COMPOSER_BITBUCKET_PUBLIC_KEY-}" ]; then composer global config bitbucket-oauth.bitbucket.org ${COMPOSER_BITBUCKET_PUBLIC_KEY-} ${COMPOSER_BITBUCKET_PRIVATE_KEY-}; fi + if [ -n "${COMPOSER_GITLAB_OAUTH_TOKEN-}" ]; then composer global config gitlab-oauth.${COMPOSER_GITLAB_HOST:-gitlab.com} ${COMPOSER_GITLAB_OAUTH_TOKEN-}; fi + if [ -n "${COMPOSER_GITLAB_TOKEN-}" ]; then composer global config gitlab-oauth.${COMPOSER_GITLAB_HOST:-gitlab.com} ${COMPOSER_GITLAB_TOKEN-}; fi + if [ -n "${COMMAND_BEFORE_COMPOSER_INSTALL-}" ]; then eval "${COMMAND_BEFORE_COMPOSER_INSTALL-}"; fi + if [ "${COMPOSER_INSTALL:-true}" = "true" ]; then composer install --no-interaction --no-progress; fi + if [ -n "${COMMAND_AFTER_COMPOSER_INSTALL-}" ]; then eval "${COMMAND_AFTER_COMPOSER_INSTALL-}"; fi + composer --no-interaction clear-cache + if [ "${COMPOSER_DUMP_AUTOLOAD-}" = "true" ]; then composer dump-autoload -o; fi + printf "\", phpversion());\nprintf(\"build-date: $(date '+%Y/%m/%d %H:%M:%S')\");\n?>\n" > public/version.php +EOF +{{- end -}} diff --git a/assets/templates/build/_shopwarepwa.tpl b/assets/templates/build/_shopwarepwa.tpl new file mode 100644 index 0000000..e3e0d18 --- /dev/null +++ b/assets/templates/build/_shopwarepwa.tpl @@ -0,0 +1,33 @@ +{{- define "shopware-pwa-dockerfile-start" -}} +ARG NODE_VERSION={{ include "node-version" . }} +ARG BASE_IMAGE=alpine +FROM node:${NODE_VERSION}-${BASE_IMAGE} +{{- end -}} + +{{- define "shopware-pwa-dockerfile-end" -}} +USER node +WORKDIR /app + +COPY --chown=node:node . . + +RUN <<-EOF + set -eux + if [ -n "${COMMAND_BEFORE_NPM_INSTALL-}" ]; then eval "${COMMAND_BEFORE_NPM_INSTALL}"; fi + npm install + if [ -n "${COMMAND_AFTER_NPM_INSTALL-}" ]; then eval "${COMMAND_AFTER_NPM_INSTALL}"; fi +EOF + +RUN <<-EOF + set -eux + if [ -n "${COMMAND_BEFORE_NPM_BUILD-}" ]; then eval "${COMMAND_BEFORE_NPM_BUILD}"; fi + npm run build + if [ -n "${COMMAND_AFTER_NPM_BUILD-}" ]; then eval "${COMMAND_AFTER_NPM_BUILD}"; fi +EOF + +EXPOSE 3000 + +ARG NPM_RUN_COMMAND="run start" +ENV NPM_RUN_COMMAND=${NPM_RUN_COMMAND} + +CMD [ "/bin/sh", "-c", "npm ${NPM_RUN_COMMAND}" ] +{{- end -}} diff --git a/assets/templates/build/_wordpress.tpl b/assets/templates/build/_wordpress.tpl new file mode 100644 index 0000000..f3d4581 --- /dev/null +++ b/assets/templates/build/_wordpress.tpl @@ -0,0 +1,32 @@ +{{- define "wordpress-dockerfile-start" -}} +FROM rewardenv/php-fpm:{{ include "php-version" . }}-wordpress-web{{ include "build-image-suffix" . }} + +{{- end -}} + +{{- define "wordpress-dockerfile-end" -}} +COPY --chown=www-data:www-data . . + +RUN <<-EOF + set -eux + if [ "${COMPOSER_VERSION:-2}" = "1" ]; then + alternatives --altdir ~/.local/etc/alternatives --admindir ~/.local/var/lib/alternatives --set composer "${HOME}/.local/bin/composer1"; + else + alternatives --altdir ~/.local/etc/alternatives --admindir ~/.local/var/lib/alternatives --set composer "${HOME}/.local/bin/composer2"; + if [ "${COMPOSER_VERSION:-2}" = "2" ]; then + composer self-update --stable; + else + composer self-update "${COMPOSER_VERSION:-2}"; + fi + fi + if [ -n "${COMPOSER_GITHUB_USER-}" ]; then composer global config http-basic.github.com ${COMPOSER_GITHUB_USER-} ${COMPOSER_GITHUB_TOKEN-}; fi + if [ -n "${COMPOSER_BITBUCKET_PUBLIC_KEY-}" ]; then composer global config bitbucket-oauth.bitbucket.org ${COMPOSER_BITBUCKET_PUBLIC_KEY-} ${COMPOSER_BITBUCKET_PRIVATE_KEY-}; fi + if [ -n "${COMPOSER_GITLAB_OAUTH_TOKEN-}" ]; then composer global config gitlab-oauth.${COMPOSER_GITLAB_HOST:-gitlab.com} ${COMPOSER_GITLAB_OAUTH_TOKEN-}; fi + if [ -n "${COMPOSER_GITLAB_TOKEN-}" ]; then composer global config gitlab-oauth.${COMPOSER_GITLAB_HOST:-gitlab.com} ${COMPOSER_GITLAB_TOKEN-}; fi + if [ -n "${COMMAND_BEFORE_COMPOSER_INSTALL-}" ]; then eval "${COMMAND_BEFORE_COMPOSER_INSTALL-}"; fi + if [ "${COMPOSER_INSTALL:-false}" = "true" ]; then composer install --no-interaction --no-progress; fi + if [ -n "${COMMAND_AFTER_COMPOSER_INSTALL-}" ]; then eval "${COMMAND_AFTER_COMPOSER_INSTALL-}"; fi + composer --no-interaction clear-cache + if [ "${COMPOSER_DUMP_AUTOLOAD-}" = "true" ]; then composer dump-autoload -o; fi + printf "\", phpversion());\nprintf(\"build-date: $(date '+%Y/%m/%d %H:%M:%S')\");\n?>\n" > version.php +EOF +{{- end -}} diff --git a/cmd/cloud/main.go b/cmd/cloud/main.go index 576b0ec..a187f54 100644 --- a/cmd/cloud/main.go +++ b/cmd/cloud/main.go @@ -16,22 +16,17 @@ limitations under the License. package main import ( - log "github.com/sirupsen/logrus" - "github.com/spf13/cobra" "os" "os/signal" "syscall" + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + "github.com/rewardenv/reward-cloud-cli/cmd/root" "github.com/rewardenv/reward-cloud-cli/internal/config" ) -var ( - APPNAME = "cloud" - PARENTAPPNAME = "reward" - VERSION = "v0.0.1" -) - func main() { sig := make(chan os.Signal, 1) signal.Notify( @@ -42,7 +37,7 @@ func main() { syscall.SIGKILL, ) - app := config.New(APPNAME, PARENTAPPNAME, VERSION) + app := config.New() cobra.OnInitialize(func() { app.Init() @@ -50,7 +45,6 @@ func main() { go func() { <-sig - if err := app.Cleanup(); err != nil { os.Exit(1) } diff --git a/cmd/env/env.go b/cmd/env/env.go index a21eaf2..aa34ece 100644 --- a/cmd/env/env.go +++ b/cmd/env/env.go @@ -1,11 +1,16 @@ package env import ( + "os" + "time" + "github.com/pkg/errors" + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + cmdpkg "github.com/rewardenv/reward-cloud-cli/cmd" "github.com/rewardenv/reward-cloud-cli/internal/config" "github.com/rewardenv/reward-cloud-cli/internal/logic" - "github.com/spf13/cobra" ) func NewCmdEnv(app *config.App) *cmdpkg.Command { @@ -30,6 +35,7 @@ func NewCmdEnv(app *config.App) *cmdpkg.Command { NewCmdEnvBuildAndDeploy(app), NewCmdEnvExportDB(app), NewCmdEnvExportMedia(app), + NewCmdEnvLogs(app), ) return cmd @@ -115,3 +121,101 @@ func NewCmdEnvExportMedia(app *config.App) *cmdpkg.Command { return cmd } + +func NewCmdEnvLogs(app *config.App) *cmdpkg.Command { + cmd := &cmdpkg.Command{ + Command: &cobra.Command{ + Use: "logs", + Short: "stream logs for the selected environment", + Long: `stream logs for the selected environment`, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ( + []string, cobra.ShellCompDirective, + ) { + return nil, cobra.ShellCompDirectiveNoFileComp + }, + RunE: func(cmd *cobra.Command, args []string) error { + err := logic.NewEnvClient(app).RunCmdLogs(cmd, args) + if err != nil { + return errors.Wrap(err, "running logs command") + } + + return nil + }, + }, + App: app, + } + + logsCmdAddFlags(cmd) + + err := logsCmdCheckFlags(cmd) + if err != nil { + log.Fatalf(`%s`, err) + } + + return cmd +} + +func logsCmdAddFlags(cmd *cmdpkg.Command) { + cmd.Flags().StringSlice( + "filter", + []string{"application"}, + "comma separated list of components (eg: --filter=application,database)", + ) + _ = cmd.App.BindPFlag("filter", cmd.Flags().Lookup("filter")) + + cmd.Flags().String( + "offset", "1m", "read logs from the last offset time (eg: --offset=10s, --offset=5m, --offset=1h)", + ) + _ = cmd.App.BindPFlag("offset", cmd.Flags().Lookup("offset")) + + cmd.ParseFlags(os.Args) +} + +func logsCmdCheckFlags(cmd *cmdpkg.Command) error { + filter, err := cmd.Flags().GetStringSlice("filter") + if err != nil { + return errors.Wrap(err, "getting filter flag") + } + + if len(filter) == 0 { + return errors.New("filter flag is required") + } + + for _, f := range filter { + switch f { + case "application", "database", "message-queue", "search-engine", "redis", "http-cache", "build", "export-db", "import-db", "export-media", "import-media": + continue + default: + return errors.Errorf(`invalid filter value: %s +Valid values are: + application + database + message-queue + search-engine + redis + http-cache + build + export-db + import-db + export-media + import-media`, f) + } + } + + // the offset should not be longer than 1 day + val, _ := cmd.Flags().GetString("offset") + offset, err := time.ParseDuration(val) + if err != nil { + return errors.Wrap(err, "getting offset flag") + } + + if offset > time.Duration(24*time.Hour) { + return errors.New("offset should not be longer than 24h") + } + + if offset < 0 { + return errors.New("offset should be a positive value") + } + + return nil +} diff --git a/cmd/local/local.go b/cmd/local/local.go new file mode 100644 index 0000000..503bc55 --- /dev/null +++ b/cmd/local/local.go @@ -0,0 +1,88 @@ +package local + +import ( + "github.com/pkg/errors" + "github.com/spf13/cobra" + + cmdpkg "github.com/rewardenv/reward-cloud-cli/cmd" + "github.com/rewardenv/reward-cloud-cli/internal/config" + "github.com/rewardenv/reward-cloud-cli/internal/logic" +) + +func NewCmdLocal(app *config.App) *cmdpkg.Command { + cmd := &cmdpkg.Command{ + Command: &cobra.Command{ + Use: "local", + Short: "simulate reward cloud commands locally", + Long: `simulate reward cloud commands locally`, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ( + []string, cobra.ShellCompDirective, + ) { + return nil, cobra.ShellCompDirectiveNoFileComp + }, + RunE: func(cmd *cobra.Command, args []string) error { + return cmd.Help() + }, + }, + App: app, + } + + cmd.AddCommands( + NewCmdLocalBuild(app), + NewCmdLocalDumpDockerfile(app), + ) + + return cmd +} + +func NewCmdLocalBuild(app *config.App) *cmdpkg.Command { + cmd := &cmdpkg.Command{ + Command: &cobra.Command{ + Use: "build", + Short: "build environment locally", + Long: `build environment locally`, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ( + []string, cobra.ShellCompDirective, + ) { + return nil, cobra.ShellCompDirectiveNoFileComp + }, + RunE: func(cmd *cobra.Command, args []string) error { + err := logic.NewLocalClient(app).RunCmdLocalBuild(cmd, args) + if err != nil { + return errors.Wrap(err, "running local build") + } + + return nil + }, + }, + App: app, + } + + return cmd +} + +func NewCmdLocalDumpDockerfile(app *config.App) *cmdpkg.Command { + cmd := &cmdpkg.Command{ + Command: &cobra.Command{ + Use: "dump-dockerfile", + Short: "dump the dockerfile which is used for cloud build", + Long: `dump the dockerfile which is used for cloud build`, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ( + []string, cobra.ShellCompDirective, + ) { + return nil, cobra.ShellCompDirectiveNoFileComp + }, + RunE: func(cmd *cobra.Command, args []string) error { + err := logic.NewLocalClient(app).RunCmdLocalDumpDockerfile(cmd, args) + if err != nil { + return errors.Wrap(err, "running local build") + } + + return nil + }, + }, + App: app, + } + + return cmd +} diff --git a/cmd/root/root.go b/cmd/root/root.go index 3f66350..0b624e6 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -2,13 +2,16 @@ package root import ( "fmt" + "path/filepath" + "github.com/pkg/errors" + "github.com/rewardenv/reward-cloud-cli/cmd/cache" "github.com/rewardenv/reward-cloud-cli/cmd/context" "github.com/rewardenv/reward-cloud-cli/cmd/env" "github.com/rewardenv/reward-cloud-cli/cmd/info" + "github.com/rewardenv/reward-cloud-cli/cmd/local" "github.com/rewardenv/reward-cloud-cli/cmd/portForward" - "path/filepath" "github.com/rewardenv/reward/pkg/util" "github.com/spf13/cobra" @@ -68,6 +71,7 @@ func NewCmdRoot(conf *config.App) *cmdpkg.Command { shell.NewCmdShell(conf), portForward.NewCmdPortForward(conf), env.NewCmdEnv(conf), + local.NewCmdLocal(conf), info.NewCmdInfo(conf), ) diff --git a/go.mod b/go.mod index 7c1a2d0..e6dab30 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,9 @@ module github.com/rewardenv/reward-cloud-cli -go 1.19 - -//replace github.com/rewardenv/reward-cloud-sdk-go v0.1.3 => ../reward-cloud-sdk-go +go 1.22 require ( + github.com/Masterminds/sprig/v3 v3.2.3 github.com/charmbracelet/bubbles v0.16.1 github.com/charmbracelet/bubbletea v0.24.1 github.com/charmbracelet/lipgloss v0.7.1 @@ -12,7 +11,6 @@ require ( github.com/jedib0t/go-pretty/v6 v6.4.4 github.com/pkg/errors v0.9.1 github.com/rewardenv/reward v0.4.0-beta3 - github.com/rewardenv/reward-cloud-sdk-go v0.2.0 github.com/sirupsen/logrus v1.9.0 github.com/spf13/afero v1.9.3 github.com/spf13/cobra v1.6.1 @@ -26,6 +24,8 @@ require ( require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Microsoft/go-winio v0.6.0 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect @@ -37,7 +37,10 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/huandu/xstrings v1.4.0 // indirect + github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect @@ -45,7 +48,9 @@ require ( github.com/mattn/go-isatty v0.0.18 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect @@ -57,6 +62,7 @@ require ( github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect + github.com/shopspring/decimal v1.3.1 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect diff --git a/go.sum b/go.sum index c9207ee..5aeb731 100644 --- a/go.sum +++ b/go.sum @@ -40,6 +40,12 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25 github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= +github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= @@ -79,6 +85,7 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -126,8 +133,10 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -142,7 +151,10 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= @@ -152,8 +164,14 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -168,9 +186,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -183,15 +203,23 @@ github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRC github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b h1:1XF24mVaiu7u+CFywTdcDo2ie1pzzhwjt6RHqzpMU34= github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= @@ -215,18 +243,21 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rewardenv/reward v0.4.0-beta3 h1:HORz5IMHRtQS0PBtkvwoVDHEbcQ3Clj2inpQEkUpGzY= github.com/rewardenv/reward v0.4.0-beta3/go.mod h1:XrJSe7BceERfeH1voWpLMCIlWET8PRBr+PqvlrQvYtA= -github.com/rewardenv/reward-cloud-sdk-go v0.2.0 h1:Ah6VhelLadcCvSO8Ptj4xh59et1mQyeuQaPUy4K9V2I= -github.com/rewardenv/reward-cloud-sdk-go v0.2.0/go.mod h1:K+l2LaJ07o8wnOOe/9B6SfKBU3lTb1iiAeyrC+KK3O4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= @@ -258,6 +289,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/david_mbuvi/go_asterisks v0.0.0-20221114073100-4669d8bedcbe h1:XGTTqgiG7bdDYBNmyJ2gj7mEfMAFcTttIUNrNyDNQac= gitlab.com/david_mbuvi/go_asterisks v0.0.0-20221114073100-4669d8bedcbe/go.mod h1:pzi8WFRQpQ0+S6X7z/mm4FrCY72CK8a4UThn7JgPDzc= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -272,7 +304,9 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -308,6 +342,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -341,6 +376,8 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -362,6 +399,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -399,13 +437,18 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -414,12 +457,15 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -469,6 +515,7 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -568,16 +615,20 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -592,6 +643,7 @@ k8s.io/client-go v0.27.2/go.mod h1:tY0gVmUsHrAmjzHX9zs7eCjxcBsf8IiNe7KQ52biTcQ= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= +k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/hack/main.py b/hack/main.py new file mode 100644 index 0000000..aa6d781 --- /dev/null +++ b/hack/main.py @@ -0,0 +1,41 @@ +import sys +import argparse +from pathlib import Path +import ruamel.yaml + +parser = argparse.ArgumentParser() +parser.add_argument("-i", "--input", help="input file in yaml format", required=True, type=argparse.FileType('r')) +parser.add_argument("-o", "--output", help="output file in yaml format, defaults to output.yaml", default="reward-api.yaml", type=argparse.FileType('w')) + +args = parser.parse_args() + +in_file = args.input +out_file = args.output + +yaml = ruamel.yaml.YAML() +yaml.indent(mapping=2, sequence=4, offset=2) +yaml.preserve_quotes = True +data = yaml.load(in_file) + +delete = [] + + +def rm_merge(d, s): + if isinstance(d, dict): + if s in d: + del d[s] + for k in list(d.keys()): + if str(k).find(s) != -1: + del d[k] + else: + rm_merge(d[k], s) + elif isinstance(d, list): + for item in d: + rm_merge(item, s) + + +rm_merge(data, 'application/ld+json') +rm_merge(data, '.jsonld') +rm_merge(data, 'application/jsonld') + +yaml.dump(data, out_file) diff --git a/hack/requirements.txt b/hack/requirements.txt new file mode 100644 index 0000000..4c0f633 --- /dev/null +++ b/hack/requirements.txt @@ -0,0 +1 @@ +ruamel.yaml \ No newline at end of file diff --git a/internal/config/app.go b/internal/config/app.go index c3960f7..2659590 100644 --- a/internal/config/app.go +++ b/internal/config/app.go @@ -4,9 +4,8 @@ import ( "container/list" "context" "fmt" - "github.com/pkg/errors" - "github.com/rewardenv/reward/pkg/util" - "gopkg.in/yaml.v3" + "io" + "net/http" "os" "path" "path/filepath" @@ -14,10 +13,17 @@ import ( "strings" "github.com/hashicorp/go-version" - "github.com/rewardenv/reward-cloud-sdk-go/rewardcloud" + "github.com/pkg/errors" + "github.com/rewardenv/reward/pkg/util" log "github.com/sirupsen/logrus" "github.com/spf13/afero" "github.com/spf13/viper" + "gopkg.in/yaml.v3" + + "github.com/rewardenv/reward-cloud-cli/internal/globals" + "github.com/rewardenv/reward-cloud-cli/internal/shell" + "github.com/rewardenv/reward-cloud-cli/internal/templates" + "github.com/rewardenv/reward-cloud-cli/pkg/api/rewardcloud" ) // FS is the implementation of Afero Filesystem. It's a filesystem wrapper and used for testing. @@ -29,18 +35,20 @@ type App struct { parentAppName string token string TmpFiles *list.List + Templates *templates.Client RewardCloud *rewardcloud.APIClient + Shell shell.Shell } -func New(name, parentAppName, ver string) *App { +func New() *App { a := &App{ Viper: viper.GetViper(), - appName: name, - parentAppName: parentAppName, + appName: globals.APPNAME, + parentAppName: globals.PARENTAPPNAME, TmpFiles: list.New(), } - a.SetDefault(fmt.Sprintf("%s_%s_version", parentAppName, name), version.Must(version.NewVersion(ver)).String()) + a.SetDefault(fmt.Sprintf("%s_%s_version", globals.PARENTAPPNAME, globals.APPNAME), version.Must(version.NewVersion(globals.VERSION)).String()) return a } @@ -48,9 +56,11 @@ func New(name, parentAppName, ver string) *App { func (a *App) Cleanup() error { var err error for e := a.TmpFiles.Front(); e != nil; e = e.Next() { - err2 := os.Remove(e.Value.(string)) - if err2 != nil { - err = err2 + if val, ok := e.Value.(string); ok { + err2 := os.Remove(val) + if err2 != nil { + err = err2 + } } } @@ -88,8 +98,11 @@ func (a *App) Init() *App { a.SetDefault(fmt.Sprintf("%s_config_file", a.ConfigPrefix()), filepath.Join(a.AppHomeDir(), "config.yml")) - // Cloud API App - a.SetDefault(fmt.Sprintf("%s_endpoint", a.ConfigPrefix()), "rewardcloud.itg.cloud") + // Cloud API Endpoint + a.SetDefault(fmt.Sprintf("%s_endpoint", a.ConfigPrefix()), "console.reward.sh") + + // Cloud API Cli Token + a.SetDefault(fmt.Sprintf("%s_cli_token", a.ConfigPrefix()), globals.CLITOKEN) a.AddConfigPath(".") @@ -124,14 +137,20 @@ func (a *App) Init() *App { } conf := &rewardcloud.Configuration{ UserAgent: "reward-cloud-cli", - Debug: false, - Servers: endpoint, + DefaultHeader: map[string]string{ + "cli-token": a.CliTokenHeader(), + }, + Debug: false, + Servers: endpoint, OperationServers: map[string]rewardcloud.ServerConfigurations{ "default": endpoint, }, } a.RewardCloud = rewardcloud.NewAPIClient(conf) + a.Templates = templates.New() + a.Shell = shell.NewLocalShellWithOpts() + return a } @@ -278,3 +297,20 @@ func (a *App) ReadConfig() (*Config, error) { return conf, nil } + +func (a *App) CliTokenHeader() string { + return a.GetString(fmt.Sprintf("%s_cli_token", a.ConfigPrefix())) +} + +func (a *App) CheckStatus(res *http.Response) ([]byte, error) { + out, err := io.ReadAll(res.Body) + if err != nil { + return nil, errors.Wrap(err, "failed to read message body") + } + + if res.StatusCode < 200 || res.StatusCode > 399 { + return nil, errors.Errorf("http error: status code: %d, body: %s", res.StatusCode, string(out)) + } + + return out, nil +} diff --git a/internal/globals/globals.go b/internal/globals/globals.go new file mode 100644 index 0000000..25450dc --- /dev/null +++ b/internal/globals/globals.go @@ -0,0 +1,8 @@ +package globals + +var ( + APPNAME = "cloud" + PARENTAPPNAME = "reward" + VERSION = "v0.0.1" + CLITOKEN = "token" +) diff --git a/internal/logic/client.go b/internal/logic/client.go index b520991..2c4bac3 100644 --- a/internal/logic/client.go +++ b/internal/logic/client.go @@ -4,15 +4,18 @@ import ( "context" "encoding/base64" "fmt" + "os" + "path/filepath" + "strconv" + "strings" + "github.com/pkg/errors" + "github.com/rewardenv/reward/pkg/util" + "github.com/rewardenv/reward-cloud-cli/internal/config" "github.com/rewardenv/reward-cloud-cli/internal/kubectl" "github.com/rewardenv/reward-cloud-cli/internal/shell" - "github.com/rewardenv/reward-cloud-sdk-go/rewardcloud" - "github.com/rewardenv/reward/pkg/util" - "os" - "path/filepath" - "strconv" + "github.com/rewardenv/reward-cloud-cli/pkg/api/rewardcloud" ) type Client struct { @@ -57,7 +60,7 @@ func (c *Client) getCluster(ctx context.Context) (*rewardcloud.Cluster, error) { } clusterID := GetIDFromPath(env.GetCluster()) - cluster, _, err := c.RewardCloud.ClusterApi.ApiClustersIdGet(ctx, clusterID).Execute() + cluster, _, err := c.RewardCloud.ClusterAPI.ApiClustersIdGet(ctx, clusterID).Execute() if err != nil { return nil, errors.Wrap(err, "getting cluster") } @@ -67,7 +70,7 @@ func (c *Client) getCluster(ctx context.Context) (*rewardcloud.Cluster, error) { func (c *Client) getClusterByID(ctx context.Context, id int32) (*rewardcloud.Cluster, error) { idstr := strconv.FormatInt(int64(id), 10) - cluster, _, err := c.RewardCloud.ClusterApi.ApiClustersIdGet(ctx, idstr).Execute() + cluster, _, err := c.RewardCloud.ClusterAPI.ApiClustersIdGet(ctx, idstr).Execute() if err != nil { return nil, errors.Wrap(err, "getting cluster") } @@ -76,7 +79,7 @@ func (c *Client) getClusterByID(ctx context.Context, id int32) (*rewardcloud.Clu } func (c *Client) getOrganizationByID(ctx context.Context, id string) (name string, err error) { - org, resp, err := c.RewardCloud.OrganisationApi.ApiOrganisationsIdGet(ctx, id).Execute() + org, resp, err := c.RewardCloud.OrganisationAPI.ApiOrganisationsIdGet(ctx, id).Execute() _ = resp if err != nil { return "", errors.Wrap(err, "getting organization") @@ -86,7 +89,7 @@ func (c *Client) getOrganizationByID(ctx context.Context, id string) (name strin } func (c *Client) getTeamByID(ctx context.Context, id string) (name string, err error) { - team, _, err := c.RewardCloud.TeamApi.ApiTeamsIdGet(ctx, id).Execute() + team, _, err := c.RewardCloud.TeamAPI.ApiTeamsIdGet(ctx, id).Execute() if err != nil { return "", errors.Wrap(err, "getting team") } @@ -109,7 +112,7 @@ func (c *Client) getProject(ctx context.Context) (*rewardcloud.ProjectProjectOut } func (c *Client) getProjectNameByID(ctx context.Context, id string) (name string, err error) { - project, _, err := c.RewardCloud.ProjectApi.ApiProjectsIdGet(ctx, id).Execute() + project, _, err := c.RewardCloud.ProjectAPI.ApiProjectsIdGet(ctx, id).Execute() if err != nil { return "", errors.Wrap(err, "getting project") } @@ -118,7 +121,7 @@ func (c *Client) getProjectNameByID(ctx context.Context, id string) (name string } func (c *Client) getProjectByID(ctx context.Context, id string) (get *rewardcloud.ProjectProjectOutput, err error) { - project, _, err := c.RewardCloud.ProjectApi.ApiProjectsIdGet(ctx, id).Execute() + project, _, err := c.RewardCloud.ProjectAPI.ApiProjectsIdGet(ctx, id).Execute() if err != nil { return nil, errors.Wrap(err, "getting project") } @@ -134,32 +137,33 @@ func (c *Client) getEnvironment(ctx context.Context) (*rewardcloud.EnvironmentEn environment, err := c.getEnvironmentByID(ctx, c.getRcContext(ctx).Environment) if err != nil { - return nil, errors.Wrap(err, "getting environment") + return nil, errors.Wrap(err, "getting environment by id") } return environment, nil } func (c *Client) getEnvironmentNameByID(ctx context.Context, id string) (name string, err error) { - environment, _, err := c.RewardCloud.EnvironmentApi.ApiEnvironmentsIdGet(ctx, id).Execute() + environment, _, err := c.RewardCloud.EnvironmentAPI.ApiEnvironmentsIdGet(ctx, id).Execute() if err != nil { - return "", errors.Wrap(err, "getting environment") + return "", errors.Wrap(err, "getting environment from api") } return environment.GetName(), nil } func (c *Client) getEnvironmentByID(ctx context.Context, id string) (*rewardcloud.EnvironmentEnvironmentOutput, error) { - environment, _, err := c.RewardCloud.EnvironmentApi.ApiEnvironmentsIdGet(ctx, id).Execute() + environment, resp, err := c.RewardCloud.EnvironmentAPI.ApiEnvironmentsIdGet(ctx, id).Execute() + _ = resp if err != nil { - return nil, errors.Wrap(err, "getting environment") + return nil, errors.Wrap(err, "getting environment from api") } return environment, nil } func (c *Client) getStateNameByID(ctx context.Context, id string) (string, error) { - state, _, err := c.RewardCloud.StateApi.ApiStatesIdGet(ctx, id).Execute() + state, _, err := c.RewardCloud.StateAPI.ApiStatesIdGet(ctx, id).Execute() if err != nil { return "", errors.Wrap(err, "getting state") } @@ -235,3 +239,177 @@ func (c *Client) prepareContext(ctx context.Context) (context.Context, error) { return context.WithValue(ctx, config.ContextKey{}, rcContext), nil } + +func (c *Client) getBuildEnvVars(ctx context.Context) (map[string]string, error) { + buildEnvVars := make(map[string]string) + + // TODO: Fetch organization, team build variables + project, err := c.getProject(ctx) + if err != nil { + return nil, errors.Wrap(err, "getting project") + } + + projectEnvVars := project.GetProjectEnvVar() + projectEnvVarsMap, err := c.envVarsToMap(ctx, projectEnvVars, []string{"build", "all"}) + if err != nil { + return nil, errors.Wrap(err, "getting project env vars") + } + + environment, err := c.getEnvironment(ctx) + if err != nil { + return nil, errors.Wrap(err, "getting environment") + } + + envVars := environment.GetEnvVar() + environmentEnvVarsMap, err := c.envVarsToMap(ctx, envVars, []string{"build", "all"}) + if err != nil { + return nil, errors.Wrap(err, "getting environment env vars") + } + _, _ = projectEnvVarsMap, environmentEnvVarsMap + + for _, v := range envVars { + t := v.GetEnvVarType() + envVarType, _, err := c.RewardCloud.EnvVarTypeAPI.ApiEnvVarTypesIdGet(ctx, GetIDFromPath(t)).Execute() + if err != nil { + continue + } + if envVarType.GetCodeName() == "build" || envVarType.GetCodeName() == "all" { + buildEnvVars[v.GetKey()] = v.GetValue() + } + } + + return buildEnvVars, nil +} + +func (c *Client) envVarsToMap(ctx context.Context, envVars interface{}, t []string) (map[string]string, error) { + ids, err := c.getEnvVarTypeIDs(ctx, t) + if err != nil { + return nil, errors.Wrap(err, "getting env var type ids") + } + + m := make(map[string]string) + switch t := envVars.(type) { + case []rewardcloud.EnvironmentEnvVarEnvironmentOutput: + for _, v := range t { + if ContainsAny(ids, fmt.Sprintf("%v", GetIDFromPath(v.GetEnvVarType()))) { + m[v.GetKey()] = v.GetValue() + } + } + case []rewardcloud.ProjectEnvVarProjectOutput: + for _, v := range t { + if ContainsAny(ids, fmt.Sprintf("%v", GetIDFromPath(v.GetEnvVarType()))) { + m[v.GetKey()] = v.GetValue() + } + } + case []rewardcloud.TeamEnvVarTeamOutput: + for _, v := range t { + if ContainsAny(ids, fmt.Sprintf("%v", GetIDFromPath(v.GetEnvVarType()))) { + m[v.GetKey()] = v.GetValue() + } + } + case []rewardcloud.OrganisationEnvVarOrganisationOutput: + for _, v := range t { + if ContainsAny(ids, fmt.Sprintf("%v", GetIDFromPath(v.GetEnvVarType()))) { + m[v.GetKey()] = v.GetValue() + } + } + } + return m, nil +} + +func (c *Client) getProjectType(ctx context.Context) (string, error) { + project, err := c.getProject(ctx) + if err != nil { + return "", errors.Wrap(err, "getting project") + } + + // Get project type version + projectTypeVersion, resp, err := c.RewardCloud.ProjectTypeVersionAPI.ApiProjectTypeVersionsIdGet(ctx, GetIDFromPath(project.GetProjectTypeVersion())).Execute() + if err != nil { + _ = resp + return "", errors.Wrap(err, "getting project type version by id") + } + + // Get project type + projectType, resp, err := c.RewardCloud.ProjectTypeAPI.ApiProjectTypesIdGet(ctx, GetIDFromPath(projectTypeVersion.GetProjectType())).Execute() + if err != nil { + _ = resp + return "", errors.Wrap(err, "getting project type by id") + } + + projectTypeName := projectType.GetName() + if projectTypeName == "" { + return "", errors.New("project type name is empty") + } + + return strings.ToLower(projectTypeName), nil +} + +func (c *Client) getMainComponentVersion(ctx context.Context) (string, error) { + environment, err := c.getEnvironment(ctx) + if err != nil { + return "", errors.Wrap(err, "getting project") + } + + components := environment.GetEnvironmentComponent() + + projectTypeName, err := c.getProjectType(ctx) + if err != nil { + return "", errors.Wrap(err, "getting project type") + } + + mainComponentName := "" + switch projectTypeName { + case "magento", "wordpress", "shopware": + mainComponentName = "php" + case "magento-pwa", "shopware-pwa": + mainComponentName = "node" + default: + return "", errors.New("project type not supported") + } + + mainComponentVersion, err := c.getComponentVersion(ctx, components, mainComponentName) + if err != nil { + return "", errors.Wrap(err, "getting php component version") + } + + return mainComponentVersion, nil +} + +func (c *Client) getComponentVersion(ctx context.Context, components []rewardcloud.EnvironmentComponentEnvironmentOutput, selected string) (string, error) { + for _, v := range components { + cv, _, err := c.RewardCloud.ComponentVersionAPI.ApiComponentVersionsIdGet(ctx, GetIDFromPath(v.GetComponentVersion())).Execute() + if err != nil { + return "", err + } + componentID := cv.GetComponent() + component, _, err := c.RewardCloud.ComponentAPI.ApiComponentsIdGet(ctx, GetIDFromPath(componentID)).Execute() + if err != nil { + return "", err + } + + if component.GetName() == selected { + return cv.GetVersion(), nil + } + } + + return "", errors.New("component not found") +} + +func (c *Client) getEnvVarTypeIDs(ctx context.Context, t []string) ([]string, error) { + var ids []string + envVarTypes, _, err := c.RewardCloud.EnvVarTypeAPI.ApiEnvVarTypesGetCollection(ctx).Execute() + if err != nil { + return nil, errors.Wrap(err, "getting env var types") + } + + for _, v := range envVarTypes { + for _, tt := range t { + if v.GetCodeName() == tt { + ids = append(ids, fmt.Sprintf("%v", v.GetId())) + } + } + } + + return ids, nil +} diff --git a/internal/logic/context.go b/internal/logic/context.go index 3d14cef..72b2994 100644 --- a/internal/logic/context.go +++ b/internal/logic/context.go @@ -3,16 +3,18 @@ package logic import ( "context" "fmt" + "reflect" + "strconv" + "strings" + "github.com/jedib0t/go-pretty/v6/table" "github.com/pkg/errors" - "github.com/rewardenv/reward-cloud-cli/internal/config" "github.com/rewardenv/reward/pkg/util" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "gopkg.in/yaml.v3" - "reflect" - "strconv" - "strings" + + "github.com/rewardenv/reward-cloud-cli/internal/config" ) type ContextClient struct { @@ -387,7 +389,7 @@ func (c *ContextClient) saveContext(conf *config.Config) error { func (c *ContextClient) selectOrganization(ctx context.Context) (_ context.Context, name string, err error) { rcContext := c.getRcContext(ctx) - orgs, _, err := c.RewardCloud.OrganisationApi.ApiOrganisationsGetCollection(ctx).Execute() + orgs, _, err := c.RewardCloud.OrganisationAPI.ApiOrganisationsGetCollection(ctx).Execute() if err != nil { return ctx, "", errors.Wrap(err, "getting organizations") } @@ -433,9 +435,10 @@ func (c *ContextClient) selectTeam(ctx context.Context) (_ context.Context, name return ctx, "", errors.Wrap(err, "checking organization") } - teams, _, err := c.RewardCloud.TeamApi.ApiTeamsGetCollection(ctx). + teams, resp, err := c.RewardCloud.TeamAPI.ApiTeamsGetCollection(ctx). Organisation(rcContext.Organization). Execute() + _ = resp if err != nil { return ctx, "", errors.Wrap(err, "getting teams") } @@ -483,10 +486,11 @@ func (c *ContextClient) selectProject(ctx context.Context) (_ context.Context, n return ctx, "", errors.Wrap(err, "checking team") } - projects, _, err := c.RewardCloud.ProjectApi.ApiProjectsGetCollection(ctx). + projects, resp, err := c.RewardCloud.ProjectAPI.ApiProjectsGetCollection(ctx). TeamOrganisationId(rcContext.OrganizationID()). Team(rcContext.Team). Execute() + _ = resp if err != nil { return ctx, "", errors.Wrap(err, "getting projects") } @@ -540,7 +544,7 @@ func (c *ContextClient) selectEnvironment(ctx context.Context) (_ context.Contex return ctx, "", errors.Wrap(err, "checking project") } - environments, _, err := c.RewardCloud.EnvironmentApi.ApiEnvironmentsGetCollection(ctx). + environments, _, err := c.RewardCloud.EnvironmentAPI.ApiEnvironmentsGetCollection(ctx). Project(rcContext.Project). ProjectTeamId(rcContext.TeamID()). Execute() diff --git a/internal/logic/env.go b/internal/logic/env.go index 28758b9..067b979 100644 --- a/internal/logic/env.go +++ b/internal/logic/env.go @@ -1,19 +1,26 @@ package logic import ( + "bufio" "context" + "encoding/base64" + "encoding/json" "fmt" - tea "github.com/charmbracelet/bubbletea" - "github.com/pkg/errors" - "github.com/rewardenv/reward-cloud-cli/internal/config" - "github.com/rewardenv/reward-cloud-cli/internal/ui" - "github.com/rewardenv/reward-cloud-sdk-go/rewardcloud" - log "github.com/sirupsen/logrus" - "github.com/spf13/cobra" + "net/http" + "net/url" "os" "strconv" "strings" "time" + + tea "github.com/charmbracelet/bubbletea" + "github.com/pkg/errors" + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + + "github.com/rewardenv/reward-cloud-cli/internal/config" + "github.com/rewardenv/reward-cloud-cli/internal/ui" + "github.com/rewardenv/reward-cloud-cli/pkg/api/rewardcloud" ) type EnvClient struct { @@ -39,11 +46,12 @@ func (c *EnvClient) RunCmdEnvBuildAndDeploy(cmd *cobra.Command, args []string) e Id: env.Id, } - // TODO: Check error when Lang fixes the build and deploy endpoint - _, _, _ = c.RewardCloud.EnvironmentApi.ApiEnvironmentsIdbuildAndDeployPatch(ctx, c.getRcContext(ctx).Environment).EnvironmentEnvironmentOutput(patch).Execute() - //if err != nil { - // return errors.Wrap(err, "building environment") - //} + bdp, resp, err := c.RewardCloud.EnvironmentAPI.ApiEnvironmentsIdBuildAndDeployPatch(ctx, c.getRcContext(ctx).EnvironmentID()).EnvironmentEnvironmentOutput(patch).Execute() + if err != nil { + _ = bdp + _ = resp + return errors.Wrap(err, "building environment") + } p := tea.NewProgram(ui.NewModel("Building environment...")) @@ -51,7 +59,7 @@ func (c *EnvClient) RunCmdEnvBuildAndDeploy(cmd *cobra.Command, args []string) e // Initial delay initialized := false for { - pause := time.Duration(3000) * time.Millisecond + pause := 3 * time.Second time.Sleep(pause) ctx, err := NewLoginClient(c.App).CheckTokenAndLogin(ctx) @@ -102,11 +110,11 @@ func (c *EnvClient) RunCmdEnvExportDB(cmd *cobra.Command, args []string) error { } stripDatabase := rewardcloud.NewNullableBool(rewardcloud.PtrBool(c.GetBool("strip_database"))) - post := rewardcloud.EnvironmentEnvironmentInput{ + post := rewardcloud.EnvironmentEnvironmentOutput{ IsStripDatabase: *stripDatabase, } - _, _, err = c.RewardCloud.EnvironmentApi.ApiEnvironmentsIdexportDatabasePut(ctx, c.getRcContext(ctx).Environment).EnvironmentEnvironmentInput(post).Execute() + _, _, err = c.RewardCloud.EnvironmentAPI.ApiEnvironmentsIdExportDatabasePut(ctx, c.getRcContext(ctx).EnvironmentID()).EnvironmentEnvironmentOutput(post).Execute() if err != nil { return errors.Wrap(err, "exporting database") } @@ -146,7 +154,7 @@ func (c *EnvClient) RunCmdEnvExportDB(cmd *cobra.Command, args []string) error { return errors.Wrap(err, "getting data type id") } - res, _, err := c.RewardCloud.ExportedDataApi.ApiExportedDatasGetCollection(ctx). + res, _, err := c.RewardCloud.ExportedDataAPI.ApiExportedDatasGetCollection(ctx). Environment(c.getRcContext(ctx).Environment). DataTransferDataType(datatypeID). OrderCreatedAt("desc"). @@ -188,9 +196,9 @@ func (c *EnvClient) RunCmdEnvExportMedia(cmd *cobra.Command, args []string) erro return errors.Wrap(err, "preparing context") } - post := rewardcloud.EnvironmentEnvironmentInput{} + post := rewardcloud.EnvironmentEnvironmentOutput{} - _, _, err = c.RewardCloud.EnvironmentApi.ApiEnvironmentsIdexportMediaPut(ctx, c.getRcContext(ctx).Environment).EnvironmentEnvironmentInput(post).Execute() + _, _, err = c.RewardCloud.EnvironmentAPI.ApiEnvironmentsIdExportMediaPut(ctx, c.getRcContext(ctx).EnvironmentID()).EnvironmentEnvironmentOutput(post).Execute() if err != nil { return errors.Wrap(err, "exporting media") } @@ -230,7 +238,7 @@ func (c *EnvClient) RunCmdEnvExportMedia(cmd *cobra.Command, args []string) erro return errors.Wrap(err, "getting data type id") } - res, _, err := c.RewardCloud.ExportedDataApi.ApiExportedDatasGetCollection(ctx). + res, _, err := c.RewardCloud.ExportedDataAPI.ApiExportedDatasGetCollection(ctx). Environment(c.getRcContext(ctx).Environment). DataTransferDataType(datatypeID). OrderCreatedAt("desc"). @@ -265,7 +273,7 @@ func (c *EnvClient) RunCmdEnvExportMedia(cmd *cobra.Command, args []string) erro } func (c *EnvClient) GetDatatransferDataTypeID(ctx context.Context, s string) (string, error) { - dts, _, err := c.RewardCloud.DataTransferDataTypeApi.ApiDataTransferDataTypesGetCollection(ctx).Execute() + dts, _, err := c.RewardCloud.DataTransferDataTypeAPI.ApiDataTransferDataTypesGetCollection(ctx).Execute() if err != nil { return "", errors.Wrap(err, "getting data transfer data types") } @@ -279,3 +287,79 @@ func (c *EnvClient) GetDatatransferDataTypeID(ctx context.Context, s string) (st return id, nil } + +func (c *EnvClient) RunCmdLogs(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + + ctx, err := NewLoginClient(c.App).CheckTokenAndLogin(ctx) + if err != nil { + return errors.Wrap(err, "logging in") + } + + environment, err := c.getEnvironment(ctx) + if err != nil { + return errors.Wrap(err, "getting environment") + } + + f := c.GetStringSlice("filter") + filter := struct { + Filters []string `json:"filters"` + }{} + for _, f := range f { + filter.Filters = append(filter.Filters, fmt.Sprintf("component=%s", f)) + } + + jsonFilters, err := json.Marshal(filter) + if err != nil { + return errors.Wrap(err, "marshaling filters") + } + + logstream, resp, err := c.RewardCloud.EnvironmentAPI.ApiEnvironmentsIdLogsGet(ctx, environment.GetId()). + // XFilters(`{"filters":["component=application"]}`). + XFilters(string(jsonFilters)). + XOffset(int32(c.GetDuration("offset").Seconds())). + Execute() + if err != nil { + _ = resp + return errors.Wrap(err, "getting log stream") + } + + topic := url.QueryEscape(logstream.GetTopic()) + + r, err := http.NewRequestWithContext(ctx, "GET", c.Endpoint()+"/.well-known/mercure?topic="+topic, nil) + if err != nil { + return errors.Wrap(err, "failed to create request") + } + + r.Header.Set("Authorization", "Bearer "+logstream.GetToken()) + + client := &http.Client{} + res, err := client.Do(r) + if err != nil { + return errors.Wrap(err, "failed to send request") + } + defer func() { _ = res.Body.Close() }() + + log.Info("Receiving logs from stream, press Ctrl+C to exit...") + + scanner := bufio.NewScanner(res.Body) + for { + if !scanner.Scan() { + break + } + + data := strings.TrimLeft(scanner.Text(), `data: `) + foo := struct { + Data string `json:"data"` + }{} + _ = json.Unmarshal([]byte(data), &foo) + if foo.Data != "" { + decoded, _ := base64.StdEncoding.DecodeString(foo.Data) + if decoded != nil { + fmt.Printf("%s\n", decoded) + } + } + } + + return nil +} diff --git a/internal/logic/info.go b/internal/logic/info.go index 87ca278..18310b6 100644 --- a/internal/logic/info.go +++ b/internal/logic/info.go @@ -1,13 +1,14 @@ package logic import ( - "context" "encoding/base64" + "net/url" + "github.com/jedib0t/go-pretty/v6/table" "github.com/pkg/errors" - "github.com/rewardenv/reward-cloud-cli/internal/config" "github.com/spf13/cobra" - "net/url" + + "github.com/rewardenv/reward-cloud-cli/internal/config" ) type InfoClient struct { @@ -19,7 +20,7 @@ func NewInfoClient(c *config.App) *InfoClient { } func (c *InfoClient) RunCmdInfo(cmd *cobra.Command, args []string) error { - ctx := context.Background() + ctx := cmd.Context() ctx, err := NewLoginClient(c.App).CheckTokenAndLogin(ctx) if err != nil { @@ -44,18 +45,18 @@ func (c *InfoClient) RunCmdInfo(cmd *cobra.Command, args []string) error { accessID := environment.GetEnvironmentAccess() if accessID != "" { - access, resp, err := c.RewardCloud.EnvironmentAccessApi.ApiEnvironmentAccessesIdGet(ctx, GetIDFromPath(accessID)).Execute() + access, resp, err := c.RewardCloud.EnvironmentAccessAPI.ApiEnvironmentAccessesIdGet(ctx, GetIDFromPath(accessID)).Execute() _ = resp if err != nil { return errors.Wrap(err, "getting accesses") } - frontend, _, err := c.RewardCloud.EnvironmentAccessFrontendApi.ApiEnvironmentAccessFrontendsIdGet(ctx, GetIDFromPath(access.GetFrontend())).Execute() + frontend, _, err := c.RewardCloud.EnvironmentAccessFrontendAPI.ApiEnvironmentAccessFrontendsIdGet(ctx, GetIDFromPath(access.GetFrontend())).Execute() if err != nil { return errors.Wrap(err, "getting frontend") } - backend, _, err := c.RewardCloud.EnvironmentAccessBackendApi.ApiEnvironmentAccessBackendsIdGet(ctx, GetIDFromPath(access.GetBackend())).Execute() + backend, _, err := c.RewardCloud.EnvironmentAccessBackendAPI.ApiEnvironmentAccessBackendsIdGet(ctx, GetIDFromPath(access.GetBackend())).Execute() if err != nil { return errors.Wrap(err, "getting backend") } @@ -65,7 +66,7 @@ func (c *InfoClient) RunCmdInfo(cmd *cobra.Command, args []string) error { return errors.Wrap(err, "decoding backend password") } - devtools, _, err := c.RewardCloud.EnvironmentAccessDevToolsApi.ApiEnvironmentAccessDevToolsIdGet(ctx, GetIDFromPath(access.GetDevTools())).Execute() + devtools, _, err := c.RewardCloud.EnvironmentAccessDevToolsAPI.ApiEnvironmentAccessDevToolsIdGet(ctx, GetIDFromPath(access.GetDevTools())).Execute() if err != nil { return errors.Wrap(err, "getting devtools") } @@ -82,12 +83,12 @@ func (c *InfoClient) RunCmdInfo(cmd *cobra.Command, args []string) error { devtoolsURL.User = url.UserPassword(devtools.GetUsername(), string(devtoolsPassword)) - mailhog, _, err := c.RewardCloud.EnvironmentAccessMailhogApi.ApiEnvironmentAccessMailhogsIdGet(ctx, GetIDFromPath(access.GetMailhog())).Execute() + mailbox, _, err := c.RewardCloud.EnvironmentAccessMailboxAPI.ApiEnvironmentAccessMailboxesIdGet(ctx, GetIDFromPath(access.GetMailbox())).Execute() if err != nil { return errors.Wrap(err, "getting mailhog") } - phpmyadmin, _, err := c.RewardCloud.EnvironmentAccessDatabaseApi.ApiEnvironmentAccessDatabasesIdGet(ctx, GetIDFromPath(access.GetDatabase())).Execute() + phpmyadmin, _, err := c.RewardCloud.EnvironmentAccessDatabaseAPI.ApiEnvironmentAccessDatabasesIdGet(ctx, GetIDFromPath(access.GetDatabase())).Execute() if err != nil { return errors.Wrap(err, "getting database") } @@ -118,7 +119,7 @@ func (c *InfoClient) RunCmdInfo(cmd *cobra.Command, args []string) error { t.AppendRow(table.Row{"PHPMyAdmin URL", phpmyadminURL.String()}) t.AppendRow(table.Row{"PHPMyAdmin Username", phpmyadmin.GetUsername()}) t.AppendRow(table.Row{"PHPMyAdmin Password", string(phpmyadminPassword)}) - t.AppendRow(table.Row{"Mailhog URL", mailhog.GetUrl()}) + t.AppendRow(table.Row{"Mailbox URL", mailbox.GetUrl()}) } t.Render() diff --git a/internal/logic/local.go b/internal/logic/local.go new file mode 100644 index 0000000..feea048 --- /dev/null +++ b/internal/logic/local.go @@ -0,0 +1,121 @@ +package logic + +import ( + "bytes" + "context" + "fmt" + "os" + + "github.com/pkg/errors" + "github.com/spf13/cobra" + + "github.com/rewardenv/reward-cloud-cli/internal/config" + "github.com/rewardenv/reward-cloud-cli/internal/globals" +) + +type LocalClient struct { + *Client +} + +func NewLocalClient(c *config.App) *LocalClient { + return &LocalClient{new(c)} +} + +func (c *LocalClient) RunCmdLocalBuild(cmd *cobra.Command, args []string) error { + ctx, err := NewLoginClient(c.App).CheckTokenAndLogin(cmd.Context()) + if err != nil { + return errors.Wrap(err, "logging in") + } + + dockerfile, err := c.generateDockerfile(ctx) + if err != nil { + return err + } + + // Write dockerfile to a temporary file + tmpFile, err := os.CreateTemp(os.TempDir(), fmt.Sprintf("%s-%s-", globals.PARENTAPPNAME, globals.APPNAME)) + if err != nil { + return fmt.Errorf("failed to create temporary file: %w", err) + } + defer os.Remove(tmpFile.Name()) + + _, err = tmpFile.Write(dockerfile.Bytes()) + if err != nil { + return fmt.Errorf("failed to write to temporary file: %w", err) + } + + // + envVars, err := c.getBuildEnvVars(ctx) + if err != nil { + return errors.Wrap(err, "getting build env vars") + } + + buildArgs := []string{"build", "-f", tmpFile.Name(), "."} + for k, v := range envVars { + buildArgs = append(buildArgs, "--build-arg", fmt.Sprintf("%s=%s", k, v)) + } + out, err := c.Shell.Execute("docker", buildArgs...) + if err != nil { + return errors.Wrap(err, "building docker image") + } + + _ = out + + return nil +} + +func (c *LocalClient) RunCmdLocalDumpDockerfile(cmd *cobra.Command, args []string) error { + ctx, err := NewLoginClient(c.App).CheckTokenAndLogin(cmd.Context()) + if err != nil { + return errors.Wrap(err, "logging in") + } + + dockerfile, err := c.generateDockerfile(ctx) + if err != nil { + return err + } + + fmt.Println(dockerfile.String()) + + return nil +} + +func (c *LocalClient) generateDockerfile(ctx context.Context) (*bytes.Buffer, error) { + buf := &bytes.Buffer{} + + projectType, err := c.getProjectType(ctx) + if err != nil { + return nil, errors.Wrap(err, "getting project type") + } + + tpl, err := c.Templates.LoadTemplate("templates/build/*") + if err != nil { + return nil, errors.Wrap(err, "loading template") + } + + envVars, err := c.getBuildEnvVars(ctx) + if err != nil { + return nil, errors.Wrap(err, "getting build env vars") + } + + mainComponentVersion, err := c.getMainComponentVersion(ctx) + if err != nil { + return nil, errors.Wrap(err, "getting main component version") + + } + + data := map[string]interface{}{ + "Values": map[string]interface{}{ + "envVars": envVars, + "projectType": projectType, + "phpVersion": mainComponentVersion, + }, + } + + err = c.Templates.ExecuteTemplate(tpl, "Dockerfile.tpl", data, buf) + if err != nil { + return nil, errors.Wrap(err, "executing template") + } + + return buf, nil +} diff --git a/internal/logic/login.go b/internal/logic/login.go index de0fa1e..5bb161a 100644 --- a/internal/logic/login.go +++ b/internal/logic/login.go @@ -4,15 +4,17 @@ import ( "context" "encoding/base64" "fmt" - "github.com/pkg/errors" - "github.com/rewardenv/reward-cloud-cli/internal/config" - "github.com/rewardenv/reward-cloud-sdk-go/rewardcloud" - "github.com/rewardenv/reward/pkg/util" - log "github.com/sirupsen/logrus" + "net/http" "os" "strings" + "github.com/pkg/errors" + "github.com/rewardenv/reward/pkg/util" + log "github.com/sirupsen/logrus" "github.com/spf13/cobra" + + "github.com/rewardenv/reward-cloud-cli/internal/config" + "github.com/rewardenv/reward-cloud-cli/pkg/api/rewardcloud" ) type LoginClient struct { @@ -24,7 +26,7 @@ func NewLoginClient(c *config.App) *LoginClient { } func (c *LoginClient) RunCmdLogin(cmd *cobra.Command, args []string) error { - ctx := context.Background() + ctx := cmd.Context() _, err := c.CheckTokenAndLogin(ctx) if err != nil { @@ -100,13 +102,13 @@ func (c *LoginClient) loginWithUsernameAndPassword(ctx context.Context) (string, } } - creds := rewardcloud.Credentials{ + creds := rewardcloud.AuthenticationCredentials{ Id: rewardcloud.PtrString(id), Password: rewardcloud.PtrString(password), } ctx = context.Background() - token, _, err := c.RewardCloud.TokenApi.PostCredentialsItem(ctx).Credentials(creds).Execute() + token, _, err := c.RewardCloud.MiscellaneousAPI.PostCredentialsItem(ctx).AuthenticationCredentials(creds).Execute() if err != nil { return "", errors.Wrap(err, "getting token") } @@ -165,16 +167,10 @@ func (c *LoginClient) readToken() []byte { } func (c *LoginClient) ValidateToken(ctx context.Context) (bool, error) { - projects, _, err := c.RewardCloud.ProjectApi.ApiProjectsGetCollection(ctx).Execute() - if err != nil { - if err.Error() == ErrUnauthorized.Error() { - return false, nil - } - - return false, errors.Wrap(err, "checking token") + _, resp, _ := c.RewardCloud.ProjectAPI.ApiProjectsGetCollection(ctx).Execute() + if resp.StatusCode == http.StatusOK { + return true, nil } - _ = projects - - return true, nil + return false, nil } diff --git a/internal/logic/portForward.go b/internal/logic/portForward.go index 4ae8d8d..ae152c3 100644 --- a/internal/logic/portForward.go +++ b/internal/logic/portForward.go @@ -1,15 +1,16 @@ package logic import ( - "context" "encoding/base64" "fmt" + "path/filepath" + "github.com/jedib0t/go-pretty/v6/table" "github.com/pkg/errors" + "github.com/spf13/cobra" + "github.com/rewardenv/reward-cloud-cli/internal/config" "github.com/rewardenv/reward-cloud-cli/internal/shell" - "github.com/spf13/cobra" - "path/filepath" ) type PortForwardClient struct { @@ -21,7 +22,7 @@ func NewPortForwardClient(c *config.App) *PortForwardClient { } func (c *PortForwardClient) RunCmdPortForwardDB(cmd *cobra.Command, args []string) error { - ctx := context.Background() + ctx := cmd.Context() ctx, err := NewLoginClient(c.App).CheckTokenAndLogin(ctx) if err != nil { @@ -33,12 +34,12 @@ func (c *PortForwardClient) RunCmdPortForwardDB(cmd *cobra.Command, args []strin return errors.Wrap(err, "getting project") } - projectTypeVersion, _, err := c.RewardCloud.ProjectTypeVersionApi.ApiProjectTypeVersionsIdGet(ctx, GetIDFromPath(project.GetProjectTypeVersion())).Execute() + projectTypeVersion, _, err := c.RewardCloud.ProjectTypeVersionAPI.ApiProjectTypeVersionsIdGet(ctx, GetIDFromPath(project.GetProjectTypeVersion())).Execute() if err != nil { return errors.Wrap(err, "getting project type version") } - _, _, err = c.RewardCloud.ProjectTypeApi.ApiProjectTypesIdGet(ctx, GetIDFromPath(projectTypeVersion.GetProjectType())).Execute() + _, _, err = c.RewardCloud.ProjectTypeAPI.ApiProjectTypesIdGet(ctx, GetIDFromPath(projectTypeVersion.GetProjectType())).Execute() if err != nil { return errors.Wrap(err, "getting project type") } @@ -48,7 +49,7 @@ func (c *PortForwardClient) RunCmdPortForwardDB(cmd *cobra.Command, args []strin return errors.Wrap(err, "getting environment") } - state, _, err := c.RewardCloud.StateApi.ApiStatesIdGet(ctx, GetIDFromPath(environment.GetState())).Execute() + state, _, err := c.RewardCloud.StateAPI.ApiStatesIdGet(ctx, GetIDFromPath(environment.GetState())).Execute() if state.GetName() != "Running" { return errors.Errorf("environment is not running: state = %s", state.GetName()) } @@ -78,12 +79,12 @@ func (c *PortForwardClient) RunCmdPortForwardDB(cmd *cobra.Command, args []strin return errors.New("cannot find db pod") } - access, _, err := c.RewardCloud.EnvironmentAccessApi.ApiEnvironmentAccessesIdGet(ctx, GetIDFromPath(environment.GetEnvironmentAccess())).Execute() + access, _, err := c.RewardCloud.EnvironmentAccessAPI.ApiEnvironmentAccessesIdGet(ctx, GetIDFromPath(environment.GetEnvironmentAccess())).Execute() if err != nil { return errors.Wrap(err, "getting accesses") } - database, _, err := c.RewardCloud.EnvironmentAccessDatabaseApi.ApiEnvironmentAccessDatabasesIdGet(ctx, GetIDFromPath(access.GetDatabase())).Execute() + database, _, err := c.RewardCloud.EnvironmentAccessDatabaseAPI.ApiEnvironmentAccessDatabasesIdGet(ctx, GetIDFromPath(access.GetDatabase())).Execute() if err != nil { return errors.Wrap(err, "getting database") } diff --git a/internal/logic/prerequisites.go b/internal/logic/prerequisites.go new file mode 100644 index 0000000..7c92513 --- /dev/null +++ b/internal/logic/prerequisites.go @@ -0,0 +1,26 @@ +package logic + +import ( + "github.com/pkg/errors" + + "github.com/rewardenv/reward-cloud-cli/internal/config" + "github.com/rewardenv/reward-cloud-cli/internal/shell" +) + +type PrerequisitesClient struct { + *Client +} + +func NewPrerequisitesClient(c *config.App) *PrerequisitesClient { + return &PrerequisitesClient{new(c)} +} + +// Check if kubectl oidc-login plugin is installed +func (c *PrerequisitesClient) Check() error { + _, err := c.Kubectl.RunCommand([]string{"oidc-login", "--help"}, shell.WithSuppressOutput(true)) + if err != nil { + return errors.Wrap(err, "please install oidc-plugin for kubectl: https://github.com/int128/kubelogin?tab=readme-ov-file#setup") + } + + return nil +} diff --git a/internal/logic/shell.go b/internal/logic/shell.go index f73fb91..62a7667 100644 --- a/internal/logic/shell.go +++ b/internal/logic/shell.go @@ -1,14 +1,16 @@ package logic import ( - "context" "fmt" + "path/filepath" + "strings" + "github.com/pkg/errors" + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + "github.com/rewardenv/reward-cloud-cli/internal/config" "github.com/rewardenv/reward-cloud-cli/internal/shell" - "github.com/spf13/cobra" - "path/filepath" - "strings" ) type ShellClient struct { @@ -20,24 +22,29 @@ func NewShellClient(c *config.App) *ShellClient { } func (c *ShellClient) RunCmdShell(cmd *cobra.Command, args []string) error { - ctx := context.Background() + ctx := cmd.Context() ctx, err := NewLoginClient(c.App).CheckTokenAndLogin(ctx) if err != nil { return errors.Wrap(err, "logging in") } + err = NewPrerequisitesClient(c.App).Check() + if err != nil { + return errors.Wrap(err, "checking prerequisites") + } + project, err := c.getProject(ctx) if err != nil { return errors.Wrap(err, "getting project") } - projectTypeVersion, _, err := c.RewardCloud.ProjectTypeVersionApi.ApiProjectTypeVersionsIdGet(ctx, GetIDFromPath(project.GetProjectTypeVersion())).Execute() + projectTypeVersion, _, err := c.RewardCloud.ProjectTypeVersionAPI.ApiProjectTypeVersionsIdGet(ctx, GetIDFromPath(project.GetProjectTypeVersion())).Execute() if err != nil { return errors.Wrap(err, "getting project type version") } - projectType, _, err := c.RewardCloud.ProjectTypeApi.ApiProjectTypesIdGet(ctx, GetIDFromPath(projectTypeVersion.GetProjectType())).Execute() + projectType, _, err := c.RewardCloud.ProjectTypeAPI.ApiProjectTypesIdGet(ctx, GetIDFromPath(projectTypeVersion.GetProjectType())).Execute() if err != nil { return errors.Wrap(err, "getting project type") } @@ -63,10 +70,14 @@ func (c *ShellClient) RunCmdShell(cmd *cobra.Command, args []string) error { "get", "pod", "-n", fmt.Sprintf("%s-%s", project.GetCodeName(), environment.GetCodeName()), - "--selector", "reward.itg.cloud/component=main", + "--selector", "reward.itg.cloud/component=application", "-o", "jsonpath={.items[0].metadata.name}", }, shell.WithSuppressOutput(true), shell.WithCatchOutput(true)) + if err != nil { + log.Debugf("Error getting shell pod: %s", err.Error()) + return errors.New("cannot find shell pod") + } if string(podname) == "" { return errors.New("cannot find shell pod") diff --git a/internal/logic/util.go b/internal/logic/util.go index 5a7d513..98c844a 100644 --- a/internal/logic/util.go +++ b/internal/logic/util.go @@ -3,14 +3,15 @@ package logic import ( "bufio" "fmt" + "os" + "strconv" + "strings" + "github.com/jedib0t/go-pretty/v6/table" "github.com/jedib0t/go-pretty/v6/text" "github.com/pkg/errors" log "github.com/sirupsen/logrus" "gitlab.com/david_mbuvi/go_asterisks" - "os" - "strconv" - "strings" ) type options struct { @@ -148,7 +149,7 @@ func NewTableWriter(opts ...tableWriterOption) TableWriter { t := table.NewWriter() t.SetOutputMirror(os.Stdout) - //t.Style().Options.SeparateRows = true + // t.Style().Options.SeparateRows = true t.SetStyle(table.StyleDefault) t.SetAllowedRowLength(180) @@ -196,3 +197,14 @@ func GetIDFromPath(path string) string { pathParts := strings.Split(path, "/") return pathParts[len(pathParts)-1] } + +func ContainsAny[K comparable](s []K, search ...K) bool { + for _, i := range s { + for _, v := range search { + if v == i { + return true + } + } + } + return false +} diff --git a/internal/shell/shell.go b/internal/shell/shell.go index cd78189..172f9df 100644 --- a/internal/shell/shell.go +++ b/internal/shell/shell.go @@ -107,6 +107,9 @@ func (c *LocalShell) Execute(name string, arg ...string) ([]byte, error) { case c.CatchOutput(): cmd.Stdout = io.MultiWriter(os.Stdout, &combinedOutBuf) cmd.Stderr = io.MultiWriter(os.Stderr, &combinedOutBuf) + case c.SuppressOutput(): + cmd.Stdout = io.Discard + cmd.Stderr = os.Stderr default: cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr diff --git a/internal/templates/templates.go b/internal/templates/templates.go new file mode 100644 index 0000000..a275762 --- /dev/null +++ b/internal/templates/templates.go @@ -0,0 +1,139 @@ +package templates + +import ( + "bytes" + "embed" + "fmt" + "io" + "os" + "reflect" + "strings" + "text/template" + + "github.com/Masterminds/sprig/v3" + "github.com/pkg/errors" + log "github.com/sirupsen/logrus" + + "github.com/rewardenv/reward-cloud-cli/assets" +) + +type Client struct { + fs embed.FS +} + +func New() *Client { + return &Client{ + fs: assets.Assets, + } +} + +// Cwd returns the current working directory. +func (c *Client) Cwd() string { + cwd, err := os.Getwd() + if err != nil { + log.Panicln(err) + } + + return cwd +} + +func (c *Client) LoadTemplate(name string) (*template.Template, error) { + funcMap := funcMap() + + t, err := template.New("Dockerfile").Funcs(funcMap).ParseFS(c.fs, name) + if err != nil { + return nil, errors.Wrap(err, "parsing template") + } + + // Add the "include" template function to make it possible to bring in another templates and pass the results to + // other template functions. + // {{ include "mytpl" . | upper | quote }} + // + // Similarly as it works in Helm. + // https://helm.sh/docs/howto/charts_tips_and_tricks/#know-your-template-functions + funcMap["include"] = func(name string, data interface{}) (string, error) { + buf := bytes.NewBuffer(nil) + + err := t.ExecuteTemplate(buf, name, data) + if err != nil { + return "", errors.Wrap(err, "cannot execute template") + } + + return buf.String(), nil + } + + t, err = template.New("Dockerfile").Funcs(funcMap).ParseFS(c.fs, name) + if err != nil { + return nil, errors.Wrap(err, "parsing template") + } + + return t, nil +} + +// ExecuteTemplate executes the templates, appending some specific template functions to the execution. +func (c *Client) ExecuteTemplate(t *template.Template, name string, data any, buffer io.Writer) error { + if name == "" { + name = t.Name() + } + + funcMap := funcMap() + funcMap["include"] = func(name string, data interface{}) (string, error) { + buf := bytes.NewBuffer(nil) + + err := t.ExecuteTemplate(buf, name, data) + if err != nil { + return "", errors.Wrap(err, "cannot execute template") + } + + return buf.String(), nil + } + + err := t.Funcs(funcMap).ExecuteTemplate(buffer, name, data) + if err != nil { + return fmt.Errorf("cannot execute template %s: %w", t.Name(), err) + } + + return nil +} + +func funcMap() template.FuncMap { + //nolint:varnamelen + f := sprig.TxtFuncMap() + delete(f, "env") + delete(f, "expandenv") + + extra := template.FuncMap{ + "include": func(string, interface{}) string { return "not implemented" }, + "tpl": func(string, interface{}) interface{} { return "not implemented" }, + "required": func(string, interface{}) (interface{}, error) { return "not implemented", nil }, + "lookup": func(string, string, string, string) (map[string]interface{}, error) { + return map[string]interface{}{}, nil + }, + "isEnabled": isEnabled, + } + + for k, v := range extra { + f[k] = v + } + + return f +} + +// isEnabled returns true if given value is true (bool), 1 (int), "1" (string) or "true" (string). +func isEnabled(given interface{}) bool { + g := reflect.ValueOf(given) + if !g.IsValid() { + return false + } + + switch g.Kind() { //nolint:exhaustive + case reflect.String: + return strings.EqualFold(g.String(), "true") || g.String() == "1" + case reflect.Bool: + return g.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return g.Int() == 1 + default: + return false + } +} diff --git a/pkg/api/config.yaml b/pkg/api/config.yaml new file mode 100644 index 0000000..342e90a --- /dev/null +++ b/pkg/api/config.yaml @@ -0,0 +1,9 @@ +disallowAdditionalPropertiesIfNotPresent: true +packageName: rewardcloud +useOneOfDiscriminatorLookup: true +isGoSubmodule: false +enumClassPrefix: true +structPrefix: true +validateSpec: true +generateInterfaces: false +prependFormOrBodyParameters: true \ No newline at end of file diff --git a/pkg/api/gitignore b/pkg/api/gitignore new file mode 100644 index 0000000..94eb0c9 --- /dev/null +++ b/pkg/api/gitignore @@ -0,0 +1 @@ +reward-cloud-api*.yaml \ No newline at end of file diff --git a/pkg/api/reward-cloud-api-no-jsonld.yaml b/pkg/api/reward-cloud-api-no-jsonld.yaml new file mode 100644 index 0000000..09fcdfa --- /dev/null +++ b/pkg/api/reward-cloud-api-no-jsonld.yaml @@ -0,0 +1,21336 @@ +openapi: 3.1.0 +info: + title: 'Reward Cloud' + description: 'It is an API for Reward Cloud project in ITG Commerce' + version: v0.7.0-alpha +servers: + - url: / + description: '' +paths: + /api/access_codes: + get: + operationId: api_access_codes_get_collection + tags: + - AccessCode + responses: + 200: + description: 'AccessCode collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/AccessCode' + summary: 'Retrieves the collection of AccessCode resources.' + description: 'Retrieves the collection of AccessCode resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: accessCode + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'accessCode[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_access_codes_post + tags: + - AccessCode + responses: + 201: + description: 'AccessCode resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a AccessCode resource.' + description: 'Creates a AccessCode resource.' + parameters: [] + requestBody: + description: 'The new AccessCode resource' + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + required: true + deprecated: false + parameters: [] + '/api/access_codes/{id}': + get: + operationId: api_access_codes_id_get + tags: + - AccessCode + responses: + 200: + description: 'AccessCode resource' + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + 404: + description: 'Resource not found' + summary: 'Retrieves a AccessCode resource.' + description: 'Retrieves a AccessCode resource.' + parameters: + - name: id + in: path + description: 'AccessCode identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_access_codes_id_put + tags: + - AccessCode + responses: + 200: + description: 'AccessCode resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the AccessCode resource.' + description: 'Replaces the AccessCode resource.' + parameters: + - name: id + in: path + description: 'AccessCode identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated AccessCode resource' + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + required: true + deprecated: false + delete: + operationId: api_access_codes_id_delete + tags: + - AccessCode + responses: + 204: + description: 'AccessCode resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the AccessCode resource.' + description: 'Removes the AccessCode resource.' + parameters: + - name: id + in: path + description: 'AccessCode identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_access_codes_id_patch + tags: + - AccessCode + responses: + 200: + description: 'AccessCode resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the AccessCode resource.' + description: 'Updates the AccessCode resource.' + parameters: + - name: id + in: path + description: 'AccessCode identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated AccessCode resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/AccessCode' + required: true + deprecated: false + parameters: [] + /api/authentication_token: + post: + operationId: postCredentialsItem + tags: + - Miscellaneous + responses: + 200: + description: 'Get JWT token' + content: + application/json: + schema: + $ref: '#/components/schemas/Authentication.Token' + summary: 'Get JWT token to login.' + requestBody: + description: 'Generate new JWT Token' + content: + application/json: + schema: + $ref: '#/components/schemas/Authentication.Credentials' + required: false + security: [] + parameters: [] + /api/clusters: + get: + operationId: api_clusters_get_collection + tags: + - Cluster + responses: + 200: + description: 'Cluster collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Cluster' + summary: 'Retrieves the collection of Cluster resources.' + description: 'Retrieves the collection of Cluster resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: provider + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'provider[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_clusters_post + tags: + - Cluster + responses: + 201: + description: 'Cluster resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Cluster resource.' + description: 'Creates a Cluster resource.' + parameters: [] + requestBody: + description: 'The new Cluster resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + required: true + deprecated: false + parameters: [] + /api/clusters/get-with-provider: + get: + operationId: api_clustersget-with-provider_get_collection + tags: + - Cluster + responses: + 200: + description: 'Cluster collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + summary: 'Retrieves the collection of Cluster resources.' + description: 'Retrieves the collection of Cluster resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: provider + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'provider[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + parameters: [] + '/api/clusters/{id}': + get: + operationId: api_clusters_id_get + tags: + - Cluster + responses: + 200: + description: 'Cluster resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + 404: + description: 'Resource not found' + summary: 'Retrieves a Cluster resource.' + description: 'Retrieves a Cluster resource.' + parameters: + - name: id + in: path + description: 'Cluster identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_clusters_id_put + tags: + - Cluster + responses: + 200: + description: 'Cluster resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Cluster resource.' + description: 'Replaces the Cluster resource.' + parameters: + - name: id + in: path + description: 'Cluster identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Cluster resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + required: true + deprecated: false + delete: + operationId: api_clusters_id_delete + tags: + - Cluster + responses: + 204: + description: 'Cluster resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Cluster resource.' + description: 'Removes the Cluster resource.' + parameters: + - name: id + in: path + description: 'Cluster identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_clusters_id_patch + tags: + - Cluster + responses: + 200: + description: 'Cluster resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Cluster resource.' + description: 'Updates the Cluster resource.' + parameters: + - name: id + in: path + description: 'Cluster identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Cluster resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Cluster' + required: true + deprecated: false + parameters: [] + '/api/clusters/{id}/get-with-provider': + get: + operationId: api_clusters_idget-with-provider_get + tags: + - Cluster + responses: + 200: + description: 'Cluster resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + text/html: + schema: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + 404: + description: 'Resource not found' + summary: 'Retrieves a Cluster resource.' + description: 'Retrieves a Cluster resource.' + parameters: + - name: id + in: path + description: 'Cluster identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [] + /api/component_resource_limits: + get: + operationId: api_component_resource_limits_get_collection + tags: + - ComponentResourceLimit + responses: + 200: + description: 'ComponentResourceLimit collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentResourceLimit' + summary: 'Retrieves the collection of ComponentResourceLimit resources.' + description: 'Retrieves the collection of ComponentResourceLimit resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectTypeVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectTypeVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: resourceType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'resourceType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: componentVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'componentVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_component_resource_limits_post + tags: + - ComponentResourceLimit + responses: + 201: + description: 'ComponentResourceLimit resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ComponentResourceLimit resource.' + description: 'Creates a ComponentResourceLimit resource.' + parameters: [] + requestBody: + description: 'The new ComponentResourceLimit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + required: true + deprecated: false + parameters: [] + '/api/component_resource_limits/{id}': + get: + operationId: api_component_resource_limits_id_get + tags: + - ComponentResourceLimit + responses: + 200: + description: 'ComponentResourceLimit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + 404: + description: 'Resource not found' + summary: 'Retrieves a ComponentResourceLimit resource.' + description: 'Retrieves a ComponentResourceLimit resource.' + parameters: + - name: id + in: path + description: 'ComponentResourceLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_component_resource_limits_id_put + tags: + - ComponentResourceLimit + responses: + 200: + description: 'ComponentResourceLimit resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ComponentResourceLimit resource.' + description: 'Replaces the ComponentResourceLimit resource.' + parameters: + - name: id + in: path + description: 'ComponentResourceLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentResourceLimit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + required: true + deprecated: false + delete: + operationId: api_component_resource_limits_id_delete + tags: + - ComponentResourceLimit + responses: + 204: + description: 'ComponentResourceLimit resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ComponentResourceLimit resource.' + description: 'Removes the ComponentResourceLimit resource.' + parameters: + - name: id + in: path + description: 'ComponentResourceLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_component_resource_limits_id_patch + tags: + - ComponentResourceLimit + responses: + 200: + description: 'ComponentResourceLimit resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ComponentResourceLimit resource.' + description: 'Updates the ComponentResourceLimit resource.' + parameters: + - name: id + in: path + description: 'ComponentResourceLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentResourceLimit resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + required: true + deprecated: false + parameters: [] + /api/component_version_env_var_examples: + get: + operationId: api_component_version_env_var_examples_get_collection + tags: + - ComponentVersionEnvVarExample + responses: + 200: + description: 'ComponentVersionEnvVarExample collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + summary: 'Retrieves the collection of ComponentVersionEnvVarExample resources.' + description: 'Retrieves the collection of ComponentVersionEnvVarExample resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_component_version_env_var_examples_post + tags: + - ComponentVersionEnvVarExample + responses: + 201: + description: 'ComponentVersionEnvVarExample resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ComponentVersionEnvVarExample resource.' + description: 'Creates a ComponentVersionEnvVarExample resource.' + parameters: [] + requestBody: + description: 'The new ComponentVersionEnvVarExample resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + required: true + deprecated: false + parameters: [] + '/api/component_version_env_var_examples/{id}': + get: + operationId: api_component_version_env_var_examples_id_get + tags: + - ComponentVersionEnvVarExample + responses: + 200: + description: 'ComponentVersionEnvVarExample resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + 404: + description: 'Resource not found' + summary: 'Retrieves a ComponentVersionEnvVarExample resource.' + description: 'Retrieves a ComponentVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_component_version_env_var_examples_id_put + tags: + - ComponentVersionEnvVarExample + responses: + 200: + description: 'ComponentVersionEnvVarExample resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ComponentVersionEnvVarExample resource.' + description: 'Replaces the ComponentVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersionEnvVarExample resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + required: true + deprecated: false + delete: + operationId: api_component_version_env_var_examples_id_delete + tags: + - ComponentVersionEnvVarExample + responses: + 204: + description: 'ComponentVersionEnvVarExample resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ComponentVersionEnvVarExample resource.' + description: 'Removes the ComponentVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_component_version_env_var_examples_id_patch + tags: + - ComponentVersionEnvVarExample + responses: + 200: + description: 'ComponentVersionEnvVarExample resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ComponentVersionEnvVarExample resource.' + description: 'Updates the ComponentVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersionEnvVarExample resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + required: true + deprecated: false + parameters: [] + /api/component_version_env_vars: + get: + operationId: api_component_version_env_vars_get_collection + tags: + - ComponentVersionEnvVar + responses: + 200: + description: 'ComponentVersionEnvVar collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersionEnvVar' + summary: 'Retrieves the collection of ComponentVersionEnvVar resources.' + description: 'Retrieves the collection of ComponentVersionEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: componentVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'componentVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarValidations + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarValidations[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_component_version_env_vars_post + tags: + - ComponentVersionEnvVar + responses: + 201: + description: 'ComponentVersionEnvVar resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ComponentVersionEnvVar resource.' + description: 'Creates a ComponentVersionEnvVar resource.' + parameters: [] + requestBody: + description: 'The new ComponentVersionEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + required: true + deprecated: false + parameters: [] + '/api/component_version_env_vars/{id}': + get: + operationId: api_component_version_env_vars_id_get + tags: + - ComponentVersionEnvVar + responses: + 200: + description: 'ComponentVersionEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a ComponentVersionEnvVar resource.' + description: 'Retrieves a ComponentVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_component_version_env_vars_id_put + tags: + - ComponentVersionEnvVar + responses: + 200: + description: 'ComponentVersionEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ComponentVersionEnvVar resource.' + description: 'Replaces the ComponentVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersionEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + required: true + deprecated: false + delete: + operationId: api_component_version_env_vars_id_delete + tags: + - ComponentVersionEnvVar + responses: + 204: + description: 'ComponentVersionEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ComponentVersionEnvVar resource.' + description: 'Removes the ComponentVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_component_version_env_vars_id_patch + tags: + - ComponentVersionEnvVar + responses: + 200: + description: 'ComponentVersionEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ComponentVersionEnvVar resource.' + description: 'Updates the ComponentVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersionEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + required: true + deprecated: false + parameters: [] + /api/component_versions: + get: + operationId: api_component_versions_get_collection + tags: + - ComponentVersion + responses: + 200: + description: 'ComponentVersion collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersion' + summary: 'Retrieves the collection of ComponentVersion resources.' + description: 'Retrieves the collection of ComponentVersion resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: 'order[version]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: component + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'component[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_component_versions_post + tags: + - ComponentVersion + responses: + 201: + description: 'ComponentVersion resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ComponentVersion resource.' + description: 'Creates a ComponentVersion resource.' + parameters: [] + requestBody: + description: 'The new ComponentVersion resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + required: true + deprecated: false + parameters: [] + '/api/component_versions/{id}': + get: + operationId: api_component_versions_id_get + tags: + - ComponentVersion + responses: + 200: + description: 'ComponentVersion resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + 404: + description: 'Resource not found' + summary: 'Retrieves a ComponentVersion resource.' + description: 'Retrieves a ComponentVersion resource.' + parameters: + - name: id + in: path + description: 'ComponentVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_component_versions_id_put + tags: + - ComponentVersion + responses: + 200: + description: 'ComponentVersion resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ComponentVersion resource.' + description: 'Replaces the ComponentVersion resource.' + parameters: + - name: id + in: path + description: 'ComponentVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersion resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + required: true + deprecated: false + delete: + operationId: api_component_versions_id_delete + tags: + - ComponentVersion + responses: + 204: + description: 'ComponentVersion resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ComponentVersion resource.' + description: 'Removes the ComponentVersion resource.' + parameters: + - name: id + in: path + description: 'ComponentVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_component_versions_id_patch + tags: + - ComponentVersion + responses: + 200: + description: 'ComponentVersion resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ComponentVersion resource.' + description: 'Updates the ComponentVersion resource.' + parameters: + - name: id + in: path + description: 'ComponentVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersion resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentVersion' + required: true + deprecated: false + parameters: [] + /api/components: + get: + operationId: api_components_get_collection + tags: + - Component + responses: + 200: + description: 'Component collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Component' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Component' + summary: 'Retrieves the collection of Component resources.' + description: 'Retrieves the collection of Component resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: 'order[name]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_components_post + tags: + - Component + responses: + 201: + description: 'Component resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Component resource.' + description: 'Creates a Component resource.' + parameters: [] + requestBody: + description: 'The new Component resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + required: true + deprecated: false + parameters: [] + '/api/components/{id}': + get: + operationId: api_components_id_get + tags: + - Component + responses: + 200: + description: 'Component resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + 404: + description: 'Resource not found' + summary: 'Retrieves a Component resource.' + description: 'Retrieves a Component resource.' + parameters: + - name: id + in: path + description: 'Component identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_components_id_put + tags: + - Component + responses: + 200: + description: 'Component resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Component resource.' + description: 'Replaces the Component resource.' + parameters: + - name: id + in: path + description: 'Component identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Component resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + required: true + deprecated: false + delete: + operationId: api_components_id_delete + tags: + - Component + responses: + 204: + description: 'Component resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Component resource.' + description: 'Removes the Component resource.' + parameters: + - name: id + in: path + description: 'Component identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_components_id_patch + tags: + - Component + responses: + 200: + description: 'Component resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Component resource.' + description: 'Updates the Component resource.' + parameters: + - name: id + in: path + description: 'Component identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Component resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Component' + required: true + deprecated: false + parameters: [] + /api/credential_types: + get: + operationId: api_credential_types_get_collection + tags: + - CredentialType + responses: + 200: + description: 'CredentialType collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/CredentialType' + summary: 'Retrieves the collection of CredentialType resources.' + description: 'Retrieves the collection of CredentialType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_credential_types_post + tags: + - CredentialType + responses: + 201: + description: 'CredentialType resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a CredentialType resource.' + description: 'Creates a CredentialType resource.' + parameters: [] + requestBody: + description: 'The new CredentialType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + required: true + deprecated: false + parameters: [] + '/api/credential_types/{id}': + get: + operationId: api_credential_types_id_get + tags: + - CredentialType + responses: + 200: + description: 'CredentialType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + 404: + description: 'Resource not found' + summary: 'Retrieves a CredentialType resource.' + description: 'Retrieves a CredentialType resource.' + parameters: + - name: id + in: path + description: 'CredentialType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_credential_types_id_put + tags: + - CredentialType + responses: + 200: + description: 'CredentialType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the CredentialType resource.' + description: 'Replaces the CredentialType resource.' + parameters: + - name: id + in: path + description: 'CredentialType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated CredentialType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + required: true + deprecated: false + delete: + operationId: api_credential_types_id_delete + tags: + - CredentialType + responses: + 204: + description: 'CredentialType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the CredentialType resource.' + description: 'Removes the CredentialType resource.' + parameters: + - name: id + in: path + description: 'CredentialType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_credential_types_id_patch + tags: + - CredentialType + responses: + 200: + description: 'CredentialType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the CredentialType resource.' + description: 'Updates the CredentialType resource.' + parameters: + - name: id + in: path + description: 'CredentialType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated CredentialType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/CredentialType' + required: true + deprecated: false + parameters: [] + '/api/crypto_key_types/{id}': + get: + operationId: api_crypto_key_types_id_get + tags: + - CryptoKeyType + responses: + 200: + description: 'CryptoKeyType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/CryptoKeyType' + text/html: + schema: + $ref: '#/components/schemas/CryptoKeyType' + 404: + description: 'Resource not found' + summary: 'Retrieves a CryptoKeyType resource.' + description: 'Retrieves a CryptoKeyType resource.' + parameters: + - name: id + in: path + description: 'CryptoKeyType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [] + /api/data_transfer_data_types: + get: + operationId: api_data_transfer_data_types_get_collection + tags: + - DataTransferDataType + responses: + 200: + description: 'DataTransferDataType collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/DataTransferDataType' + summary: 'Retrieves the collection of DataTransferDataType resources.' + description: 'Retrieves the collection of DataTransferDataType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_data_transfer_data_types_post + tags: + - DataTransferDataType + responses: + 201: + description: 'DataTransferDataType resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a DataTransferDataType resource.' + description: 'Creates a DataTransferDataType resource.' + parameters: [] + requestBody: + description: 'The new DataTransferDataType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + required: true + deprecated: false + parameters: [] + '/api/data_transfer_data_types/{id}': + get: + operationId: api_data_transfer_data_types_id_get + tags: + - DataTransferDataType + responses: + 200: + description: 'DataTransferDataType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + 404: + description: 'Resource not found' + summary: 'Retrieves a DataTransferDataType resource.' + description: 'Retrieves a DataTransferDataType resource.' + parameters: + - name: id + in: path + description: 'DataTransferDataType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_data_transfer_data_types_id_put + tags: + - DataTransferDataType + responses: + 200: + description: 'DataTransferDataType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the DataTransferDataType resource.' + description: 'Replaces the DataTransferDataType resource.' + parameters: + - name: id + in: path + description: 'DataTransferDataType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated DataTransferDataType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + required: true + deprecated: false + delete: + operationId: api_data_transfer_data_types_id_delete + tags: + - DataTransferDataType + responses: + 204: + description: 'DataTransferDataType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the DataTransferDataType resource.' + description: 'Removes the DataTransferDataType resource.' + parameters: + - name: id + in: path + description: 'DataTransferDataType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_data_transfer_data_types_id_patch + tags: + - DataTransferDataType + responses: + 200: + description: 'DataTransferDataType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the DataTransferDataType resource.' + description: 'Updates the DataTransferDataType resource.' + parameters: + - name: id + in: path + description: 'DataTransferDataType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated DataTransferDataType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + required: true + deprecated: false + parameters: [] + /api/data_transfer_types: + get: + operationId: api_data_transfer_types_get_collection + tags: + - DataTransferType + responses: + 200: + description: 'DataTransferType collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/DataTransferType' + summary: 'Retrieves the collection of DataTransferType resources.' + description: 'Retrieves the collection of DataTransferType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_data_transfer_types_post + tags: + - DataTransferType + responses: + 201: + description: 'DataTransferType resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a DataTransferType resource.' + description: 'Creates a DataTransferType resource.' + parameters: [] + requestBody: + description: 'The new DataTransferType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + required: true + deprecated: false + parameters: [] + '/api/data_transfer_types/{id}': + get: + operationId: api_data_transfer_types_id_get + tags: + - DataTransferType + responses: + 200: + description: 'DataTransferType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + 404: + description: 'Resource not found' + summary: 'Retrieves a DataTransferType resource.' + description: 'Retrieves a DataTransferType resource.' + parameters: + - name: id + in: path + description: 'DataTransferType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_data_transfer_types_id_put + tags: + - DataTransferType + responses: + 200: + description: 'DataTransferType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the DataTransferType resource.' + description: 'Replaces the DataTransferType resource.' + parameters: + - name: id + in: path + description: 'DataTransferType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated DataTransferType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + required: true + deprecated: false + delete: + operationId: api_data_transfer_types_id_delete + tags: + - DataTransferType + responses: + 204: + description: 'DataTransferType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the DataTransferType resource.' + description: 'Removes the DataTransferType resource.' + parameters: + - name: id + in: path + description: 'DataTransferType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_data_transfer_types_id_patch + tags: + - DataTransferType + responses: + 200: + description: 'DataTransferType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the DataTransferType resource.' + description: 'Updates the DataTransferType resource.' + parameters: + - name: id + in: path + description: 'DataTransferType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated DataTransferType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/DataTransferType' + required: true + deprecated: false + parameters: [] + /api/env_var_types: + get: + operationId: api_env_var_types_get_collection + tags: + - EnvVarType + responses: + 200: + description: 'EnvVarType collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvVarType' + summary: 'Retrieves the collection of EnvVarType resources.' + description: 'Retrieves the collection of EnvVarType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_env_var_types_post + tags: + - EnvVarType + responses: + 201: + description: 'EnvVarType resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvVarType resource.' + description: 'Creates a EnvVarType resource.' + parameters: [] + requestBody: + description: 'The new EnvVarType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + required: true + deprecated: false + parameters: [] + '/api/env_var_types/{id}': + get: + operationId: api_env_var_types_id_get + tags: + - EnvVarType + responses: + 200: + description: 'EnvVarType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvVarType resource.' + description: 'Retrieves a EnvVarType resource.' + parameters: + - name: id + in: path + description: 'EnvVarType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_env_var_types_id_put + tags: + - EnvVarType + responses: + 200: + description: 'EnvVarType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvVarType resource.' + description: 'Replaces the EnvVarType resource.' + parameters: + - name: id + in: path + description: 'EnvVarType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvVarType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + required: true + deprecated: false + delete: + operationId: api_env_var_types_id_delete + tags: + - EnvVarType + responses: + 204: + description: 'EnvVarType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvVarType resource.' + description: 'Removes the EnvVarType resource.' + parameters: + - name: id + in: path + description: 'EnvVarType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_env_var_types_id_patch + tags: + - EnvVarType + responses: + 200: + description: 'EnvVarType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvVarType resource.' + description: 'Updates the EnvVarType resource.' + parameters: + - name: id + in: path + description: 'EnvVarType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvVarType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvVarType' + required: true + deprecated: false + parameters: [] + /api/env_var_validation: + post: + operationId: postValidateEnvVar + tags: + - Miscellaneous + responses: + 200: + description: 'It will returns w/ an object' + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateEnvVar.Response' + 201: + description: 'The same as the HTTP 200' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing EnvVarDefinition' + summary: 'It checks the validation of an environment variable definition' + description: |- + It will check a any EnvVar's definition validation by this entity. The entity can contain + more than one validation. Then it will test all of them and reply w/ their messages. + requestBody: + description: 'Let the system to check a word to validate by definition(s). + Both are REQUIRED!' + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateEnvVar.Request' + required: false + security: [] + parameters: [] + /api/env_var_validations: + get: + operationId: api_env_var_validations_get_collection + tags: + - EnvVarValidation + responses: + 200: + description: 'EnvVarValidation collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvVarValidation' + summary: 'Retrieves the collection of EnvVarValidation resources.' + description: 'Retrieves the collection of EnvVarValidation resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_env_var_validations_post + tags: + - EnvVarValidation + responses: + 201: + description: 'EnvVarValidation resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvVarValidation resource.' + description: 'Creates a EnvVarValidation resource.' + parameters: [] + requestBody: + description: 'The new EnvVarValidation resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + required: true + deprecated: false + parameters: [] + '/api/env_var_validations/{id}': + get: + operationId: api_env_var_validations_id_get + tags: + - EnvVarValidation + responses: + 200: + description: 'EnvVarValidation resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvVarValidation resource.' + description: 'Retrieves a EnvVarValidation resource.' + parameters: + - name: id + in: path + description: 'EnvVarValidation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_env_var_validations_id_put + tags: + - EnvVarValidation + responses: + 200: + description: 'EnvVarValidation resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvVarValidation resource.' + description: 'Replaces the EnvVarValidation resource.' + parameters: + - name: id + in: path + description: 'EnvVarValidation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvVarValidation resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + required: true + deprecated: false + delete: + operationId: api_env_var_validations_id_delete + tags: + - EnvVarValidation + responses: + 204: + description: 'EnvVarValidation resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvVarValidation resource.' + description: 'Removes the EnvVarValidation resource.' + parameters: + - name: id + in: path + description: 'EnvVarValidation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_env_var_validations_id_patch + tags: + - EnvVarValidation + responses: + 200: + description: 'EnvVarValidation resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvVarValidation resource.' + description: 'Updates the EnvVarValidation resource.' + parameters: + - name: id + in: path + description: 'EnvVarValidation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvVarValidation resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + required: true + deprecated: false + parameters: [] + /api/environment_access_backends: + get: + operationId: api_environment_access_backends_get_collection + tags: + - EnvironmentAccessBackend + responses: + 200: + description: 'EnvironmentAccessBackend collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessBackend' + summary: 'Retrieves the collection of EnvironmentAccessBackend resources.' + description: 'Retrieves the collection of EnvironmentAccessBackend resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_backends_post + tags: + - EnvironmentAccessBackend + responses: + 201: + description: 'EnvironmentAccessBackend resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessBackend resource.' + description: 'Creates a EnvironmentAccessBackend resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentAccessBackend resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + required: true + deprecated: false + parameters: [] + '/api/environment_access_backends/{id}': + get: + operationId: api_environment_access_backends_id_get + tags: + - EnvironmentAccessBackend + responses: + 200: + description: 'EnvironmentAccessBackend resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessBackend resource.' + description: 'Retrieves a EnvironmentAccessBackend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessBackend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_backends_id_put + tags: + - EnvironmentAccessBackend + responses: + 200: + description: 'EnvironmentAccessBackend resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessBackend resource.' + description: 'Replaces the EnvironmentAccessBackend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessBackend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessBackend resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + required: true + deprecated: false + delete: + operationId: api_environment_access_backends_id_delete + tags: + - EnvironmentAccessBackend + responses: + 204: + description: 'EnvironmentAccessBackend resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessBackend resource.' + description: 'Removes the EnvironmentAccessBackend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessBackend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_backends_id_patch + tags: + - EnvironmentAccessBackend + responses: + 200: + description: 'EnvironmentAccessBackend resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessBackend resource.' + description: 'Updates the EnvironmentAccessBackend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessBackend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessBackend resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + required: true + deprecated: false + parameters: [] + /api/environment_access_databases: + get: + operationId: api_environment_access_databases_get_collection + tags: + - EnvironmentAccessDatabase + responses: + 200: + description: 'EnvironmentAccessDatabase collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + summary: 'Retrieves the collection of EnvironmentAccessDatabase resources.' + description: 'Retrieves the collection of EnvironmentAccessDatabase resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_databases_post + tags: + - EnvironmentAccessDatabase + responses: + 201: + description: 'EnvironmentAccessDatabase resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessDatabase resource.' + description: 'Creates a EnvironmentAccessDatabase resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentAccessDatabase resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + required: true + deprecated: false + parameters: [] + '/api/environment_access_databases/{id}': + get: + operationId: api_environment_access_databases_id_get + tags: + - EnvironmentAccessDatabase + responses: + 200: + description: 'EnvironmentAccessDatabase resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessDatabase resource.' + description: 'Retrieves a EnvironmentAccessDatabase resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDatabase identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_databases_id_put + tags: + - EnvironmentAccessDatabase + responses: + 200: + description: 'EnvironmentAccessDatabase resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessDatabase resource.' + description: 'Replaces the EnvironmentAccessDatabase resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDatabase identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessDatabase resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + required: true + deprecated: false + delete: + operationId: api_environment_access_databases_id_delete + tags: + - EnvironmentAccessDatabase + responses: + 204: + description: 'EnvironmentAccessDatabase resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessDatabase resource.' + description: 'Removes the EnvironmentAccessDatabase resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDatabase identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_databases_id_patch + tags: + - EnvironmentAccessDatabase + responses: + 200: + description: 'EnvironmentAccessDatabase resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessDatabase resource.' + description: 'Updates the EnvironmentAccessDatabase resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDatabase identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessDatabase resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + required: true + deprecated: false + parameters: [] + /api/environment_access_dev_tools: + get: + operationId: api_environment_access_dev_tools_get_collection + tags: + - EnvironmentAccessDevTools + responses: + 200: + description: 'EnvironmentAccessDevTools collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + summary: 'Retrieves the collection of EnvironmentAccessDevTools resources.' + description: 'Retrieves the collection of EnvironmentAccessDevTools resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_dev_tools_post + tags: + - EnvironmentAccessDevTools + responses: + 201: + description: 'EnvironmentAccessDevTools resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessDevTools resource.' + description: 'Creates a EnvironmentAccessDevTools resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentAccessDevTools resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + required: true + deprecated: false + parameters: [] + '/api/environment_access_dev_tools/{id}': + get: + operationId: api_environment_access_dev_tools_id_get + tags: + - EnvironmentAccessDevTools + responses: + 200: + description: 'EnvironmentAccessDevTools resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessDevTools resource.' + description: 'Retrieves a EnvironmentAccessDevTools resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDevTools identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_dev_tools_id_put + tags: + - EnvironmentAccessDevTools + responses: + 200: + description: 'EnvironmentAccessDevTools resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessDevTools resource.' + description: 'Replaces the EnvironmentAccessDevTools resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDevTools identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessDevTools resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + required: true + deprecated: false + delete: + operationId: api_environment_access_dev_tools_id_delete + tags: + - EnvironmentAccessDevTools + responses: + 204: + description: 'EnvironmentAccessDevTools resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessDevTools resource.' + description: 'Removes the EnvironmentAccessDevTools resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDevTools identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_dev_tools_id_patch + tags: + - EnvironmentAccessDevTools + responses: + 200: + description: 'EnvironmentAccessDevTools resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessDevTools resource.' + description: 'Updates the EnvironmentAccessDevTools resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDevTools identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessDevTools resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + required: true + deprecated: false + parameters: [] + /api/environment_access_frontends: + get: + operationId: api_environment_access_frontends_get_collection + tags: + - EnvironmentAccessFrontend + responses: + 200: + description: 'EnvironmentAccessFrontend collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + summary: 'Retrieves the collection of EnvironmentAccessFrontend resources.' + description: 'Retrieves the collection of EnvironmentAccessFrontend resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_frontends_post + tags: + - EnvironmentAccessFrontend + responses: + 201: + description: 'EnvironmentAccessFrontend resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessFrontend resource.' + description: 'Creates a EnvironmentAccessFrontend resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentAccessFrontend resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + required: true + deprecated: false + parameters: [] + '/api/environment_access_frontends/{id}': + get: + operationId: api_environment_access_frontends_id_get + tags: + - EnvironmentAccessFrontend + responses: + 200: + description: 'EnvironmentAccessFrontend resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessFrontend resource.' + description: 'Retrieves a EnvironmentAccessFrontend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessFrontend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_frontends_id_put + tags: + - EnvironmentAccessFrontend + responses: + 200: + description: 'EnvironmentAccessFrontend resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessFrontend resource.' + description: 'Replaces the EnvironmentAccessFrontend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessFrontend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessFrontend resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + required: true + deprecated: false + delete: + operationId: api_environment_access_frontends_id_delete + tags: + - EnvironmentAccessFrontend + responses: + 204: + description: 'EnvironmentAccessFrontend resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessFrontend resource.' + description: 'Removes the EnvironmentAccessFrontend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessFrontend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_frontends_id_patch + tags: + - EnvironmentAccessFrontend + responses: + 200: + description: 'EnvironmentAccessFrontend resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessFrontend resource.' + description: 'Updates the EnvironmentAccessFrontend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessFrontend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessFrontend resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + required: true + deprecated: false + parameters: [] + /api/environment_access_mailboxes: + get: + operationId: api_environment_access_mailboxes_get_collection + tags: + - EnvironmentAccessMailbox + responses: + 200: + description: 'EnvironmentAccessMailbox collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + summary: 'Retrieves the collection of EnvironmentAccessMailbox resources.' + description: 'Retrieves the collection of EnvironmentAccessMailbox resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_mailboxes_post + tags: + - EnvironmentAccessMailbox + responses: + 201: + description: 'EnvironmentAccessMailbox resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessMailbox resource.' + description: 'Creates a EnvironmentAccessMailbox resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentAccessMailbox resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + required: true + deprecated: false + parameters: [] + '/api/environment_access_mailboxes/{id}': + get: + operationId: api_environment_access_mailboxes_id_get + tags: + - EnvironmentAccessMailbox + responses: + 200: + description: 'EnvironmentAccessMailbox resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessMailbox resource.' + description: 'Retrieves a EnvironmentAccessMailbox resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessMailbox identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_mailboxes_id_put + tags: + - EnvironmentAccessMailbox + responses: + 200: + description: 'EnvironmentAccessMailbox resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessMailbox resource.' + description: 'Replaces the EnvironmentAccessMailbox resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessMailbox identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessMailbox resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + required: true + deprecated: false + delete: + operationId: api_environment_access_mailboxes_id_delete + tags: + - EnvironmentAccessMailbox + responses: + 204: + description: 'EnvironmentAccessMailbox resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessMailbox resource.' + description: 'Removes the EnvironmentAccessMailbox resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessMailbox identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_mailboxes_id_patch + tags: + - EnvironmentAccessMailbox + responses: + 200: + description: 'EnvironmentAccessMailbox resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessMailbox resource.' + description: 'Updates the EnvironmentAccessMailbox resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessMailbox identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessMailbox resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + required: true + deprecated: false + parameters: [] + /api/environment_access_rabbits: + get: + operationId: api_environment_access_rabbits_get_collection + tags: + - EnvironmentAccessRabbit + responses: + 200: + description: 'EnvironmentAccessRabbit collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + summary: 'Retrieves the collection of EnvironmentAccessRabbit resources.' + description: 'Retrieves the collection of EnvironmentAccessRabbit resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_rabbits_post + tags: + - EnvironmentAccessRabbit + responses: + 201: + description: 'EnvironmentAccessRabbit resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessRabbit resource.' + description: 'Creates a EnvironmentAccessRabbit resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentAccessRabbit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + required: true + deprecated: false + parameters: [] + '/api/environment_access_rabbits/{id}': + get: + operationId: api_environment_access_rabbits_id_get + tags: + - EnvironmentAccessRabbit + responses: + 200: + description: 'EnvironmentAccessRabbit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessRabbit resource.' + description: 'Retrieves a EnvironmentAccessRabbit resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRabbit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_rabbits_id_put + tags: + - EnvironmentAccessRabbit + responses: + 200: + description: 'EnvironmentAccessRabbit resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessRabbit resource.' + description: 'Replaces the EnvironmentAccessRabbit resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRabbit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessRabbit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + required: true + deprecated: false + delete: + operationId: api_environment_access_rabbits_id_delete + tags: + - EnvironmentAccessRabbit + responses: + 204: + description: 'EnvironmentAccessRabbit resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessRabbit resource.' + description: 'Removes the EnvironmentAccessRabbit resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRabbit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_rabbits_id_patch + tags: + - EnvironmentAccessRabbit + responses: + 200: + description: 'EnvironmentAccessRabbit resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessRabbit resource.' + description: 'Updates the EnvironmentAccessRabbit resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRabbit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessRabbit resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + required: true + deprecated: false + parameters: [] + /api/environment_access_redis: + get: + operationId: api_environment_access_redis_get_collection + tags: + - EnvironmentAccessRedis + responses: + 200: + description: 'EnvironmentAccessRedis collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessRedis' + summary: 'Retrieves the collection of EnvironmentAccessRedis resources.' + description: 'Retrieves the collection of EnvironmentAccessRedis resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_redis_post + tags: + - EnvironmentAccessRedis + responses: + 201: + description: 'EnvironmentAccessRedis resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessRedis resource.' + description: 'Creates a EnvironmentAccessRedis resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentAccessRedis resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + required: true + deprecated: false + parameters: [] + '/api/environment_access_redis/{id}': + get: + operationId: api_environment_access_redis_id_get + tags: + - EnvironmentAccessRedis + responses: + 200: + description: 'EnvironmentAccessRedis resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessRedis resource.' + description: 'Retrieves a EnvironmentAccessRedis resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRedis identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_redis_id_put + tags: + - EnvironmentAccessRedis + responses: + 200: + description: 'EnvironmentAccessRedis resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessRedis resource.' + description: 'Replaces the EnvironmentAccessRedis resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRedis identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessRedis resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + required: true + deprecated: false + delete: + operationId: api_environment_access_redis_id_delete + tags: + - EnvironmentAccessRedis + responses: + 204: + description: 'EnvironmentAccessRedis resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessRedis resource.' + description: 'Removes the EnvironmentAccessRedis resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRedis identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_redis_id_patch + tags: + - EnvironmentAccessRedis + responses: + 200: + description: 'EnvironmentAccessRedis resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessRedis resource.' + description: 'Updates the EnvironmentAccessRedis resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRedis identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessRedis resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + required: true + deprecated: false + parameters: [] + /api/environment_access_webshells: + get: + operationId: api_environment_access_webshells_get_collection + tags: + - EnvironmentAccessWebshell + responses: + 200: + description: 'EnvironmentAccessWebshell collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + summary: 'Retrieves the collection of EnvironmentAccessWebshell resources.' + description: 'Retrieves the collection of EnvironmentAccessWebshell resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_webshells_post + tags: + - EnvironmentAccessWebshell + responses: + 201: + description: 'EnvironmentAccessWebshell resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessWebshell resource.' + description: 'Creates a EnvironmentAccessWebshell resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentAccessWebshell resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + required: true + deprecated: false + parameters: [] + '/api/environment_access_webshells/{id}': + get: + operationId: api_environment_access_webshells_id_get + tags: + - EnvironmentAccessWebshell + responses: + 200: + description: 'EnvironmentAccessWebshell resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessWebshell resource.' + description: 'Retrieves a EnvironmentAccessWebshell resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessWebshell identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_webshells_id_put + tags: + - EnvironmentAccessWebshell + responses: + 200: + description: 'EnvironmentAccessWebshell resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessWebshell resource.' + description: 'Replaces the EnvironmentAccessWebshell resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessWebshell identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessWebshell resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + required: true + deprecated: false + delete: + operationId: api_environment_access_webshells_id_delete + tags: + - EnvironmentAccessWebshell + responses: + 204: + description: 'EnvironmentAccessWebshell resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessWebshell resource.' + description: 'Removes the EnvironmentAccessWebshell resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessWebshell identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_webshells_id_patch + tags: + - EnvironmentAccessWebshell + responses: + 200: + description: 'EnvironmentAccessWebshell resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessWebshell resource.' + description: 'Updates the EnvironmentAccessWebshell resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessWebshell identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessWebshell resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + required: true + deprecated: false + parameters: [] + /api/environment_accesses: + get: + operationId: api_environment_accesses_get_collection + tags: + - EnvironmentAccess + responses: + 200: + description: 'EnvironmentAccess collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccess' + summary: 'Retrieves the collection of EnvironmentAccess resources.' + description: 'Retrieves the collection of EnvironmentAccess resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: frontend + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'frontend[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: backend + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'backend[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: database + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'database[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: devTools + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'devTools[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: redis + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'redis[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: rabbit + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'rabbit[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: mailbox + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'mailbox[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: webshell + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'webshell[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_environment_accesses_post + tags: + - EnvironmentAccess + responses: + 201: + description: 'EnvironmentAccess resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccess resource.' + description: 'Creates a EnvironmentAccess resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentAccess resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + required: true + deprecated: false + parameters: [] + '/api/environment_accesses/{id}': + get: + operationId: api_environment_accesses_id_get + tags: + - EnvironmentAccess + responses: + 200: + description: 'EnvironmentAccess resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccess resource.' + description: 'Retrieves a EnvironmentAccess resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_accesses_id_put + tags: + - EnvironmentAccess + responses: + 200: + description: 'EnvironmentAccess resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccess resource.' + description: 'Replaces the EnvironmentAccess resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccess resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + required: true + deprecated: false + delete: + operationId: api_environment_accesses_id_delete + tags: + - EnvironmentAccess + responses: + 204: + description: 'EnvironmentAccess resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccess resource.' + description: 'Removes the EnvironmentAccess resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_accesses_id_patch + tags: + - EnvironmentAccess + responses: + 200: + description: 'EnvironmentAccess resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccess resource.' + description: 'Updates the EnvironmentAccess resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccess resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + required: true + deprecated: false + parameters: [] + '/api/environment_accesses/{id}/all-data': + get: + tags: + - EnvironmentAccess + responses: + 200: + description: 'All data of EnvironmentAccess queried successful' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.AllDataResponse' + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.AllDataResponse' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Get all data of an EnvironmentAccess resource' + description: 'Gets all data what is related to the EnvironmentAccess resource + and its children' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [] + /api/environment_components: + get: + operationId: api_environment_components_get_collection + tags: + - EnvironmentComponent + responses: + 200: + description: 'EnvironmentComponent collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent' + summary: 'Retrieves the collection of EnvironmentComponent resources.' + description: 'Retrieves the collection of EnvironmentComponent resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: componentVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'componentVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_environment_components_post + tags: + - EnvironmentComponent + responses: + 201: + description: 'EnvironmentComponent resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentComponent resource.' + description: 'Creates a EnvironmentComponent resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentComponent resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + required: true + deprecated: false + parameters: [] + '/api/environment_components/{id}': + get: + operationId: api_environment_components_id_get + tags: + - EnvironmentComponent + responses: + 200: + description: 'EnvironmentComponent resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentComponent resource.' + description: 'Retrieves a EnvironmentComponent resource.' + parameters: + - name: id + in: path + description: 'EnvironmentComponent identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_components_id_put + tags: + - EnvironmentComponent + responses: + 200: + description: 'EnvironmentComponent resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentComponent resource.' + description: 'Replaces the EnvironmentComponent resource.' + parameters: + - name: id + in: path + description: 'EnvironmentComponent identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentComponent resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + required: true + deprecated: false + delete: + operationId: api_environment_components_id_delete + tags: + - EnvironmentComponent + responses: + 204: + description: 'EnvironmentComponent resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentComponent resource.' + description: 'Removes the EnvironmentComponent resource.' + parameters: + - name: id + in: path + description: 'EnvironmentComponent identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_components_id_patch + tags: + - EnvironmentComponent + responses: + 200: + description: 'EnvironmentComponent resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentComponent resource.' + description: 'Updates the EnvironmentComponent resource.' + parameters: + - name: id + in: path + description: 'EnvironmentComponent identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentComponent resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + required: true + deprecated: false + parameters: [] + /api/environment_custom_domains: + get: + operationId: api_environment_custom_domains_get_collection + tags: + - EnvironmentCustomDomain + responses: + 200: + description: 'EnvironmentCustomDomain collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentCustomDomain' + summary: 'Retrieves the collection of EnvironmentCustomDomain resources.' + description: 'Retrieves the collection of EnvironmentCustomDomain resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_environment_custom_domains_post + tags: + - EnvironmentCustomDomain + responses: + 201: + description: 'EnvironmentCustomDomain resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentCustomDomain resource.' + description: 'Creates a EnvironmentCustomDomain resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentCustomDomain resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + required: true + deprecated: false + parameters: [] + '/api/environment_custom_domains/{id}': + get: + operationId: api_environment_custom_domains_id_get + tags: + - EnvironmentCustomDomain + responses: + 200: + description: 'EnvironmentCustomDomain resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentCustomDomain resource.' + description: 'Retrieves a EnvironmentCustomDomain resource.' + parameters: + - name: id + in: path + description: 'EnvironmentCustomDomain identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_custom_domains_id_put + tags: + - EnvironmentCustomDomain + responses: + 200: + description: 'EnvironmentCustomDomain resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentCustomDomain resource.' + description: 'Replaces the EnvironmentCustomDomain resource.' + parameters: + - name: id + in: path + description: 'EnvironmentCustomDomain identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentCustomDomain resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + required: true + deprecated: false + delete: + operationId: api_environment_custom_domains_id_delete + tags: + - EnvironmentCustomDomain + responses: + 204: + description: 'EnvironmentCustomDomain resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentCustomDomain resource.' + description: 'Removes the EnvironmentCustomDomain resource.' + parameters: + - name: id + in: path + description: 'EnvironmentCustomDomain identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_custom_domains_id_patch + tags: + - EnvironmentCustomDomain + responses: + 200: + description: 'EnvironmentCustomDomain resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentCustomDomain resource.' + description: 'Updates the EnvironmentCustomDomain resource.' + parameters: + - name: id + in: path + description: 'EnvironmentCustomDomain identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentCustomDomain resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + required: true + deprecated: false + parameters: [] + /api/environment_env_vars: + get: + operationId: api_environment_env_vars_get_collection + tags: + - EnvironmentEnvVar + responses: + 200: + description: 'EnvironmentEnvVar collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar' + summary: 'Retrieves the collection of EnvironmentEnvVar resources.' + description: 'Retrieves the collection of EnvironmentEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_environment_env_vars_post + tags: + - EnvironmentEnvVar + responses: + 201: + description: 'EnvironmentEnvVar resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentEnvVar resource.' + description: 'Creates a EnvironmentEnvVar resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + required: true + deprecated: false + parameters: [] + '/api/environment_env_vars/{id}': + get: + operationId: api_environment_env_vars_id_get + tags: + - EnvironmentEnvVar + responses: + 200: + description: 'EnvironmentEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentEnvVar resource.' + description: 'Retrieves a EnvironmentEnvVar resource.' + parameters: + - name: id + in: path + description: 'EnvironmentEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_env_vars_id_put + tags: + - EnvironmentEnvVar + responses: + 200: + description: 'EnvironmentEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentEnvVar resource.' + description: 'Replaces the EnvironmentEnvVar resource.' + parameters: + - name: id + in: path + description: 'EnvironmentEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + required: true + deprecated: false + delete: + operationId: api_environment_env_vars_id_delete + tags: + - EnvironmentEnvVar + responses: + 204: + description: 'EnvironmentEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentEnvVar resource.' + description: 'Removes the EnvironmentEnvVar resource.' + parameters: + - name: id + in: path + description: 'EnvironmentEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_env_vars_id_patch + tags: + - EnvironmentEnvVar + responses: + 200: + description: 'EnvironmentEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentEnvVar resource.' + description: 'Updates the EnvironmentEnvVar resource.' + parameters: + - name: id + in: path + description: 'EnvironmentEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + required: true + deprecated: false + parameters: [] + /api/environment_magento_host_mappings: + get: + operationId: api_environment_magento_host_mappings_get_collection + tags: + - EnvironmentMagentoHostMapping + responses: + 200: + description: 'EnvironmentMagentoHostMapping collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + summary: 'Retrieves the collection of EnvironmentMagentoHostMapping resources.' + description: 'Retrieves the collection of EnvironmentMagentoHostMapping resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_environment_magento_host_mappings_post + tags: + - EnvironmentMagentoHostMapping + responses: + 201: + description: 'EnvironmentMagentoHostMapping resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentMagentoHostMapping resource.' + description: 'Creates a EnvironmentMagentoHostMapping resource.' + parameters: [] + requestBody: + description: 'The new EnvironmentMagentoHostMapping resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + required: true + deprecated: false + parameters: [] + '/api/environment_magento_host_mappings/{id}': + get: + operationId: api_environment_magento_host_mappings_id_get + tags: + - EnvironmentMagentoHostMapping + responses: + 200: + description: 'EnvironmentMagentoHostMapping resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentMagentoHostMapping resource.' + description: 'Retrieves a EnvironmentMagentoHostMapping resource.' + parameters: + - name: id + in: path + description: 'EnvironmentMagentoHostMapping identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_magento_host_mappings_id_put + tags: + - EnvironmentMagentoHostMapping + responses: + 200: + description: 'EnvironmentMagentoHostMapping resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentMagentoHostMapping resource.' + description: 'Replaces the EnvironmentMagentoHostMapping resource.' + parameters: + - name: id + in: path + description: 'EnvironmentMagentoHostMapping identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentMagentoHostMapping resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + required: true + deprecated: false + delete: + operationId: api_environment_magento_host_mappings_id_delete + tags: + - EnvironmentMagentoHostMapping + responses: + 204: + description: 'EnvironmentMagentoHostMapping resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentMagentoHostMapping resource.' + description: 'Removes the EnvironmentMagentoHostMapping resource.' + parameters: + - name: id + in: path + description: 'EnvironmentMagentoHostMapping identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_magento_host_mappings_id_patch + tags: + - EnvironmentMagentoHostMapping + responses: + 200: + description: 'EnvironmentMagentoHostMapping resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentMagentoHostMapping resource.' + description: 'Updates the EnvironmentMagentoHostMapping resource.' + parameters: + - name: id + in: path + description: 'EnvironmentMagentoHostMapping identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentMagentoHostMapping resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + required: true + deprecated: false + parameters: [] + /api/environment_message_histories: + get: + operationId: api_environment_message_histories_get_collection + tags: + - EnvironmentMessageHistory + responses: + 200: + description: 'EnvironmentMessageHistory collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentMessageHistory' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentMessageHistory' + summary: 'Retrieves the collection of EnvironmentMessageHistory resources.' + description: 'Retrieves the collection of EnvironmentMessageHistory resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + parameters: [] + '/api/environment_message_histories/{id}': + get: + operationId: api_environment_message_histories_id_get + tags: + - EnvironmentMessageHistory + responses: + 200: + description: 'EnvironmentMessageHistory resource' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMessageHistory' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMessageHistory' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentMessageHistory resource.' + description: 'Retrieves a EnvironmentMessageHistory resource.' + parameters: + - name: id + in: path + description: 'EnvironmentMessageHistory identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [] + /api/environments: + get: + operationId: api_environments_get_collection + tags: + - Environment + responses: + 200: + description: 'Environment collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Environment-Environment.output' + summary: 'Retrieves the collection of Environment resources.' + description: 'Retrieves the collection of Environment resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: project + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'project[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: project.team.id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'project.team.id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: provider + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'provider[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: state + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'state[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: cluster + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'cluster[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: environmentAccess + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environmentAccess[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: stateByInfra + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'stateByInfra[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'state[not]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + example: '1' + - name: 'state[not][]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + example: '[1,2,3]' + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environments_post + tags: + - Environment + responses: + 201: + description: 'Environment resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Environment resource.' + description: 'Creates a Environment resource.' + parameters: [] + requestBody: + description: 'The new Environment resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + required: true + deprecated: false + parameters: [] + '/api/environments/{id}': + get: + operationId: api_environments_id_get + tags: + - Environment + responses: + 200: + description: 'Environment resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Environment resource.' + description: 'Retrieves a Environment resource.' + parameters: + - name: id + in: path + description: 'Environment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environments_id_put + tags: + - Environment + responses: + 200: + description: 'Environment resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Environment resource.' + description: 'Replaces the Environment resource.' + parameters: + - name: id + in: path + description: 'Environment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Environment resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + required: true + deprecated: false + delete: + operationId: api_environments_id_delete + tags: + - Environment + responses: + 204: + description: 'Environment resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Environment resource.' + description: 'Removes the Environment resource.' + parameters: + - name: id + in: path + description: 'Environment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environments_id_patch + tags: + - Environment + responses: + 200: + description: 'Environment resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Environment resource.' + description: 'Updates the Environment resource.' + parameters: + - name: id + in: path + description: 'Environment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Environment resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + required: true + deprecated: false + parameters: [] + '/api/environments/{id}/build-and-deploy': + patch: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Build commad for Environment' + description: 'It sends a Build command through the Amqp to the infrastructure' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + required: false + parameters: [] + '/api/environments/{id}/costs': + get: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment.Costs' + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment.Costs' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Get all costs data that related to the Environment' + description: 'These costs data is came from Kubernetes (Kubecost)' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [] + '/api/environments/{id}/export-database': + put: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Build commad for Environment' + description: 'It sends a Build command through the Amqp to the infrastructure' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + required: false + parameters: [] + '/api/environments/{id}/export-media': + put: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Build commad for Environment' + description: 'It sends a Build command through the Amqp to the infrastructure' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + required: false + parameters: [] + '/api/environments/{id}/import-database': + post: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Build commad for Environment' + description: 'It sends a Build command through the Amqp to the infrastructure' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + required: false + parameters: [] + '/api/environments/{id}/import-media': + post: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Build commad for Environment' + description: 'It sends a Build command through the Amqp to the infrastructure' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + required: false + parameters: [] + '/api/environments/{id}/logs': + get: + tags: + - Environment + responses: + 200: + description: 'The log request has been sent successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment.LogStreamResponse' + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment.LogStreamResponse' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Create a request to view logs' + description: 'It sends a request to infra to stream logs to a mercure topic. + The topic is in the response' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + - name: x-filters + in: header + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + - name: x-offset + in: header + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [] + '/api/environments/{id}/progressbar': + get: + operationId: api_environments_idprogressbar_get + tags: + - Environment + responses: + 200: + description: 'Environment resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Environment resource.' + description: 'Retrieves a Environment resource.' + parameters: + - name: id + in: path + description: 'Environment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [] + /api/exported_datas: + get: + operationId: api_exported_datas_get_collection + tags: + - ExportedData + responses: + 200: + description: 'ExportedData collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ExportedData' + summary: 'Retrieves the collection of ExportedData resources.' + description: 'Retrieves the collection of ExportedData resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: dataTransferDataType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'dataTransferDataType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: state + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'state[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'order[createdAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_exported_datas_post + tags: + - ExportedData + responses: + 201: + description: 'ExportedData resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ExportedData resource.' + description: 'Creates a ExportedData resource.' + parameters: [] + requestBody: + description: 'The new ExportedData resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + required: true + deprecated: false + parameters: [] + '/api/exported_datas/{id}': + get: + operationId: api_exported_datas_id_get + tags: + - ExportedData + responses: + 200: + description: 'ExportedData resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + 404: + description: 'Resource not found' + summary: 'Retrieves a ExportedData resource.' + description: 'Retrieves a ExportedData resource.' + parameters: + - name: id + in: path + description: 'ExportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_exported_datas_id_put + tags: + - ExportedData + responses: + 200: + description: 'ExportedData resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ExportedData resource.' + description: 'Replaces the ExportedData resource.' + parameters: + - name: id + in: path + description: 'ExportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ExportedData resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + required: true + deprecated: false + delete: + operationId: api_exported_datas_id_delete + tags: + - ExportedData + responses: + 204: + description: 'ExportedData resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ExportedData resource.' + description: 'Removes the ExportedData resource.' + parameters: + - name: id + in: path + description: 'ExportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_exported_datas_id_patch + tags: + - ExportedData + responses: + 200: + description: 'ExportedData resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ExportedData resource.' + description: 'Updates the ExportedData resource.' + parameters: + - name: id + in: path + description: 'ExportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ExportedData resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ExportedData' + required: true + deprecated: false + parameters: [] + /api/git_types: + get: + operationId: api_git_types_get_collection + tags: + - GitType + responses: + 200: + description: 'GitType collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GitType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/GitType' + summary: 'Retrieves the collection of GitType resources.' + description: 'Retrieves the collection of GitType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_git_types_post + tags: + - GitType + responses: + 201: + description: 'GitType resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a GitType resource.' + description: 'Creates a GitType resource.' + parameters: [] + requestBody: + description: 'The new GitType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + required: true + deprecated: false + parameters: [] + '/api/git_types/{id}': + get: + operationId: api_git_types_id_get + tags: + - GitType + responses: + 200: + description: 'GitType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + 404: + description: 'Resource not found' + summary: 'Retrieves a GitType resource.' + description: 'Retrieves a GitType resource.' + parameters: + - name: id + in: path + description: 'GitType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_git_types_id_put + tags: + - GitType + responses: + 200: + description: 'GitType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the GitType resource.' + description: 'Replaces the GitType resource.' + parameters: + - name: id + in: path + description: 'GitType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated GitType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + required: true + deprecated: false + delete: + operationId: api_git_types_id_delete + tags: + - GitType + responses: + 204: + description: 'GitType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the GitType resource.' + description: 'Removes the GitType resource.' + parameters: + - name: id + in: path + description: 'GitType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_git_types_id_patch + tags: + - GitType + responses: + 200: + description: 'GitType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the GitType resource.' + description: 'Updates the GitType resource.' + parameters: + - name: id + in: path + description: 'GitType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated GitType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/GitType' + required: true + deprecated: false + parameters: [] + /api/gits: + get: + operationId: api_gits_get_collection + tags: + - Git + responses: + 200: + description: 'Git collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Git-Git.output' + summary: 'Retrieves the collection of Git resources.' + description: 'Retrieves the collection of Git resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: project + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'project[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: gitType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'gitType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: credentialType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'credentialType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: cryptoKeyType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'cryptoKeyType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_gits_post + tags: + - Git + responses: + 201: + description: 'Git resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Git resource.' + description: 'Creates a Git resource.' + parameters: [] + requestBody: + description: 'The new Git resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.input' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.input' + required: true + deprecated: false + parameters: [] + '/api/gits/{id}': + get: + operationId: api_gits_id_get + tags: + - Git + responses: + 200: + description: 'Git resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Git resource.' + description: 'Retrieves a Git resource.' + parameters: + - name: id + in: path + description: 'Git identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_gits_id_put + tags: + - Git + responses: + 200: + description: 'Git resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Git resource.' + description: 'Replaces the Git resource.' + parameters: + - name: id + in: path + description: 'Git identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Git resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.input' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.input' + required: true + deprecated: false + delete: + operationId: api_gits_id_delete + tags: + - Git + responses: + 204: + description: 'Git resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Git resource.' + description: 'Removes the Git resource.' + parameters: + - name: id + in: path + description: 'Git identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_gits_id_patch + tags: + - Git + responses: + 200: + description: 'Git resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Git resource.' + description: 'Updates the Git resource.' + parameters: + - name: id + in: path + description: 'Git identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Git resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Git-Git.input' + required: true + deprecated: false + parameters: [] + '/api/gits/{id}/connect-test': + get: + tags: + - Git + responses: + 200: + description: 'The query run successfully' + content: + application/json: + schema: + type: object + properties: + isSuccessful: {type: boolean} + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + properties: + isSuccessful: {type: boolean} + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Git' + summary: 'Get information about the repository connection' + description: 'It will tests the repository connection by the added credentials' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [] + /api/imported_datas: + get: + operationId: api_imported_datas_get_collection + tags: + - ImportedData + responses: + 200: + description: 'ImportedData collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ImportedData' + summary: 'Retrieves the collection of ImportedData resources.' + description: 'Retrieves the collection of ImportedData resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: dataTransferDataType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'dataTransferDataType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: state + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'state[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'order[createdAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_imported_datas_post + tags: + - ImportedData + responses: + 201: + description: 'ImportedData resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ImportedData resource.' + description: 'Creates a ImportedData resource.' + parameters: [] + requestBody: + description: 'The new ImportedData resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + required: true + deprecated: false + parameters: [] + '/api/imported_datas/{id}': + get: + operationId: api_imported_datas_id_get + tags: + - ImportedData + responses: + 200: + description: 'ImportedData resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + 404: + description: 'Resource not found' + summary: 'Retrieves a ImportedData resource.' + description: 'Retrieves a ImportedData resource.' + parameters: + - name: id + in: path + description: 'ImportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_imported_datas_id_put + tags: + - ImportedData + responses: + 200: + description: 'ImportedData resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ImportedData resource.' + description: 'Replaces the ImportedData resource.' + parameters: + - name: id + in: path + description: 'ImportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ImportedData resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + required: true + deprecated: false + delete: + operationId: api_imported_datas_id_delete + tags: + - ImportedData + responses: + 204: + description: 'ImportedData resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ImportedData resource.' + description: 'Removes the ImportedData resource.' + parameters: + - name: id + in: path + description: 'ImportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_imported_datas_id_patch + tags: + - ImportedData + responses: + 200: + description: 'ImportedData resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ImportedData resource.' + description: 'Updates the ImportedData resource.' + parameters: + - name: id + in: path + description: 'ImportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ImportedData resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ImportedData' + required: true + deprecated: false + parameters: [] + /api/invitations: + get: + operationId: api_invitations_get_collection + tags: + - Invitation + responses: + 200: + description: 'Invitation collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Invitation-Invitation.output' + summary: 'Retrieves the collection of Invitation resources.' + description: 'Retrieves the collection of Invitation resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: user + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'user[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: team + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'team[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: state + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: boolean + style: form + explode: false + allowReserved: false + - name: 'state[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: boolean + style: form + explode: true + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_invitations_post + tags: + - Invitation + responses: + 201: + description: 'Invitation resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Invitation resource.' + description: 'Creates a Invitation resource.' + parameters: [] + requestBody: + description: 'The new Invitation resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + required: true + deprecated: false + parameters: [] + '/api/invitations/{id}': + get: + operationId: api_invitations_id_get + tags: + - Invitation + responses: + 200: + description: 'Invitation resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Invitation resource.' + description: 'Retrieves a Invitation resource.' + parameters: + - name: id + in: path + description: 'Invitation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_invitations_id_put + tags: + - Invitation + responses: + 200: + description: 'Invitation resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Invitation resource.' + description: 'Replaces the Invitation resource.' + parameters: + - name: id + in: path + description: 'Invitation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Invitation resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + required: true + deprecated: false + delete: + operationId: api_invitations_id_delete + tags: + - Invitation + responses: + 204: + description: 'Invitation resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Invitation resource.' + description: 'Removes the Invitation resource.' + parameters: + - name: id + in: path + description: 'Invitation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_invitations_id_patch + tags: + - Invitation + responses: + 200: + description: 'Invitation resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Invitation resource.' + description: 'Updates the Invitation resource.' + parameters: + - name: id + in: path + description: 'Invitation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Invitation resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + required: true + deprecated: false + parameters: [] + /api/organisation_env_vars: + get: + operationId: api_organisation_env_vars_get_collection + tags: + - OrganisationEnvVar + responses: + 200: + description: 'OrganisationEnvVar collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/OrganisationEnvVar' + summary: 'Retrieves the collection of OrganisationEnvVar resources.' + description: 'Retrieves the collection of OrganisationEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: organisation + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'organisation[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_organisation_env_vars_post + tags: + - OrganisationEnvVar + responses: + 201: + description: 'OrganisationEnvVar resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a OrganisationEnvVar resource.' + description: 'Creates a OrganisationEnvVar resource.' + parameters: [] + requestBody: + description: 'The new OrganisationEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + required: true + deprecated: false + parameters: [] + '/api/organisation_env_vars/{id}': + get: + operationId: api_organisation_env_vars_id_get + tags: + - OrganisationEnvVar + responses: + 200: + description: 'OrganisationEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a OrganisationEnvVar resource.' + description: 'Retrieves a OrganisationEnvVar resource.' + parameters: + - name: id + in: path + description: 'OrganisationEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_organisation_env_vars_id_put + tags: + - OrganisationEnvVar + responses: + 200: + description: 'OrganisationEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the OrganisationEnvVar resource.' + description: 'Replaces the OrganisationEnvVar resource.' + parameters: + - name: id + in: path + description: 'OrganisationEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated OrganisationEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + required: true + deprecated: false + delete: + operationId: api_organisation_env_vars_id_delete + tags: + - OrganisationEnvVar + responses: + 204: + description: 'OrganisationEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the OrganisationEnvVar resource.' + description: 'Removes the OrganisationEnvVar resource.' + parameters: + - name: id + in: path + description: 'OrganisationEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_organisation_env_vars_id_patch + tags: + - OrganisationEnvVar + responses: + 200: + description: 'OrganisationEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the OrganisationEnvVar resource.' + description: 'Updates the OrganisationEnvVar resource.' + parameters: + - name: id + in: path + description: 'OrganisationEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated OrganisationEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + required: true + deprecated: false + parameters: [] + /api/organisations: + get: + operationId: api_organisations_get_collection + tags: + - Organisation + responses: + 200: + description: 'Organisation collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Organisation-Organisation.output' + summary: 'Retrieves the collection of Organisation resources.' + description: 'Retrieves the collection of Organisation resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: name + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'name[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: stateByInfra + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'stateByInfra[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: team + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'team[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_organisations_post + tags: + - Organisation + responses: + 201: + description: 'Organisation resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Organisation resource.' + description: 'Creates a Organisation resource.' + parameters: [] + requestBody: + description: 'The new Organisation resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + required: true + deprecated: false + parameters: [] + '/api/organisations/{id}': + get: + operationId: api_organisations_id_get + tags: + - Organisation + responses: + 200: + description: 'Organisation resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Organisation resource.' + description: 'Retrieves a Organisation resource.' + parameters: + - name: id + in: path + description: 'Organisation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_organisations_id_put + tags: + - Organisation + responses: + 200: + description: 'Organisation resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Organisation resource.' + description: 'Replaces the Organisation resource.' + parameters: + - name: id + in: path + description: 'Organisation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Organisation resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + required: true + deprecated: false + delete: + operationId: api_organisations_id_delete + tags: + - Organisation + responses: + 204: + description: 'Organisation resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Organisation resource.' + description: 'Removes the Organisation resource.' + parameters: + - name: id + in: path + description: 'Organisation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_organisations_id_patch + tags: + - Organisation + responses: + 200: + description: 'Organisation resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Organisation resource.' + description: 'Updates the Organisation resource.' + parameters: + - name: id + in: path + description: 'Organisation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Organisation resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + required: true + deprecated: false + parameters: [] + /api/prices: + get: + operationId: api_prices_get_collection + tags: + - Price + responses: + 200: + description: 'Price collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Price' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Price' + summary: 'Retrieves the collection of Price resources.' + description: 'Retrieves the collection of Price resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: product + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'product[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_prices_post + tags: + - Price + responses: + 201: + description: 'Price resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Price resource.' + description: 'Creates a Price resource.' + parameters: [] + requestBody: + description: 'The new Price resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + required: true + deprecated: false + parameters: [] + '/api/prices/{id}': + get: + operationId: api_prices_id_get + tags: + - Price + responses: + 200: + description: 'Price resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + 404: + description: 'Resource not found' + summary: 'Retrieves a Price resource.' + description: 'Retrieves a Price resource.' + parameters: + - name: id + in: path + description: 'Price identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_prices_id_put + tags: + - Price + responses: + 200: + description: 'Price resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Price resource.' + description: 'Replaces the Price resource.' + parameters: + - name: id + in: path + description: 'Price identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Price resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + required: true + deprecated: false + delete: + operationId: api_prices_id_delete + tags: + - Price + responses: + 204: + description: 'Price resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Price resource.' + description: 'Removes the Price resource.' + parameters: + - name: id + in: path + description: 'Price identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_prices_id_patch + tags: + - Price + responses: + 200: + description: 'Price resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Price resource.' + description: 'Updates the Price resource.' + parameters: + - name: id + in: path + description: 'Price identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Price resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Price' + required: true + deprecated: false + parameters: [] + /api/products: + get: + operationId: api_products_get_collection + tags: + - Product + responses: + 200: + description: 'Product collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Product-Product.output' + summary: 'Retrieves the collection of Product resources.' + description: 'Retrieves the collection of Product resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: defaultPrice + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'defaultPrice[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: cluster + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'cluster[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_products_post + tags: + - Product + responses: + 201: + description: 'Product resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Product resource.' + description: 'Creates a Product resource.' + parameters: [] + requestBody: + description: 'The new Product resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.input' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.input' + required: true + deprecated: false + parameters: [] + '/api/products/{id}': + get: + operationId: api_products_id_get + tags: + - Product + responses: + 200: + description: 'Product resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Product resource.' + description: 'Retrieves a Product resource.' + parameters: + - name: id + in: path + description: 'Product identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_products_id_put + tags: + - Product + responses: + 200: + description: 'Product resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Product resource.' + description: 'Replaces the Product resource.' + parameters: + - name: id + in: path + description: 'Product identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Product resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.input' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.input' + required: true + deprecated: false + delete: + operationId: api_products_id_delete + tags: + - Product + responses: + 204: + description: 'Product resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Product resource.' + description: 'Removes the Product resource.' + parameters: + - name: id + in: path + description: 'Product identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_products_id_patch + tags: + - Product + responses: + 200: + description: 'Product resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Product resource.' + description: 'Updates the Product resource.' + parameters: + - name: id + in: path + description: 'Product identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Product resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Product-Product.input' + required: true + deprecated: false + parameters: [] + /api/project_access_gits: + get: + operationId: api_project_access_gits_get_collection + tags: + - ProjectAccessGit + responses: + 200: + description: 'ProjectAccessGit collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessGit' + summary: 'Retrieves the collection of ProjectAccessGit resources.' + description: 'Retrieves the collection of ProjectAccessGit resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectAccess + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccess[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_access_gits_post + tags: + - ProjectAccessGit + responses: + 201: + description: 'ProjectAccessGit resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectAccessGit resource.' + description: 'Creates a ProjectAccessGit resource.' + parameters: [] + requestBody: + description: 'The new ProjectAccessGit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + required: true + deprecated: false + parameters: [] + '/api/project_access_gits/{id}': + get: + operationId: api_project_access_gits_id_get + tags: + - ProjectAccessGit + responses: + 200: + description: 'ProjectAccessGit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectAccessGit resource.' + description: 'Retrieves a ProjectAccessGit resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessGit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_access_gits_id_put + tags: + - ProjectAccessGit + responses: + 200: + description: 'ProjectAccessGit resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectAccessGit resource.' + description: 'Replaces the ProjectAccessGit resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessGit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessGit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + required: true + deprecated: false + delete: + operationId: api_project_access_gits_id_delete + tags: + - ProjectAccessGit + responses: + 204: + description: 'ProjectAccessGit resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectAccessGit resource.' + description: 'Removes the ProjectAccessGit resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessGit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_access_gits_id_patch + tags: + - ProjectAccessGit + responses: + 200: + description: 'ProjectAccessGit resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectAccessGit resource.' + description: 'Updates the ProjectAccessGit resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessGit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessGit resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + required: true + deprecated: false + parameters: [] + /api/project_access_registries: + get: + operationId: api_project_access_registries_get_collection + tags: + - ProjectAccessRegistry + responses: + 200: + description: 'ProjectAccessRegistry collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessRegistry' + summary: 'Retrieves the collection of ProjectAccessRegistry resources.' + description: 'Retrieves the collection of ProjectAccessRegistry resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectAccess + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccess[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_access_registries_post + tags: + - ProjectAccessRegistry + responses: + 201: + description: 'ProjectAccessRegistry resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectAccessRegistry resource.' + description: 'Creates a ProjectAccessRegistry resource.' + parameters: [] + requestBody: + description: 'The new ProjectAccessRegistry resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + required: true + deprecated: false + parameters: [] + '/api/project_access_registries/{id}': + get: + operationId: api_project_access_registries_id_get + tags: + - ProjectAccessRegistry + responses: + 200: + description: 'ProjectAccessRegistry resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectAccessRegistry resource.' + description: 'Retrieves a ProjectAccessRegistry resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessRegistry identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_access_registries_id_put + tags: + - ProjectAccessRegistry + responses: + 200: + description: 'ProjectAccessRegistry resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectAccessRegistry resource.' + description: 'Replaces the ProjectAccessRegistry resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessRegistry identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessRegistry resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + required: true + deprecated: false + delete: + operationId: api_project_access_registries_id_delete + tags: + - ProjectAccessRegistry + responses: + 204: + description: 'ProjectAccessRegistry resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectAccessRegistry resource.' + description: 'Removes the ProjectAccessRegistry resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessRegistry identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_access_registries_id_patch + tags: + - ProjectAccessRegistry + responses: + 200: + description: 'ProjectAccessRegistry resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectAccessRegistry resource.' + description: 'Updates the ProjectAccessRegistry resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessRegistry identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessRegistry resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + required: true + deprecated: false + parameters: [] + /api/project_access_service_accounts: + get: + operationId: api_project_access_service_accounts_get_collection + tags: + - ProjectAccessServiceAccount + responses: + 200: + description: 'ProjectAccessServiceAccount collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + summary: 'Retrieves the collection of ProjectAccessServiceAccount resources.' + description: 'Retrieves the collection of ProjectAccessServiceAccount resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectAccess + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccess[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_access_service_accounts_post + tags: + - ProjectAccessServiceAccount + responses: + 201: + description: 'ProjectAccessServiceAccount resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectAccessServiceAccount resource.' + description: 'Creates a ProjectAccessServiceAccount resource.' + parameters: [] + requestBody: + description: 'The new ProjectAccessServiceAccount resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + required: true + deprecated: false + parameters: [] + '/api/project_access_service_accounts/{id}': + get: + operationId: api_project_access_service_accounts_id_get + tags: + - ProjectAccessServiceAccount + responses: + 200: + description: 'ProjectAccessServiceAccount resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectAccessServiceAccount resource.' + description: 'Retrieves a ProjectAccessServiceAccount resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessServiceAccount identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_access_service_accounts_id_put + tags: + - ProjectAccessServiceAccount + responses: + 200: + description: 'ProjectAccessServiceAccount resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectAccessServiceAccount resource.' + description: 'Replaces the ProjectAccessServiceAccount resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessServiceAccount identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessServiceAccount resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + required: true + deprecated: false + delete: + operationId: api_project_access_service_accounts_id_delete + tags: + - ProjectAccessServiceAccount + responses: + 204: + description: 'ProjectAccessServiceAccount resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectAccessServiceAccount resource.' + description: 'Removes the ProjectAccessServiceAccount resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessServiceAccount identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_access_service_accounts_id_patch + tags: + - ProjectAccessServiceAccount + responses: + 200: + description: 'ProjectAccessServiceAccount resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectAccessServiceAccount resource.' + description: 'Updates the ProjectAccessServiceAccount resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessServiceAccount identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessServiceAccount resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + required: true + deprecated: false + parameters: [] + /api/project_accesses: + get: + operationId: api_project_accesses_get_collection + tags: + - ProjectAccess + responses: + 200: + description: 'ProjectAccess collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccess' + summary: 'Retrieves the collection of ProjectAccess resources.' + description: 'Retrieves the collection of ProjectAccess resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectAccessGit + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccessGit[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: projectAccessRegistry + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccessRegistry[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: projectAccessServiceAccount + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccessServiceAccount[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_accesses_post + tags: + - ProjectAccess + responses: + 201: + description: 'ProjectAccess resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectAccess resource.' + description: 'Creates a ProjectAccess resource.' + parameters: [] + requestBody: + description: 'The new ProjectAccess resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + required: true + deprecated: false + parameters: [] + '/api/project_accesses/{id}': + get: + operationId: api_project_accesses_id_get + tags: + - ProjectAccess + responses: + 200: + description: 'ProjectAccess resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectAccess resource.' + description: 'Retrieves a ProjectAccess resource.' + parameters: + - name: id + in: path + description: 'ProjectAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_accesses_id_put + tags: + - ProjectAccess + responses: + 200: + description: 'ProjectAccess resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectAccess resource.' + description: 'Replaces the ProjectAccess resource.' + parameters: + - name: id + in: path + description: 'ProjectAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccess resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + required: true + deprecated: false + delete: + operationId: api_project_accesses_id_delete + tags: + - ProjectAccess + responses: + 204: + description: 'ProjectAccess resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectAccess resource.' + description: 'Removes the ProjectAccess resource.' + parameters: + - name: id + in: path + description: 'ProjectAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_accesses_id_patch + tags: + - ProjectAccess + responses: + 200: + description: 'ProjectAccess resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectAccess resource.' + description: 'Updates the ProjectAccess resource.' + parameters: + - name: id + in: path + description: 'ProjectAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccess resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccess' + required: true + deprecated: false + parameters: [] + /api/project_env_vars: + get: + operationId: api_project_env_vars_get_collection + tags: + - ProjectEnvVar + responses: + 200: + description: 'ProjectEnvVar collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar' + summary: 'Retrieves the collection of ProjectEnvVar resources.' + description: 'Retrieves the collection of ProjectEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: project + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'project[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_env_vars_post + tags: + - ProjectEnvVar + responses: + 201: + description: 'ProjectEnvVar resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectEnvVar resource.' + description: 'Creates a ProjectEnvVar resource.' + parameters: [] + requestBody: + description: 'The new ProjectEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + required: true + deprecated: false + parameters: [] + '/api/project_env_vars/{id}': + get: + operationId: api_project_env_vars_id_get + tags: + - ProjectEnvVar + responses: + 200: + description: 'ProjectEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectEnvVar resource.' + description: 'Retrieves a ProjectEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_env_vars_id_put + tags: + - ProjectEnvVar + responses: + 200: + description: 'ProjectEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectEnvVar resource.' + description: 'Replaces the ProjectEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + required: true + deprecated: false + delete: + operationId: api_project_env_vars_id_delete + tags: + - ProjectEnvVar + responses: + 204: + description: 'ProjectEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectEnvVar resource.' + description: 'Removes the ProjectEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_env_vars_id_patch + tags: + - ProjectEnvVar + responses: + 200: + description: 'ProjectEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectEnvVar resource.' + description: 'Updates the ProjectEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + required: true + deprecated: false + parameters: [] + /api/project_type_version_env_var_examples: + get: + operationId: api_project_type_version_env_var_examples_get_collection + tags: + - ProjectTypeVersionEnvVarExample + responses: + 200: + description: 'ProjectTypeVersionEnvVarExample collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + summary: 'Retrieves the collection of ProjectTypeVersionEnvVarExample resources.' + description: 'Retrieves the collection of ProjectTypeVersionEnvVarExample resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectTypeVersionEnvVar + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectTypeVersionEnvVar[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_type_version_env_var_examples_post + tags: + - ProjectTypeVersionEnvVarExample + responses: + 201: + description: 'ProjectTypeVersionEnvVarExample resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectTypeVersionEnvVarExample resource.' + description: 'Creates a ProjectTypeVersionEnvVarExample resource.' + parameters: [] + requestBody: + description: 'The new ProjectTypeVersionEnvVarExample resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + required: true + deprecated: false + parameters: [] + '/api/project_type_version_env_var_examples/{id}': + get: + operationId: api_project_type_version_env_var_examples_id_get + tags: + - ProjectTypeVersionEnvVarExample + responses: + 200: + description: 'ProjectTypeVersionEnvVarExample resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectTypeVersionEnvVarExample resource.' + description: 'Retrieves a ProjectTypeVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_type_version_env_var_examples_id_put + tags: + - ProjectTypeVersionEnvVarExample + responses: + 200: + description: 'ProjectTypeVersionEnvVarExample resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectTypeVersionEnvVarExample resource.' + description: 'Replaces the ProjectTypeVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersionEnvVarExample resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + required: true + deprecated: false + delete: + operationId: api_project_type_version_env_var_examples_id_delete + tags: + - ProjectTypeVersionEnvVarExample + responses: + 204: + description: 'ProjectTypeVersionEnvVarExample resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectTypeVersionEnvVarExample resource.' + description: 'Removes the ProjectTypeVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_type_version_env_var_examples_id_patch + tags: + - ProjectTypeVersionEnvVarExample + responses: + 200: + description: 'ProjectTypeVersionEnvVarExample resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectTypeVersionEnvVarExample resource.' + description: 'Updates the ProjectTypeVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersionEnvVarExample resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + required: true + deprecated: false + parameters: [] + /api/project_type_version_env_vars: + get: + operationId: api_project_type_version_env_vars_get_collection + tags: + - ProjectTypeVersionEnvVar + responses: + 200: + description: 'ProjectTypeVersionEnvVar collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + summary: 'Retrieves the collection of ProjectTypeVersionEnvVar resources.' + description: 'Retrieves the collection of ProjectTypeVersionEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectTypeVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectTypeVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarValidations + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarValidations[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_type_version_env_vars_post + tags: + - ProjectTypeVersionEnvVar + responses: + 201: + description: 'ProjectTypeVersionEnvVar resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectTypeVersionEnvVar resource.' + description: 'Creates a ProjectTypeVersionEnvVar resource.' + parameters: [] + requestBody: + description: 'The new ProjectTypeVersionEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + required: true + deprecated: false + parameters: [] + '/api/project_type_version_env_vars/{id}': + get: + operationId: api_project_type_version_env_vars_id_get + tags: + - ProjectTypeVersionEnvVar + responses: + 200: + description: 'ProjectTypeVersionEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectTypeVersionEnvVar resource.' + description: 'Retrieves a ProjectTypeVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_type_version_env_vars_id_put + tags: + - ProjectTypeVersionEnvVar + responses: + 200: + description: 'ProjectTypeVersionEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectTypeVersionEnvVar resource.' + description: 'Replaces the ProjectTypeVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersionEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + required: true + deprecated: false + delete: + operationId: api_project_type_version_env_vars_id_delete + tags: + - ProjectTypeVersionEnvVar + responses: + 204: + description: 'ProjectTypeVersionEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectTypeVersionEnvVar resource.' + description: 'Removes the ProjectTypeVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_type_version_env_vars_id_patch + tags: + - ProjectTypeVersionEnvVar + responses: + 200: + description: 'ProjectTypeVersionEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectTypeVersionEnvVar resource.' + description: 'Updates the ProjectTypeVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersionEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + required: true + deprecated: false + parameters: [] + /api/project_type_versions: + get: + operationId: api_project_type_versions_get_collection + tags: + - ProjectTypeVersion + responses: + 200: + description: 'ProjectTypeVersion collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersion' + summary: 'Retrieves the collection of ProjectTypeVersion resources.' + description: 'Retrieves the collection of ProjectTypeVersion resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_type_versions_post + tags: + - ProjectTypeVersion + responses: + 201: + description: 'ProjectTypeVersion resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectTypeVersion resource.' + description: 'Creates a ProjectTypeVersion resource.' + parameters: [] + requestBody: + description: 'The new ProjectTypeVersion resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + required: true + deprecated: false + parameters: [] + '/api/project_type_versions/{id}': + get: + operationId: api_project_type_versions_id_get + tags: + - ProjectTypeVersion + responses: + 200: + description: 'ProjectTypeVersion resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectTypeVersion resource.' + description: 'Retrieves a ProjectTypeVersion resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_type_versions_id_put + tags: + - ProjectTypeVersion + responses: + 200: + description: 'ProjectTypeVersion resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectTypeVersion resource.' + description: 'Replaces the ProjectTypeVersion resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersion resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + required: true + deprecated: false + delete: + operationId: api_project_type_versions_id_delete + tags: + - ProjectTypeVersion + responses: + 204: + description: 'ProjectTypeVersion resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectTypeVersion resource.' + description: 'Removes the ProjectTypeVersion resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_type_versions_id_patch + tags: + - ProjectTypeVersion + responses: + 200: + description: 'ProjectTypeVersion resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectTypeVersion resource.' + description: 'Updates the ProjectTypeVersion resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersion resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + required: true + deprecated: false + parameters: [] + /api/project_types: + get: + operationId: api_project_types_get_collection + tags: + - ProjectType + responses: + 200: + description: 'ProjectType collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectType' + summary: 'Retrieves the collection of ProjectType resources.' + description: 'Retrieves the collection of ProjectType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: 'order[name]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_project_types_post + tags: + - ProjectType + responses: + 201: + description: 'ProjectType resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectType resource.' + description: 'Creates a ProjectType resource.' + parameters: [] + requestBody: + description: 'The new ProjectType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + required: true + deprecated: false + parameters: [] + '/api/project_types/{id}': + get: + operationId: api_project_types_id_get + tags: + - ProjectType + responses: + 200: + description: 'ProjectType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectType resource.' + description: 'Retrieves a ProjectType resource.' + parameters: + - name: id + in: path + description: 'ProjectType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_types_id_put + tags: + - ProjectType + responses: + 200: + description: 'ProjectType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectType resource.' + description: 'Replaces the ProjectType resource.' + parameters: + - name: id + in: path + description: 'ProjectType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + required: true + deprecated: false + delete: + operationId: api_project_types_id_delete + tags: + - ProjectType + responses: + 204: + description: 'ProjectType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectType resource.' + description: 'Removes the ProjectType resource.' + parameters: + - name: id + in: path + description: 'ProjectType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_types_id_patch + tags: + - ProjectType + responses: + 200: + description: 'ProjectType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectType resource.' + description: 'Updates the ProjectType resource.' + parameters: + - name: id + in: path + description: 'ProjectType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectType' + required: true + deprecated: false + parameters: [] + /api/projects: + get: + operationId: api_projects_get_collection + tags: + - Project + responses: + 200: + description: 'Project collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Project-Project.output' + summary: 'Retrieves the collection of Project resources.' + description: 'Retrieves the collection of Project resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: team.organisation.id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'team.organisation.id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: state + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'state[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: git + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'git[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: team + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'team[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: stateByInfra + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'stateByInfra[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'createdAt[before]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'createdAt[strictly_before]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'createdAt[after]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'createdAt[strictly_after]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: projectTypeVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectTypeVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_projects_post + tags: + - Project + responses: + 201: + description: 'Project resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Project resource.' + description: 'Creates a Project resource.' + parameters: [] + requestBody: + description: 'The new Project resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.input' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.input' + required: true + deprecated: false + parameters: [] + '/api/projects/{id}': + get: + operationId: api_projects_id_get + tags: + - Project + responses: + 200: + description: 'Project resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Project resource.' + description: 'Retrieves a Project resource.' + parameters: + - name: id + in: path + description: 'Project identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_projects_id_put + tags: + - Project + responses: + 200: + description: 'Project resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Project resource.' + description: 'Replaces the Project resource.' + parameters: + - name: id + in: path + description: 'Project identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Project resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.input' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.input' + required: true + deprecated: false + delete: + operationId: api_projects_id_delete + tags: + - Project + responses: + 204: + description: 'Project resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Project resource.' + description: 'Removes the Project resource.' + parameters: + - name: id + in: path + description: 'Project identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_projects_id_patch + tags: + - Project + responses: + 200: + description: 'Project resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Project resource.' + description: 'Updates the Project resource.' + parameters: + - name: id + in: path + description: 'Project identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Project resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Project-Project.input' + required: true + deprecated: false + parameters: [] + '/api/projects/{id}/costs': + get: + operationId: api_projects_idcosts_get + tags: + - Project + responses: + 200: + description: 'Project resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Project resource.' + description: 'Retrieves a Project resource.' + parameters: + - name: id + in: path + description: 'Project identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [] + /api/providers: + get: + operationId: api_providers_get_collection + tags: + - Provider + responses: + 200: + description: 'Provider collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Provider' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Provider' + summary: 'Retrieves the collection of Provider resources.' + description: 'Retrieves the collection of Provider resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_providers_post + tags: + - Provider + responses: + 201: + description: 'Provider resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Provider resource.' + description: 'Creates a Provider resource.' + parameters: [] + requestBody: + description: 'The new Provider resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + required: true + deprecated: false + parameters: [] + '/api/providers/{id}': + get: + operationId: api_providers_id_get + tags: + - Provider + responses: + 200: + description: 'Provider resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + 404: + description: 'Resource not found' + summary: 'Retrieves a Provider resource.' + description: 'Retrieves a Provider resource.' + parameters: + - name: id + in: path + description: 'Provider identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_providers_id_put + tags: + - Provider + responses: + 200: + description: 'Provider resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Provider resource.' + description: 'Replaces the Provider resource.' + parameters: + - name: id + in: path + description: 'Provider identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Provider resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + required: true + deprecated: false + delete: + operationId: api_providers_id_delete + tags: + - Provider + responses: + 204: + description: 'Provider resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Provider resource.' + description: 'Removes the Provider resource.' + parameters: + - name: id + in: path + description: 'Provider identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_providers_id_patch + tags: + - Provider + responses: + 200: + description: 'Provider resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Provider resource.' + description: 'Updates the Provider resource.' + parameters: + - name: id + in: path + description: 'Provider identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Provider resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Provider' + required: true + deprecated: false + parameters: [] + /api/resource_type_limits: + get: + operationId: api_resource_type_limits_get_collection + tags: + - ResourceTypeLimit + responses: + 200: + description: 'ResourceTypeLimit collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceTypeLimit' + summary: 'Retrieves the collection of ResourceTypeLimit resources.' + description: 'Retrieves the collection of ResourceTypeLimit resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_resource_type_limits_post + tags: + - ResourceTypeLimit + responses: + 201: + description: 'ResourceTypeLimit resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ResourceTypeLimit resource.' + description: 'Creates a ResourceTypeLimit resource.' + parameters: [] + requestBody: + description: 'The new ResourceTypeLimit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + required: true + deprecated: false + parameters: [] + '/api/resource_type_limits/{id}': + get: + operationId: api_resource_type_limits_id_get + tags: + - ResourceTypeLimit + responses: + 200: + description: 'ResourceTypeLimit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + 404: + description: 'Resource not found' + summary: 'Retrieves a ResourceTypeLimit resource.' + description: 'Retrieves a ResourceTypeLimit resource.' + parameters: + - name: id + in: path + description: 'ResourceTypeLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_resource_type_limits_id_put + tags: + - ResourceTypeLimit + responses: + 200: + description: 'ResourceTypeLimit resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ResourceTypeLimit resource.' + description: 'Replaces the ResourceTypeLimit resource.' + parameters: + - name: id + in: path + description: 'ResourceTypeLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ResourceTypeLimit resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + required: true + deprecated: false + delete: + operationId: api_resource_type_limits_id_delete + tags: + - ResourceTypeLimit + responses: + 204: + description: 'ResourceTypeLimit resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ResourceTypeLimit resource.' + description: 'Removes the ResourceTypeLimit resource.' + parameters: + - name: id + in: path + description: 'ResourceTypeLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_resource_type_limits_id_patch + tags: + - ResourceTypeLimit + responses: + 200: + description: 'ResourceTypeLimit resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ResourceTypeLimit resource.' + description: 'Updates the ResourceTypeLimit resource.' + parameters: + - name: id + in: path + description: 'ResourceTypeLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ResourceTypeLimit resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + required: true + deprecated: false + parameters: [] + /api/resource_types: + get: + operationId: api_resource_types_get_collection + tags: + - ResourceType + responses: + 200: + description: 'ResourceType collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + summary: 'Retrieves the collection of ResourceType resources.' + description: 'Retrieves the collection of ResourceType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: resourceTypeLimit + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'resourceTypeLimit[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_resource_types_post + tags: + - ResourceType + responses: + 201: + description: 'ResourceType resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ResourceType resource.' + description: 'Creates a ResourceType resource.' + parameters: [] + requestBody: + description: 'The new ResourceType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + required: true + deprecated: false + parameters: [] + '/api/resource_types/{id}': + get: + operationId: api_resource_types_id_get + tags: + - ResourceType + responses: + 200: + description: 'ResourceType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a ResourceType resource.' + description: 'Retrieves a ResourceType resource.' + parameters: + - name: id + in: path + description: 'ResourceType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_resource_types_id_put + tags: + - ResourceType + responses: + 200: + description: 'ResourceType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ResourceType resource.' + description: 'Replaces the ResourceType resource.' + parameters: + - name: id + in: path + description: 'ResourceType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ResourceType resource' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + required: true + deprecated: false + delete: + operationId: api_resource_types_id_delete + tags: + - ResourceType + responses: + 204: + description: 'ResourceType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ResourceType resource.' + description: 'Removes the ResourceType resource.' + parameters: + - name: id + in: path + description: 'ResourceType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_resource_types_id_patch + tags: + - ResourceType + responses: + 200: + description: 'ResourceType resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ResourceType resource.' + description: 'Updates the ResourceType resource.' + parameters: + - name: id + in: path + description: 'ResourceType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ResourceType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + required: true + deprecated: false + parameters: [] + /api/role_groups: + get: + operationId: api_role_groups_get_collection + tags: + - RoleGroup + responses: + 200: + description: 'RoleGroup collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/RoleGroup' + summary: 'Retrieves the collection of RoleGroup resources.' + description: 'Retrieves the collection of RoleGroup resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: name + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_role_groups_post + tags: + - RoleGroup + responses: + 201: + description: 'RoleGroup resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a RoleGroup resource.' + description: 'Creates a RoleGroup resource.' + parameters: [] + requestBody: + description: 'The new RoleGroup resource' + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + required: true + deprecated: false + parameters: [] + '/api/role_groups/{id}': + get: + operationId: api_role_groups_id_get + tags: + - RoleGroup + responses: + 200: + description: 'RoleGroup resource' + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + 404: + description: 'Resource not found' + summary: 'Retrieves a RoleGroup resource.' + description: 'Retrieves a RoleGroup resource.' + parameters: + - name: id + in: path + description: 'RoleGroup identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_role_groups_id_put + tags: + - RoleGroup + responses: + 200: + description: 'RoleGroup resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the RoleGroup resource.' + description: 'Replaces the RoleGroup resource.' + parameters: + - name: id + in: path + description: 'RoleGroup identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated RoleGroup resource' + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + required: true + deprecated: false + delete: + operationId: api_role_groups_id_delete + tags: + - RoleGroup + responses: + 204: + description: 'RoleGroup resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the RoleGroup resource.' + description: 'Removes the RoleGroup resource.' + parameters: + - name: id + in: path + description: 'RoleGroup identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_role_groups_id_patch + tags: + - RoleGroup + responses: + 200: + description: 'RoleGroup resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the RoleGroup resource.' + description: 'Updates the RoleGroup resource.' + parameters: + - name: id + in: path + description: 'RoleGroup identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated RoleGroup resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/RoleGroup' + required: true + deprecated: false + parameters: [] + /api/state_by_infras: + get: + operationId: api_state_by_infras_get_collection + tags: + - StateByInfra + responses: + 200: + description: 'StateByInfra collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/StateByInfra' + summary: 'Retrieves the collection of StateByInfra resources.' + description: 'Retrieves the collection of StateByInfra resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_state_by_infras_post + tags: + - StateByInfra + responses: + 201: + description: 'StateByInfra resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a StateByInfra resource.' + description: 'Creates a StateByInfra resource.' + parameters: [] + requestBody: + description: 'The new StateByInfra resource' + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + required: true + deprecated: false + parameters: [] + '/api/state_by_infras/{id}': + get: + operationId: api_state_by_infras_id_get + tags: + - StateByInfra + responses: + 200: + description: 'StateByInfra resource' + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + 404: + description: 'Resource not found' + summary: 'Retrieves a StateByInfra resource.' + description: 'Retrieves a StateByInfra resource.' + parameters: + - name: id + in: path + description: 'StateByInfra identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_state_by_infras_id_put + tags: + - StateByInfra + responses: + 200: + description: 'StateByInfra resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the StateByInfra resource.' + description: 'Replaces the StateByInfra resource.' + parameters: + - name: id + in: path + description: 'StateByInfra identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated StateByInfra resource' + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + required: true + deprecated: false + delete: + operationId: api_state_by_infras_id_delete + tags: + - StateByInfra + responses: + 204: + description: 'StateByInfra resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the StateByInfra resource.' + description: 'Removes the StateByInfra resource.' + parameters: + - name: id + in: path + description: 'StateByInfra identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_state_by_infras_id_patch + tags: + - StateByInfra + responses: + 200: + description: 'StateByInfra resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the StateByInfra resource.' + description: 'Updates the StateByInfra resource.' + parameters: + - name: id + in: path + description: 'StateByInfra identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated StateByInfra resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/StateByInfra' + required: true + deprecated: false + parameters: [] + /api/states: + get: + operationId: api_states_get_collection + tags: + - State + responses: + 200: + description: 'State collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/State' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/State' + summary: 'Retrieves the collection of State resources.' + description: 'Retrieves the collection of State resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: seqNumber + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'seqNumber[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: 'order[name]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_states_post + tags: + - State + responses: + 201: + description: 'State resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a State resource.' + description: 'Creates a State resource.' + parameters: [] + requestBody: + description: 'The new State resource' + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + required: true + deprecated: false + parameters: [] + '/api/states/{id}': + get: + operationId: api_states_id_get + tags: + - State + responses: + 200: + description: 'State resource' + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + 404: + description: 'Resource not found' + summary: 'Retrieves a State resource.' + description: 'Retrieves a State resource.' + parameters: + - name: id + in: path + description: 'State identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_states_id_put + tags: + - State + responses: + 200: + description: 'State resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the State resource.' + description: 'Replaces the State resource.' + parameters: + - name: id + in: path + description: 'State identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated State resource' + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + required: true + deprecated: false + delete: + operationId: api_states_id_delete + tags: + - State + responses: + 204: + description: 'State resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the State resource.' + description: 'Removes the State resource.' + parameters: + - name: id + in: path + description: 'State identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_states_id_patch + tags: + - State + responses: + 200: + description: 'State resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the State resource.' + description: 'Updates the State resource.' + parameters: + - name: id + in: path + description: 'State identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated State resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/State' + required: true + deprecated: false + parameters: [] + /api/team_env_vars: + get: + operationId: api_team_env_vars_get_collection + tags: + - TeamEnvVar + responses: + 200: + description: 'TeamEnvVar collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/TeamEnvVar' + summary: 'Retrieves the collection of TeamEnvVar resources.' + description: 'Retrieves the collection of TeamEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: team + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'team[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_team_env_vars_post + tags: + - TeamEnvVar + responses: + 201: + description: 'TeamEnvVar resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a TeamEnvVar resource.' + description: 'Creates a TeamEnvVar resource.' + parameters: [] + requestBody: + description: 'The new TeamEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + required: true + deprecated: false + parameters: [] + '/api/team_env_vars/{id}': + get: + operationId: api_team_env_vars_id_get + tags: + - TeamEnvVar + responses: + 200: + description: 'TeamEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a TeamEnvVar resource.' + description: 'Retrieves a TeamEnvVar resource.' + parameters: + - name: id + in: path + description: 'TeamEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_team_env_vars_id_put + tags: + - TeamEnvVar + responses: + 200: + description: 'TeamEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the TeamEnvVar resource.' + description: 'Replaces the TeamEnvVar resource.' + parameters: + - name: id + in: path + description: 'TeamEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TeamEnvVar resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + required: true + deprecated: false + delete: + operationId: api_team_env_vars_id_delete + tags: + - TeamEnvVar + responses: + 204: + description: 'TeamEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the TeamEnvVar resource.' + description: 'Removes the TeamEnvVar resource.' + parameters: + - name: id + in: path + description: 'TeamEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_team_env_vars_id_patch + tags: + - TeamEnvVar + responses: + 200: + description: 'TeamEnvVar resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the TeamEnvVar resource.' + description: 'Updates the TeamEnvVar resource.' + parameters: + - name: id + in: path + description: 'TeamEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TeamEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + required: true + deprecated: false + parameters: [] + /api/teams: + get: + operationId: api_teams_get_collection + tags: + - Team + responses: + 200: + description: 'Team collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Team-Team.output' + summary: 'Retrieves the collection of Team resources.' + description: 'Retrieves the collection of Team resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: 'exists[organisation]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: boolean + style: form + explode: false + allowReserved: false + - name: name + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: user + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'user[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: organisation + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'organisation[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: stateByInfra + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'stateByInfra[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_teams_post + tags: + - Team + responses: + 201: + description: 'Team resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Team resource.' + description: 'Creates a Team resource.' + parameters: [] + requestBody: + description: 'The new Team resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.input' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.input' + required: true + deprecated: false + parameters: [] + '/api/teams/{id}': + get: + operationId: api_teams_id_get + tags: + - Team + responses: + 200: + description: 'Team resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Team resource.' + description: 'Retrieves a Team resource.' + parameters: + - name: id + in: path + description: 'Team identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_teams_id_put + tags: + - Team + responses: + 200: + description: 'Team resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Team resource.' + description: 'Replaces the Team resource.' + parameters: + - name: id + in: path + description: 'Team identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Team resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.input' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.input' + required: true + deprecated: false + delete: + operationId: api_teams_id_delete + tags: + - Team + responses: + 204: + description: 'Team resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Team resource.' + description: 'Removes the Team resource.' + parameters: + - name: id + in: path + description: 'Team identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_teams_id_patch + tags: + - Team + responses: + 200: + description: 'Team resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Team resource.' + description: 'Updates the Team resource.' + parameters: + - name: id + in: path + description: 'Team identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Team resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Team-Team.input' + required: true + deprecated: false + parameters: [] + '/api/teams/{id}/user-role': + put: + operationId: api_teams_iduser-role_put + tags: + - Team + responses: + 200: + description: 'Team resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Team resource.' + description: 'Replaces the Team resource.' + parameters: + - name: id + in: path + description: 'Team identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Team resource' + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.input' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.input' + required: true + deprecated: false + parameters: [] + /api/template_environments: + get: + operationId: api_template_environments_get_collection + tags: + - TemplateEnvironment + responses: + 200: + description: 'TemplateEnvironment collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + summary: 'Retrieves the collection of TemplateEnvironment resources.' + description: 'Retrieves the collection of TemplateEnvironment resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: templateProject + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'templateProject[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_template_environments_post + tags: + - TemplateEnvironment + responses: + 201: + description: 'TemplateEnvironment resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a TemplateEnvironment resource.' + description: 'Creates a TemplateEnvironment resource.' + parameters: [] + requestBody: + description: 'The new TemplateEnvironment resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + required: true + deprecated: false + parameters: [] + '/api/template_environments/{id}': + get: + operationId: api_template_environments_id_get + tags: + - TemplateEnvironment + responses: + 200: + description: 'TemplateEnvironment resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a TemplateEnvironment resource.' + description: 'Retrieves a TemplateEnvironment resource.' + parameters: + - name: id + in: path + description: 'TemplateEnvironment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_template_environments_id_put + tags: + - TemplateEnvironment + responses: + 200: + description: 'TemplateEnvironment resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the TemplateEnvironment resource.' + description: 'Replaces the TemplateEnvironment resource.' + parameters: + - name: id + in: path + description: 'TemplateEnvironment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TemplateEnvironment resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + required: true + deprecated: false + delete: + operationId: api_template_environments_id_delete + tags: + - TemplateEnvironment + responses: + 204: + description: 'TemplateEnvironment resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the TemplateEnvironment resource.' + description: 'Removes the TemplateEnvironment resource.' + parameters: + - name: id + in: path + description: 'TemplateEnvironment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_template_environments_id_patch + tags: + - TemplateEnvironment + responses: + 200: + description: 'TemplateEnvironment resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the TemplateEnvironment resource.' + description: 'Updates the TemplateEnvironment resource.' + parameters: + - name: id + in: path + description: 'TemplateEnvironment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TemplateEnvironment resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + required: true + deprecated: false + parameters: [] + /api/template_projects: + get: + operationId: api_template_projects_get_collection + tags: + - TemplateProject + responses: + 200: + description: 'TemplateProject collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + summary: 'Retrieves the collection of TemplateProject resources.' + description: 'Retrieves the collection of TemplateProject resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectTypeVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectTypeVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_template_projects_post + tags: + - TemplateProject + responses: + 201: + description: 'TemplateProject resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a TemplateProject resource.' + description: 'Creates a TemplateProject resource.' + parameters: [] + requestBody: + description: 'The new TemplateProject resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + required: true + deprecated: false + parameters: [] + '/api/template_projects/{id}': + get: + operationId: api_template_projects_id_get + tags: + - TemplateProject + responses: + 200: + description: 'TemplateProject resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a TemplateProject resource.' + description: 'Retrieves a TemplateProject resource.' + parameters: + - name: id + in: path + description: 'TemplateProject identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_template_projects_id_put + tags: + - TemplateProject + responses: + 200: + description: 'TemplateProject resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the TemplateProject resource.' + description: 'Replaces the TemplateProject resource.' + parameters: + - name: id + in: path + description: 'TemplateProject identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TemplateProject resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + required: true + deprecated: false + delete: + operationId: api_template_projects_id_delete + tags: + - TemplateProject + responses: + 204: + description: 'TemplateProject resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the TemplateProject resource.' + description: 'Removes the TemplateProject resource.' + parameters: + - name: id + in: path + description: 'TemplateProject identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_template_projects_id_patch + tags: + - TemplateProject + responses: + 200: + description: 'TemplateProject resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the TemplateProject resource.' + description: 'Updates the TemplateProject resource.' + parameters: + - name: id + in: path + description: 'TemplateProject identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TemplateProject resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + required: true + deprecated: false + parameters: [] + /api/users: + get: + operationId: api_users_get_collection + tags: + - User + responses: + 200: + description: 'User collection' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/User' + summary: 'Retrieves the collection of User resources.' + description: 'Retrieves the collection of User resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: roleGroup + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'roleGroup[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: team + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'team[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_users_post + tags: + - User + responses: + 201: + description: 'User resource created' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a User resource.' + description: 'Creates a User resource.' + parameters: [] + requestBody: + description: 'The new User resource' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + required: true + deprecated: false + parameters: [] + /api/users/activate: + put: + tags: + - User + responses: + 200: + description: 'The user has been activated successfully' + content: + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + summary: 'User activation entry point' + description: 'If you have the correct hash string, you can activate your freshly + registered user' + parameters: + - name: hash + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + parameters: [] + /api/users/check-email: + get: + tags: + - User + responses: + 200: + description: 'The query has been requested successfully' + content: + application/json: + schema: + type: object + properties: + isNotExists: {type: boolean} + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + properties: + isNotExists: {type: boolean} + 403: + description: 'You have no permission to query this' + summary: 'Check the email existence' + description: "This entry point checks an email address' existence in database" + parameters: + - name: email + in: query + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + parameters: [] + /api/users/check-username: + get: + tags: + - User + responses: + 200: + description: 'The query has been requested successfully' + content: + application/json: + schema: + type: object + properties: + isNotExists: {type: boolean} + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + properties: + isNotExists: {type: boolean} + 403: + description: 'You have no permission to query this' + summary: 'Check the username existence' + description: "This entry point checks an username's existence in database" + parameters: + - name: username + in: query + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + parameters: [] + /api/users/discover_mercure: + get: + tags: + - User + responses: + 200: + description: 'Successfully authenticated for Mercure protocol' + content: + application/json: + schema: + $ref: '#/components/schemas/Mercure.DiscoverResponse' + headers: + Set-Cookie: + schema: + type: string + description: 'Its name is mercureAuthorization' + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + $ref: '#/components/schemas/Mercure.DiscoverResponse' + headers: + Set-Cookie: + schema: + type: string + description: 'Its name is mercureAuthorization' + 403: + description: 'You have no permission to query this' + summary: 'Retrieve cookie for Mercure authentication' + description: |2- + + It will discovers for mercure JWT token for you - w/ take consideration your permissions + + security: + - cookieAuth: [] + parameters: [] + /api/users/forgot-password: + put: + tags: + - User + responses: + 200: + description: 'The email sent successfully' + content: + application/json: + schema: + type: object + properties: + msg: {type: string} + error: {type: boolean} + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + properties: + msg: {type: string} + error: {type: boolean} + 403: + description: 'You have no permission to query this' + summary: 'Restore password through email' + description: 'If the user exists, we will send an email to restore password' + requestBody: + description: '' + content: + application/json: + schema: + type: object + properties: + email: + type: string + required: false + parameters: [] + /api/users/register: + post: + tags: + - User + responses: + 200: + description: 'User resource created' + content: + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'User creation entry point' + description: 'An unauthenticated user can create its own account in database' + parameters: [] + /api/users/reset-password: + put: + tags: + - User + responses: + 200: + description: 'The email sent successfully' + content: + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + summary: 'Change the current password' + description: 'The user can change his password if he has the current password' + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + changePassword: + type: string + required: false + parameters: [] + '/api/users/{id}': + get: + operationId: api_users_id_get + tags: + - User + responses: + 200: + description: 'User resource' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + 404: + description: 'Resource not found' + summary: 'Retrieves a User resource.' + description: 'Retrieves a User resource.' + parameters: + - name: id + in: path + description: 'User identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_users_id_put + tags: + - User + responses: + 200: + description: 'User resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the User resource.' + description: 'Replaces the User resource.' + parameters: + - name: id + in: path + description: 'User identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated User resource' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + required: true + deprecated: false + delete: + operationId: api_users_id_delete + tags: + - User + responses: + 204: + description: 'User resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the User resource.' + description: 'Removes the User resource.' + parameters: + - name: id + in: path + description: 'User identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_users_id_patch + tags: + - User + responses: + 200: + description: 'User resource updated' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + links: {} + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the User resource.' + description: 'Updates the User resource.' + parameters: + - name: id + in: path + description: 'User identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated User resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/User' + required: true + deprecated: false + parameters: [] + '/api/users/{id}/administrate': + get: + tags: + - User + responses: + 200: + description: 'User administrate request granted. Authentication success' + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.ApiTokenResponse' + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.ApiTokenResponse' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Get authentication data from another user' + description: 'An administrator user can control another non-admin user i.e. + through the UI' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [] + '/api/users/{id}/finance/costs': + get: + tags: + - User + responses: + 200: + description: 'The query is queried successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.CostsResponse' + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.CostsResponse' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Get resource costs information' + description: 'You can query the summary of costs of CPU, memory and storage' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [] + '/api/users/{id}/finance/detach-card': + patch: + tags: + - User + responses: + 200: + description: 'The response is an empty object on success' + content: + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Detach a payment method from the user' + description: 'WARNING! It is a permanent, irreversible process' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + - name: paymentMethodId + in: query + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + parameters: [] + '/api/users/{id}/finance/invoices': + get: + tags: + - User + responses: + 200: + description: 'The query is queried successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.InvoicesResponse' + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.InvoicesResponse' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Get invoices and some necessary data from payment module' + description: |2- + + You You can retrieve all user related customer, + payment methods and invoices data from Stripe + + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [] + '/api/users/{id}/finance/pay': + patch: + tags: + - User + responses: + 200: + description: |- + The response contains all invoices. This is documented here - + https://stripe.com/docs/api/invoices/list?lang=php + 201: + description: 'The same as the HTTP 200' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Initiate a payment for the user' + description: 'It sends a payment initiative to the payment API through our API' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + - name: invoiceId + in: query + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + - name: paymentMethodId + in: query + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + parameters: [] + '/api/users/{id}/finance/subscribe-info': + get: + tags: + - User + responses: + 200: + description: 'Subscription successful' + content: + application/json: + schema: + type: object + properties: + clientSecret: {type: string} + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + properties: + clientSecret: {type: string} + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: "Get payment module's access token" + description: 'Stripe access token information can be retrieved through this + entry point' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [] + '/api/users/{id}/remove-account': + delete: + tags: + - User + responses: + 200: + description: 'User resource deleted' + content: + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'User can delete itself' + description: 'User can delete its whole account w/ its all data' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [] +components: + schemas: + AbstractEnvVar: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + rawValue: + readOnly: true + type: + - string + - 'null' + AbstractEnvironment: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + envVar: + type: array + items: + type: string + environmentComponent: + type: array + items: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + AbstractProject: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + AccessCode: + type: object + description: 'Class AccessCode' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + accessCode: + type: + - string + - 'null' + user: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + userId: + readOnly: true + type: + - string + - 'null' + usedAt: + type: + - string + - 'null' + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Cluster: + type: object + description: 'Class Cluster' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: string + example: 'Hetzner EU' + description: "This is the 'Display name' in the infrastructure" + codeName: + type: string + example: dev-rc-worker-1-hetzner-eu + description: "This is the cluster's name in the infrastructure" + kubecostUrl: + type: + - string + - 'null' + kubecostUser: + type: + - string + - 'null' + kubecostPass: + type: + - string + - 'null' + changeKubecostPass: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + clusterServer: + type: + - string + - 'null' + clusterCertificateAuthorityData: + type: + - string + - 'null' + oidcIssuerUrl: + type: + - string + - 'null' + oidcClientID: + type: + - string + - 'null' + oidcClientSecret: + type: + - string + - 'null' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + provider: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + products: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Cluster-Cluster.withProvider: + type: object + description: 'Class Cluster' + deprecated: false + properties: + name: + type: string + example: 'Hetzner EU' + description: "This is the 'Display name' in the infrastructure" + provider: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Provider-Cluster.withProvider' + - type: 'null' + Component: + type: object + description: 'Class Component' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ComponentResourceLimit: + type: object + description: 'Class ComponentResourceLimit' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + minValue: + type: + - integer + - 'null' + maxValue: + type: + - integer + - 'null' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + resourceType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ComponentVersion: + type: object + description: 'Class ComponentVersion' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + version: + type: + - string + - 'null' + component: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + componentVersionEnvVar: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + project: + type: array + items: + $ref: '#/components/schemas/AbstractProject' + environmentComponent: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + componentResourceLimit: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersions: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ComponentVersionEnvVar: + type: object + description: 'Class ComponentVersionEnvVar' + deprecated: false + properties: + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + componentVersionEnvVarExample: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + key: + type: + - string + - 'null' + note: + type: + - string + - 'null' + isRequired: + type: + - boolean + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarValidations: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + ComponentVersionEnvVarExample: + type: object + description: 'Class ComponentVersionEnvVarExample' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + value: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + componentVersionEnvVar: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + CredentialType: + type: object + description: 'Class CredentialType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + git: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + CryptoKeyType: + type: object + description: 'Class CryptoKeyType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: string + gits: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + DataTransferDataType: + type: object + description: 'Class DataTransferDataType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + exportedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + DataTransferType: + type: object + description: 'Class DataTransferType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvVarType: + type: object + description: 'Class EnvVarType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + envVar: + type: array + items: + $ref: '#/components/schemas/AbstractEnvVar' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvVarValidation: + type: object + description: 'Class EnvVarValidation' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + regexp: + type: + - string + - 'null' + validationMessage: + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Environment-Environment.input: + type: object + description: 'Class Environment' + deprecated: false + properties: + templateIri: + type: + - string + - 'null' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + provider: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + exportedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + environmentCustomDomain: + type: array + items: + $ref: '#/components/schemas/EnvironmentCustomDomain-Environment.input' + environmentMagentoHostMapping: + type: array + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping-Environment.input' + targetRefName: + type: + - string + - 'null' + name: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar-Environment.input' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent-Environment.input' + Environment-Environment.output: + type: object + description: 'Class Environment' + deprecated: false + properties: + templateIri: + type: + - string + - 'null' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + provider: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + exportedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environmentCustomDomain: + type: array + items: + $ref: '#/components/schemas/EnvironmentCustomDomain-Environment.output' + environmentMagentoHostMapping: + type: array + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping-Environment.output' + targetRefName: + type: + - string + - 'null' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar-Environment.output' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent-Environment.output' + EnvironmentAccess: + type: object + description: 'Class EnvironmentAccess' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + frontend: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + backend: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + database: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + devTools: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + redis: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rabbit: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + mailbox: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + webshell: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessBackend: + type: object + description: 'Class EnvironmentAccessBackend' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessDatabase: + type: object + description: 'Class EnvironmentAccessDatabase' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + host: + type: + - string + - 'null' + port: + type: + - integer + - 'null' + scheme: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + rootPassword: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessDevTools: + type: object + description: 'Class EnvironmentAccessDevTools' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessFrontend: + type: object + description: 'Class EnvironmentAccessFrontend' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + domain: + type: + - string + - 'null' + path: + type: + - string + - 'null' + url: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessMailbox: + type: object + description: 'Class EnvironmentAccessMailbox' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessRabbit: + type: object + description: 'Class EnvironmentAccessRabbit' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + host: + type: + - string + - 'null' + port: + type: + - integer + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessRedis: + type: object + description: 'Class EnvironmentAccessRedis' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + host: + type: + - string + - 'null' + port: + type: + - integer + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessWebshell: + type: object + description: 'Class EnvironmentAccessWebshell' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentComponent: + type: object + description: 'Class EnvironmentComponent' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + anyOf: + - $ref: '#/components/schemas/AbstractEnvironment' + - type: 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentComponent-Environment.input: + type: object + description: 'Class EnvironmentComponent' + deprecated: false + properties: + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentComponent-Environment.output: + type: object + description: '' + deprecated: false + properties: + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentComponent-TemplateEnvironment.input: + type: object + description: 'Class EnvironmentComponent' + deprecated: false + properties: + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentComponent-TemplateEnvironment.output: + type: object + description: '' + deprecated: false + properties: + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentCustomDomain: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + hostname: + type: + - string + - 'null' + certificateData: + type: + - string + - 'null' + certificateKey: + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentCustomDomain-Environment.input: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + hostname: + type: + - string + - 'null' + certificateData: + type: + - string + - 'null' + certificateKey: + type: + - string + - 'null' + EnvironmentCustomDomain-Environment.output: + type: object + description: '' + deprecated: false + properties: + hostname: + type: + - string + - 'null' + certificateData: + type: + - string + - 'null' + certificateKey: + type: + - string + - 'null' + EnvironmentEnvVar: + type: object + description: '' + deprecated: false + properties: + environment: + anyOf: + - $ref: '#/components/schemas/AbstractEnvironment' + - type: 'null' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + EnvironmentEnvVar-Environment.input: + type: object + description: 'Class EnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentEnvVar-Environment.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentEnvVar-TemplateEnvironment.input: + type: object + description: 'Class EnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentEnvVar-TemplateEnvironment.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentMagentoHostMapping: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + hostname: + type: + - string + - 'null' + mageRunCode: + type: + - string + - 'null' + mageRunType: + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentMagentoHostMapping-Environment.input: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + hostname: + type: + - string + - 'null' + mageRunCode: + type: + - string + - 'null' + mageRunType: + type: + - string + - 'null' + EnvironmentMagentoHostMapping-Environment.output: + type: object + description: '' + deprecated: false + properties: + hostname: + type: + - string + - 'null' + mageRunCode: + type: + - string + - 'null' + mageRunType: + type: + - string + - 'null' + EnvironmentMessageHistory: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + entityType: + type: + - string + - 'null' + action: + type: + - string + - 'null' + status: + type: + - string + - 'null' + statusCode: + type: + - integer + - 'null' + rcStatus: + type: + - integer + - 'null' + message: + type: + - string + - 'null' + header: + type: + - string + - 'null' + eventAt: + type: + - string + - 'null' + entityUuid: + type: + - string + - 'null' + dataTransferId: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ExportedData: + type: object + description: 'Class ExportedData' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + dataTransferDataType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + Git-Git.input: + type: object + description: 'Class Git' + deprecated: false + properties: + repo: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + gitType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + credentialType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cryptoKeyType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Git-Git.output: + type: object + description: 'Class Git' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + repo: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + publicKey: + type: + - string + - 'null' + gitType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + credentialType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cryptoKeyType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + GitType: + type: object + description: 'Class GitType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + git: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ImportedData: + type: object + description: 'Class ImportedData' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + dataTransferDataType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + Invitation-Invitation.input: + type: object + description: 'Class Invitation' + deprecated: false + properties: + user: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + email: + type: + - string + - 'null' + Invitation-Invitation.output: + type: object + description: 'Class Invitation' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + user: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + type: boolean + email: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + expiredAt: + type: + - string + - 'null' + format: date-time + Organisation-Organisation.input: + type: object + description: 'Class Organisation' + deprecated: false + properties: + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default + Organisation' + type: + - boolean + - 'null' + team: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisationEnvVar: + type: array + items: + $ref: '#/components/schemas/OrganisationEnvVar-Organisation.input' + Organisation-Organisation.output: + type: object + description: 'Class Organisation' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default + Organisation' + type: + - boolean + - 'null' + team: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisationEnvVar: + type: array + items: + $ref: '#/components/schemas/OrganisationEnvVar-Organisation.output' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUser: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUserName: + type: + - string + - 'null' + OrganisationEnvVar: + type: object + description: 'Class OrganisationEnvVar' + deprecated: false + properties: + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + OrganisationEnvVar-Organisation.input: + type: object + description: 'Class OrganisationEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + OrganisationEnvVar-Organisation.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Price: + type: object + description: 'Class Price' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + amount: + type: + - number + - 'null' + currency: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + product: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Product' + - type: 'null' + products: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Price-Product.input: + type: object + description: 'Class Price' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + amount: + type: + - number + - 'null' + currency: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + Price-Product.output: + type: object + description: '' + deprecated: false + properties: + paymentId: + type: + - string + - 'null' + amount: + type: + - number + - 'null' + currency: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + Product: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + name: + type: + - string + - 'null' + description: + type: + - string + - 'null' + metadata: + type: + - array + - 'null' + items: + type: string + isActive: + type: + - boolean + - 'null' + prices: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + defaultPrice: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Product-Product.input: + type: object + description: 'Class Product' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + name: + type: + - string + - 'null' + description: + type: + - string + - 'null' + metadata: + type: + - array + - 'null' + items: + type: string + isActive: + type: + - boolean + - 'null' + prices: + type: array + items: + $ref: '#/components/schemas/Price-Product.input' + defaultPrice: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Price-Product.input' + - type: 'null' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Product-Product.output: + type: object + description: 'Class Product' + deprecated: false + properties: + paymentId: + type: + - string + - 'null' + name: + type: + - string + - 'null' + description: + type: + - string + - 'null' + metadata: + type: + - array + - 'null' + items: + type: string + isActive: + type: + - boolean + - 'null' + prices: + type: array + items: + $ref: '#/components/schemas/Price-Product.output' + defaultPrice: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Price-Product.output' + - type: 'null' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Project-Project.input: + type: object + description: 'Class Project' + deprecated: false + properties: + templateIri: + type: + - string + - 'null' + git: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + name: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar-Project.input' + Project-Project.output: + type: object + description: 'Class Project' + deprecated: false + properties: + templateIri: + type: + - string + - 'null' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + git: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectAccess: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccess-Project.output' + - type: 'null' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar-Project.output' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccess: + type: object + description: 'Class ProjectAccess' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectAccessGit: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectAccessRegistry: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectAccessServiceAccount: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccess-Project.output: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + projectAccessGit: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccessGit-Project.output' + - type: 'null' + projectAccessRegistry: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccessRegistry-Project.output' + - type: 'null' + projectAccessServiceAccount: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccessServiceAccount-Project.output' + - type: 'null' + ProjectAccessGit: + type: object + description: 'Class ProjectAccessGit' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + isExternal: + type: + - boolean + - 'null' + url: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + email: + type: + - string + - 'null' + password: + type: + - string + - 'null' + sshPrivateKey: + type: + - string + - 'null' + projectAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccessGit-Project.output: + type: object + description: '' + deprecated: false + properties: + isExternal: + type: + - boolean + - 'null' + url: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + email: + type: + - string + - 'null' + password: + type: + - string + - 'null' + sshPrivateKey: + type: + - string + - 'null' + ProjectAccessRegistry: + type: object + description: 'Class ProjectAccessRegistry' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + quota: + type: + - integer + - 'null' + instance: + type: + - string + - 'null' + url: + type: + - string + - 'null' + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + projectAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccessRegistry-Project.output: + type: object + description: '' + deprecated: false + properties: + quota: + type: + - integer + - 'null' + instance: + type: + - string + - 'null' + url: + type: + - string + - 'null' + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + ProjectAccessServiceAccount: + type: object + description: 'Class ProjectAccessServiceAccount' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + projectAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccessServiceAccount-Project.output: + type: object + description: '' + deprecated: false + properties: + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + ProjectEnvVar: + type: object + description: '' + deprecated: false + properties: + project: + anyOf: + - $ref: '#/components/schemas/AbstractProject' + - type: 'null' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + ProjectEnvVar-Project.input: + type: object + description: 'Class ProjectEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectEnvVar-Project.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectEnvVar-TemplateProject.input: + type: object + description: 'Class ProjectEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectEnvVar-TemplateProject.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectType: + type: object + description: 'Class ProjectType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + logo: + type: + - string + - 'null' + projectTypeVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectTypeVersion: + type: object + description: 'Class ProjectTypeVersion' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + version: + type: + - string + - 'null' + projectType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectTypeVersionEnvVar: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + componentResourceLimit: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + requiredComponent: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + componentVersions: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectTypeVersionEnvVar: + type: object + description: 'Class ProjectTypeEnvVar' + deprecated: false + properties: + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectTypeVersionEnvVarExample: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + key: + type: + - string + - 'null' + note: + type: + - string + - 'null' + isRequired: + type: + - boolean + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarValidations: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + ProjectTypeVersionEnvVarExample: + type: object + description: 'Class ProjectTypeEnvVarExample' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + value: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + projectTypeVersionEnvVar: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Provider: + type: object + description: 'Class Provider' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + cluster: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Provider-Cluster.withProvider: + type: object + description: '' + deprecated: false + properties: + name: + type: + - string + - 'null' + ResourceType-ResourceType.input: + type: object + description: 'Class ResourceType' + deprecated: false + properties: + name: + type: + - string + - 'null' + resourceTypeLimit: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ResourceTypeLimit-ResourceType.input' + - type: 'null' + ResourceType-ResourceType.output: + type: object + description: 'Class ResourceType' + deprecated: false + properties: + name: + type: + - string + - 'null' + resourceTypeLimit: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ResourceTypeLimit-ResourceType.output' + - type: 'null' + ResourceTypeLimit: + type: object + description: 'Class ResourceTypeLimit' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + projectMinValue: + type: + - integer + - 'null' + projectMaxValue: + type: + - integer + - 'null' + environmentMinValue: + type: + - integer + - 'null' + environmentMaxValue: + type: + - integer + - 'null' + componentMinValue: + type: + - integer + - 'null' + componentMaxValue: + type: + - integer + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ResourceTypeLimit-ResourceType.input: + type: object + description: 'Class ResourceTypeLimit' + deprecated: false + properties: + projectMinValue: + type: + - integer + - 'null' + projectMaxValue: + type: + - integer + - 'null' + environmentMinValue: + type: + - integer + - 'null' + environmentMaxValue: + type: + - integer + - 'null' + componentMinValue: + type: + - integer + - 'null' + componentMaxValue: + type: + - integer + - 'null' + ResourceTypeLimit-ResourceType.output: + type: object + description: '' + deprecated: false + properties: + projectMinValue: + type: + - integer + - 'null' + projectMaxValue: + type: + - integer + - 'null' + environmentMinValue: + type: + - integer + - 'null' + environmentMaxValue: + type: + - integer + - 'null' + componentMinValue: + type: + - integer + - 'null' + componentMaxValue: + type: + - integer + - 'null' + RoleGroup: + type: object + description: 'Class RoleGroup' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: string + roles: + type: array + items: + type: string + users: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + State: + type: object + description: 'Class State' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + seqNumber: + type: + - integer + - 'null' + project: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + StateByInfra: + type: object + description: 'Class StateByInfra' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + status: + type: + - string + - 'null' + statusCode: + type: + - integer + - 'null' + message: + type: + - string + - 'null' + messageInfo: + type: + - string + - 'null' + lastInfraEventAt: + type: + - string + - 'null' + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Team-Team.input: + type: object + description: 'Class Team' + deprecated: false + properties: + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default + Team' + type: + - boolean + - 'null' + user: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + teamUsers: + type: array + items: + type: object + properties: + user: + type: string + roleGroup: + type: string + project: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + teamEnvVar: + type: array + items: + $ref: '#/components/schemas/TeamEnvVar-Team.input' + Team-Team.output: + type: object + description: 'Class Team' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default + Team' + type: + - boolean + - 'null' + user: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + teamUsers: + type: array + items: + type: object + properties: + user: + type: string + roleGroup: + type: string + project: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + teamEnvVar: + type: array + items: + $ref: '#/components/schemas/TeamEnvVar-Team.output' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUser: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUserName: + type: + - string + - 'null' + TeamEnvVar: + type: object + description: 'Class TeamEnvVar' + deprecated: false + properties: + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + TeamEnvVar-Team.input: + type: object + description: 'Class TeamEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + TeamEnvVar-Team.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + TemplateEnvironment-TemplateEnvironment.input: + type: object + description: 'Class TemplateEnvironment' + deprecated: false + properties: + templateProject: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + name: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar-TemplateEnvironment.input' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent-TemplateEnvironment.input' + TemplateEnvironment-TemplateEnvironment.output: + type: object + description: 'Class TemplateEnvironment' + deprecated: false + properties: + templateProject: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar-TemplateEnvironment.output' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent-TemplateEnvironment.output' + TemplateProject-TemplateProject.input: + type: object + description: 'Class ProjectTemplate' + deprecated: false + properties: + description: + type: + - string + - 'null' + templateEnvironment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + name: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar-TemplateProject.input' + TemplateProject-TemplateProject.output: + type: object + description: 'Class ProjectTemplate' + deprecated: false + properties: + description: + type: + - string + - 'null' + templateEnvironment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar-TemplateProject.output' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + User: + type: object + description: 'Class User' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + authenticatorId: + type: + - integer + - 'null' + fullname: + type: + - string + - 'null' + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + roles: + type: + - array + - 'null' + items: + type: string + currency: + type: + - string + - 'null' + password: + type: string + changePassword: + type: + - string + - 'null' + currentPassword: + type: + - string + - 'null' + isEnabled: + type: boolean + passwordHash: + type: + - string + - 'null' + activationHash: + type: + - string + - 'null' + roleGroup: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + teamRoles: + type: array + items: + type: object + properties: + team: + type: string + roleGroup: + type: string + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + userIdentifier: + readOnly: true + type: string + salt: + readOnly: true + description: 'not needed when using the "bcrypt" algorithm in security.yaml' + type: + - string + - 'null' + EnvironmentAccess.AllDataResponse: + $ref: '#/components/schemas/EnvironmentAccess' + type: object + properties: + frontend: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + backend: + $ref: '#/components/schemas/EnvironmentAccessBackend' + database: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + devTools: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + redis: + $ref: '#/components/schemas/EnvironmentAccessRedis' + rabbit: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + mailbox: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + webshell: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + Environment.Costs: + type: object + properties: + uuid: + type: object + properties: + costs: + type: array + items: + type: object + environment: + $ref: '#/components/schemas/Environment-Environment.output' + Environment.LogStreamResponse: + type: object + properties: + topic: + type: string + token: + type: string + Authentication.Token: + type: object + properties: + token: + type: string + readOnly: true + data: + type: object + properties: + id: + type: integer + fullname: + type: string + roles: + type: array + items: + type: string + teams: + type: array + items: + type: object + properties: + uuid: {type: string} + Authentication.Credentials: + type: object + properties: + id: + type: string + example: 'johndoe@example.com OR johndoe' + password: + type: string + example: password + ValidateEnvVar.Request: + type: object + properties: + word: + type: string + iri: + type: string + ValidateEnvVar.Response: + type: object + properties: + isValid: + type: boolean + messages: + type: array + items: + type: string + Finance.InvoicesResponse: + type: object + properties: + costomer: + type: object + paymentMethods: + type: array + items: + type: object + invoices: + type: array + items: + type: object + Finance.CostsResponse: + type: object + properties: + summary: + type: object + properties: + cpuCoreHours: + type: integer + ramByteHours: + type: integer + pvByteHours: + type: integer + cpuCost: + type: integer + ramCost: + type: integer + pvCost: + type: integer + Mercure.DiscoverResponse: + type: object + properties: + data: + type: array + items: + type: string + Finance.ApiTokenResponse: + type: object + properties: + token: + type: string + data: + type: object + properties: + id: + type: integer + fullname: + type: string + roles: + type: array + items: + type: string + teams: + type: array + items: + type: object + properties: + uuid: {type: string} + responses: {} + parameters: {} + examples: {} + requestBodies: {} + headers: {} + securitySchemes: + apiKey: + type: apiKey + description: 'Value for the Authorization header parameter.' + name: Authorization + in: header + JWT: + type: http + scheme: bearer + bearerFormat: JWT +security: + - apiKey: [] +tags: [] + diff --git a/pkg/api/reward-cloud-api.yaml b/pkg/api/reward-cloud-api.yaml new file mode 100644 index 0000000..6ea0f49 --- /dev/null +++ b/pkg/api/reward-cloud-api.yaml @@ -0,0 +1,29533 @@ +openapi: 3.1.0 +info: + title: 'Reward Cloud' + description: 'It is an API for Reward Cloud project in ITG Commerce' + version: v0.7.0-alpha +servers: + - url: / + description: '' +paths: + /api/access_codes: + get: + operationId: api_access_codes_get_collection + tags: + - AccessCode + responses: + 200: + description: 'AccessCode collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/AccessCode.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/AccessCode' + summary: 'Retrieves the collection of AccessCode resources.' + description: 'Retrieves the collection of AccessCode resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: accessCode + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'accessCode[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_access_codes_post + tags: + - AccessCode + responses: + 201: + description: 'AccessCode resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/AccessCode.jsonld' + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a AccessCode resource.' + description: 'Creates a AccessCode resource.' + parameters: [ ] + requestBody: + description: 'The new AccessCode resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/AccessCode.jsonld' + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + required: true + deprecated: false + parameters: [ ] + '/api/access_codes/{id}': + get: + operationId: api_access_codes_id_get + tags: + - AccessCode + responses: + 200: + description: 'AccessCode resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/AccessCode.jsonld' + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + 404: + description: 'Resource not found' + summary: 'Retrieves a AccessCode resource.' + description: 'Retrieves a AccessCode resource.' + parameters: + - name: id + in: path + description: 'AccessCode identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_access_codes_id_put + tags: + - AccessCode + responses: + 200: + description: 'AccessCode resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/AccessCode.jsonld' + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the AccessCode resource.' + description: 'Replaces the AccessCode resource.' + parameters: + - name: id + in: path + description: 'AccessCode identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated AccessCode resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/AccessCode.jsonld' + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + required: true + deprecated: false + delete: + operationId: api_access_codes_id_delete + tags: + - AccessCode + responses: + 204: + description: 'AccessCode resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the AccessCode resource.' + description: 'Removes the AccessCode resource.' + parameters: + - name: id + in: path + description: 'AccessCode identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_access_codes_id_patch + tags: + - AccessCode + responses: + 200: + description: 'AccessCode resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/AccessCode.jsonld' + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the AccessCode resource.' + description: 'Updates the AccessCode resource.' + parameters: + - name: id + in: path + description: 'AccessCode identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated AccessCode resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/AccessCode' + required: true + deprecated: false + parameters: [ ] + /api/authentication_token: + post: + operationId: postCredentialsItem + tags: + - Miscellaneous + responses: + 200: + description: 'Get JWT token' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Authentication.Token' + application/json: + schema: + $ref: '#/components/schemas/Authentication.Token' + summary: 'Get JWT token to login.' + requestBody: + description: 'Generate new JWT Token' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Authentication.Credentials' + application/json: + schema: + $ref: '#/components/schemas/Authentication.Credentials' + required: false + security: [ ] + parameters: [ ] + /api/clusters: + get: + operationId: api_clusters_get_collection + tags: + - Cluster + responses: + 200: + description: 'Cluster collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Cluster.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Cluster' + summary: 'Retrieves the collection of Cluster resources.' + description: 'Retrieves the collection of Cluster resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: provider + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'provider[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_clusters_post + tags: + - Cluster + responses: + 201: + description: 'Cluster resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Cluster.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Cluster resource.' + description: 'Creates a Cluster resource.' + parameters: [ ] + requestBody: + description: 'The new Cluster resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Cluster.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + required: true + deprecated: false + parameters: [ ] + /api/clusters/get-with-provider: + get: + operationId: api_clustersget-with-provider_get_collection + tags: + - Cluster + responses: + 200: + description: 'Cluster collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Cluster.jsonld-Cluster.withProvider' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + summary: 'Retrieves the collection of Cluster resources.' + description: 'Retrieves the collection of Cluster resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: provider + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'provider[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + parameters: [ ] + '/api/clusters/{id}': + get: + operationId: api_clusters_id_get + tags: + - Cluster + responses: + 200: + description: 'Cluster resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Cluster.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + 404: + description: 'Resource not found' + summary: 'Retrieves a Cluster resource.' + description: 'Retrieves a Cluster resource.' + parameters: + - name: id + in: path + description: 'Cluster identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_clusters_id_put + tags: + - Cluster + responses: + 200: + description: 'Cluster resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Cluster.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Cluster resource.' + description: 'Replaces the Cluster resource.' + parameters: + - name: id + in: path + description: 'Cluster identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Cluster resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Cluster.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + required: true + deprecated: false + delete: + operationId: api_clusters_id_delete + tags: + - Cluster + responses: + 204: + description: 'Cluster resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Cluster resource.' + description: 'Removes the Cluster resource.' + parameters: + - name: id + in: path + description: 'Cluster identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_clusters_id_patch + tags: + - Cluster + responses: + 200: + description: 'Cluster resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Cluster.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Cluster resource.' + description: 'Updates the Cluster resource.' + parameters: + - name: id + in: path + description: 'Cluster identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Cluster resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Cluster' + required: true + deprecated: false + parameters: [ ] + '/api/clusters/{id}/get-with-provider': + get: + operationId: api_clusters_idget-with-provider_get + tags: + - Cluster + responses: + 200: + description: 'Cluster resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Cluster.jsonld-Cluster.withProvider' + application/json: + schema: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + text/html: + schema: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + 404: + description: 'Resource not found' + summary: 'Retrieves a Cluster resource.' + description: 'Retrieves a Cluster resource.' + parameters: + - name: id + in: path + description: 'Cluster identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [ ] + /api/component_resource_limits: + get: + operationId: api_component_resource_limits_get_collection + tags: + - ComponentResourceLimit + responses: + 200: + description: 'ComponentResourceLimit collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ComponentResourceLimit.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentResourceLimit' + summary: 'Retrieves the collection of ComponentResourceLimit resources.' + description: 'Retrieves the collection of ComponentResourceLimit resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectTypeVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectTypeVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: resourceType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'resourceType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: componentVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'componentVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_component_resource_limits_post + tags: + - ComponentResourceLimit + responses: + 201: + description: 'ComponentResourceLimit resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ComponentResourceLimit resource.' + description: 'Creates a ComponentResourceLimit resource.' + parameters: [ ] + requestBody: + description: 'The new ComponentResourceLimit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + required: true + deprecated: false + parameters: [ ] + '/api/component_resource_limits/{id}': + get: + operationId: api_component_resource_limits_id_get + tags: + - ComponentResourceLimit + responses: + 200: + description: 'ComponentResourceLimit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + 404: + description: 'Resource not found' + summary: 'Retrieves a ComponentResourceLimit resource.' + description: 'Retrieves a ComponentResourceLimit resource.' + parameters: + - name: id + in: path + description: 'ComponentResourceLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_component_resource_limits_id_put + tags: + - ComponentResourceLimit + responses: + 200: + description: 'ComponentResourceLimit resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ComponentResourceLimit resource.' + description: 'Replaces the ComponentResourceLimit resource.' + parameters: + - name: id + in: path + description: 'ComponentResourceLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentResourceLimit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + required: true + deprecated: false + delete: + operationId: api_component_resource_limits_id_delete + tags: + - ComponentResourceLimit + responses: + 204: + description: 'ComponentResourceLimit resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ComponentResourceLimit resource.' + description: 'Removes the ComponentResourceLimit resource.' + parameters: + - name: id + in: path + description: 'ComponentResourceLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_component_resource_limits_id_patch + tags: + - ComponentResourceLimit + responses: + 200: + description: 'ComponentResourceLimit resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ComponentResourceLimit resource.' + description: 'Updates the ComponentResourceLimit resource.' + parameters: + - name: id + in: path + description: 'ComponentResourceLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentResourceLimit resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + required: true + deprecated: false + parameters: [ ] + /api/component_version_env_var_examples: + get: + operationId: api_component_version_env_var_examples_get_collection + tags: + - ComponentVersionEnvVarExample + responses: + 200: + description: 'ComponentVersionEnvVarExample collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ComponentVersionEnvVarExample.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + summary: 'Retrieves the collection of ComponentVersionEnvVarExample resources.' + description: 'Retrieves the collection of ComponentVersionEnvVarExample resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_component_version_env_var_examples_post + tags: + - ComponentVersionEnvVarExample + responses: + 201: + description: 'ComponentVersionEnvVarExample resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ComponentVersionEnvVarExample resource.' + description: 'Creates a ComponentVersionEnvVarExample resource.' + parameters: [ ] + requestBody: + description: 'The new ComponentVersionEnvVarExample resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + required: true + deprecated: false + parameters: [ ] + '/api/component_version_env_var_examples/{id}': + get: + operationId: api_component_version_env_var_examples_id_get + tags: + - ComponentVersionEnvVarExample + responses: + 200: + description: 'ComponentVersionEnvVarExample resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + 404: + description: 'Resource not found' + summary: 'Retrieves a ComponentVersionEnvVarExample resource.' + description: 'Retrieves a ComponentVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_component_version_env_var_examples_id_put + tags: + - ComponentVersionEnvVarExample + responses: + 200: + description: 'ComponentVersionEnvVarExample resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ComponentVersionEnvVarExample resource.' + description: 'Replaces the ComponentVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersionEnvVarExample resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + required: true + deprecated: false + delete: + operationId: api_component_version_env_var_examples_id_delete + tags: + - ComponentVersionEnvVarExample + responses: + 204: + description: 'ComponentVersionEnvVarExample resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ComponentVersionEnvVarExample resource.' + description: 'Removes the ComponentVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_component_version_env_var_examples_id_patch + tags: + - ComponentVersionEnvVarExample + responses: + 200: + description: 'ComponentVersionEnvVarExample resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ComponentVersionEnvVarExample resource.' + description: 'Updates the ComponentVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersionEnvVarExample resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + required: true + deprecated: false + parameters: [ ] + /api/component_version_env_vars: + get: + operationId: api_component_version_env_vars_get_collection + tags: + - ComponentVersionEnvVar + responses: + 200: + description: 'ComponentVersionEnvVar collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ComponentVersionEnvVar.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersionEnvVar' + summary: 'Retrieves the collection of ComponentVersionEnvVar resources.' + description: 'Retrieves the collection of ComponentVersionEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: componentVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'componentVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarValidations + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarValidations[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_component_version_env_vars_post + tags: + - ComponentVersionEnvVar + responses: + 201: + description: 'ComponentVersionEnvVar resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ComponentVersionEnvVar resource.' + description: 'Creates a ComponentVersionEnvVar resource.' + parameters: [ ] + requestBody: + description: 'The new ComponentVersionEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + required: true + deprecated: false + parameters: [ ] + '/api/component_version_env_vars/{id}': + get: + operationId: api_component_version_env_vars_id_get + tags: + - ComponentVersionEnvVar + responses: + 200: + description: 'ComponentVersionEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a ComponentVersionEnvVar resource.' + description: 'Retrieves a ComponentVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_component_version_env_vars_id_put + tags: + - ComponentVersionEnvVar + responses: + 200: + description: 'ComponentVersionEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ComponentVersionEnvVar resource.' + description: 'Replaces the ComponentVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersionEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + required: true + deprecated: false + delete: + operationId: api_component_version_env_vars_id_delete + tags: + - ComponentVersionEnvVar + responses: + 204: + description: 'ComponentVersionEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ComponentVersionEnvVar resource.' + description: 'Removes the ComponentVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_component_version_env_vars_id_patch + tags: + - ComponentVersionEnvVar + responses: + 200: + description: 'ComponentVersionEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ComponentVersionEnvVar resource.' + description: 'Updates the ComponentVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ComponentVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersionEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + required: true + deprecated: false + parameters: [ ] + /api/component_versions: + get: + operationId: api_component_versions_get_collection + tags: + - ComponentVersion + responses: + 200: + description: 'ComponentVersion collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ComponentVersion.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ComponentVersion' + summary: 'Retrieves the collection of ComponentVersion resources.' + description: 'Retrieves the collection of ComponentVersion resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: 'order[version]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: component + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'component[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_component_versions_post + tags: + - ComponentVersion + responses: + 201: + description: 'ComponentVersion resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ComponentVersion resource.' + description: 'Creates a ComponentVersion resource.' + parameters: [ ] + requestBody: + description: 'The new ComponentVersion resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + required: true + deprecated: false + parameters: [ ] + '/api/component_versions/{id}': + get: + operationId: api_component_versions_id_get + tags: + - ComponentVersion + responses: + 200: + description: 'ComponentVersion resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + 404: + description: 'Resource not found' + summary: 'Retrieves a ComponentVersion resource.' + description: 'Retrieves a ComponentVersion resource.' + parameters: + - name: id + in: path + description: 'ComponentVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_component_versions_id_put + tags: + - ComponentVersion + responses: + 200: + description: 'ComponentVersion resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ComponentVersion resource.' + description: 'Replaces the ComponentVersion resource.' + parameters: + - name: id + in: path + description: 'ComponentVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersion resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + required: true + deprecated: false + delete: + operationId: api_component_versions_id_delete + tags: + - ComponentVersion + responses: + 204: + description: 'ComponentVersion resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ComponentVersion resource.' + description: 'Removes the ComponentVersion resource.' + parameters: + - name: id + in: path + description: 'ComponentVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_component_versions_id_patch + tags: + - ComponentVersion + responses: + 200: + description: 'ComponentVersion resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ComponentVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ComponentVersion resource.' + description: 'Updates the ComponentVersion resource.' + parameters: + - name: id + in: path + description: 'ComponentVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ComponentVersion resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentVersion' + required: true + deprecated: false + parameters: [ ] + /api/components: + get: + operationId: api_components_get_collection + tags: + - Component + responses: + 200: + description: 'Component collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Component.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Component' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Component' + summary: 'Retrieves the collection of Component resources.' + description: 'Retrieves the collection of Component resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: 'order[name]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_components_post + tags: + - Component + responses: + 201: + description: 'Component resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Component.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Component resource.' + description: 'Creates a Component resource.' + parameters: [ ] + requestBody: + description: 'The new Component resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Component.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + required: true + deprecated: false + parameters: [ ] + '/api/components/{id}': + get: + operationId: api_components_id_get + tags: + - Component + responses: + 200: + description: 'Component resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Component.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + 404: + description: 'Resource not found' + summary: 'Retrieves a Component resource.' + description: 'Retrieves a Component resource.' + parameters: + - name: id + in: path + description: 'Component identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_components_id_put + tags: + - Component + responses: + 200: + description: 'Component resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Component.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Component resource.' + description: 'Replaces the Component resource.' + parameters: + - name: id + in: path + description: 'Component identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Component resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Component.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + required: true + deprecated: false + delete: + operationId: api_components_id_delete + tags: + - Component + responses: + 204: + description: 'Component resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Component resource.' + description: 'Removes the Component resource.' + parameters: + - name: id + in: path + description: 'Component identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_components_id_patch + tags: + - Component + responses: + 200: + description: 'Component resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Component.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Component resource.' + description: 'Updates the Component resource.' + parameters: + - name: id + in: path + description: 'Component identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Component resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Component' + required: true + deprecated: false + parameters: [ ] + /api/credential_types: + get: + operationId: api_credential_types_get_collection + tags: + - CredentialType + responses: + 200: + description: 'CredentialType collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/CredentialType.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/CredentialType' + summary: 'Retrieves the collection of CredentialType resources.' + description: 'Retrieves the collection of CredentialType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_credential_types_post + tags: + - CredentialType + responses: + 201: + description: 'CredentialType resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/CredentialType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a CredentialType resource.' + description: 'Creates a CredentialType resource.' + parameters: [ ] + requestBody: + description: 'The new CredentialType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/CredentialType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + required: true + deprecated: false + parameters: [ ] + '/api/credential_types/{id}': + get: + operationId: api_credential_types_id_get + tags: + - CredentialType + responses: + 200: + description: 'CredentialType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/CredentialType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + 404: + description: 'Resource not found' + summary: 'Retrieves a CredentialType resource.' + description: 'Retrieves a CredentialType resource.' + parameters: + - name: id + in: path + description: 'CredentialType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_credential_types_id_put + tags: + - CredentialType + responses: + 200: + description: 'CredentialType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/CredentialType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the CredentialType resource.' + description: 'Replaces the CredentialType resource.' + parameters: + - name: id + in: path + description: 'CredentialType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated CredentialType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/CredentialType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + required: true + deprecated: false + delete: + operationId: api_credential_types_id_delete + tags: + - CredentialType + responses: + 204: + description: 'CredentialType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the CredentialType resource.' + description: 'Removes the CredentialType resource.' + parameters: + - name: id + in: path + description: 'CredentialType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_credential_types_id_patch + tags: + - CredentialType + responses: + 200: + description: 'CredentialType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/CredentialType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the CredentialType resource.' + description: 'Updates the CredentialType resource.' + parameters: + - name: id + in: path + description: 'CredentialType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated CredentialType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/CredentialType' + required: true + deprecated: false + parameters: [ ] + '/api/crypto_key_types/{id}': + get: + operationId: api_crypto_key_types_id_get + tags: + - CryptoKeyType + responses: + 200: + description: 'CryptoKeyType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/CryptoKeyType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/CryptoKeyType' + text/html: + schema: + $ref: '#/components/schemas/CryptoKeyType' + 404: + description: 'Resource not found' + summary: 'Retrieves a CryptoKeyType resource.' + description: 'Retrieves a CryptoKeyType resource.' + parameters: + - name: id + in: path + description: 'CryptoKeyType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [ ] + /api/data_transfer_data_types: + get: + operationId: api_data_transfer_data_types_get_collection + tags: + - DataTransferDataType + responses: + 200: + description: 'DataTransferDataType collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/DataTransferDataType.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/DataTransferDataType' + summary: 'Retrieves the collection of DataTransferDataType resources.' + description: 'Retrieves the collection of DataTransferDataType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_data_transfer_data_types_post + tags: + - DataTransferDataType + responses: + 201: + description: 'DataTransferDataType resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferDataType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a DataTransferDataType resource.' + description: 'Creates a DataTransferDataType resource.' + parameters: [ ] + requestBody: + description: 'The new DataTransferDataType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferDataType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + required: true + deprecated: false + parameters: [ ] + '/api/data_transfer_data_types/{id}': + get: + operationId: api_data_transfer_data_types_id_get + tags: + - DataTransferDataType + responses: + 200: + description: 'DataTransferDataType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferDataType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + 404: + description: 'Resource not found' + summary: 'Retrieves a DataTransferDataType resource.' + description: 'Retrieves a DataTransferDataType resource.' + parameters: + - name: id + in: path + description: 'DataTransferDataType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_data_transfer_data_types_id_put + tags: + - DataTransferDataType + responses: + 200: + description: 'DataTransferDataType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferDataType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the DataTransferDataType resource.' + description: 'Replaces the DataTransferDataType resource.' + parameters: + - name: id + in: path + description: 'DataTransferDataType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated DataTransferDataType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferDataType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + required: true + deprecated: false + delete: + operationId: api_data_transfer_data_types_id_delete + tags: + - DataTransferDataType + responses: + 204: + description: 'DataTransferDataType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the DataTransferDataType resource.' + description: 'Removes the DataTransferDataType resource.' + parameters: + - name: id + in: path + description: 'DataTransferDataType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_data_transfer_data_types_id_patch + tags: + - DataTransferDataType + responses: + 200: + description: 'DataTransferDataType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferDataType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the DataTransferDataType resource.' + description: 'Updates the DataTransferDataType resource.' + parameters: + - name: id + in: path + description: 'DataTransferDataType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated DataTransferDataType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + required: true + deprecated: false + parameters: [ ] + /api/data_transfer_types: + get: + operationId: api_data_transfer_types_get_collection + tags: + - DataTransferType + responses: + 200: + description: 'DataTransferType collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/DataTransferType.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/DataTransferType' + summary: 'Retrieves the collection of DataTransferType resources.' + description: 'Retrieves the collection of DataTransferType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_data_transfer_types_post + tags: + - DataTransferType + responses: + 201: + description: 'DataTransferType resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a DataTransferType resource.' + description: 'Creates a DataTransferType resource.' + parameters: [ ] + requestBody: + description: 'The new DataTransferType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + required: true + deprecated: false + parameters: [ ] + '/api/data_transfer_types/{id}': + get: + operationId: api_data_transfer_types_id_get + tags: + - DataTransferType + responses: + 200: + description: 'DataTransferType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + 404: + description: 'Resource not found' + summary: 'Retrieves a DataTransferType resource.' + description: 'Retrieves a DataTransferType resource.' + parameters: + - name: id + in: path + description: 'DataTransferType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_data_transfer_types_id_put + tags: + - DataTransferType + responses: + 200: + description: 'DataTransferType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the DataTransferType resource.' + description: 'Replaces the DataTransferType resource.' + parameters: + - name: id + in: path + description: 'DataTransferType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated DataTransferType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + required: true + deprecated: false + delete: + operationId: api_data_transfer_types_id_delete + tags: + - DataTransferType + responses: + 204: + description: 'DataTransferType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the DataTransferType resource.' + description: 'Removes the DataTransferType resource.' + parameters: + - name: id + in: path + description: 'DataTransferType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_data_transfer_types_id_patch + tags: + - DataTransferType + responses: + 200: + description: 'DataTransferType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/DataTransferType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the DataTransferType resource.' + description: 'Updates the DataTransferType resource.' + parameters: + - name: id + in: path + description: 'DataTransferType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated DataTransferType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/DataTransferType' + required: true + deprecated: false + parameters: [ ] + /api/env_var_types: + get: + operationId: api_env_var_types_get_collection + tags: + - EnvVarType + responses: + 200: + description: 'EnvVarType collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvVarType.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvVarType' + summary: 'Retrieves the collection of EnvVarType resources.' + description: 'Retrieves the collection of EnvVarType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_env_var_types_post + tags: + - EnvVarType + responses: + 201: + description: 'EnvVarType resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvVarType resource.' + description: 'Creates a EnvVarType resource.' + parameters: [ ] + requestBody: + description: 'The new EnvVarType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + required: true + deprecated: false + parameters: [ ] + '/api/env_var_types/{id}': + get: + operationId: api_env_var_types_id_get + tags: + - EnvVarType + responses: + 200: + description: 'EnvVarType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvVarType resource.' + description: 'Retrieves a EnvVarType resource.' + parameters: + - name: id + in: path + description: 'EnvVarType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_env_var_types_id_put + tags: + - EnvVarType + responses: + 200: + description: 'EnvVarType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvVarType resource.' + description: 'Replaces the EnvVarType resource.' + parameters: + - name: id + in: path + description: 'EnvVarType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvVarType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + required: true + deprecated: false + delete: + operationId: api_env_var_types_id_delete + tags: + - EnvVarType + responses: + 204: + description: 'EnvVarType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvVarType resource.' + description: 'Removes the EnvVarType resource.' + parameters: + - name: id + in: path + description: 'EnvVarType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_env_var_types_id_patch + tags: + - EnvVarType + responses: + 200: + description: 'EnvVarType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvVarType resource.' + description: 'Updates the EnvVarType resource.' + parameters: + - name: id + in: path + description: 'EnvVarType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvVarType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvVarType' + required: true + deprecated: false + parameters: [ ] + /api/env_var_validation: + post: + operationId: postValidateEnvVar + tags: + - Miscellaneous + responses: + 200: + description: 'It will returns w/ an object' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ValidateEnvVar.Response' + application/json: + schema: + $ref: '#/components/schemas/ValidateEnvVar.Response' + 201: + description: 'The same as the HTTP 200' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing EnvVarDefinition' + summary: 'It checks the validation of an environment variable definition' + description: |- + It will check a any EnvVar's definition validation by this entity. The entity can contain + more than one validation. Then it will test all of them and reply w/ their messages. + requestBody: + description: 'Let the system to check a word to validate by definition(s). Both are REQUIRED!' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ValidateEnvVar.Request' + application/json: + schema: + $ref: '#/components/schemas/ValidateEnvVar.Request' + required: false + security: [ ] + parameters: [ ] + /api/env_var_validations: + get: + operationId: api_env_var_validations_get_collection + tags: + - EnvVarValidation + responses: + 200: + description: 'EnvVarValidation collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvVarValidation.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvVarValidation' + summary: 'Retrieves the collection of EnvVarValidation resources.' + description: 'Retrieves the collection of EnvVarValidation resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_env_var_validations_post + tags: + - EnvVarValidation + responses: + 201: + description: 'EnvVarValidation resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarValidation.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvVarValidation resource.' + description: 'Creates a EnvVarValidation resource.' + parameters: [ ] + requestBody: + description: 'The new EnvVarValidation resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarValidation.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + required: true + deprecated: false + parameters: [ ] + '/api/env_var_validations/{id}': + get: + operationId: api_env_var_validations_id_get + tags: + - EnvVarValidation + responses: + 200: + description: 'EnvVarValidation resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarValidation.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvVarValidation resource.' + description: 'Retrieves a EnvVarValidation resource.' + parameters: + - name: id + in: path + description: 'EnvVarValidation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_env_var_validations_id_put + tags: + - EnvVarValidation + responses: + 200: + description: 'EnvVarValidation resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarValidation.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvVarValidation resource.' + description: 'Replaces the EnvVarValidation resource.' + parameters: + - name: id + in: path + description: 'EnvVarValidation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvVarValidation resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarValidation.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + required: true + deprecated: false + delete: + operationId: api_env_var_validations_id_delete + tags: + - EnvVarValidation + responses: + 204: + description: 'EnvVarValidation resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvVarValidation resource.' + description: 'Removes the EnvVarValidation resource.' + parameters: + - name: id + in: path + description: 'EnvVarValidation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_env_var_validations_id_patch + tags: + - EnvVarValidation + responses: + 200: + description: 'EnvVarValidation resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvVarValidation.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvVarValidation resource.' + description: 'Updates the EnvVarValidation resource.' + parameters: + - name: id + in: path + description: 'EnvVarValidation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvVarValidation resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + required: true + deprecated: false + parameters: [ ] + /api/environment_access_backends: + get: + operationId: api_environment_access_backends_get_collection + tags: + - EnvironmentAccessBackend + responses: + 200: + description: 'EnvironmentAccessBackend collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentAccessBackend.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessBackend' + summary: 'Retrieves the collection of EnvironmentAccessBackend resources.' + description: 'Retrieves the collection of EnvironmentAccessBackend resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_backends_post + tags: + - EnvironmentAccessBackend + responses: + 201: + description: 'EnvironmentAccessBackend resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessBackend resource.' + description: 'Creates a EnvironmentAccessBackend resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentAccessBackend resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + required: true + deprecated: false + parameters: [ ] + '/api/environment_access_backends/{id}': + get: + operationId: api_environment_access_backends_id_get + tags: + - EnvironmentAccessBackend + responses: + 200: + description: 'EnvironmentAccessBackend resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessBackend resource.' + description: 'Retrieves a EnvironmentAccessBackend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessBackend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_backends_id_put + tags: + - EnvironmentAccessBackend + responses: + 200: + description: 'EnvironmentAccessBackend resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessBackend resource.' + description: 'Replaces the EnvironmentAccessBackend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessBackend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessBackend resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + required: true + deprecated: false + delete: + operationId: api_environment_access_backends_id_delete + tags: + - EnvironmentAccessBackend + responses: + 204: + description: 'EnvironmentAccessBackend resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessBackend resource.' + description: 'Removes the EnvironmentAccessBackend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessBackend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_backends_id_patch + tags: + - EnvironmentAccessBackend + responses: + 200: + description: 'EnvironmentAccessBackend resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessBackend resource.' + description: 'Updates the EnvironmentAccessBackend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessBackend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessBackend resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + required: true + deprecated: false + parameters: [ ] + /api/environment_access_databases: + get: + operationId: api_environment_access_databases_get_collection + tags: + - EnvironmentAccessDatabase + responses: + 200: + description: 'EnvironmentAccessDatabase collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentAccessDatabase.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + summary: 'Retrieves the collection of EnvironmentAccessDatabase resources.' + description: 'Retrieves the collection of EnvironmentAccessDatabase resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_databases_post + tags: + - EnvironmentAccessDatabase + responses: + 201: + description: 'EnvironmentAccessDatabase resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessDatabase resource.' + description: 'Creates a EnvironmentAccessDatabase resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentAccessDatabase resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + required: true + deprecated: false + parameters: [ ] + '/api/environment_access_databases/{id}': + get: + operationId: api_environment_access_databases_id_get + tags: + - EnvironmentAccessDatabase + responses: + 200: + description: 'EnvironmentAccessDatabase resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessDatabase resource.' + description: 'Retrieves a EnvironmentAccessDatabase resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDatabase identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_databases_id_put + tags: + - EnvironmentAccessDatabase + responses: + 200: + description: 'EnvironmentAccessDatabase resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessDatabase resource.' + description: 'Replaces the EnvironmentAccessDatabase resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDatabase identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessDatabase resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + required: true + deprecated: false + delete: + operationId: api_environment_access_databases_id_delete + tags: + - EnvironmentAccessDatabase + responses: + 204: + description: 'EnvironmentAccessDatabase resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessDatabase resource.' + description: 'Removes the EnvironmentAccessDatabase resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDatabase identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_databases_id_patch + tags: + - EnvironmentAccessDatabase + responses: + 200: + description: 'EnvironmentAccessDatabase resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessDatabase resource.' + description: 'Updates the EnvironmentAccessDatabase resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDatabase identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessDatabase resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + required: true + deprecated: false + parameters: [ ] + /api/environment_access_dev_tools: + get: + operationId: api_environment_access_dev_tools_get_collection + tags: + - EnvironmentAccessDevTools + responses: + 200: + description: 'EnvironmentAccessDevTools collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentAccessDevTools.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + summary: 'Retrieves the collection of EnvironmentAccessDevTools resources.' + description: 'Retrieves the collection of EnvironmentAccessDevTools resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_dev_tools_post + tags: + - EnvironmentAccessDevTools + responses: + 201: + description: 'EnvironmentAccessDevTools resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessDevTools resource.' + description: 'Creates a EnvironmentAccessDevTools resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentAccessDevTools resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + required: true + deprecated: false + parameters: [ ] + '/api/environment_access_dev_tools/{id}': + get: + operationId: api_environment_access_dev_tools_id_get + tags: + - EnvironmentAccessDevTools + responses: + 200: + description: 'EnvironmentAccessDevTools resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessDevTools resource.' + description: 'Retrieves a EnvironmentAccessDevTools resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDevTools identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_dev_tools_id_put + tags: + - EnvironmentAccessDevTools + responses: + 200: + description: 'EnvironmentAccessDevTools resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessDevTools resource.' + description: 'Replaces the EnvironmentAccessDevTools resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDevTools identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessDevTools resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + required: true + deprecated: false + delete: + operationId: api_environment_access_dev_tools_id_delete + tags: + - EnvironmentAccessDevTools + responses: + 204: + description: 'EnvironmentAccessDevTools resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessDevTools resource.' + description: 'Removes the EnvironmentAccessDevTools resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDevTools identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_dev_tools_id_patch + tags: + - EnvironmentAccessDevTools + responses: + 200: + description: 'EnvironmentAccessDevTools resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessDevTools resource.' + description: 'Updates the EnvironmentAccessDevTools resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessDevTools identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessDevTools resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + required: true + deprecated: false + parameters: [ ] + /api/environment_access_frontends: + get: + operationId: api_environment_access_frontends_get_collection + tags: + - EnvironmentAccessFrontend + responses: + 200: + description: 'EnvironmentAccessFrontend collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentAccessFrontend.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + summary: 'Retrieves the collection of EnvironmentAccessFrontend resources.' + description: 'Retrieves the collection of EnvironmentAccessFrontend resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_frontends_post + tags: + - EnvironmentAccessFrontend + responses: + 201: + description: 'EnvironmentAccessFrontend resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessFrontend resource.' + description: 'Creates a EnvironmentAccessFrontend resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentAccessFrontend resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + required: true + deprecated: false + parameters: [ ] + '/api/environment_access_frontends/{id}': + get: + operationId: api_environment_access_frontends_id_get + tags: + - EnvironmentAccessFrontend + responses: + 200: + description: 'EnvironmentAccessFrontend resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessFrontend resource.' + description: 'Retrieves a EnvironmentAccessFrontend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessFrontend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_frontends_id_put + tags: + - EnvironmentAccessFrontend + responses: + 200: + description: 'EnvironmentAccessFrontend resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessFrontend resource.' + description: 'Replaces the EnvironmentAccessFrontend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessFrontend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessFrontend resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + required: true + deprecated: false + delete: + operationId: api_environment_access_frontends_id_delete + tags: + - EnvironmentAccessFrontend + responses: + 204: + description: 'EnvironmentAccessFrontend resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessFrontend resource.' + description: 'Removes the EnvironmentAccessFrontend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessFrontend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_frontends_id_patch + tags: + - EnvironmentAccessFrontend + responses: + 200: + description: 'EnvironmentAccessFrontend resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessFrontend resource.' + description: 'Updates the EnvironmentAccessFrontend resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessFrontend identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessFrontend resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + required: true + deprecated: false + parameters: [ ] + /api/environment_access_mailboxes: + get: + operationId: api_environment_access_mailboxes_get_collection + tags: + - EnvironmentAccessMailbox + responses: + 200: + description: 'EnvironmentAccessMailbox collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentAccessMailbox.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + summary: 'Retrieves the collection of EnvironmentAccessMailbox resources.' + description: 'Retrieves the collection of EnvironmentAccessMailbox resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_mailboxes_post + tags: + - EnvironmentAccessMailbox + responses: + 201: + description: 'EnvironmentAccessMailbox resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessMailbox resource.' + description: 'Creates a EnvironmentAccessMailbox resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentAccessMailbox resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + required: true + deprecated: false + parameters: [ ] + '/api/environment_access_mailboxes/{id}': + get: + operationId: api_environment_access_mailboxes_id_get + tags: + - EnvironmentAccessMailbox + responses: + 200: + description: 'EnvironmentAccessMailbox resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessMailbox resource.' + description: 'Retrieves a EnvironmentAccessMailbox resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessMailbox identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_mailboxes_id_put + tags: + - EnvironmentAccessMailbox + responses: + 200: + description: 'EnvironmentAccessMailbox resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessMailbox resource.' + description: 'Replaces the EnvironmentAccessMailbox resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessMailbox identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessMailbox resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + required: true + deprecated: false + delete: + operationId: api_environment_access_mailboxes_id_delete + tags: + - EnvironmentAccessMailbox + responses: + 204: + description: 'EnvironmentAccessMailbox resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessMailbox resource.' + description: 'Removes the EnvironmentAccessMailbox resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessMailbox identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_mailboxes_id_patch + tags: + - EnvironmentAccessMailbox + responses: + 200: + description: 'EnvironmentAccessMailbox resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessMailbox resource.' + description: 'Updates the EnvironmentAccessMailbox resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessMailbox identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessMailbox resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + required: true + deprecated: false + parameters: [ ] + /api/environment_access_rabbits: + get: + operationId: api_environment_access_rabbits_get_collection + tags: + - EnvironmentAccessRabbit + responses: + 200: + description: 'EnvironmentAccessRabbit collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentAccessRabbit.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + summary: 'Retrieves the collection of EnvironmentAccessRabbit resources.' + description: 'Retrieves the collection of EnvironmentAccessRabbit resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_rabbits_post + tags: + - EnvironmentAccessRabbit + responses: + 201: + description: 'EnvironmentAccessRabbit resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessRabbit resource.' + description: 'Creates a EnvironmentAccessRabbit resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentAccessRabbit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + required: true + deprecated: false + parameters: [ ] + '/api/environment_access_rabbits/{id}': + get: + operationId: api_environment_access_rabbits_id_get + tags: + - EnvironmentAccessRabbit + responses: + 200: + description: 'EnvironmentAccessRabbit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessRabbit resource.' + description: 'Retrieves a EnvironmentAccessRabbit resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRabbit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_rabbits_id_put + tags: + - EnvironmentAccessRabbit + responses: + 200: + description: 'EnvironmentAccessRabbit resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessRabbit resource.' + description: 'Replaces the EnvironmentAccessRabbit resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRabbit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessRabbit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + required: true + deprecated: false + delete: + operationId: api_environment_access_rabbits_id_delete + tags: + - EnvironmentAccessRabbit + responses: + 204: + description: 'EnvironmentAccessRabbit resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessRabbit resource.' + description: 'Removes the EnvironmentAccessRabbit resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRabbit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_rabbits_id_patch + tags: + - EnvironmentAccessRabbit + responses: + 200: + description: 'EnvironmentAccessRabbit resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessRabbit resource.' + description: 'Updates the EnvironmentAccessRabbit resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRabbit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessRabbit resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + required: true + deprecated: false + parameters: [ ] + /api/environment_access_redis: + get: + operationId: api_environment_access_redis_get_collection + tags: + - EnvironmentAccessRedis + responses: + 200: + description: 'EnvironmentAccessRedis collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentAccessRedis.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessRedis' + summary: 'Retrieves the collection of EnvironmentAccessRedis resources.' + description: 'Retrieves the collection of EnvironmentAccessRedis resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_redis_post + tags: + - EnvironmentAccessRedis + responses: + 201: + description: 'EnvironmentAccessRedis resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessRedis resource.' + description: 'Creates a EnvironmentAccessRedis resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentAccessRedis resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + required: true + deprecated: false + parameters: [ ] + '/api/environment_access_redis/{id}': + get: + operationId: api_environment_access_redis_id_get + tags: + - EnvironmentAccessRedis + responses: + 200: + description: 'EnvironmentAccessRedis resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessRedis resource.' + description: 'Retrieves a EnvironmentAccessRedis resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRedis identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_redis_id_put + tags: + - EnvironmentAccessRedis + responses: + 200: + description: 'EnvironmentAccessRedis resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessRedis resource.' + description: 'Replaces the EnvironmentAccessRedis resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRedis identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessRedis resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + required: true + deprecated: false + delete: + operationId: api_environment_access_redis_id_delete + tags: + - EnvironmentAccessRedis + responses: + 204: + description: 'EnvironmentAccessRedis resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessRedis resource.' + description: 'Removes the EnvironmentAccessRedis resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRedis identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_redis_id_patch + tags: + - EnvironmentAccessRedis + responses: + 200: + description: 'EnvironmentAccessRedis resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessRedis resource.' + description: 'Updates the EnvironmentAccessRedis resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessRedis identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessRedis resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + required: true + deprecated: false + parameters: [ ] + /api/environment_access_webshells: + get: + operationId: api_environment_access_webshells_get_collection + tags: + - EnvironmentAccessWebshell + responses: + 200: + description: 'EnvironmentAccessWebshell collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentAccessWebshell.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + summary: 'Retrieves the collection of EnvironmentAccessWebshell resources.' + description: 'Retrieves the collection of EnvironmentAccessWebshell resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environment_access_webshells_post + tags: + - EnvironmentAccessWebshell + responses: + 201: + description: 'EnvironmentAccessWebshell resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccessWebshell resource.' + description: 'Creates a EnvironmentAccessWebshell resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentAccessWebshell resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + required: true + deprecated: false + parameters: [ ] + '/api/environment_access_webshells/{id}': + get: + operationId: api_environment_access_webshells_id_get + tags: + - EnvironmentAccessWebshell + responses: + 200: + description: 'EnvironmentAccessWebshell resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccessWebshell resource.' + description: 'Retrieves a EnvironmentAccessWebshell resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessWebshell identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_access_webshells_id_put + tags: + - EnvironmentAccessWebshell + responses: + 200: + description: 'EnvironmentAccessWebshell resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccessWebshell resource.' + description: 'Replaces the EnvironmentAccessWebshell resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessWebshell identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessWebshell resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + required: true + deprecated: false + delete: + operationId: api_environment_access_webshells_id_delete + tags: + - EnvironmentAccessWebshell + responses: + 204: + description: 'EnvironmentAccessWebshell resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccessWebshell resource.' + description: 'Removes the EnvironmentAccessWebshell resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessWebshell identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_access_webshells_id_patch + tags: + - EnvironmentAccessWebshell + responses: + 200: + description: 'EnvironmentAccessWebshell resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccessWebshell resource.' + description: 'Updates the EnvironmentAccessWebshell resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccessWebshell identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccessWebshell resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + required: true + deprecated: false + parameters: [ ] + /api/environment_accesses: + get: + operationId: api_environment_accesses_get_collection + tags: + - EnvironmentAccess + responses: + 200: + description: 'EnvironmentAccess collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentAccess.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentAccess' + summary: 'Retrieves the collection of EnvironmentAccess resources.' + description: 'Retrieves the collection of EnvironmentAccess resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: frontend + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'frontend[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: backend + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'backend[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: database + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'database[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: devTools + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'devTools[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: redis + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'redis[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: rabbit + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'rabbit[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: mailbox + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'mailbox[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: webshell + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'webshell[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_environment_accesses_post + tags: + - EnvironmentAccess + responses: + 201: + description: 'EnvironmentAccess resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentAccess resource.' + description: 'Creates a EnvironmentAccess resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentAccess resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + required: true + deprecated: false + parameters: [ ] + '/api/environment_accesses/{id}': + get: + operationId: api_environment_accesses_id_get + tags: + - EnvironmentAccess + responses: + 200: + description: 'EnvironmentAccess resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentAccess resource.' + description: 'Retrieves a EnvironmentAccess resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_accesses_id_put + tags: + - EnvironmentAccess + responses: + 200: + description: 'EnvironmentAccess resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentAccess resource.' + description: 'Replaces the EnvironmentAccess resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccess resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + required: true + deprecated: false + delete: + operationId: api_environment_accesses_id_delete + tags: + - EnvironmentAccess + responses: + 204: + description: 'EnvironmentAccess resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentAccess resource.' + description: 'Removes the EnvironmentAccess resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_accesses_id_patch + tags: + - EnvironmentAccess + responses: + 200: + description: 'EnvironmentAccess resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentAccess resource.' + description: 'Updates the EnvironmentAccess resource.' + parameters: + - name: id + in: path + description: 'EnvironmentAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentAccess resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + required: true + deprecated: false + parameters: [ ] + '/api/environment_accesses/{id}/all-data': + get: + tags: + - EnvironmentAccess + responses: + 200: + description: 'All data of EnvironmentAccess queried successful' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.AllDataResponse' + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.AllDataResponse' + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.AllDataResponse' + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.AllDataResponse' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Get all data of an EnvironmentAccess resource' + description: 'Gets all data what is related to the EnvironmentAccess resource and its children' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [ ] + /api/environment_components: + get: + operationId: api_environment_components_get_collection + tags: + - EnvironmentComponent + responses: + 200: + description: 'EnvironmentComponent collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentComponent.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent' + summary: 'Retrieves the collection of EnvironmentComponent resources.' + description: 'Retrieves the collection of EnvironmentComponent resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: componentVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'componentVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_environment_components_post + tags: + - EnvironmentComponent + responses: + 201: + description: 'EnvironmentComponent resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentComponent.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentComponent resource.' + description: 'Creates a EnvironmentComponent resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentComponent resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentComponent.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + required: true + deprecated: false + parameters: [ ] + '/api/environment_components/{id}': + get: + operationId: api_environment_components_id_get + tags: + - EnvironmentComponent + responses: + 200: + description: 'EnvironmentComponent resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentComponent.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentComponent resource.' + description: 'Retrieves a EnvironmentComponent resource.' + parameters: + - name: id + in: path + description: 'EnvironmentComponent identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_components_id_put + tags: + - EnvironmentComponent + responses: + 200: + description: 'EnvironmentComponent resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentComponent.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentComponent resource.' + description: 'Replaces the EnvironmentComponent resource.' + parameters: + - name: id + in: path + description: 'EnvironmentComponent identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentComponent resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentComponent.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + required: true + deprecated: false + delete: + operationId: api_environment_components_id_delete + tags: + - EnvironmentComponent + responses: + 204: + description: 'EnvironmentComponent resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentComponent resource.' + description: 'Removes the EnvironmentComponent resource.' + parameters: + - name: id + in: path + description: 'EnvironmentComponent identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_components_id_patch + tags: + - EnvironmentComponent + responses: + 200: + description: 'EnvironmentComponent resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentComponent.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentComponent resource.' + description: 'Updates the EnvironmentComponent resource.' + parameters: + - name: id + in: path + description: 'EnvironmentComponent identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentComponent resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + required: true + deprecated: false + parameters: [ ] + /api/environment_custom_domains: + get: + operationId: api_environment_custom_domains_get_collection + tags: + - EnvironmentCustomDomain + responses: + 200: + description: 'EnvironmentCustomDomain collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentCustomDomain.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentCustomDomain' + summary: 'Retrieves the collection of EnvironmentCustomDomain resources.' + description: 'Retrieves the collection of EnvironmentCustomDomain resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_environment_custom_domains_post + tags: + - EnvironmentCustomDomain + responses: + 201: + description: 'EnvironmentCustomDomain resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentCustomDomain resource.' + description: 'Creates a EnvironmentCustomDomain resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentCustomDomain resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + required: true + deprecated: false + parameters: [ ] + '/api/environment_custom_domains/{id}': + get: + operationId: api_environment_custom_domains_id_get + tags: + - EnvironmentCustomDomain + responses: + 200: + description: 'EnvironmentCustomDomain resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentCustomDomain resource.' + description: 'Retrieves a EnvironmentCustomDomain resource.' + parameters: + - name: id + in: path + description: 'EnvironmentCustomDomain identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_custom_domains_id_put + tags: + - EnvironmentCustomDomain + responses: + 200: + description: 'EnvironmentCustomDomain resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentCustomDomain resource.' + description: 'Replaces the EnvironmentCustomDomain resource.' + parameters: + - name: id + in: path + description: 'EnvironmentCustomDomain identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentCustomDomain resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + required: true + deprecated: false + delete: + operationId: api_environment_custom_domains_id_delete + tags: + - EnvironmentCustomDomain + responses: + 204: + description: 'EnvironmentCustomDomain resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentCustomDomain resource.' + description: 'Removes the EnvironmentCustomDomain resource.' + parameters: + - name: id + in: path + description: 'EnvironmentCustomDomain identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_custom_domains_id_patch + tags: + - EnvironmentCustomDomain + responses: + 200: + description: 'EnvironmentCustomDomain resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentCustomDomain resource.' + description: 'Updates the EnvironmentCustomDomain resource.' + parameters: + - name: id + in: path + description: 'EnvironmentCustomDomain identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentCustomDomain resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + required: true + deprecated: false + parameters: [ ] + /api/environment_env_vars: + get: + operationId: api_environment_env_vars_get_collection + tags: + - EnvironmentEnvVar + responses: + 200: + description: 'EnvironmentEnvVar collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentEnvVar.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar' + summary: 'Retrieves the collection of EnvironmentEnvVar resources.' + description: 'Retrieves the collection of EnvironmentEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_environment_env_vars_post + tags: + - EnvironmentEnvVar + responses: + 201: + description: 'EnvironmentEnvVar resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentEnvVar resource.' + description: 'Creates a EnvironmentEnvVar resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + required: true + deprecated: false + parameters: [ ] + '/api/environment_env_vars/{id}': + get: + operationId: api_environment_env_vars_id_get + tags: + - EnvironmentEnvVar + responses: + 200: + description: 'EnvironmentEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentEnvVar resource.' + description: 'Retrieves a EnvironmentEnvVar resource.' + parameters: + - name: id + in: path + description: 'EnvironmentEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_env_vars_id_put + tags: + - EnvironmentEnvVar + responses: + 200: + description: 'EnvironmentEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentEnvVar resource.' + description: 'Replaces the EnvironmentEnvVar resource.' + parameters: + - name: id + in: path + description: 'EnvironmentEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + required: true + deprecated: false + delete: + operationId: api_environment_env_vars_id_delete + tags: + - EnvironmentEnvVar + responses: + 204: + description: 'EnvironmentEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentEnvVar resource.' + description: 'Removes the EnvironmentEnvVar resource.' + parameters: + - name: id + in: path + description: 'EnvironmentEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_env_vars_id_patch + tags: + - EnvironmentEnvVar + responses: + 200: + description: 'EnvironmentEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentEnvVar resource.' + description: 'Updates the EnvironmentEnvVar resource.' + parameters: + - name: id + in: path + description: 'EnvironmentEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + required: true + deprecated: false + parameters: [ ] + /api/environment_magento_host_mappings: + get: + operationId: api_environment_magento_host_mappings_get_collection + tags: + - EnvironmentMagentoHostMapping + responses: + 200: + description: 'EnvironmentMagentoHostMapping collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentMagentoHostMapping.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + summary: 'Retrieves the collection of EnvironmentMagentoHostMapping resources.' + description: 'Retrieves the collection of EnvironmentMagentoHostMapping resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_environment_magento_host_mappings_post + tags: + - EnvironmentMagentoHostMapping + responses: + 201: + description: 'EnvironmentMagentoHostMapping resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a EnvironmentMagentoHostMapping resource.' + description: 'Creates a EnvironmentMagentoHostMapping resource.' + parameters: [ ] + requestBody: + description: 'The new EnvironmentMagentoHostMapping resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + required: true + deprecated: false + parameters: [ ] + '/api/environment_magento_host_mappings/{id}': + get: + operationId: api_environment_magento_host_mappings_id_get + tags: + - EnvironmentMagentoHostMapping + responses: + 200: + description: 'EnvironmentMagentoHostMapping resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentMagentoHostMapping resource.' + description: 'Retrieves a EnvironmentMagentoHostMapping resource.' + parameters: + - name: id + in: path + description: 'EnvironmentMagentoHostMapping identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environment_magento_host_mappings_id_put + tags: + - EnvironmentMagentoHostMapping + responses: + 200: + description: 'EnvironmentMagentoHostMapping resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the EnvironmentMagentoHostMapping resource.' + description: 'Replaces the EnvironmentMagentoHostMapping resource.' + parameters: + - name: id + in: path + description: 'EnvironmentMagentoHostMapping identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentMagentoHostMapping resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + required: true + deprecated: false + delete: + operationId: api_environment_magento_host_mappings_id_delete + tags: + - EnvironmentMagentoHostMapping + responses: + 204: + description: 'EnvironmentMagentoHostMapping resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the EnvironmentMagentoHostMapping resource.' + description: 'Removes the EnvironmentMagentoHostMapping resource.' + parameters: + - name: id + in: path + description: 'EnvironmentMagentoHostMapping identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environment_magento_host_mappings_id_patch + tags: + - EnvironmentMagentoHostMapping + responses: + 200: + description: 'EnvironmentMagentoHostMapping resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the EnvironmentMagentoHostMapping resource.' + description: 'Updates the EnvironmentMagentoHostMapping resource.' + parameters: + - name: id + in: path + description: 'EnvironmentMagentoHostMapping identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated EnvironmentMagentoHostMapping resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + required: true + deprecated: false + parameters: [ ] + /api/environment_message_histories: + get: + operationId: api_environment_message_histories_get_collection + tags: + - EnvironmentMessageHistory + responses: + 200: + description: 'EnvironmentMessageHistory collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/EnvironmentMessageHistory.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentMessageHistory' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentMessageHistory' + summary: 'Retrieves the collection of EnvironmentMessageHistory resources.' + description: 'Retrieves the collection of EnvironmentMessageHistory resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + parameters: [ ] + '/api/environment_message_histories/{id}': + get: + operationId: api_environment_message_histories_id_get + tags: + - EnvironmentMessageHistory + responses: + 200: + description: 'EnvironmentMessageHistory resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/EnvironmentMessageHistory.jsonld' + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMessageHistory' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMessageHistory' + 404: + description: 'Resource not found' + summary: 'Retrieves a EnvironmentMessageHistory resource.' + description: 'Retrieves a EnvironmentMessageHistory resource.' + parameters: + - name: id + in: path + description: 'EnvironmentMessageHistory identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [ ] + /api/environments: + get: + operationId: api_environments_get_collection + tags: + - Environment + responses: + 200: + description: 'Environment collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Environment.jsonld-Environment.output' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Environment-Environment.output' + summary: 'Retrieves the collection of Environment resources.' + description: 'Retrieves the collection of Environment resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: project + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'project[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: project.team.id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'project.team.id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: provider + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'provider[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: state + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'state[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: cluster + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'cluster[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: environmentAccess + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environmentAccess[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: stateByInfra + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'stateByInfra[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'state[not]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + example: '1' + - name: 'state[not][]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + example: '[1,2,3]' + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_environments_post + tags: + - Environment + responses: + 201: + description: 'Environment resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Environment resource.' + description: 'Creates a Environment resource.' + parameters: [ ] + requestBody: + description: 'The new Environment resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.input' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + required: true + deprecated: false + parameters: [ ] + '/api/environments/{id}': + get: + operationId: api_environments_id_get + tags: + - Environment + responses: + 200: + description: 'Environment resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Environment resource.' + description: 'Retrieves a Environment resource.' + parameters: + - name: id + in: path + description: 'Environment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_environments_id_put + tags: + - Environment + responses: + 200: + description: 'Environment resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Environment resource.' + description: 'Replaces the Environment resource.' + parameters: + - name: id + in: path + description: 'Environment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Environment resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.input' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + required: true + deprecated: false + delete: + operationId: api_environments_id_delete + tags: + - Environment + responses: + 204: + description: 'Environment resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Environment resource.' + description: 'Removes the Environment resource.' + parameters: + - name: id + in: path + description: 'Environment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_environments_id_patch + tags: + - Environment + responses: + 200: + description: 'Environment resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Environment resource.' + description: 'Updates the Environment resource.' + parameters: + - name: id + in: path + description: 'Environment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Environment resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + required: true + deprecated: false + parameters: [ ] + '/api/environments/{id}/build-and-deploy': + patch: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Build commad for Environment' + description: 'It sends a Build command through the Amqp to the infrastructure' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + required: false + parameters: [ ] + '/api/environments/{id}/costs': + get: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.Costs.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Environment.Costs' + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.Costs.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Environment.Costs' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Get all costs data that related to the Environment' + description: 'These costs data is came from Kubernetes (Kubecost)' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [ ] + '/api/environments/{id}/export-database': + put: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Build commad for Environment' + description: 'It sends a Build command through the Amqp to the infrastructure' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + required: false + parameters: [ ] + '/api/environments/{id}/export-media': + put: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Build commad for Environment' + description: 'It sends a Build command through the Amqp to the infrastructure' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + required: false + parameters: [ ] + '/api/environments/{id}/import-database': + post: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Build commad for Environment' + description: 'It sends a Build command through the Amqp to the infrastructure' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + required: false + parameters: [ ] + '/api/environments/{id}/import-media': + post: + tags: + - Environment + responses: + 200: + description: 'The process has been finished successfully' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Build commad for Environment' + description: 'It sends a Build command through the Amqp to the infrastructure' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + required: false + parameters: [ ] + '/api/environments/{id}/logs': + get: + tags: + - Environment + responses: + 200: + description: 'The log request has been sent successfully' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.LogStreamResponse' + application/json: + schema: + $ref: '#/components/schemas/Environment.LogStreamResponse' + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.LogStreamResponse' + application/json: + schema: + $ref: '#/components/schemas/Environment.LogStreamResponse' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Environment' + summary: 'Create a request to view logs' + description: 'It sends a request to infra to stream logs to a mercure topic. The topic is in the response' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + - name: x-filters + in: header + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + - name: x-offset + in: header + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [ ] + '/api/environments/{id}/progressbar': + get: + operationId: api_environments_idprogressbar_get + tags: + - Environment + responses: + 200: + description: 'Environment resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Environment resource.' + description: 'Retrieves a Environment resource.' + parameters: + - name: id + in: path + description: 'Environment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [ ] + /api/exported_datas: + get: + operationId: api_exported_datas_get_collection + tags: + - ExportedData + responses: + 200: + description: 'ExportedData collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ExportedData.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ExportedData' + summary: 'Retrieves the collection of ExportedData resources.' + description: 'Retrieves the collection of ExportedData resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: dataTransferDataType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'dataTransferDataType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: state + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'state[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'order[createdAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_exported_datas_post + tags: + - ExportedData + responses: + 201: + description: 'ExportedData resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ExportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ExportedData resource.' + description: 'Creates a ExportedData resource.' + parameters: [ ] + requestBody: + description: 'The new ExportedData resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ExportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + required: true + deprecated: false + parameters: [ ] + '/api/exported_datas/{id}': + get: + operationId: api_exported_datas_id_get + tags: + - ExportedData + responses: + 200: + description: 'ExportedData resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ExportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + 404: + description: 'Resource not found' + summary: 'Retrieves a ExportedData resource.' + description: 'Retrieves a ExportedData resource.' + parameters: + - name: id + in: path + description: 'ExportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_exported_datas_id_put + tags: + - ExportedData + responses: + 200: + description: 'ExportedData resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ExportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ExportedData resource.' + description: 'Replaces the ExportedData resource.' + parameters: + - name: id + in: path + description: 'ExportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ExportedData resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ExportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + required: true + deprecated: false + delete: + operationId: api_exported_datas_id_delete + tags: + - ExportedData + responses: + 204: + description: 'ExportedData resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ExportedData resource.' + description: 'Removes the ExportedData resource.' + parameters: + - name: id + in: path + description: 'ExportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_exported_datas_id_patch + tags: + - ExportedData + responses: + 200: + description: 'ExportedData resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ExportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ExportedData resource.' + description: 'Updates the ExportedData resource.' + parameters: + - name: id + in: path + description: 'ExportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ExportedData resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ExportedData' + required: true + deprecated: false + parameters: [ ] + /api/git_types: + get: + operationId: api_git_types_get_collection + tags: + - GitType + responses: + 200: + description: 'GitType collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/GitType.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GitType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/GitType' + summary: 'Retrieves the collection of GitType resources.' + description: 'Retrieves the collection of GitType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_git_types_post + tags: + - GitType + responses: + 201: + description: 'GitType resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/GitType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a GitType resource.' + description: 'Creates a GitType resource.' + parameters: [ ] + requestBody: + description: 'The new GitType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/GitType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + required: true + deprecated: false + parameters: [ ] + '/api/git_types/{id}': + get: + operationId: api_git_types_id_get + tags: + - GitType + responses: + 200: + description: 'GitType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/GitType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + 404: + description: 'Resource not found' + summary: 'Retrieves a GitType resource.' + description: 'Retrieves a GitType resource.' + parameters: + - name: id + in: path + description: 'GitType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_git_types_id_put + tags: + - GitType + responses: + 200: + description: 'GitType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/GitType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the GitType resource.' + description: 'Replaces the GitType resource.' + parameters: + - name: id + in: path + description: 'GitType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated GitType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/GitType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + required: true + deprecated: false + delete: + operationId: api_git_types_id_delete + tags: + - GitType + responses: + 204: + description: 'GitType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the GitType resource.' + description: 'Removes the GitType resource.' + parameters: + - name: id + in: path + description: 'GitType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_git_types_id_patch + tags: + - GitType + responses: + 200: + description: 'GitType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/GitType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the GitType resource.' + description: 'Updates the GitType resource.' + parameters: + - name: id + in: path + description: 'GitType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated GitType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/GitType' + required: true + deprecated: false + parameters: [ ] + /api/gits: + get: + operationId: api_gits_get_collection + tags: + - Git + responses: + 200: + description: 'Git collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Git.jsonld-Git.output' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Git-Git.output' + summary: 'Retrieves the collection of Git resources.' + description: 'Retrieves the collection of Git resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: project + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'project[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: gitType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'gitType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: credentialType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'credentialType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: cryptoKeyType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'cryptoKeyType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_gits_post + tags: + - Git + responses: + 201: + description: 'Git resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Git.jsonld-Git.output' + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Git resource.' + description: 'Creates a Git resource.' + parameters: [ ] + requestBody: + description: 'The new Git resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Git.jsonld-Git.input' + application/json: + schema: + $ref: '#/components/schemas/Git-Git.input' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.input' + required: true + deprecated: false + parameters: [ ] + '/api/gits/{id}': + get: + operationId: api_gits_id_get + tags: + - Git + responses: + 200: + description: 'Git resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Git.jsonld-Git.output' + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Git resource.' + description: 'Retrieves a Git resource.' + parameters: + - name: id + in: path + description: 'Git identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_gits_id_put + tags: + - Git + responses: + 200: + description: 'Git resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Git.jsonld-Git.output' + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Git resource.' + description: 'Replaces the Git resource.' + parameters: + - name: id + in: path + description: 'Git identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Git resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Git.jsonld-Git.input' + application/json: + schema: + $ref: '#/components/schemas/Git-Git.input' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.input' + required: true + deprecated: false + delete: + operationId: api_gits_id_delete + tags: + - Git + responses: + 204: + description: 'Git resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Git resource.' + description: 'Removes the Git resource.' + parameters: + - name: id + in: path + description: 'Git identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_gits_id_patch + tags: + - Git + responses: + 200: + description: 'Git resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Git.jsonld-Git.output' + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Git resource.' + description: 'Updates the Git resource.' + parameters: + - name: id + in: path + description: 'Git identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Git resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Git-Git.input' + required: true + deprecated: false + parameters: [ ] + '/api/gits/{id}/connect-test': + get: + tags: + - Git + responses: + 200: + description: 'The query run successfully' + content: + application/json: + schema: + type: object + properties: + isSuccessful: { type: boolean } + application/ld+json: + schema: + type: object + properties: + isSuccessful: { type: boolean } + 201: + description: 'The same as the HTTP 200' + content: + application/json: + schema: + type: object + properties: + isSuccessful: { type: boolean } + application/ld+json: + schema: + type: object + properties: + isSuccessful: { type: boolean } + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing Git' + summary: 'Get information about the repository connection' + description: 'It will tests the repository connection by the added credentials' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [ ] + /api/imported_datas: + get: + operationId: api_imported_datas_get_collection + tags: + - ImportedData + responses: + 200: + description: 'ImportedData collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ImportedData.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ImportedData' + summary: 'Retrieves the collection of ImportedData resources.' + description: 'Retrieves the collection of ImportedData resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: environment + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'environment[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: dataTransferDataType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'dataTransferDataType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: state + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'state[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'order[createdAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_imported_datas_post + tags: + - ImportedData + responses: + 201: + description: 'ImportedData resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ImportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ImportedData resource.' + description: 'Creates a ImportedData resource.' + parameters: [ ] + requestBody: + description: 'The new ImportedData resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ImportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + required: true + deprecated: false + parameters: [ ] + '/api/imported_datas/{id}': + get: + operationId: api_imported_datas_id_get + tags: + - ImportedData + responses: + 200: + description: 'ImportedData resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ImportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + 404: + description: 'Resource not found' + summary: 'Retrieves a ImportedData resource.' + description: 'Retrieves a ImportedData resource.' + parameters: + - name: id + in: path + description: 'ImportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_imported_datas_id_put + tags: + - ImportedData + responses: + 200: + description: 'ImportedData resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ImportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ImportedData resource.' + description: 'Replaces the ImportedData resource.' + parameters: + - name: id + in: path + description: 'ImportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ImportedData resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ImportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + required: true + deprecated: false + delete: + operationId: api_imported_datas_id_delete + tags: + - ImportedData + responses: + 204: + description: 'ImportedData resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ImportedData resource.' + description: 'Removes the ImportedData resource.' + parameters: + - name: id + in: path + description: 'ImportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_imported_datas_id_patch + tags: + - ImportedData + responses: + 200: + description: 'ImportedData resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ImportedData.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ImportedData resource.' + description: 'Updates the ImportedData resource.' + parameters: + - name: id + in: path + description: 'ImportedData identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ImportedData resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ImportedData' + required: true + deprecated: false + parameters: [ ] + /api/invitations: + get: + operationId: api_invitations_get_collection + tags: + - Invitation + responses: + 200: + description: 'Invitation collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Invitation.jsonld-Invitation.output' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Invitation-Invitation.output' + summary: 'Retrieves the collection of Invitation resources.' + description: 'Retrieves the collection of Invitation resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: user + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'user[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: team + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'team[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: state + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: boolean + style: form + explode: false + allowReserved: false + - name: 'state[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: boolean + style: form + explode: true + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_invitations_post + tags: + - Invitation + responses: + 201: + description: 'Invitation resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Invitation.jsonld-Invitation.output' + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Invitation resource.' + description: 'Creates a Invitation resource.' + parameters: [ ] + requestBody: + description: 'The new Invitation resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Invitation.jsonld-Invitation.input' + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + required: true + deprecated: false + parameters: [ ] + '/api/invitations/{id}': + get: + operationId: api_invitations_id_get + tags: + - Invitation + responses: + 200: + description: 'Invitation resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Invitation.jsonld-Invitation.output' + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Invitation resource.' + description: 'Retrieves a Invitation resource.' + parameters: + - name: id + in: path + description: 'Invitation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_invitations_id_put + tags: + - Invitation + responses: + 200: + description: 'Invitation resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Invitation.jsonld-Invitation.output' + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Invitation resource.' + description: 'Replaces the Invitation resource.' + parameters: + - name: id + in: path + description: 'Invitation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Invitation resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Invitation.jsonld-Invitation.input' + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + required: true + deprecated: false + delete: + operationId: api_invitations_id_delete + tags: + - Invitation + responses: + 204: + description: 'Invitation resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Invitation resource.' + description: 'Removes the Invitation resource.' + parameters: + - name: id + in: path + description: 'Invitation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_invitations_id_patch + tags: + - Invitation + responses: + 200: + description: 'Invitation resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Invitation.jsonld-Invitation.output' + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Invitation resource.' + description: 'Updates the Invitation resource.' + parameters: + - name: id + in: path + description: 'Invitation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Invitation resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + required: true + deprecated: false + parameters: [ ] + /api/organisation_env_vars: + get: + operationId: api_organisation_env_vars_get_collection + tags: + - OrganisationEnvVar + responses: + 200: + description: 'OrganisationEnvVar collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/OrganisationEnvVar.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/OrganisationEnvVar' + summary: 'Retrieves the collection of OrganisationEnvVar resources.' + description: 'Retrieves the collection of OrganisationEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: organisation + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'organisation[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_organisation_env_vars_post + tags: + - OrganisationEnvVar + responses: + 201: + description: 'OrganisationEnvVar resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a OrganisationEnvVar resource.' + description: 'Creates a OrganisationEnvVar resource.' + parameters: [ ] + requestBody: + description: 'The new OrganisationEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + required: true + deprecated: false + parameters: [ ] + '/api/organisation_env_vars/{id}': + get: + operationId: api_organisation_env_vars_id_get + tags: + - OrganisationEnvVar + responses: + 200: + description: 'OrganisationEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a OrganisationEnvVar resource.' + description: 'Retrieves a OrganisationEnvVar resource.' + parameters: + - name: id + in: path + description: 'OrganisationEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_organisation_env_vars_id_put + tags: + - OrganisationEnvVar + responses: + 200: + description: 'OrganisationEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the OrganisationEnvVar resource.' + description: 'Replaces the OrganisationEnvVar resource.' + parameters: + - name: id + in: path + description: 'OrganisationEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated OrganisationEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + required: true + deprecated: false + delete: + operationId: api_organisation_env_vars_id_delete + tags: + - OrganisationEnvVar + responses: + 204: + description: 'OrganisationEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the OrganisationEnvVar resource.' + description: 'Removes the OrganisationEnvVar resource.' + parameters: + - name: id + in: path + description: 'OrganisationEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_organisation_env_vars_id_patch + tags: + - OrganisationEnvVar + responses: + 200: + description: 'OrganisationEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the OrganisationEnvVar resource.' + description: 'Updates the OrganisationEnvVar resource.' + parameters: + - name: id + in: path + description: 'OrganisationEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated OrganisationEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + required: true + deprecated: false + parameters: [ ] + /api/organisations: + get: + operationId: api_organisations_get_collection + tags: + - Organisation + responses: + 200: + description: 'Organisation collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Organisation.jsonld-Organisation.output' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Organisation-Organisation.output' + summary: 'Retrieves the collection of Organisation resources.' + description: 'Retrieves the collection of Organisation resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: name + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'name[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: stateByInfra + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'stateByInfra[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: team + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'team[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_organisations_post + tags: + - Organisation + responses: + 201: + description: 'Organisation resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Organisation.jsonld-Organisation.output' + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Organisation resource.' + description: 'Creates a Organisation resource.' + parameters: [ ] + requestBody: + description: 'The new Organisation resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Organisation.jsonld-Organisation.input' + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + required: true + deprecated: false + parameters: [ ] + '/api/organisations/{id}': + get: + operationId: api_organisations_id_get + tags: + - Organisation + responses: + 200: + description: 'Organisation resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Organisation.jsonld-Organisation.output' + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Organisation resource.' + description: 'Retrieves a Organisation resource.' + parameters: + - name: id + in: path + description: 'Organisation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_organisations_id_put + tags: + - Organisation + responses: + 200: + description: 'Organisation resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Organisation.jsonld-Organisation.output' + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Organisation resource.' + description: 'Replaces the Organisation resource.' + parameters: + - name: id + in: path + description: 'Organisation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Organisation resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Organisation.jsonld-Organisation.input' + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + required: true + deprecated: false + delete: + operationId: api_organisations_id_delete + tags: + - Organisation + responses: + 204: + description: 'Organisation resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Organisation resource.' + description: 'Removes the Organisation resource.' + parameters: + - name: id + in: path + description: 'Organisation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_organisations_id_patch + tags: + - Organisation + responses: + 200: + description: 'Organisation resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Organisation.jsonld-Organisation.output' + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Organisation resource.' + description: 'Updates the Organisation resource.' + parameters: + - name: id + in: path + description: 'Organisation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Organisation resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + required: true + deprecated: false + parameters: [ ] + /api/prices: + get: + operationId: api_prices_get_collection + tags: + - Price + responses: + 200: + description: 'Price collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Price.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Price' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Price' + summary: 'Retrieves the collection of Price resources.' + description: 'Retrieves the collection of Price resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: product + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'product[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_prices_post + tags: + - Price + responses: + 201: + description: 'Price resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Price.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Price resource.' + description: 'Creates a Price resource.' + parameters: [ ] + requestBody: + description: 'The new Price resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Price.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + required: true + deprecated: false + parameters: [ ] + '/api/prices/{id}': + get: + operationId: api_prices_id_get + tags: + - Price + responses: + 200: + description: 'Price resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Price.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + 404: + description: 'Resource not found' + summary: 'Retrieves a Price resource.' + description: 'Retrieves a Price resource.' + parameters: + - name: id + in: path + description: 'Price identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_prices_id_put + tags: + - Price + responses: + 200: + description: 'Price resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Price.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Price resource.' + description: 'Replaces the Price resource.' + parameters: + - name: id + in: path + description: 'Price identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Price resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Price.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + required: true + deprecated: false + delete: + operationId: api_prices_id_delete + tags: + - Price + responses: + 204: + description: 'Price resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Price resource.' + description: 'Removes the Price resource.' + parameters: + - name: id + in: path + description: 'Price identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_prices_id_patch + tags: + - Price + responses: + 200: + description: 'Price resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Price.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Price resource.' + description: 'Updates the Price resource.' + parameters: + - name: id + in: path + description: 'Price identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Price resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Price' + required: true + deprecated: false + parameters: [ ] + /api/products: + get: + operationId: api_products_get_collection + tags: + - Product + responses: + 200: + description: 'Product collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Product.jsonld-Product.output' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Product-Product.output' + summary: 'Retrieves the collection of Product resources.' + description: 'Retrieves the collection of Product resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: defaultPrice + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'defaultPrice[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: cluster + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'cluster[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_products_post + tags: + - Product + responses: + 201: + description: 'Product resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Product.jsonld-Product.output' + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Product resource.' + description: 'Creates a Product resource.' + parameters: [ ] + requestBody: + description: 'The new Product resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Product.jsonld-Product.input' + application/json: + schema: + $ref: '#/components/schemas/Product-Product.input' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.input' + required: true + deprecated: false + parameters: [ ] + '/api/products/{id}': + get: + operationId: api_products_id_get + tags: + - Product + responses: + 200: + description: 'Product resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Product.jsonld-Product.output' + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Product resource.' + description: 'Retrieves a Product resource.' + parameters: + - name: id + in: path + description: 'Product identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_products_id_put + tags: + - Product + responses: + 200: + description: 'Product resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Product.jsonld-Product.output' + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Product resource.' + description: 'Replaces the Product resource.' + parameters: + - name: id + in: path + description: 'Product identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Product resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Product.jsonld-Product.input' + application/json: + schema: + $ref: '#/components/schemas/Product-Product.input' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.input' + required: true + deprecated: false + delete: + operationId: api_products_id_delete + tags: + - Product + responses: + 204: + description: 'Product resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Product resource.' + description: 'Removes the Product resource.' + parameters: + - name: id + in: path + description: 'Product identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_products_id_patch + tags: + - Product + responses: + 200: + description: 'Product resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Product.jsonld-Product.output' + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Product resource.' + description: 'Updates the Product resource.' + parameters: + - name: id + in: path + description: 'Product identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Product resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Product-Product.input' + required: true + deprecated: false + parameters: [ ] + /api/project_access_gits: + get: + operationId: api_project_access_gits_get_collection + tags: + - ProjectAccessGit + responses: + 200: + description: 'ProjectAccessGit collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ProjectAccessGit.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessGit' + summary: 'Retrieves the collection of ProjectAccessGit resources.' + description: 'Retrieves the collection of ProjectAccessGit resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectAccess + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccess[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_access_gits_post + tags: + - ProjectAccessGit + responses: + 201: + description: 'ProjectAccessGit resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessGit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectAccessGit resource.' + description: 'Creates a ProjectAccessGit resource.' + parameters: [ ] + requestBody: + description: 'The new ProjectAccessGit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessGit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + required: true + deprecated: false + parameters: [ ] + '/api/project_access_gits/{id}': + get: + operationId: api_project_access_gits_id_get + tags: + - ProjectAccessGit + responses: + 200: + description: 'ProjectAccessGit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessGit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectAccessGit resource.' + description: 'Retrieves a ProjectAccessGit resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessGit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_access_gits_id_put + tags: + - ProjectAccessGit + responses: + 200: + description: 'ProjectAccessGit resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessGit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectAccessGit resource.' + description: 'Replaces the ProjectAccessGit resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessGit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessGit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessGit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + required: true + deprecated: false + delete: + operationId: api_project_access_gits_id_delete + tags: + - ProjectAccessGit + responses: + 204: + description: 'ProjectAccessGit resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectAccessGit resource.' + description: 'Removes the ProjectAccessGit resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessGit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_access_gits_id_patch + tags: + - ProjectAccessGit + responses: + 200: + description: 'ProjectAccessGit resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessGit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectAccessGit resource.' + description: 'Updates the ProjectAccessGit resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessGit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessGit resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + required: true + deprecated: false + parameters: [ ] + /api/project_access_registries: + get: + operationId: api_project_access_registries_get_collection + tags: + - ProjectAccessRegistry + responses: + 200: + description: 'ProjectAccessRegistry collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ProjectAccessRegistry.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessRegistry' + summary: 'Retrieves the collection of ProjectAccessRegistry resources.' + description: 'Retrieves the collection of ProjectAccessRegistry resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectAccess + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccess[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_access_registries_post + tags: + - ProjectAccessRegistry + responses: + 201: + description: 'ProjectAccessRegistry resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectAccessRegistry resource.' + description: 'Creates a ProjectAccessRegistry resource.' + parameters: [ ] + requestBody: + description: 'The new ProjectAccessRegistry resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + required: true + deprecated: false + parameters: [ ] + '/api/project_access_registries/{id}': + get: + operationId: api_project_access_registries_id_get + tags: + - ProjectAccessRegistry + responses: + 200: + description: 'ProjectAccessRegistry resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectAccessRegistry resource.' + description: 'Retrieves a ProjectAccessRegistry resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessRegistry identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_access_registries_id_put + tags: + - ProjectAccessRegistry + responses: + 200: + description: 'ProjectAccessRegistry resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectAccessRegistry resource.' + description: 'Replaces the ProjectAccessRegistry resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessRegistry identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessRegistry resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + required: true + deprecated: false + delete: + operationId: api_project_access_registries_id_delete + tags: + - ProjectAccessRegistry + responses: + 204: + description: 'ProjectAccessRegistry resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectAccessRegistry resource.' + description: 'Removes the ProjectAccessRegistry resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessRegistry identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_access_registries_id_patch + tags: + - ProjectAccessRegistry + responses: + 200: + description: 'ProjectAccessRegistry resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectAccessRegistry resource.' + description: 'Updates the ProjectAccessRegistry resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessRegistry identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessRegistry resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + required: true + deprecated: false + parameters: [ ] + /api/project_access_service_accounts: + get: + operationId: api_project_access_service_accounts_get_collection + tags: + - ProjectAccessServiceAccount + responses: + 200: + description: 'ProjectAccessServiceAccount collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ProjectAccessServiceAccount.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + summary: 'Retrieves the collection of ProjectAccessServiceAccount resources.' + description: 'Retrieves the collection of ProjectAccessServiceAccount resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectAccess + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccess[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_access_service_accounts_post + tags: + - ProjectAccessServiceAccount + responses: + 201: + description: 'ProjectAccessServiceAccount resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectAccessServiceAccount resource.' + description: 'Creates a ProjectAccessServiceAccount resource.' + parameters: [ ] + requestBody: + description: 'The new ProjectAccessServiceAccount resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + required: true + deprecated: false + parameters: [ ] + '/api/project_access_service_accounts/{id}': + get: + operationId: api_project_access_service_accounts_id_get + tags: + - ProjectAccessServiceAccount + responses: + 200: + description: 'ProjectAccessServiceAccount resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectAccessServiceAccount resource.' + description: 'Retrieves a ProjectAccessServiceAccount resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessServiceAccount identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_access_service_accounts_id_put + tags: + - ProjectAccessServiceAccount + responses: + 200: + description: 'ProjectAccessServiceAccount resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectAccessServiceAccount resource.' + description: 'Replaces the ProjectAccessServiceAccount resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessServiceAccount identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessServiceAccount resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + required: true + deprecated: false + delete: + operationId: api_project_access_service_accounts_id_delete + tags: + - ProjectAccessServiceAccount + responses: + 204: + description: 'ProjectAccessServiceAccount resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectAccessServiceAccount resource.' + description: 'Removes the ProjectAccessServiceAccount resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessServiceAccount identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_access_service_accounts_id_patch + tags: + - ProjectAccessServiceAccount + responses: + 200: + description: 'ProjectAccessServiceAccount resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectAccessServiceAccount resource.' + description: 'Updates the ProjectAccessServiceAccount resource.' + parameters: + - name: id + in: path + description: 'ProjectAccessServiceAccount identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccessServiceAccount resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + required: true + deprecated: false + parameters: [ ] + /api/project_accesses: + get: + operationId: api_project_accesses_get_collection + tags: + - ProjectAccess + responses: + 200: + description: 'ProjectAccess collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ProjectAccess.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccess' + summary: 'Retrieves the collection of ProjectAccess resources.' + description: 'Retrieves the collection of ProjectAccess resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectAccessGit + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccessGit[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: projectAccessRegistry + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccessRegistry[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: projectAccessServiceAccount + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectAccessServiceAccount[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_accesses_post + tags: + - ProjectAccess + responses: + 201: + description: 'ProjectAccess resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectAccess resource.' + description: 'Creates a ProjectAccess resource.' + parameters: [ ] + requestBody: + description: 'The new ProjectAccess resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + required: true + deprecated: false + parameters: [ ] + '/api/project_accesses/{id}': + get: + operationId: api_project_accesses_id_get + tags: + - ProjectAccess + responses: + 200: + description: 'ProjectAccess resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectAccess resource.' + description: 'Retrieves a ProjectAccess resource.' + parameters: + - name: id + in: path + description: 'ProjectAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_accesses_id_put + tags: + - ProjectAccess + responses: + 200: + description: 'ProjectAccess resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectAccess resource.' + description: 'Replaces the ProjectAccess resource.' + parameters: + - name: id + in: path + description: 'ProjectAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccess resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + required: true + deprecated: false + delete: + operationId: api_project_accesses_id_delete + tags: + - ProjectAccess + responses: + 204: + description: 'ProjectAccess resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectAccess resource.' + description: 'Removes the ProjectAccess resource.' + parameters: + - name: id + in: path + description: 'ProjectAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_accesses_id_patch + tags: + - ProjectAccess + responses: + 200: + description: 'ProjectAccess resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectAccess.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectAccess resource.' + description: 'Updates the ProjectAccess resource.' + parameters: + - name: id + in: path + description: 'ProjectAccess identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectAccess resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccess' + required: true + deprecated: false + parameters: [ ] + /api/project_env_vars: + get: + operationId: api_project_env_vars_get_collection + tags: + - ProjectEnvVar + responses: + 200: + description: 'ProjectEnvVar collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ProjectEnvVar.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar' + summary: 'Retrieves the collection of ProjectEnvVar resources.' + description: 'Retrieves the collection of ProjectEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: project + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'project[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_env_vars_post + tags: + - ProjectEnvVar + responses: + 201: + description: 'ProjectEnvVar resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectEnvVar resource.' + description: 'Creates a ProjectEnvVar resource.' + parameters: [ ] + requestBody: + description: 'The new ProjectEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + required: true + deprecated: false + parameters: [ ] + '/api/project_env_vars/{id}': + get: + operationId: api_project_env_vars_id_get + tags: + - ProjectEnvVar + responses: + 200: + description: 'ProjectEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectEnvVar resource.' + description: 'Retrieves a ProjectEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_env_vars_id_put + tags: + - ProjectEnvVar + responses: + 200: + description: 'ProjectEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectEnvVar resource.' + description: 'Replaces the ProjectEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + required: true + deprecated: false + delete: + operationId: api_project_env_vars_id_delete + tags: + - ProjectEnvVar + responses: + 204: + description: 'ProjectEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectEnvVar resource.' + description: 'Removes the ProjectEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_env_vars_id_patch + tags: + - ProjectEnvVar + responses: + 200: + description: 'ProjectEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectEnvVar resource.' + description: 'Updates the ProjectEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + required: true + deprecated: false + parameters: [ ] + /api/project_type_version_env_var_examples: + get: + operationId: api_project_type_version_env_var_examples_get_collection + tags: + - ProjectTypeVersionEnvVarExample + responses: + 200: + description: 'ProjectTypeVersionEnvVarExample collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + summary: 'Retrieves the collection of ProjectTypeVersionEnvVarExample resources.' + description: 'Retrieves the collection of ProjectTypeVersionEnvVarExample resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectTypeVersionEnvVar + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectTypeVersionEnvVar[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_type_version_env_var_examples_post + tags: + - ProjectTypeVersionEnvVarExample + responses: + 201: + description: 'ProjectTypeVersionEnvVarExample resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectTypeVersionEnvVarExample resource.' + description: 'Creates a ProjectTypeVersionEnvVarExample resource.' + parameters: [ ] + requestBody: + description: 'The new ProjectTypeVersionEnvVarExample resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + required: true + deprecated: false + parameters: [ ] + '/api/project_type_version_env_var_examples/{id}': + get: + operationId: api_project_type_version_env_var_examples_id_get + tags: + - ProjectTypeVersionEnvVarExample + responses: + 200: + description: 'ProjectTypeVersionEnvVarExample resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectTypeVersionEnvVarExample resource.' + description: 'Retrieves a ProjectTypeVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_type_version_env_var_examples_id_put + tags: + - ProjectTypeVersionEnvVarExample + responses: + 200: + description: 'ProjectTypeVersionEnvVarExample resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectTypeVersionEnvVarExample resource.' + description: 'Replaces the ProjectTypeVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersionEnvVarExample resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + required: true + deprecated: false + delete: + operationId: api_project_type_version_env_var_examples_id_delete + tags: + - ProjectTypeVersionEnvVarExample + responses: + 204: + description: 'ProjectTypeVersionEnvVarExample resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectTypeVersionEnvVarExample resource.' + description: 'Removes the ProjectTypeVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_type_version_env_var_examples_id_patch + tags: + - ProjectTypeVersionEnvVarExample + responses: + 200: + description: 'ProjectTypeVersionEnvVarExample resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectTypeVersionEnvVarExample resource.' + description: 'Updates the ProjectTypeVersionEnvVarExample resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVarExample identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersionEnvVarExample resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + required: true + deprecated: false + parameters: [ ] + /api/project_type_version_env_vars: + get: + operationId: api_project_type_version_env_vars_get_collection + tags: + - ProjectTypeVersionEnvVar + responses: + 200: + description: 'ProjectTypeVersionEnvVar collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ProjectTypeVersionEnvVar.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + summary: 'Retrieves the collection of ProjectTypeVersionEnvVar resources.' + description: 'Retrieves the collection of ProjectTypeVersionEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectTypeVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectTypeVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarValidations + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarValidations[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_type_version_env_vars_post + tags: + - ProjectTypeVersionEnvVar + responses: + 201: + description: 'ProjectTypeVersionEnvVar resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectTypeVersionEnvVar resource.' + description: 'Creates a ProjectTypeVersionEnvVar resource.' + parameters: [ ] + requestBody: + description: 'The new ProjectTypeVersionEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + required: true + deprecated: false + parameters: [ ] + '/api/project_type_version_env_vars/{id}': + get: + operationId: api_project_type_version_env_vars_id_get + tags: + - ProjectTypeVersionEnvVar + responses: + 200: + description: 'ProjectTypeVersionEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectTypeVersionEnvVar resource.' + description: 'Retrieves a ProjectTypeVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_type_version_env_vars_id_put + tags: + - ProjectTypeVersionEnvVar + responses: + 200: + description: 'ProjectTypeVersionEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectTypeVersionEnvVar resource.' + description: 'Replaces the ProjectTypeVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersionEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + required: true + deprecated: false + delete: + operationId: api_project_type_version_env_vars_id_delete + tags: + - ProjectTypeVersionEnvVar + responses: + 204: + description: 'ProjectTypeVersionEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectTypeVersionEnvVar resource.' + description: 'Removes the ProjectTypeVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_type_version_env_vars_id_patch + tags: + - ProjectTypeVersionEnvVar + responses: + 200: + description: 'ProjectTypeVersionEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectTypeVersionEnvVar resource.' + description: 'Updates the ProjectTypeVersionEnvVar resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersionEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersionEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + required: true + deprecated: false + parameters: [ ] + /api/project_type_versions: + get: + operationId: api_project_type_versions_get_collection + tags: + - ProjectTypeVersion + responses: + 200: + description: 'ProjectTypeVersion collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ProjectTypeVersion.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectTypeVersion' + summary: 'Retrieves the collection of ProjectTypeVersion resources.' + description: 'Retrieves the collection of ProjectTypeVersion resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_project_type_versions_post + tags: + - ProjectTypeVersion + responses: + 201: + description: 'ProjectTypeVersion resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectTypeVersion resource.' + description: 'Creates a ProjectTypeVersion resource.' + parameters: [ ] + requestBody: + description: 'The new ProjectTypeVersion resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + required: true + deprecated: false + parameters: [ ] + '/api/project_type_versions/{id}': + get: + operationId: api_project_type_versions_id_get + tags: + - ProjectTypeVersion + responses: + 200: + description: 'ProjectTypeVersion resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectTypeVersion resource.' + description: 'Retrieves a ProjectTypeVersion resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_type_versions_id_put + tags: + - ProjectTypeVersion + responses: + 200: + description: 'ProjectTypeVersion resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectTypeVersion resource.' + description: 'Replaces the ProjectTypeVersion resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersion resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + required: true + deprecated: false + delete: + operationId: api_project_type_versions_id_delete + tags: + - ProjectTypeVersion + responses: + 204: + description: 'ProjectTypeVersion resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectTypeVersion resource.' + description: 'Removes the ProjectTypeVersion resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_type_versions_id_patch + tags: + - ProjectTypeVersion + responses: + 200: + description: 'ProjectTypeVersion resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectTypeVersion resource.' + description: 'Updates the ProjectTypeVersion resource.' + parameters: + - name: id + in: path + description: 'ProjectTypeVersion identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectTypeVersion resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + required: true + deprecated: false + parameters: [ ] + /api/project_types: + get: + operationId: api_project_types_get_collection + tags: + - ProjectType + responses: + 200: + description: 'ProjectType collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ProjectType.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectType' + summary: 'Retrieves the collection of ProjectType resources.' + description: 'Retrieves the collection of ProjectType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: 'order[name]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_project_types_post + tags: + - ProjectType + responses: + 201: + description: 'ProjectType resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ProjectType resource.' + description: 'Creates a ProjectType resource.' + parameters: [ ] + requestBody: + description: 'The new ProjectType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + required: true + deprecated: false + parameters: [ ] + '/api/project_types/{id}': + get: + operationId: api_project_types_id_get + tags: + - ProjectType + responses: + 200: + description: 'ProjectType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + 404: + description: 'Resource not found' + summary: 'Retrieves a ProjectType resource.' + description: 'Retrieves a ProjectType resource.' + parameters: + - name: id + in: path + description: 'ProjectType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_project_types_id_put + tags: + - ProjectType + responses: + 200: + description: 'ProjectType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ProjectType resource.' + description: 'Replaces the ProjectType resource.' + parameters: + - name: id + in: path + description: 'ProjectType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + required: true + deprecated: false + delete: + operationId: api_project_types_id_delete + tags: + - ProjectType + responses: + 204: + description: 'ProjectType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ProjectType resource.' + description: 'Removes the ProjectType resource.' + parameters: + - name: id + in: path + description: 'ProjectType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_project_types_id_patch + tags: + - ProjectType + responses: + 200: + description: 'ProjectType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ProjectType.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ProjectType resource.' + description: 'Updates the ProjectType resource.' + parameters: + - name: id + in: path + description: 'ProjectType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ProjectType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectType' + required: true + deprecated: false + parameters: [ ] + /api/projects: + get: + operationId: api_projects_get_collection + tags: + - Project + responses: + 200: + description: 'Project collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Project.jsonld-Project.output' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Project-Project.output' + summary: 'Retrieves the collection of Project resources.' + description: 'Retrieves the collection of Project resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: team.organisation.id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'team.organisation.id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: state + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'state[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: git + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'git[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: team + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'team[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: stateByInfra + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'stateByInfra[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'createdAt[before]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'createdAt[strictly_before]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'createdAt[after]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'createdAt[strictly_after]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: projectTypeVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectTypeVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_projects_post + tags: + - Project + responses: + 201: + description: 'Project resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Project.jsonld-Project.output' + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Project resource.' + description: 'Creates a Project resource.' + parameters: [ ] + requestBody: + description: 'The new Project resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Project.jsonld-Project.input' + application/json: + schema: + $ref: '#/components/schemas/Project-Project.input' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.input' + required: true + deprecated: false + parameters: [ ] + '/api/projects/{id}': + get: + operationId: api_projects_id_get + tags: + - Project + responses: + 200: + description: 'Project resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Project.jsonld-Project.output' + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Project resource.' + description: 'Retrieves a Project resource.' + parameters: + - name: id + in: path + description: 'Project identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_projects_id_put + tags: + - Project + responses: + 200: + description: 'Project resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Project.jsonld-Project.output' + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Project resource.' + description: 'Replaces the Project resource.' + parameters: + - name: id + in: path + description: 'Project identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Project resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Project.jsonld-Project.input' + application/json: + schema: + $ref: '#/components/schemas/Project-Project.input' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.input' + required: true + deprecated: false + delete: + operationId: api_projects_id_delete + tags: + - Project + responses: + 204: + description: 'Project resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Project resource.' + description: 'Removes the Project resource.' + parameters: + - name: id + in: path + description: 'Project identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_projects_id_patch + tags: + - Project + responses: + 200: + description: 'Project resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Project.jsonld-Project.output' + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Project resource.' + description: 'Updates the Project resource.' + parameters: + - name: id + in: path + description: 'Project identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Project resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Project-Project.input' + required: true + deprecated: false + parameters: [ ] + '/api/projects/{id}/costs': + get: + operationId: api_projects_idcosts_get + tags: + - Project + responses: + 200: + description: 'Project resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Project.jsonld-Project.output' + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Project resource.' + description: 'Retrieves a Project resource.' + parameters: + - name: id + in: path + description: 'Project identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [ ] + /api/providers: + get: + operationId: api_providers_get_collection + tags: + - Provider + responses: + 200: + description: 'Provider collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Provider.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Provider' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Provider' + summary: 'Retrieves the collection of Provider resources.' + description: 'Retrieves the collection of Provider resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_providers_post + tags: + - Provider + responses: + 201: + description: 'Provider resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Provider.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Provider resource.' + description: 'Creates a Provider resource.' + parameters: [ ] + requestBody: + description: 'The new Provider resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Provider.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + required: true + deprecated: false + parameters: [ ] + '/api/providers/{id}': + get: + operationId: api_providers_id_get + tags: + - Provider + responses: + 200: + description: 'Provider resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Provider.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + 404: + description: 'Resource not found' + summary: 'Retrieves a Provider resource.' + description: 'Retrieves a Provider resource.' + parameters: + - name: id + in: path + description: 'Provider identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_providers_id_put + tags: + - Provider + responses: + 200: + description: 'Provider resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Provider.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Provider resource.' + description: 'Replaces the Provider resource.' + parameters: + - name: id + in: path + description: 'Provider identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Provider resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Provider.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + required: true + deprecated: false + delete: + operationId: api_providers_id_delete + tags: + - Provider + responses: + 204: + description: 'Provider resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Provider resource.' + description: 'Removes the Provider resource.' + parameters: + - name: id + in: path + description: 'Provider identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_providers_id_patch + tags: + - Provider + responses: + 200: + description: 'Provider resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Provider.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Provider resource.' + description: 'Updates the Provider resource.' + parameters: + - name: id + in: path + description: 'Provider identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Provider resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Provider' + required: true + deprecated: false + parameters: [ ] + /api/resource_type_limits: + get: + operationId: api_resource_type_limits_get_collection + tags: + - ResourceTypeLimit + responses: + 200: + description: 'ResourceTypeLimit collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ResourceTypeLimit.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceTypeLimit' + summary: 'Retrieves the collection of ResourceTypeLimit resources.' + description: 'Retrieves the collection of ResourceTypeLimit resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_resource_type_limits_post + tags: + - ResourceTypeLimit + responses: + 201: + description: 'ResourceTypeLimit resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ResourceTypeLimit resource.' + description: 'Creates a ResourceTypeLimit resource.' + parameters: [ ] + requestBody: + description: 'The new ResourceTypeLimit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + required: true + deprecated: false + parameters: [ ] + '/api/resource_type_limits/{id}': + get: + operationId: api_resource_type_limits_id_get + tags: + - ResourceTypeLimit + responses: + 200: + description: 'ResourceTypeLimit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + 404: + description: 'Resource not found' + summary: 'Retrieves a ResourceTypeLimit resource.' + description: 'Retrieves a ResourceTypeLimit resource.' + parameters: + - name: id + in: path + description: 'ResourceTypeLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_resource_type_limits_id_put + tags: + - ResourceTypeLimit + responses: + 200: + description: 'ResourceTypeLimit resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ResourceTypeLimit resource.' + description: 'Replaces the ResourceTypeLimit resource.' + parameters: + - name: id + in: path + description: 'ResourceTypeLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ResourceTypeLimit resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + required: true + deprecated: false + delete: + operationId: api_resource_type_limits_id_delete + tags: + - ResourceTypeLimit + responses: + 204: + description: 'ResourceTypeLimit resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ResourceTypeLimit resource.' + description: 'Removes the ResourceTypeLimit resource.' + parameters: + - name: id + in: path + description: 'ResourceTypeLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_resource_type_limits_id_patch + tags: + - ResourceTypeLimit + responses: + 200: + description: 'ResourceTypeLimit resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit.jsonld' + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ResourceTypeLimit resource.' + description: 'Updates the ResourceTypeLimit resource.' + parameters: + - name: id + in: path + description: 'ResourceTypeLimit identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ResourceTypeLimit resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + required: true + deprecated: false + parameters: [ ] + /api/resource_types: + get: + operationId: api_resource_types_get_collection + tags: + - ResourceType + responses: + 200: + description: 'ResourceType collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ResourceType.jsonld-ResourceType.output' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + summary: 'Retrieves the collection of ResourceType resources.' + description: 'Retrieves the collection of ResourceType resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: resourceTypeLimit + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'resourceTypeLimit[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_resource_types_post + tags: + - ResourceType + responses: + 201: + description: 'ResourceType resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceType.jsonld-ResourceType.output' + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a ResourceType resource.' + description: 'Creates a ResourceType resource.' + parameters: [ ] + requestBody: + description: 'The new ResourceType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceType.jsonld-ResourceType.input' + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + required: true + deprecated: false + parameters: [ ] + '/api/resource_types/{id}': + get: + operationId: api_resource_types_id_get + tags: + - ResourceType + responses: + 200: + description: 'ResourceType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceType.jsonld-ResourceType.output' + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a ResourceType resource.' + description: 'Retrieves a ResourceType resource.' + parameters: + - name: id + in: path + description: 'ResourceType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_resource_types_id_put + tags: + - ResourceType + responses: + 200: + description: 'ResourceType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceType.jsonld-ResourceType.output' + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the ResourceType resource.' + description: 'Replaces the ResourceType resource.' + parameters: + - name: id + in: path + description: 'ResourceType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ResourceType resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceType.jsonld-ResourceType.input' + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + required: true + deprecated: false + delete: + operationId: api_resource_types_id_delete + tags: + - ResourceType + responses: + 204: + description: 'ResourceType resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the ResourceType resource.' + description: 'Removes the ResourceType resource.' + parameters: + - name: id + in: path + description: 'ResourceType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_resource_types_id_patch + tags: + - ResourceType + responses: + 200: + description: 'ResourceType resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ResourceType.jsonld-ResourceType.output' + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the ResourceType resource.' + description: 'Updates the ResourceType resource.' + parameters: + - name: id + in: path + description: 'ResourceType identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated ResourceType resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + required: true + deprecated: false + parameters: [ ] + /api/role_groups: + get: + operationId: api_role_groups_get_collection + tags: + - RoleGroup + responses: + 200: + description: 'RoleGroup collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/RoleGroup.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/RoleGroup' + summary: 'Retrieves the collection of RoleGroup resources.' + description: 'Retrieves the collection of RoleGroup resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: name + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_role_groups_post + tags: + - RoleGroup + responses: + 201: + description: 'RoleGroup resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/RoleGroup.jsonld' + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a RoleGroup resource.' + description: 'Creates a RoleGroup resource.' + parameters: [ ] + requestBody: + description: 'The new RoleGroup resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/RoleGroup.jsonld' + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + required: true + deprecated: false + parameters: [ ] + '/api/role_groups/{id}': + get: + operationId: api_role_groups_id_get + tags: + - RoleGroup + responses: + 200: + description: 'RoleGroup resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/RoleGroup.jsonld' + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + 404: + description: 'Resource not found' + summary: 'Retrieves a RoleGroup resource.' + description: 'Retrieves a RoleGroup resource.' + parameters: + - name: id + in: path + description: 'RoleGroup identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_role_groups_id_put + tags: + - RoleGroup + responses: + 200: + description: 'RoleGroup resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/RoleGroup.jsonld' + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the RoleGroup resource.' + description: 'Replaces the RoleGroup resource.' + parameters: + - name: id + in: path + description: 'RoleGroup identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated RoleGroup resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/RoleGroup.jsonld' + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + required: true + deprecated: false + delete: + operationId: api_role_groups_id_delete + tags: + - RoleGroup + responses: + 204: + description: 'RoleGroup resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the RoleGroup resource.' + description: 'Removes the RoleGroup resource.' + parameters: + - name: id + in: path + description: 'RoleGroup identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_role_groups_id_patch + tags: + - RoleGroup + responses: + 200: + description: 'RoleGroup resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/RoleGroup.jsonld' + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the RoleGroup resource.' + description: 'Updates the RoleGroup resource.' + parameters: + - name: id + in: path + description: 'RoleGroup identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated RoleGroup resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/RoleGroup' + required: true + deprecated: false + parameters: [ ] + /api/state_by_infras: + get: + operationId: api_state_by_infras_get_collection + tags: + - StateByInfra + responses: + 200: + description: 'StateByInfra collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/StateByInfra.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/StateByInfra' + summary: 'Retrieves the collection of StateByInfra resources.' + description: 'Retrieves the collection of StateByInfra resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_state_by_infras_post + tags: + - StateByInfra + responses: + 201: + description: 'StateByInfra resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/StateByInfra.jsonld' + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a StateByInfra resource.' + description: 'Creates a StateByInfra resource.' + parameters: [ ] + requestBody: + description: 'The new StateByInfra resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/StateByInfra.jsonld' + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + required: true + deprecated: false + parameters: [ ] + '/api/state_by_infras/{id}': + get: + operationId: api_state_by_infras_id_get + tags: + - StateByInfra + responses: + 200: + description: 'StateByInfra resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/StateByInfra.jsonld' + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + 404: + description: 'Resource not found' + summary: 'Retrieves a StateByInfra resource.' + description: 'Retrieves a StateByInfra resource.' + parameters: + - name: id + in: path + description: 'StateByInfra identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_state_by_infras_id_put + tags: + - StateByInfra + responses: + 200: + description: 'StateByInfra resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/StateByInfra.jsonld' + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the StateByInfra resource.' + description: 'Replaces the StateByInfra resource.' + parameters: + - name: id + in: path + description: 'StateByInfra identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated StateByInfra resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/StateByInfra.jsonld' + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + required: true + deprecated: false + delete: + operationId: api_state_by_infras_id_delete + tags: + - StateByInfra + responses: + 204: + description: 'StateByInfra resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the StateByInfra resource.' + description: 'Removes the StateByInfra resource.' + parameters: + - name: id + in: path + description: 'StateByInfra identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_state_by_infras_id_patch + tags: + - StateByInfra + responses: + 200: + description: 'StateByInfra resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/StateByInfra.jsonld' + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the StateByInfra resource.' + description: 'Updates the StateByInfra resource.' + parameters: + - name: id + in: path + description: 'StateByInfra identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated StateByInfra resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/StateByInfra' + required: true + deprecated: false + parameters: [ ] + /api/states: + get: + operationId: api_states_get_collection + tags: + - State + responses: + 200: + description: 'State collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/State.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/State' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/State' + summary: 'Retrieves the collection of State resources.' + description: 'Retrieves the collection of State resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: seqNumber + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'seqNumber[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: 'order[name]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_states_post + tags: + - State + responses: + 201: + description: 'State resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/State.jsonld' + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a State resource.' + description: 'Creates a State resource.' + parameters: [ ] + requestBody: + description: 'The new State resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/State.jsonld' + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + required: true + deprecated: false + parameters: [ ] + '/api/states/{id}': + get: + operationId: api_states_id_get + tags: + - State + responses: + 200: + description: 'State resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/State.jsonld' + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + 404: + description: 'Resource not found' + summary: 'Retrieves a State resource.' + description: 'Retrieves a State resource.' + parameters: + - name: id + in: path + description: 'State identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_states_id_put + tags: + - State + responses: + 200: + description: 'State resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/State.jsonld' + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the State resource.' + description: 'Replaces the State resource.' + parameters: + - name: id + in: path + description: 'State identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated State resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/State.jsonld' + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + required: true + deprecated: false + delete: + operationId: api_states_id_delete + tags: + - State + responses: + 204: + description: 'State resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the State resource.' + description: 'Removes the State resource.' + parameters: + - name: id + in: path + description: 'State identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_states_id_patch + tags: + - State + responses: + 200: + description: 'State resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/State.jsonld' + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the State resource.' + description: 'Updates the State resource.' + parameters: + - name: id + in: path + description: 'State identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated State resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/State' + required: true + deprecated: false + parameters: [ ] + /api/team_env_vars: + get: + operationId: api_team_env_vars_get_collection + tags: + - TeamEnvVar + responses: + 200: + description: 'TeamEnvVar collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/TeamEnvVar.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/TeamEnvVar' + summary: 'Retrieves the collection of TeamEnvVar resources.' + description: 'Retrieves the collection of TeamEnvVar resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: team + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'team[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: envVarType + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'envVarType[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_team_env_vars_post + tags: + - TeamEnvVar + responses: + 201: + description: 'TeamEnvVar resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TeamEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a TeamEnvVar resource.' + description: 'Creates a TeamEnvVar resource.' + parameters: [ ] + requestBody: + description: 'The new TeamEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TeamEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + required: true + deprecated: false + parameters: [ ] + '/api/team_env_vars/{id}': + get: + operationId: api_team_env_vars_id_get + tags: + - TeamEnvVar + responses: + 200: + description: 'TeamEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TeamEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + 404: + description: 'Resource not found' + summary: 'Retrieves a TeamEnvVar resource.' + description: 'Retrieves a TeamEnvVar resource.' + parameters: + - name: id + in: path + description: 'TeamEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_team_env_vars_id_put + tags: + - TeamEnvVar + responses: + 200: + description: 'TeamEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TeamEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the TeamEnvVar resource.' + description: 'Replaces the TeamEnvVar resource.' + parameters: + - name: id + in: path + description: 'TeamEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TeamEnvVar resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TeamEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + required: true + deprecated: false + delete: + operationId: api_team_env_vars_id_delete + tags: + - TeamEnvVar + responses: + 204: + description: 'TeamEnvVar resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the TeamEnvVar resource.' + description: 'Removes the TeamEnvVar resource.' + parameters: + - name: id + in: path + description: 'TeamEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_team_env_vars_id_patch + tags: + - TeamEnvVar + responses: + 200: + description: 'TeamEnvVar resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TeamEnvVar.jsonld' + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the TeamEnvVar resource.' + description: 'Updates the TeamEnvVar resource.' + parameters: + - name: id + in: path + description: 'TeamEnvVar identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TeamEnvVar resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + required: true + deprecated: false + parameters: [ ] + /api/teams: + get: + operationId: api_teams_get_collection + tags: + - Team + responses: + 200: + description: 'Team collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Team.jsonld-Team.output' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Team-Team.output' + summary: 'Retrieves the collection of Team resources.' + description: 'Retrieves the collection of Team resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: 'exists[organisation]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: boolean + style: form + explode: false + allowReserved: false + - name: name + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: user + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'user[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: organisation + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'organisation[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: stateByInfra + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'stateByInfra[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_teams_post + tags: + - Team + responses: + 201: + description: 'Team resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Team.jsonld-Team.output' + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Team resource.' + description: 'Creates a Team resource.' + parameters: [ ] + requestBody: + description: 'The new Team resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Team.jsonld-Team.input' + application/json: + schema: + $ref: '#/components/schemas/Team-Team.input' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.input' + required: true + deprecated: false + parameters: [ ] + '/api/teams/{id}': + get: + operationId: api_teams_id_get + tags: + - Team + responses: + 200: + description: 'Team resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Team.jsonld-Team.output' + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a Team resource.' + description: 'Retrieves a Team resource.' + parameters: + - name: id + in: path + description: 'Team identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_teams_id_put + tags: + - Team + responses: + 200: + description: 'Team resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Team.jsonld-Team.output' + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Team resource.' + description: 'Replaces the Team resource.' + parameters: + - name: id + in: path + description: 'Team identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Team resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Team.jsonld-Team.input' + application/json: + schema: + $ref: '#/components/schemas/Team-Team.input' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.input' + required: true + deprecated: false + delete: + operationId: api_teams_id_delete + tags: + - Team + responses: + 204: + description: 'Team resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Team resource.' + description: 'Removes the Team resource.' + parameters: + - name: id + in: path + description: 'Team identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_teams_id_patch + tags: + - Team + responses: + 200: + description: 'Team resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Team.jsonld-Team.output' + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Team resource.' + description: 'Updates the Team resource.' + parameters: + - name: id + in: path + description: 'Team identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Team resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Team-Team.input' + required: true + deprecated: false + parameters: [ ] + '/api/teams/{id}/user-role': + put: + operationId: api_teams_iduser-role_put + tags: + - Team + responses: + 200: + description: 'Team resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Team.jsonld-Team.output' + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the Team resource.' + description: 'Replaces the Team resource.' + parameters: + - name: id + in: path + description: 'Team identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Team resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Team.jsonld-Team.input' + application/json: + schema: + $ref: '#/components/schemas/Team-Team.input' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.input' + required: true + deprecated: false + parameters: [ ] + /api/template_environments: + get: + operationId: api_template_environments_get_collection + tags: + - TemplateEnvironment + responses: + 200: + description: 'TemplateEnvironment collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/TemplateEnvironment.jsonld-TemplateEnvironment.output' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + summary: 'Retrieves the collection of TemplateEnvironment resources.' + description: 'Retrieves the collection of TemplateEnvironment resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: templateProject + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'templateProject[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_template_environments_post + tags: + - TemplateEnvironment + responses: + 201: + description: 'TemplateEnvironment resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateEnvironment.jsonld-TemplateEnvironment.output' + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a TemplateEnvironment resource.' + description: 'Creates a TemplateEnvironment resource.' + parameters: [ ] + requestBody: + description: 'The new TemplateEnvironment resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateEnvironment.jsonld-TemplateEnvironment.input' + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + required: true + deprecated: false + parameters: [ ] + '/api/template_environments/{id}': + get: + operationId: api_template_environments_id_get + tags: + - TemplateEnvironment + responses: + 200: + description: 'TemplateEnvironment resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateEnvironment.jsonld-TemplateEnvironment.output' + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a TemplateEnvironment resource.' + description: 'Retrieves a TemplateEnvironment resource.' + parameters: + - name: id + in: path + description: 'TemplateEnvironment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_template_environments_id_put + tags: + - TemplateEnvironment + responses: + 200: + description: 'TemplateEnvironment resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateEnvironment.jsonld-TemplateEnvironment.output' + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the TemplateEnvironment resource.' + description: 'Replaces the TemplateEnvironment resource.' + parameters: + - name: id + in: path + description: 'TemplateEnvironment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TemplateEnvironment resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateEnvironment.jsonld-TemplateEnvironment.input' + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + required: true + deprecated: false + delete: + operationId: api_template_environments_id_delete + tags: + - TemplateEnvironment + responses: + 204: + description: 'TemplateEnvironment resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the TemplateEnvironment resource.' + description: 'Removes the TemplateEnvironment resource.' + parameters: + - name: id + in: path + description: 'TemplateEnvironment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_template_environments_id_patch + tags: + - TemplateEnvironment + responses: + 200: + description: 'TemplateEnvironment resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateEnvironment.jsonld-TemplateEnvironment.output' + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the TemplateEnvironment resource.' + description: 'Updates the TemplateEnvironment resource.' + parameters: + - name: id + in: path + description: 'TemplateEnvironment identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TemplateEnvironment resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + required: true + deprecated: false + parameters: [ ] + /api/template_projects: + get: + operationId: api_template_projects_get_collection + tags: + - TemplateProject + responses: + 200: + description: 'TemplateProject collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/TemplateProject.jsonld-TemplateProject.output' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + summary: 'Retrieves the collection of TemplateProject resources.' + description: 'Retrieves the collection of TemplateProject resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: projectTypeVersion + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'projectTypeVersion[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: 'order[updatedAt]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + enum: + - asc + - desc + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_template_projects_post + tags: + - TemplateProject + responses: + 201: + description: 'TemplateProject resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateProject.jsonld-TemplateProject.output' + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a TemplateProject resource.' + description: 'Creates a TemplateProject resource.' + parameters: [ ] + requestBody: + description: 'The new TemplateProject resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateProject.jsonld-TemplateProject.input' + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + required: true + deprecated: false + parameters: [ ] + '/api/template_projects/{id}': + get: + operationId: api_template_projects_id_get + tags: + - TemplateProject + responses: + 200: + description: 'TemplateProject resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateProject.jsonld-TemplateProject.output' + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + 404: + description: 'Resource not found' + summary: 'Retrieves a TemplateProject resource.' + description: 'Retrieves a TemplateProject resource.' + parameters: + - name: id + in: path + description: 'TemplateProject identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_template_projects_id_put + tags: + - TemplateProject + responses: + 200: + description: 'TemplateProject resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateProject.jsonld-TemplateProject.output' + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the TemplateProject resource.' + description: 'Replaces the TemplateProject resource.' + parameters: + - name: id + in: path + description: 'TemplateProject identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TemplateProject resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateProject.jsonld-TemplateProject.input' + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + required: true + deprecated: false + delete: + operationId: api_template_projects_id_delete + tags: + - TemplateProject + responses: + 204: + description: 'TemplateProject resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the TemplateProject resource.' + description: 'Removes the TemplateProject resource.' + parameters: + - name: id + in: path + description: 'TemplateProject identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_template_projects_id_patch + tags: + - TemplateProject + responses: + 200: + description: 'TemplateProject resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/TemplateProject.jsonld-TemplateProject.output' + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the TemplateProject resource.' + description: 'Updates the TemplateProject resource.' + parameters: + - name: id + in: path + description: 'TemplateProject identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated TemplateProject resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + required: true + deprecated: false + parameters: [ ] + /api/users: + get: + operationId: api_users_get_collection + tags: + - User + responses: + 200: + description: 'User collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/User.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [ string, 'null' ] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/User' + summary: 'Retrieves the collection of User resources.' + description: 'Retrieves the collection of User resources.' + parameters: + - name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 30 + minimum: 0 + style: form + explode: false + allowReserved: false + - name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + style: form + explode: false + allowReserved: false + - name: 'id[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: integer + style: form + explode: true + allowReserved: false + - name: roleGroup + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'roleGroup[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - name: team + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: string + style: form + explode: false + allowReserved: false + - name: 'team[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + deprecated: false + post: + operationId: api_users_post + tags: + - User + responses: + 201: + description: 'User resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a User resource.' + description: 'Creates a User resource.' + parameters: [ ] + requestBody: + description: 'The new User resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + required: true + deprecated: false + parameters: [ ] + /api/users/activate: + put: + tags: + - User + responses: + 200: + description: 'The user has been activated successfully' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + summary: 'User activation entry point' + description: 'If you have the correct hash string, you can activate your freshly registered user' + parameters: + - name: hash + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + parameters: [ ] + /api/users/check-email: + get: + tags: + - User + responses: + 200: + description: 'The query has been requested successfully' + content: + application/ld+json: + schema: + type: object + properties: + isNotExists: { type: boolean } + application/json: + schema: + type: object + properties: + isNotExists: { type: boolean } + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + properties: + isNotExists: { type: boolean } + application/json: + schema: + type: object + properties: + isNotExists: { type: boolean } + 403: + description: 'You have no permission to query this' + summary: 'Check the email existence' + description: "This entry point checks an email address' existence in database" + parameters: + - name: email + in: query + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + parameters: [ ] + /api/users/check-username: + get: + tags: + - User + responses: + 200: + description: 'The query has been requested successfully' + content: + application/ld+json: + schema: + type: object + properties: + isNotExists: { type: boolean } + application/json: + schema: + type: object + properties: + isNotExists: { type: boolean } + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + properties: + isNotExists: { type: boolean } + application/json: + schema: + type: object + properties: + isNotExists: { type: boolean } + 403: + description: 'You have no permission to query this' + summary: 'Check the username existence' + description: "This entry point checks an username's existence in database" + parameters: + - name: username + in: query + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + parameters: [ ] + /api/users/discover_mercure: + get: + tags: + - User + responses: + 200: + description: 'Successfully authenticated for Mercure protocol' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Mercure.DiscoverResponse' + application/json: + schema: + $ref: '#/components/schemas/Mercure.DiscoverResponse' + headers: + Set-Cookie: + schema: + type: string + description: 'Its name is mercureAuthorization' + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Mercure.DiscoverResponse' + application/json: + schema: + $ref: '#/components/schemas/Mercure.DiscoverResponse' + headers: + Set-Cookie: + schema: + type: string + description: 'Its name is mercureAuthorization' + 403: + description: 'You have no permission to query this' + summary: 'Retrieve cookie for Mercure authentication' + description: |2- + + It will discovers for mercure JWT token for you - w/ take consideration your permissions + + security: + - cookieAuth: [ ] + parameters: [ ] + /api/users/forgot-password: + put: + tags: + - User + responses: + 200: + description: 'The email sent successfully' + content: + application/ld+json: + schema: + type: object + properties: + msg: { type: string } + error: { type: boolean } + application/json: + schema: + type: object + properties: + msg: { type: string } + error: { type: boolean } + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + properties: + msg: { type: string } + error: { type: boolean } + application/json: + schema: + type: object + properties: + msg: { type: string } + error: { type: boolean } + 403: + description: 'You have no permission to query this' + summary: 'Restore password through email' + description: 'If the user exists, we will send an email to restore password' + requestBody: + description: '' + content: + application/ld+json: + schema: + type: object + properties: + email: + type: string + application/json: + schema: + type: object + properties: + email: + type: string + required: false + parameters: [ ] + /api/users/register: + post: + tags: + - User + responses: + 200: + description: 'User resource created' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'User creation entry point' + description: 'An unauthenticated user can create its own account in database' + parameters: [ ] + /api/users/reset-password: + put: + tags: + - User + responses: + 200: + description: 'The email sent successfully' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + summary: 'Change the current password' + description: 'The user can change his password if he has the current password' + requestBody: + description: '' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + changePassword: + type: string + application/json: + schema: + $ref: '#/components/schemas/User' + changePassword: + type: string + required: false + parameters: [ ] + '/api/users/{id}': + get: + operationId: api_users_id_get + tags: + - User + responses: + 200: + description: 'User resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + 404: + description: 'Resource not found' + summary: 'Retrieves a User resource.' + description: 'Retrieves a User resource.' + parameters: + - name: id + in: path + description: 'User identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + put: + operationId: api_users_id_put + tags: + - User + responses: + 200: + description: 'User resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Replaces the User resource.' + description: 'Replaces the User resource.' + parameters: + - name: id + in: path + description: 'User identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated User resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + required: true + deprecated: false + delete: + operationId: api_users_id_delete + tags: + - User + responses: + 204: + description: 'User resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the User resource.' + description: 'Removes the User resource.' + parameters: + - name: id + in: path + description: 'User identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_users_id_patch + tags: + - User + responses: + 200: + description: 'User resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the User resource.' + description: 'Updates the User resource.' + parameters: + - name: id + in: path + description: 'User identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated User resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/User' + required: true + deprecated: false + parameters: [ ] + '/api/users/{id}/administrate': + get: + tags: + - User + responses: + 200: + description: 'User administrate request granted. Authentication success' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Finance.ApiTokenResponse' + application/json: + schema: + $ref: '#/components/schemas/Finance.ApiTokenResponse' + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Finance.ApiTokenResponse' + application/json: + schema: + $ref: '#/components/schemas/Finance.ApiTokenResponse' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Get authentication data from another user' + description: 'An administrator user can control another non-admin user i.e. through the UI' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [ ] + '/api/users/{id}/finance/costs': + get: + tags: + - User + responses: + 200: + description: 'The query is queried successfully' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Finance.CostsResponse' + application/json: + schema: + $ref: '#/components/schemas/Finance.CostsResponse' + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Finance.CostsResponse' + application/json: + schema: + $ref: '#/components/schemas/Finance.CostsResponse' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Get resource costs information' + description: 'You can query the summary of costs of CPU, memory and storage' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [ ] + '/api/users/{id}/finance/detach-card': + patch: + tags: + - User + responses: + 200: + description: 'The response is an empty object on success' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Detach a payment method from the user' + description: 'WARNING! It is a permanent, irreversible process' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + - name: paymentMethodId + in: query + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + parameters: [ ] + '/api/users/{id}/finance/invoices': + get: + tags: + - User + responses: + 200: + description: 'The query is queried successfully' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Finance.InvoicesResponse' + application/json: + schema: + $ref: '#/components/schemas/Finance.InvoicesResponse' + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Finance.InvoicesResponse' + application/json: + schema: + $ref: '#/components/schemas/Finance.InvoicesResponse' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Get invoices and some necessary data from payment module' + description: |2- + + You You can retrieve all user related customer, + payment methods and invoices data from Stripe + + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [ ] + '/api/users/{id}/finance/pay': + patch: + tags: + - User + responses: + 200: + description: |- + The response contains all invoices. This is documented here - + https://stripe.com/docs/api/invoices/list?lang=php + 201: + description: 'The same as the HTTP 200' + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'Initiate a payment for the user' + description: 'It sends a payment initiative to the payment API through our API' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + - name: invoiceId + in: query + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + - name: paymentMethodId + in: query + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + parameters: [ ] + '/api/users/{id}/finance/subscribe-info': + get: + tags: + - User + responses: + 200: + description: 'Subscription successful' + content: + application/ld+json: + schema: + type: object + properties: + clientSecret: { type: string } + application/json: + schema: + type: object + properties: + clientSecret: { type: string } + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + properties: + clientSecret: { type: string } + application/json: + schema: + type: object + properties: + clientSecret: { type: string } + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: "Get payment module's access token" + description: 'Stripe access token information can be retrieved through this entry point' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [ ] + '/api/users/{id}/remove-account': + delete: + tags: + - User + responses: + 200: + description: 'User resource deleted' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 201: + description: 'The same as the HTTP 200' + content: + application/ld+json: + schema: + type: object + application/json: + schema: + type: object + 403: + description: 'You have no permission to query this' + 404: + description: 'Missing User' + summary: 'User can delete itself' + description: 'User can delete its whole account w/ its all data' + parameters: + - name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: simple + explode: false + allowReserved: false + parameters: [ ] +components: + schemas: + AbstractEnvVar: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + rawValue: + readOnly: true + type: + - string + - 'null' + AbstractEnvVar.jsonld: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + rawValue: + readOnly: true + type: + - string + - 'null' + AbstractEnvironment: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + envVar: + type: array + items: + type: string + environmentComponent: + type: array + items: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + AbstractEnvironment.jsonld: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent.jsonld' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + AbstractProject: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + AbstractProject.jsonld: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + $ref: '#/components/schemas/ComponentVersion.jsonld' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar.jsonld' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + AccessCode: + type: object + description: 'Class AccessCode' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + accessCode: + type: + - string + - 'null' + user: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + userId: + readOnly: true + type: + - string + - 'null' + usedAt: + type: + - string + - 'null' + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + AccessCode.jsonld: + type: object + description: 'Class AccessCode' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + accessCode: + type: + - string + - 'null' + user: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + userId: + readOnly: true + type: + - string + - 'null' + usedAt: + type: + - string + - 'null' + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Cluster: + type: object + description: 'Class Cluster' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: string + example: 'Hetzner EU' + description: "This is the 'Display name' in the infrastructure" + codeName: + type: string + example: dev-rc-worker-1-hetzner-eu + description: "This is the cluster's name in the infrastructure" + kubecostUrl: + type: + - string + - 'null' + kubecostUser: + type: + - string + - 'null' + kubecostPass: + type: + - string + - 'null' + changeKubecostPass: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + clusterServer: + type: + - string + - 'null' + clusterCertificateAuthorityData: + type: + - string + - 'null' + oidcIssuerUrl: + type: + - string + - 'null' + oidcClientID: + type: + - string + - 'null' + oidcClientSecret: + type: + - string + - 'null' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + provider: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + products: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Cluster-Cluster.withProvider: + type: object + description: 'Class Cluster' + deprecated: false + properties: + name: + type: string + example: 'Hetzner EU' + description: "This is the 'Display name' in the infrastructure" + provider: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Provider-Cluster.withProvider' + - type: 'null' + Cluster.jsonld: + type: object + description: 'Class Cluster' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: string + example: 'Hetzner EU' + description: "This is the 'Display name' in the infrastructure" + codeName: + type: string + example: dev-rc-worker-1-hetzner-eu + description: "This is the cluster's name in the infrastructure" + kubecostUrl: + type: + - string + - 'null' + kubecostUser: + type: + - string + - 'null' + kubecostPass: + type: + - string + - 'null' + changeKubecostPass: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + clusterServer: + type: + - string + - 'null' + clusterCertificateAuthorityData: + type: + - string + - 'null' + oidcIssuerUrl: + type: + - string + - 'null' + oidcClientID: + type: + - string + - 'null' + oidcClientSecret: + type: + - string + - 'null' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + provider: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + products: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Cluster.jsonld-Cluster.withProvider: + type: object + description: 'Class Cluster' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + name: + type: string + example: 'Hetzner EU' + description: "This is the 'Display name' in the infrastructure" + provider: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Provider.jsonld-Cluster.withProvider' + - type: 'null' + Component: + type: object + description: 'Class Component' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Component.jsonld: + type: object + description: 'Class Component' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ComponentResourceLimit: + type: object + description: 'Class ComponentResourceLimit' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + minValue: + type: + - integer + - 'null' + maxValue: + type: + - integer + - 'null' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + resourceType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ComponentResourceLimit.jsonld: + type: object + description: 'Class ComponentResourceLimit' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + minValue: + type: + - integer + - 'null' + maxValue: + type: + - integer + - 'null' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + resourceType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ComponentVersion: + type: object + description: 'Class ComponentVersion' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + version: + type: + - string + - 'null' + component: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + componentVersionEnvVar: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + project: + type: array + items: + $ref: '#/components/schemas/AbstractProject' + environmentComponent: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + componentResourceLimit: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersions: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ComponentVersion.jsonld: + type: object + description: 'Class ComponentVersion' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + version: + type: + - string + - 'null' + component: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + componentVersionEnvVar: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + project: + type: array + items: + $ref: '#/components/schemas/AbstractProject.jsonld' + environmentComponent: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + componentResourceLimit: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersions: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ComponentVersionEnvVar: + type: object + description: 'Class ComponentVersionEnvVar' + deprecated: false + properties: + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + componentVersionEnvVarExample: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + key: + type: + - string + - 'null' + note: + type: + - string + - 'null' + isRequired: + type: + - boolean + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarValidations: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + ComponentVersionEnvVar.jsonld: + type: object + description: 'Class ComponentVersionEnvVar' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + componentVersionEnvVarExample: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + key: + type: + - string + - 'null' + note: + type: + - string + - 'null' + isRequired: + type: + - boolean + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarValidations: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + ComponentVersionEnvVarExample: + type: object + description: 'Class ComponentVersionEnvVarExample' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + value: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + componentVersionEnvVar: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ComponentVersionEnvVarExample.jsonld: + type: object + description: 'Class ComponentVersionEnvVarExample' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + value: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + componentVersionEnvVar: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + CredentialType: + type: object + description: 'Class CredentialType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + git: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + CredentialType.jsonld: + type: object + description: 'Class CredentialType' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + git: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + CryptoKeyType: + type: object + description: 'Class CryptoKeyType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: string + gits: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + CryptoKeyType.jsonld: + type: object + description: 'Class CryptoKeyType' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: string + gits: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + DataTransferDataType: + type: object + description: 'Class DataTransferDataType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + exportedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + DataTransferDataType.jsonld: + type: object + description: 'Class DataTransferDataType' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + exportedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + DataTransferType: + type: object + description: 'Class DataTransferType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + DataTransferType.jsonld: + type: object + description: 'Class DataTransferType' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvVarType: + type: object + description: 'Class EnvVarType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + envVar: + type: array + items: + $ref: '#/components/schemas/AbstractEnvVar' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvVarType.jsonld: + type: object + description: 'Class EnvVarType' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + envVar: + type: array + items: + $ref: '#/components/schemas/AbstractEnvVar.jsonld' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvVarValidation: + type: object + description: 'Class EnvVarValidation' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + regexp: + type: + - string + - 'null' + validationMessage: + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvVarValidation.jsonld: + type: object + description: 'Class EnvVarValidation' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + regexp: + type: + - string + - 'null' + validationMessage: + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Environment-Environment.input: + type: object + description: 'Class Environment' + deprecated: false + properties: + templateIri: + type: + - string + - 'null' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + provider: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + exportedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + environmentCustomDomain: + type: array + items: + $ref: '#/components/schemas/EnvironmentCustomDomain-Environment.input' + environmentMagentoHostMapping: + type: array + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping-Environment.input' + targetRefName: + type: + - string + - 'null' + name: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar-Environment.input' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent-Environment.input' + Environment-Environment.output: + type: object + description: 'Class Environment' + deprecated: false + properties: + templateIri: + type: + - string + - 'null' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + provider: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + exportedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environmentCustomDomain: + type: array + items: + $ref: '#/components/schemas/EnvironmentCustomDomain-Environment.output' + environmentMagentoHostMapping: + type: array + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping-Environment.output' + targetRefName: + type: + - string + - 'null' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar-Environment.output' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent-Environment.output' + Environment.jsonld-Environment.input: + type: object + description: 'Class Environment' + deprecated: false + properties: + templateIri: + type: + - string + - 'null' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + provider: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + exportedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + environmentCustomDomain: + type: array + items: + $ref: '#/components/schemas/EnvironmentCustomDomain.jsonld-Environment.input' + environmentMagentoHostMapping: + type: array + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping.jsonld-Environment.input' + targetRefName: + type: + - string + - 'null' + name: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld-Environment.input' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent.jsonld-Environment.input' + Environment.jsonld-Environment.output: + type: object + description: 'Class Environment' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + templateIri: + type: + - string + - 'null' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + provider: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + exportedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environmentCustomDomain: + type: array + items: + $ref: '#/components/schemas/EnvironmentCustomDomain.jsonld-Environment.output' + environmentMagentoHostMapping: + type: array + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping.jsonld-Environment.output' + targetRefName: + type: + - string + - 'null' + progressBarInfo: + type: array + items: + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld-Environment.output' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent.jsonld-Environment.output' + EnvironmentAccess: + type: object + description: 'Class EnvironmentAccess' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + frontend: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + backend: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + database: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + devTools: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + redis: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rabbit: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + mailbox: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + webshell: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccess.jsonld: + type: object + description: 'Class EnvironmentAccess' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + frontend: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + backend: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + database: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + devTools: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + redis: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rabbit: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + mailbox: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + webshell: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessBackend: + type: object + description: 'Class EnvironmentAccessBackend' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessBackend.jsonld: + type: object + description: 'Class EnvironmentAccessBackend' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessDatabase: + type: object + description: 'Class EnvironmentAccessDatabase' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + host: + type: + - string + - 'null' + port: + type: + - integer + - 'null' + scheme: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + rootPassword: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessDatabase.jsonld: + type: object + description: 'Class EnvironmentAccessDatabase' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + host: + type: + - string + - 'null' + port: + type: + - integer + - 'null' + scheme: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + rootPassword: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessDevTools: + type: object + description: 'Class EnvironmentAccessDevTools' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessDevTools.jsonld: + type: object + description: 'Class EnvironmentAccessDevTools' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessFrontend: + type: object + description: 'Class EnvironmentAccessFrontend' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + domain: + type: + - string + - 'null' + path: + type: + - string + - 'null' + url: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessFrontend.jsonld: + type: object + description: 'Class EnvironmentAccessFrontend' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + domain: + type: + - string + - 'null' + path: + type: + - string + - 'null' + url: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessMailbox: + type: object + description: 'Class EnvironmentAccessMailbox' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessMailbox.jsonld: + type: object + description: 'Class EnvironmentAccessMailbox' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessRabbit: + type: object + description: 'Class EnvironmentAccessRabbit' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + host: + type: + - string + - 'null' + port: + type: + - integer + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessRabbit.jsonld: + type: object + description: 'Class EnvironmentAccessRabbit' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + host: + type: + - string + - 'null' + port: + type: + - integer + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessRedis: + type: object + description: 'Class EnvironmentAccessRedis' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + host: + type: + - string + - 'null' + port: + type: + - integer + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessRedis.jsonld: + type: object + description: 'Class EnvironmentAccessRedis' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + host: + type: + - string + - 'null' + port: + type: + - integer + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessWebshell: + type: object + description: 'Class EnvironmentAccessWebshell' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentAccessWebshell.jsonld: + type: object + description: 'Class EnvironmentAccessWebshell' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + environmentAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentComponent: + type: object + description: 'Class EnvironmentComponent' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + anyOf: + - $ref: '#/components/schemas/AbstractEnvironment' + - type: 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentComponent-Environment.input: + type: object + description: 'Class EnvironmentComponent' + deprecated: false + properties: + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentComponent-Environment.output: + type: object + description: '' + deprecated: false + properties: + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentComponent-TemplateEnvironment.input: + type: object + description: 'Class EnvironmentComponent' + deprecated: false + properties: + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentComponent-TemplateEnvironment.output: + type: object + description: '' + deprecated: false + properties: + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentComponent.jsonld: + type: object + description: 'Class EnvironmentComponent' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + anyOf: + - $ref: '#/components/schemas/AbstractEnvironment.jsonld' + - type: 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentComponent.jsonld-Environment.input: + type: object + description: 'Class EnvironmentComponent' + deprecated: false + properties: + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentComponent.jsonld-Environment.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentComponent.jsonld-TemplateEnvironment.input: + type: object + description: 'Class EnvironmentComponent' + deprecated: false + properties: + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentComponent.jsonld-TemplateEnvironment.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + node: + type: + - integer + - 'null' + componentVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentCustomDomain: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + hostname: + type: + - string + - 'null' + certificateData: + type: + - string + - 'null' + certificateKey: + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentCustomDomain-Environment.input: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + hostname: + type: + - string + - 'null' + certificateData: + type: + - string + - 'null' + certificateKey: + type: + - string + - 'null' + EnvironmentCustomDomain-Environment.output: + type: object + description: '' + deprecated: false + properties: + hostname: + type: + - string + - 'null' + certificateData: + type: + - string + - 'null' + certificateKey: + type: + - string + - 'null' + EnvironmentCustomDomain.jsonld: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + hostname: + type: + - string + - 'null' + certificateData: + type: + - string + - 'null' + certificateKey: + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentCustomDomain.jsonld-Environment.input: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + hostname: + type: + - string + - 'null' + certificateData: + type: + - string + - 'null' + certificateKey: + type: + - string + - 'null' + EnvironmentCustomDomain.jsonld-Environment.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + hostname: + type: + - string + - 'null' + certificateData: + type: + - string + - 'null' + certificateKey: + type: + - string + - 'null' + EnvironmentEnvVar: + type: object + description: '' + deprecated: false + properties: + environment: + anyOf: + - $ref: '#/components/schemas/AbstractEnvironment' + - type: 'null' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + EnvironmentEnvVar-Environment.input: + type: object + description: 'Class EnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentEnvVar-Environment.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentEnvVar-TemplateEnvironment.input: + type: object + description: 'Class EnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentEnvVar-TemplateEnvironment.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentEnvVar.jsonld: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + environment: + anyOf: + - $ref: '#/components/schemas/AbstractEnvironment.jsonld' + - type: 'null' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + EnvironmentEnvVar.jsonld-Environment.input: + type: object + description: 'Class EnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentEnvVar.jsonld-Environment.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentEnvVar.jsonld-TemplateEnvironment.input: + type: object + description: 'Class EnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentEnvVar.jsonld-TemplateEnvironment.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + EnvironmentMagentoHostMapping: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + hostname: + type: + - string + - 'null' + mageRunCode: + type: + - string + - 'null' + mageRunType: + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentMagentoHostMapping-Environment.input: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + hostname: + type: + - string + - 'null' + mageRunCode: + type: + - string + - 'null' + mageRunType: + type: + - string + - 'null' + EnvironmentMagentoHostMapping-Environment.output: + type: object + description: '' + deprecated: false + properties: + hostname: + type: + - string + - 'null' + mageRunCode: + type: + - string + - 'null' + mageRunType: + type: + - string + - 'null' + EnvironmentMagentoHostMapping.jsonld: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + hostname: + type: + - string + - 'null' + mageRunCode: + type: + - string + - 'null' + mageRunType: + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentMagentoHostMapping.jsonld-Environment.input: + type: object + description: 'Class EnvironmentCustomDomain' + deprecated: false + properties: + hostname: + type: + - string + - 'null' + mageRunCode: + type: + - string + - 'null' + mageRunType: + type: + - string + - 'null' + EnvironmentMagentoHostMapping.jsonld-Environment.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + hostname: + type: + - string + - 'null' + mageRunCode: + type: + - string + - 'null' + mageRunType: + type: + - string + - 'null' + EnvironmentMessageHistory: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + entityType: + type: + - string + - 'null' + action: + type: + - string + - 'null' + status: + type: + - string + - 'null' + statusCode: + type: + - integer + - 'null' + rcStatus: + type: + - integer + - 'null' + message: + type: + - string + - 'null' + header: + type: + - string + - 'null' + eventAt: + type: + - string + - 'null' + entityUuid: + type: + - string + - 'null' + dataTransferId: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + EnvironmentMessageHistory.jsonld: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + entityType: + type: + - string + - 'null' + action: + type: + - string + - 'null' + status: + type: + - string + - 'null' + statusCode: + type: + - integer + - 'null' + rcStatus: + type: + - integer + - 'null' + message: + type: + - string + - 'null' + header: + type: + - string + - 'null' + eventAt: + type: + - string + - 'null' + entityUuid: + type: + - string + - 'null' + dataTransferId: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ExportedData: + type: object + description: 'Class ExportedData' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + dataTransferDataType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + ExportedData.jsonld: + type: object + description: 'Class ExportedData' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + url: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + dataTransferDataType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + Git-Git.input: + type: object + description: 'Class Git' + deprecated: false + properties: + repo: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + gitType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + credentialType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cryptoKeyType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Git-Git.output: + type: object + description: 'Class Git' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + repo: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + publicKey: + type: + - string + - 'null' + gitType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + credentialType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cryptoKeyType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Git.jsonld-Git.input: + type: object + description: 'Class Git' + deprecated: false + properties: + repo: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + gitType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + credentialType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cryptoKeyType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Git.jsonld-Git.output: + type: object + description: 'Class Git' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + repo: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + publicKey: + type: + - string + - 'null' + gitType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + credentialType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cryptoKeyType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + GitType: + type: object + description: 'Class GitType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + git: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + GitType.jsonld: + type: object + description: 'Class GitType' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + git: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ImportedData: + type: object + description: 'Class ImportedData' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + dataTransferDataType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + ImportedData.jsonld: + type: object + description: 'Class ImportedData' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + dataTransferDataType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + Invitation-Invitation.input: + type: object + description: 'Class Invitation' + deprecated: false + properties: + user: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + email: + type: + - string + - 'null' + Invitation-Invitation.output: + type: object + description: 'Class Invitation' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + user: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + type: boolean + email: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + expiredAt: + type: + - string + - 'null' + format: date-time + Invitation.jsonld-Invitation.input: + type: object + description: 'Class Invitation' + deprecated: false + properties: + user: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + email: + type: + - string + - 'null' + Invitation.jsonld-Invitation.output: + type: object + description: 'Class Invitation' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + user: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + state: + type: boolean + email: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + expiredAt: + type: + - string + - 'null' + format: date-time + Organisation-Organisation.input: + type: object + description: 'Class Organisation' + deprecated: false + properties: + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default Organisation' + type: + - boolean + - 'null' + team: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisationEnvVar: + type: array + items: + $ref: '#/components/schemas/OrganisationEnvVar-Organisation.input' + Organisation-Organisation.output: + type: object + description: 'Class Organisation' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default Organisation' + type: + - boolean + - 'null' + team: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisationEnvVar: + type: array + items: + $ref: '#/components/schemas/OrganisationEnvVar-Organisation.output' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUser: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUserName: + type: + - string + - 'null' + Organisation.jsonld-Organisation.input: + type: object + description: 'Class Organisation' + deprecated: false + properties: + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default Organisation' + type: + - boolean + - 'null' + team: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisationEnvVar: + type: array + items: + $ref: '#/components/schemas/OrganisationEnvVar.jsonld-Organisation.input' + Organisation.jsonld-Organisation.output: + type: object + description: 'Class Organisation' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default Organisation' + type: + - boolean + - 'null' + team: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisationEnvVar: + type: array + items: + $ref: '#/components/schemas/OrganisationEnvVar.jsonld-Organisation.output' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUser: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUserName: + type: + - string + - 'null' + OrganisationEnvVar: + type: object + description: 'Class OrganisationEnvVar' + deprecated: false + properties: + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + OrganisationEnvVar-Organisation.input: + type: object + description: 'Class OrganisationEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + OrganisationEnvVar-Organisation.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + OrganisationEnvVar.jsonld: + type: object + description: 'Class OrganisationEnvVar' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + OrganisationEnvVar.jsonld-Organisation.input: + type: object + description: 'Class OrganisationEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + OrganisationEnvVar.jsonld-Organisation.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Price: + type: object + description: 'Class Price' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + amount: + type: + - number + - 'null' + currency: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + product: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Product' + - type: 'null' + products: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Price-Product.input: + type: object + description: 'Class Price' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + amount: + type: + - number + - 'null' + currency: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + Price-Product.output: + type: object + description: '' + deprecated: false + properties: + paymentId: + type: + - string + - 'null' + amount: + type: + - number + - 'null' + currency: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + Price.jsonld: + type: object + description: 'Class Price' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + amount: + type: + - number + - 'null' + currency: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + product: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Product.jsonld' + - type: 'null' + products: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Price.jsonld-Product.input: + type: object + description: 'Class Price' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + amount: + type: + - number + - 'null' + currency: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + Price.jsonld-Product.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + paymentId: + type: + - string + - 'null' + amount: + type: + - number + - 'null' + currency: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + Product: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + name: + type: + - string + - 'null' + description: + type: + - string + - 'null' + metadata: + type: + - array + - 'null' + items: + type: string + isActive: + type: + - boolean + - 'null' + prices: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + defaultPrice: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Product-Product.input: + type: object + description: 'Class Product' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + name: + type: + - string + - 'null' + description: + type: + - string + - 'null' + metadata: + type: + - array + - 'null' + items: + type: string + isActive: + type: + - boolean + - 'null' + prices: + type: array + items: + $ref: '#/components/schemas/Price-Product.input' + defaultPrice: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Price-Product.input' + - type: 'null' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Product-Product.output: + type: object + description: 'Class Product' + deprecated: false + properties: + paymentId: + type: + - string + - 'null' + name: + type: + - string + - 'null' + description: + type: + - string + - 'null' + metadata: + type: + - array + - 'null' + items: + type: string + isActive: + type: + - boolean + - 'null' + prices: + type: array + items: + $ref: '#/components/schemas/Price-Product.output' + defaultPrice: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Price-Product.output' + - type: 'null' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Product.jsonld: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + name: + type: + - string + - 'null' + description: + type: + - string + - 'null' + metadata: + type: + - array + - 'null' + items: + type: string + isActive: + type: + - boolean + - 'null' + prices: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + defaultPrice: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Product.jsonld-Product.input: + type: object + description: 'Class Product' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + name: + type: + - string + - 'null' + description: + type: + - string + - 'null' + metadata: + type: + - array + - 'null' + items: + type: string + isActive: + type: + - boolean + - 'null' + prices: + type: array + items: + $ref: '#/components/schemas/Price.jsonld-Product.input' + defaultPrice: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Price.jsonld-Product.input' + - type: 'null' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Product.jsonld-Product.output: + type: object + description: 'Class Product' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + paymentId: + type: + - string + - 'null' + name: + type: + - string + - 'null' + description: + type: + - string + - 'null' + metadata: + type: + - array + - 'null' + items: + type: string + isActive: + type: + - boolean + - 'null' + prices: + type: array + items: + $ref: '#/components/schemas/Price.jsonld-Product.output' + defaultPrice: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/Price.jsonld-Product.output' + - type: 'null' + cluster: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Project-Project.input: + type: object + description: 'Class Project' + deprecated: false + properties: + templateIri: + type: + - string + - 'null' + git: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + name: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar-Project.input' + Project-Project.output: + type: object + description: 'Class Project' + deprecated: false + properties: + templateIri: + type: + - string + - 'null' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + git: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectAccess: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccess-Project.output' + - type: 'null' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar-Project.output' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Project.jsonld-Project.input: + type: object + description: 'Class Project' + deprecated: false + properties: + templateIri: + type: + - string + - 'null' + git: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + name: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar.jsonld-Project.input' + Project.jsonld-Project.output: + type: object + description: 'Class Project' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + templateIri: + type: + - string + - 'null' + state: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + git: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectAccess: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccess.jsonld-Project.output' + - type: 'null' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar.jsonld-Project.output' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccess: + type: object + description: 'Class ProjectAccess' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectAccessGit: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectAccessRegistry: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectAccessServiceAccount: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccess-Project.output: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + projectAccessGit: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccessGit-Project.output' + - type: 'null' + projectAccessRegistry: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccessRegistry-Project.output' + - type: 'null' + projectAccessServiceAccount: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccessServiceAccount-Project.output' + - type: 'null' + ProjectAccess.jsonld: + type: object + description: 'Class ProjectAccess' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectAccessGit: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectAccessRegistry: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectAccessServiceAccount: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccess.jsonld-Project.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + projectAccessGit: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccessGit.jsonld-Project.output' + - type: 'null' + projectAccessRegistry: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccessRegistry.jsonld-Project.output' + - type: 'null' + projectAccessServiceAccount: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ProjectAccessServiceAccount.jsonld-Project.output' + - type: 'null' + ProjectAccessGit: + type: object + description: 'Class ProjectAccessGit' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + isExternal: + type: + - boolean + - 'null' + url: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + email: + type: + - string + - 'null' + password: + type: + - string + - 'null' + sshPrivateKey: + type: + - string + - 'null' + projectAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccessGit-Project.output: + type: object + description: '' + deprecated: false + properties: + isExternal: + type: + - boolean + - 'null' + url: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + email: + type: + - string + - 'null' + password: + type: + - string + - 'null' + sshPrivateKey: + type: + - string + - 'null' + ProjectAccessGit.jsonld: + type: object + description: 'Class ProjectAccessGit' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + isExternal: + type: + - boolean + - 'null' + url: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + email: + type: + - string + - 'null' + password: + type: + - string + - 'null' + sshPrivateKey: + type: + - string + - 'null' + projectAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccessGit.jsonld-Project.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + isExternal: + type: + - boolean + - 'null' + url: + type: + - string + - 'null' + path: + type: + - string + - 'null' + username: + type: + - string + - 'null' + email: + type: + - string + - 'null' + password: + type: + - string + - 'null' + sshPrivateKey: + type: + - string + - 'null' + ProjectAccessRegistry: + type: object + description: 'Class ProjectAccessRegistry' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + quota: + type: + - integer + - 'null' + instance: + type: + - string + - 'null' + url: + type: + - string + - 'null' + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + projectAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccessRegistry-Project.output: + type: object + description: '' + deprecated: false + properties: + quota: + type: + - integer + - 'null' + instance: + type: + - string + - 'null' + url: + type: + - string + - 'null' + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + ProjectAccessRegistry.jsonld: + type: object + description: 'Class ProjectAccessRegistry' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + quota: + type: + - integer + - 'null' + instance: + type: + - string + - 'null' + url: + type: + - string + - 'null' + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + projectAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccessRegistry.jsonld-Project.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + quota: + type: + - integer + - 'null' + instance: + type: + - string + - 'null' + url: + type: + - string + - 'null' + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + ProjectAccessServiceAccount: + type: object + description: 'Class ProjectAccessServiceAccount' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + projectAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccessServiceAccount-Project.output: + type: object + description: '' + deprecated: false + properties: + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + ProjectAccessServiceAccount.jsonld: + type: object + description: 'Class ProjectAccessServiceAccount' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + projectAccess: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectAccessServiceAccount.jsonld-Project.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + password: + type: + - string + - 'null' + ProjectEnvVar: + type: object + description: '' + deprecated: false + properties: + project: + anyOf: + - $ref: '#/components/schemas/AbstractProject' + - type: 'null' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + ProjectEnvVar-Project.input: + type: object + description: 'Class ProjectEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectEnvVar-Project.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectEnvVar-TemplateProject.input: + type: object + description: 'Class ProjectEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectEnvVar-TemplateProject.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectEnvVar.jsonld: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + project: + anyOf: + - $ref: '#/components/schemas/AbstractProject.jsonld' + - type: 'null' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + ProjectEnvVar.jsonld-Project.input: + type: object + description: 'Class ProjectEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectEnvVar.jsonld-Project.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectEnvVar.jsonld-TemplateProject.input: + type: object + description: 'Class ProjectEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectEnvVar.jsonld-TemplateProject.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + ProjectType: + type: object + description: 'Class ProjectType' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + logo: + type: + - string + - 'null' + projectTypeVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectType.jsonld: + type: object + description: 'Class ProjectType' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + logo: + type: + - string + - 'null' + projectTypeVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectTypeVersion: + type: object + description: 'Class ProjectTypeVersion' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + version: + type: + - string + - 'null' + projectType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectTypeVersionEnvVar: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + componentResourceLimit: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + requiredComponent: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + componentVersions: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectTypeVersion.jsonld: + type: object + description: 'Class ProjectTypeVersion' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + version: + type: + - string + - 'null' + projectType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectTypeVersionEnvVar: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + componentResourceLimit: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + requiredComponent: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + componentVersions: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectTypeVersionEnvVar: + type: object + description: 'Class ProjectTypeEnvVar' + deprecated: false + properties: + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectTypeVersionEnvVarExample: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + key: + type: + - string + - 'null' + note: + type: + - string + - 'null' + isRequired: + type: + - boolean + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarValidations: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + ProjectTypeVersionEnvVar.jsonld: + type: object + description: 'Class ProjectTypeEnvVar' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectTypeVersionEnvVarExample: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + key: + type: + - string + - 'null' + note: + type: + - string + - 'null' + isRequired: + type: + - boolean + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarValidations: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + ProjectTypeVersionEnvVarExample: + type: object + description: 'Class ProjectTypeEnvVarExample' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + value: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + projectTypeVersionEnvVar: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ProjectTypeVersionEnvVarExample.jsonld: + type: object + description: 'Class ProjectTypeEnvVarExample' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + value: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + projectTypeVersionEnvVar: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Provider: + type: object + description: 'Class Provider' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + cluster: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Provider-Cluster.withProvider: + type: object + description: '' + deprecated: false + properties: + name: + type: + - string + - 'null' + Provider.jsonld: + type: object + description: 'Class Provider' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + type: + - boolean + - 'null' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + cluster: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Provider.jsonld-Cluster.withProvider: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + name: + type: + - string + - 'null' + ResourceType-ResourceType.input: + type: object + description: 'Class ResourceType' + deprecated: false + properties: + name: + type: + - string + - 'null' + resourceTypeLimit: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ResourceTypeLimit-ResourceType.input' + - type: 'null' + ResourceType-ResourceType.output: + type: object + description: 'Class ResourceType' + deprecated: false + properties: + name: + type: + - string + - 'null' + resourceTypeLimit: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ResourceTypeLimit-ResourceType.output' + - type: 'null' + ResourceType.jsonld-ResourceType.input: + type: object + description: 'Class ResourceType' + deprecated: false + properties: + name: + type: + - string + - 'null' + resourceTypeLimit: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ResourceTypeLimit.jsonld-ResourceType.input' + - type: 'null' + ResourceType.jsonld-ResourceType.output: + type: object + description: 'Class ResourceType' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + name: + type: + - string + - 'null' + resourceTypeLimit: + 'owl:maxCardinality': 1 + anyOf: + - $ref: '#/components/schemas/ResourceTypeLimit.jsonld-ResourceType.output' + - type: 'null' + ResourceTypeLimit: + type: object + description: 'Class ResourceTypeLimit' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + projectMinValue: + type: + - integer + - 'null' + projectMaxValue: + type: + - integer + - 'null' + environmentMinValue: + type: + - integer + - 'null' + environmentMaxValue: + type: + - integer + - 'null' + componentMinValue: + type: + - integer + - 'null' + componentMaxValue: + type: + - integer + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ResourceTypeLimit-ResourceType.input: + type: object + description: 'Class ResourceTypeLimit' + deprecated: false + properties: + projectMinValue: + type: + - integer + - 'null' + projectMaxValue: + type: + - integer + - 'null' + environmentMinValue: + type: + - integer + - 'null' + environmentMaxValue: + type: + - integer + - 'null' + componentMinValue: + type: + - integer + - 'null' + componentMaxValue: + type: + - integer + - 'null' + ResourceTypeLimit-ResourceType.output: + type: object + description: '' + deprecated: false + properties: + projectMinValue: + type: + - integer + - 'null' + projectMaxValue: + type: + - integer + - 'null' + environmentMinValue: + type: + - integer + - 'null' + environmentMaxValue: + type: + - integer + - 'null' + componentMinValue: + type: + - integer + - 'null' + componentMaxValue: + type: + - integer + - 'null' + ResourceTypeLimit.jsonld: + type: object + description: 'Class ResourceTypeLimit' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + projectMinValue: + type: + - integer + - 'null' + projectMaxValue: + type: + - integer + - 'null' + environmentMinValue: + type: + - integer + - 'null' + environmentMaxValue: + type: + - integer + - 'null' + componentMinValue: + type: + - integer + - 'null' + componentMaxValue: + type: + - integer + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + ResourceTypeLimit.jsonld-ResourceType.input: + type: object + description: 'Class ResourceTypeLimit' + deprecated: false + properties: + projectMinValue: + type: + - integer + - 'null' + projectMaxValue: + type: + - integer + - 'null' + environmentMinValue: + type: + - integer + - 'null' + environmentMaxValue: + type: + - integer + - 'null' + componentMinValue: + type: + - integer + - 'null' + componentMaxValue: + type: + - integer + - 'null' + ResourceTypeLimit.jsonld-ResourceType.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + projectMinValue: + type: + - integer + - 'null' + projectMaxValue: + type: + - integer + - 'null' + environmentMinValue: + type: + - integer + - 'null' + environmentMaxValue: + type: + - integer + - 'null' + componentMinValue: + type: + - integer + - 'null' + componentMaxValue: + type: + - integer + - 'null' + RoleGroup: + type: object + description: 'Class RoleGroup' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: string + roles: + type: array + items: + type: string + users: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + RoleGroup.jsonld: + type: object + description: 'Class RoleGroup' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: string + roles: + type: array + items: + type: string + users: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + State: + type: object + description: 'Class State' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + seqNumber: + type: + - integer + - 'null' + project: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + State.jsonld: + type: object + description: 'Class State' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + seqNumber: + type: + - integer + - 'null' + project: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + environment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + importedData: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + StateByInfra: + type: object + description: 'Class StateByInfra' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + status: + type: + - string + - 'null' + statusCode: + type: + - integer + - 'null' + message: + type: + - string + - 'null' + messageInfo: + type: + - string + - 'null' + lastInfraEventAt: + type: + - string + - 'null' + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + StateByInfra.jsonld: + type: object + description: 'Class StateByInfra' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + status: + type: + - string + - 'null' + statusCode: + type: + - integer + - 'null' + message: + type: + - string + - 'null' + messageInfo: + type: + - string + - 'null' + lastInfraEventAt: + type: + - string + - 'null' + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + project: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + environment: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + Team-Team.input: + type: object + description: 'Class Team' + deprecated: false + properties: + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default Team' + type: + - boolean + - 'null' + user: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + teamUsers: + type: array + items: + type: object + properties: + user: + type: string + roleGroup: + type: string + project: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + teamEnvVar: + type: array + items: + $ref: '#/components/schemas/TeamEnvVar-Team.input' + Team-Team.output: + type: object + description: 'Class Team' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default Team' + type: + - boolean + - 'null' + user: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + teamUsers: + type: array + items: + type: object + properties: + user: + type: string + roleGroup: + type: string + project: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + teamEnvVar: + type: array + items: + $ref: '#/components/schemas/TeamEnvVar-Team.output' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUser: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUserName: + type: + - string + - 'null' + Team.jsonld-Team.input: + type: object + description: 'Class Team' + deprecated: false + properties: + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default Team' + type: + - boolean + - 'null' + user: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + teamUsers: + type: array + items: + type: object + properties: + user: + type: string + roleGroup: + type: string + project: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + teamEnvVar: + type: array + items: + $ref: '#/components/schemas/TeamEnvVar.jsonld-Team.input' + Team.jsonld-Team.output: + type: object + description: 'Class Team' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isDefault: + description: 'User related property - One user can only have 1 pcs default Team' + type: + - boolean + - 'null' + user: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + teamUsers: + type: array + items: + type: object + properties: + user: + type: string + roleGroup: + type: string + project: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + organisation: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + teamEnvVar: + type: array + items: + $ref: '#/components/schemas/TeamEnvVar.jsonld-Team.output' + stateByInfra: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUser: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + defaultUserName: + type: + - string + - 'null' + TeamEnvVar: + type: object + description: 'Class TeamEnvVar' + deprecated: false + properties: + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + TeamEnvVar-Team.input: + type: object + description: 'Class TeamEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + TeamEnvVar-Team.output: + type: object + description: '' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + TeamEnvVar.jsonld: + type: object + description: 'Class TeamEnvVar' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + team: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + rawValue: + readOnly: true + type: + - string + - 'null' + TeamEnvVar.jsonld-Team.input: + type: object + description: 'Class TeamEnvVar' + deprecated: false + properties: + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + TeamEnvVar.jsonld-Team.output: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + key: + type: + - string + - 'null' + value: + type: + - string + - 'null' + isEncrypted: + type: + - boolean + - 'null' + envVarType: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + TemplateEnvironment-TemplateEnvironment.input: + type: object + description: 'Class TemplateEnvironment' + deprecated: false + properties: + templateProject: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + name: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar-TemplateEnvironment.input' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent-TemplateEnvironment.input' + TemplateEnvironment-TemplateEnvironment.output: + type: object + description: 'Class TemplateEnvironment' + deprecated: false + properties: + templateProject: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar-TemplateEnvironment.output' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent-TemplateEnvironment.output' + TemplateEnvironment.jsonld-TemplateEnvironment.input: + type: object + description: 'Class TemplateEnvironment' + deprecated: false + properties: + templateProject: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + name: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld-TemplateEnvironment.input' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent.jsonld-TemplateEnvironment.input' + TemplateEnvironment.jsonld-TemplateEnvironment.output: + type: object + description: 'Class TemplateEnvironment' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + templateProject: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + dataTransferSettings: + type: + - string + - 'null' + isStripDatabase: + type: + - boolean + - 'null' + isAllowOutgoingEmails: + type: + - boolean + - 'null' + isAllowHtaccessDevtoolsProtection: + type: + - boolean + - 'null' + isInitSampleData: + type: + - boolean + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + envVar: + type: array + items: + $ref: '#/components/schemas/EnvironmentEnvVar.jsonld-TemplateEnvironment.output' + environmentComponent: + type: array + items: + $ref: '#/components/schemas/EnvironmentComponent.jsonld-TemplateEnvironment.output' + TemplateProject-TemplateProject.input: + type: object + description: 'Class ProjectTemplate' + deprecated: false + properties: + description: + type: + - string + - 'null' + templateEnvironment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + name: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar-TemplateProject.input' + TemplateProject-TemplateProject.output: + type: object + description: 'Class ProjectTemplate' + deprecated: false + properties: + description: + type: + - string + - 'null' + templateEnvironment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar-TemplateProject.output' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + TemplateProject.jsonld-TemplateProject.input: + type: object + description: 'Class ProjectTemplate' + deprecated: false + properties: + description: + type: + - string + - 'null' + templateEnvironment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + name: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar.jsonld-TemplateProject.input' + TemplateProject.jsonld-TemplateProject.output: + type: object + description: 'Class ProjectTemplate' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + description: + type: + - string + - 'null' + templateEnvironment: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + type: + - string + - 'null' + codeName: + type: + - string + - 'null' + isActive: + type: + - boolean + - 'null' + cpu: + type: + - integer + - 'null' + memory: + type: + - integer + - 'null' + storage: + type: + - integer + - 'null' + code: + type: + - string + - 'null' + color: + type: + - string + - 'null' + isInitProjectSkeleton: + type: + - boolean + - 'null' + componentVersion: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + projectTypeVersion: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + projectEnvVar: + type: array + items: + $ref: '#/components/schemas/ProjectEnvVar.jsonld-TemplateProject.output' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + User: + type: object + description: 'Class User' + deprecated: false + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + authenticatorId: + type: + - integer + - 'null' + fullname: + type: + - string + - 'null' + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + roles: + type: + - array + - 'null' + items: + type: string + currency: + type: + - string + - 'null' + password: + type: string + changePassword: + type: + - string + - 'null' + currentPassword: + type: + - string + - 'null' + isEnabled: + type: boolean + passwordHash: + type: + - string + - 'null' + activationHash: + type: + - string + - 'null' + roleGroup: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + teamRoles: + type: array + items: + type: object + properties: + team: + type: string + roleGroup: + type: string + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + userIdentifier: + readOnly: true + type: string + salt: + readOnly: true + description: 'not needed when using the "bcrypt" algorithm in security.yaml' + type: + - string + - 'null' + User.jsonld: + type: object + description: 'Class User' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - type: string + - type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: [ 'http://www.w3.org/ns/hydra/core#' ] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: + - string + - 'null' + paymentId: + type: + - string + - 'null' + authenticatorId: + type: + - integer + - 'null' + fullname: + type: + - string + - 'null' + email: + type: + - string + - 'null' + username: + type: + - string + - 'null' + roles: + type: + - array + - 'null' + items: + type: string + currency: + type: + - string + - 'null' + password: + type: string + changePassword: + type: + - string + - 'null' + currentPassword: + type: + - string + - 'null' + isEnabled: + type: boolean + passwordHash: + type: + - string + - 'null' + activationHash: + type: + - string + - 'null' + roleGroup: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + team: + type: array + items: + type: string + format: iri-reference + example: 'https://example.com/' + teamRoles: + type: array + items: + type: object + properties: + team: + type: string + roleGroup: + type: string + createdBy: + type: + - string + - 'null' + updatedBy: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + userIdentifier: + readOnly: true + type: string + salt: + readOnly: true + description: 'not needed when using the "bcrypt" algorithm in security.yaml' + type: + - string + - 'null' + EnvironmentAccess.AllDataResponse: + $ref: '#/components/schemas/EnvironmentAccess' + type: object + properties: + frontend: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + backend: + $ref: '#/components/schemas/EnvironmentAccessBackend' + database: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + devTools: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + redis: + $ref: '#/components/schemas/EnvironmentAccessRedis' + rabbit: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + mailbox: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + webshell: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + Environment.Costs: + type: object + properties: + uuid: + type: object + properties: + costs: + type: array + items: + type: object + environment: + $ref: '#/components/schemas/Environment-Environment.output' + Environment.Costs.jsonld: + type: object + properties: + uuid: + type: object + properties: + costs: + type: array + items: + type: object + environment: + $ref: '#/components/schemas/Environment.jsonld-Environment.output' + Environment.LogStreamResponse: + type: object + properties: + topic: + type: string + token: + type: string + Authentication.Token: + type: object + properties: + token: + type: string + readOnly: true + data: + type: object + properties: + id: + type: integer + fullname: + type: string + roles: + type: array + items: + type: string + teams: + type: array + items: + type: object + properties: + uuid: { type: string } + Authentication.Credentials: + type: object + properties: + id: + type: string + example: 'johndoe@example.com OR johndoe' + password: + type: string + example: password + ValidateEnvVar.Request: + type: object + properties: + word: + type: string + iri: + type: string + ValidateEnvVar.Response: + type: object + properties: + isValid: + type: boolean + messages: + type: array + items: + type: string + Finance.InvoicesResponse: + type: object + properties: + costomer: + type: object + paymentMethods: + type: array + items: + type: object + invoices: + type: array + items: + type: object + Finance.CostsResponse: + type: object + properties: + summary: + type: object + properties: + cpuCoreHours: + type: integer + ramByteHours: + type: integer + pvByteHours: + type: integer + cpuCost: + type: integer + ramCost: + type: integer + pvCost: + type: integer + Mercure.DiscoverResponse: + type: object + properties: + data: + type: array + items: + type: string + Finance.ApiTokenResponse: + type: object + properties: + token: + type: string + data: + type: object + properties: + id: + type: integer + fullname: + type: string + roles: + type: array + items: + type: string + teams: + type: array + items: + type: object + properties: + uuid: { type: string } + responses: { } + parameters: { } + examples: { } + requestBodies: { } + headers: { } + securitySchemes: + apiKey: + type: apiKey + description: 'Value for the Authorization header parameter.' + name: Authorization + in: header + JWT: + type: http + scheme: bearer + bearerFormat: JWT +security: + - apiKey: [ ] +tags: [ ] + diff --git a/pkg/api/rewardcloud/.gitignore b/pkg/api/rewardcloud/.gitignore new file mode 100644 index 0000000..daf913b --- /dev/null +++ b/pkg/api/rewardcloud/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/pkg/api/rewardcloud/.openapi-generator-ignore b/pkg/api/rewardcloud/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/pkg/api/rewardcloud/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/pkg/api/rewardcloud/.openapi-generator/FILES b/pkg/api/rewardcloud/.openapi-generator/FILES new file mode 100644 index 0000000..0e59c7e --- /dev/null +++ b/pkg/api/rewardcloud/.openapi-generator/FILES @@ -0,0 +1,194 @@ +.gitignore +.travis.yml +README.md +api/openapi.yaml +api_access_code.go +api_cluster.go +api_component.go +api_component_resource_limit.go +api_component_version.go +api_component_version_env_var.go +api_component_version_env_var_example.go +api_credential_type.go +api_crypto_key_type.go +api_data_transfer_data_type.go +api_data_transfer_type.go +api_env_var_type.go +api_env_var_validation.go +api_environment.go +api_environment_access.go +api_environment_access_backend.go +api_environment_access_database.go +api_environment_access_dev_tools.go +api_environment_access_frontend.go +api_environment_access_mailbox.go +api_environment_access_rabbit.go +api_environment_access_redis.go +api_environment_access_webshell.go +api_environment_component.go +api_environment_custom_domain.go +api_environment_env_var.go +api_environment_magento_host_mapping.go +api_environment_message_history.go +api_exported_data.go +api_git.go +api_git_type.go +api_imported_data.go +api_invitation.go +api_miscellaneous.go +api_organisation.go +api_organisation_env_var.go +api_price.go +api_product.go +api_project.go +api_project_access.go +api_project_access_git.go +api_project_access_registry.go +api_project_access_service_account.go +api_project_env_var.go +api_project_type.go +api_project_type_version.go +api_project_type_version_env_var.go +api_project_type_version_env_var_example.go +api_provider.go +api_resource_type.go +api_resource_type_limit.go +api_role_group.go +api_state.go +api_state_by_infra.go +api_team.go +api_team_env_var.go +api_template_environment.go +api_template_project.go +api_user.go +client.go +configuration.go +git_push.sh +go.mod +go.sum +model__api_gits__id__connect_test_get_200_response.go +model__api_users__id__finance_subscribe_info_get_200_response.go +model__api_users_check_email_get_200_response.go +model__api_users_forgot_password_put_200_response.go +model__api_users_forgot_password_put_request.go +model_abstract_env_var.go +model_abstract_environment.go +model_abstract_project.go +model_access_code.go +model_authentication_credentials.go +model_authentication_token.go +model_authentication_token_data.go +model_authentication_token_data_teams_inner.go +model_cluster.go +model_cluster_cluster_with_provider.go +model_component.go +model_component_resource_limit.go +model_component_version.go +model_component_version_env_var.go +model_component_version_env_var_example.go +model_credential_type.go +model_crypto_key_type.go +model_data_transfer_data_type.go +model_data_transfer_type.go +model_env_var_type.go +model_env_var_validation.go +model_environment_access.go +model_environment_access_all_data_response.go +model_environment_access_backend.go +model_environment_access_database.go +model_environment_access_dev_tools.go +model_environment_access_frontend.go +model_environment_access_mailbox.go +model_environment_access_rabbit.go +model_environment_access_redis.go +model_environment_access_webshell.go +model_environment_component.go +model_environment_component_environment_input.go +model_environment_component_environment_output.go +model_environment_component_template_environment_input.go +model_environment_component_template_environment_output.go +model_environment_costs.go +model_environment_costs_uuid.go +model_environment_custom_domain.go +model_environment_custom_domain_environment_input.go +model_environment_custom_domain_environment_output.go +model_environment_env_var.go +model_environment_env_var_environment_input.go +model_environment_env_var_environment_output.go +model_environment_env_var_template_environment_input.go +model_environment_env_var_template_environment_output.go +model_environment_environment_input.go +model_environment_environment_output.go +model_environment_log_stream_response.go +model_environment_magento_host_mapping.go +model_environment_magento_host_mapping_environment_input.go +model_environment_magento_host_mapping_environment_output.go +model_environment_message_history.go +model_exported_data.go +model_finance_api_token_response.go +model_finance_costs_response.go +model_finance_costs_response_summary.go +model_finance_invoices_response.go +model_git_git_input.go +model_git_git_output.go +model_git_type.go +model_imported_data.go +model_invitation_invitation_input.go +model_invitation_invitation_output.go +model_mercure_discover_response.go +model_organisation_env_var.go +model_organisation_env_var_organisation_input.go +model_organisation_env_var_organisation_output.go +model_organisation_organisation_input.go +model_organisation_organisation_output.go +model_price.go +model_price_product_input.go +model_price_product_output.go +model_product.go +model_product_product_input.go +model_product_product_output.go +model_project_access.go +model_project_access_git.go +model_project_access_git_project_output.go +model_project_access_project_output.go +model_project_access_registry.go +model_project_access_registry_project_output.go +model_project_access_service_account.go +model_project_access_service_account_project_output.go +model_project_env_var.go +model_project_env_var_project_input.go +model_project_env_var_project_output.go +model_project_env_var_template_project_input.go +model_project_env_var_template_project_output.go +model_project_project_input.go +model_project_project_output.go +model_project_type.go +model_project_type_version.go +model_project_type_version_env_var.go +model_project_type_version_env_var_example.go +model_provider.go +model_provider_cluster_with_provider.go +model_resource_type_limit.go +model_resource_type_limit_resource_type_input.go +model_resource_type_limit_resource_type_output.go +model_resource_type_resource_type_input.go +model_resource_type_resource_type_output.go +model_role_group.go +model_state.go +model_state_by_infra.go +model_team_env_var.go +model_team_env_var_team_input.go +model_team_env_var_team_output.go +model_team_team_input.go +model_team_team_input_team_users_inner.go +model_team_team_output.go +model_template_environment_template_environment_input.go +model_template_environment_template_environment_output.go +model_template_project_template_project_input.go +model_template_project_template_project_output.go +model_user.go +model_user_team_roles_inner.go +model_validate_env_var_request.go +model_validate_env_var_response.go +response.go +utils.go diff --git a/pkg/api/rewardcloud/.openapi-generator/VERSION b/pkg/api/rewardcloud/.openapi-generator/VERSION new file mode 100644 index 0000000..73a86b1 --- /dev/null +++ b/pkg/api/rewardcloud/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.0.1 \ No newline at end of file diff --git a/pkg/api/rewardcloud/.travis.yml b/pkg/api/rewardcloud/.travis.yml new file mode 100644 index 0000000..f5cb2ce --- /dev/null +++ b/pkg/api/rewardcloud/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/pkg/api/rewardcloud/README.md b/pkg/api/rewardcloud/README.md new file mode 100644 index 0000000..52b7581 --- /dev/null +++ b/pkg/api/rewardcloud/README.md @@ -0,0 +1,635 @@ +# Go API client for rewardcloud + +It is an API for Reward Cloud project in ITG Commerce + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: v0.7.0-alpha +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import rewardcloud "github.com/GIT_USER_ID/GIT_REPO_ID" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. + +```golang +ctx := context.WithValue(context.Background(), rewardcloud.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. + +```golang +ctx := context.WithValue(context.Background(), rewardcloud.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. + +```golang +ctx := context.WithValue(context.Background(), rewardcloud.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), rewardcloud.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccessCodeAPI* | [**ApiAccessCodesGetCollection**](docs/AccessCodeAPI.md#apiaccesscodesgetcollection) | **Get** /api/access_codes | Retrieves the collection of AccessCode resources. +*AccessCodeAPI* | [**ApiAccessCodesIdDelete**](docs/AccessCodeAPI.md#apiaccesscodesiddelete) | **Delete** /api/access_codes/{id} | Removes the AccessCode resource. +*AccessCodeAPI* | [**ApiAccessCodesIdGet**](docs/AccessCodeAPI.md#apiaccesscodesidget) | **Get** /api/access_codes/{id} | Retrieves a AccessCode resource. +*AccessCodeAPI* | [**ApiAccessCodesIdPatch**](docs/AccessCodeAPI.md#apiaccesscodesidpatch) | **Patch** /api/access_codes/{id} | Updates the AccessCode resource. +*AccessCodeAPI* | [**ApiAccessCodesIdPut**](docs/AccessCodeAPI.md#apiaccesscodesidput) | **Put** /api/access_codes/{id} | Replaces the AccessCode resource. +*AccessCodeAPI* | [**ApiAccessCodesPost**](docs/AccessCodeAPI.md#apiaccesscodespost) | **Post** /api/access_codes | Creates a AccessCode resource. +*ClusterAPI* | [**ApiClustersGetCollection**](docs/ClusterAPI.md#apiclustersgetcollection) | **Get** /api/clusters | Retrieves the collection of Cluster resources. +*ClusterAPI* | [**ApiClustersIdDelete**](docs/ClusterAPI.md#apiclustersiddelete) | **Delete** /api/clusters/{id} | Removes the Cluster resource. +*ClusterAPI* | [**ApiClustersIdGet**](docs/ClusterAPI.md#apiclustersidget) | **Get** /api/clusters/{id} | Retrieves a Cluster resource. +*ClusterAPI* | [**ApiClustersIdPatch**](docs/ClusterAPI.md#apiclustersidpatch) | **Patch** /api/clusters/{id} | Updates the Cluster resource. +*ClusterAPI* | [**ApiClustersIdPut**](docs/ClusterAPI.md#apiclustersidput) | **Put** /api/clusters/{id} | Replaces the Cluster resource. +*ClusterAPI* | [**ApiClustersIdgetWithProviderGet**](docs/ClusterAPI.md#apiclustersidgetwithproviderget) | **Get** /api/clusters/{id}/get-with-provider | Retrieves a Cluster resource. +*ClusterAPI* | [**ApiClustersPost**](docs/ClusterAPI.md#apiclusterspost) | **Post** /api/clusters | Creates a Cluster resource. +*ClusterAPI* | [**ApiClustersgetWithProviderGetCollection**](docs/ClusterAPI.md#apiclustersgetwithprovidergetcollection) | **Get** /api/clusters/get-with-provider | Retrieves the collection of Cluster resources. +*ComponentAPI* | [**ApiComponentsGetCollection**](docs/ComponentAPI.md#apicomponentsgetcollection) | **Get** /api/components | Retrieves the collection of Component resources. +*ComponentAPI* | [**ApiComponentsIdDelete**](docs/ComponentAPI.md#apicomponentsiddelete) | **Delete** /api/components/{id} | Removes the Component resource. +*ComponentAPI* | [**ApiComponentsIdGet**](docs/ComponentAPI.md#apicomponentsidget) | **Get** /api/components/{id} | Retrieves a Component resource. +*ComponentAPI* | [**ApiComponentsIdPatch**](docs/ComponentAPI.md#apicomponentsidpatch) | **Patch** /api/components/{id} | Updates the Component resource. +*ComponentAPI* | [**ApiComponentsIdPut**](docs/ComponentAPI.md#apicomponentsidput) | **Put** /api/components/{id} | Replaces the Component resource. +*ComponentAPI* | [**ApiComponentsPost**](docs/ComponentAPI.md#apicomponentspost) | **Post** /api/components | Creates a Component resource. +*ComponentResourceLimitAPI* | [**ApiComponentResourceLimitsGetCollection**](docs/ComponentResourceLimitAPI.md#apicomponentresourcelimitsgetcollection) | **Get** /api/component_resource_limits | Retrieves the collection of ComponentResourceLimit resources. +*ComponentResourceLimitAPI* | [**ApiComponentResourceLimitsIdDelete**](docs/ComponentResourceLimitAPI.md#apicomponentresourcelimitsiddelete) | **Delete** /api/component_resource_limits/{id} | Removes the ComponentResourceLimit resource. +*ComponentResourceLimitAPI* | [**ApiComponentResourceLimitsIdGet**](docs/ComponentResourceLimitAPI.md#apicomponentresourcelimitsidget) | **Get** /api/component_resource_limits/{id} | Retrieves a ComponentResourceLimit resource. +*ComponentResourceLimitAPI* | [**ApiComponentResourceLimitsIdPatch**](docs/ComponentResourceLimitAPI.md#apicomponentresourcelimitsidpatch) | **Patch** /api/component_resource_limits/{id} | Updates the ComponentResourceLimit resource. +*ComponentResourceLimitAPI* | [**ApiComponentResourceLimitsIdPut**](docs/ComponentResourceLimitAPI.md#apicomponentresourcelimitsidput) | **Put** /api/component_resource_limits/{id} | Replaces the ComponentResourceLimit resource. +*ComponentResourceLimitAPI* | [**ApiComponentResourceLimitsPost**](docs/ComponentResourceLimitAPI.md#apicomponentresourcelimitspost) | **Post** /api/component_resource_limits | Creates a ComponentResourceLimit resource. +*ComponentVersionAPI* | [**ApiComponentVersionsGetCollection**](docs/ComponentVersionAPI.md#apicomponentversionsgetcollection) | **Get** /api/component_versions | Retrieves the collection of ComponentVersion resources. +*ComponentVersionAPI* | [**ApiComponentVersionsIdDelete**](docs/ComponentVersionAPI.md#apicomponentversionsiddelete) | **Delete** /api/component_versions/{id} | Removes the ComponentVersion resource. +*ComponentVersionAPI* | [**ApiComponentVersionsIdGet**](docs/ComponentVersionAPI.md#apicomponentversionsidget) | **Get** /api/component_versions/{id} | Retrieves a ComponentVersion resource. +*ComponentVersionAPI* | [**ApiComponentVersionsIdPatch**](docs/ComponentVersionAPI.md#apicomponentversionsidpatch) | **Patch** /api/component_versions/{id} | Updates the ComponentVersion resource. +*ComponentVersionAPI* | [**ApiComponentVersionsIdPut**](docs/ComponentVersionAPI.md#apicomponentversionsidput) | **Put** /api/component_versions/{id} | Replaces the ComponentVersion resource. +*ComponentVersionAPI* | [**ApiComponentVersionsPost**](docs/ComponentVersionAPI.md#apicomponentversionspost) | **Post** /api/component_versions | Creates a ComponentVersion resource. +*ComponentVersionEnvVarAPI* | [**ApiComponentVersionEnvVarsGetCollection**](docs/ComponentVersionEnvVarAPI.md#apicomponentversionenvvarsgetcollection) | **Get** /api/component_version_env_vars | Retrieves the collection of ComponentVersionEnvVar resources. +*ComponentVersionEnvVarAPI* | [**ApiComponentVersionEnvVarsIdDelete**](docs/ComponentVersionEnvVarAPI.md#apicomponentversionenvvarsiddelete) | **Delete** /api/component_version_env_vars/{id} | Removes the ComponentVersionEnvVar resource. +*ComponentVersionEnvVarAPI* | [**ApiComponentVersionEnvVarsIdGet**](docs/ComponentVersionEnvVarAPI.md#apicomponentversionenvvarsidget) | **Get** /api/component_version_env_vars/{id} | Retrieves a ComponentVersionEnvVar resource. +*ComponentVersionEnvVarAPI* | [**ApiComponentVersionEnvVarsIdPatch**](docs/ComponentVersionEnvVarAPI.md#apicomponentversionenvvarsidpatch) | **Patch** /api/component_version_env_vars/{id} | Updates the ComponentVersionEnvVar resource. +*ComponentVersionEnvVarAPI* | [**ApiComponentVersionEnvVarsIdPut**](docs/ComponentVersionEnvVarAPI.md#apicomponentversionenvvarsidput) | **Put** /api/component_version_env_vars/{id} | Replaces the ComponentVersionEnvVar resource. +*ComponentVersionEnvVarAPI* | [**ApiComponentVersionEnvVarsPost**](docs/ComponentVersionEnvVarAPI.md#apicomponentversionenvvarspost) | **Post** /api/component_version_env_vars | Creates a ComponentVersionEnvVar resource. +*ComponentVersionEnvVarExampleAPI* | [**ApiComponentVersionEnvVarExamplesGetCollection**](docs/ComponentVersionEnvVarExampleAPI.md#apicomponentversionenvvarexamplesgetcollection) | **Get** /api/component_version_env_var_examples | Retrieves the collection of ComponentVersionEnvVarExample resources. +*ComponentVersionEnvVarExampleAPI* | [**ApiComponentVersionEnvVarExamplesIdDelete**](docs/ComponentVersionEnvVarExampleAPI.md#apicomponentversionenvvarexamplesiddelete) | **Delete** /api/component_version_env_var_examples/{id} | Removes the ComponentVersionEnvVarExample resource. +*ComponentVersionEnvVarExampleAPI* | [**ApiComponentVersionEnvVarExamplesIdGet**](docs/ComponentVersionEnvVarExampleAPI.md#apicomponentversionenvvarexamplesidget) | **Get** /api/component_version_env_var_examples/{id} | Retrieves a ComponentVersionEnvVarExample resource. +*ComponentVersionEnvVarExampleAPI* | [**ApiComponentVersionEnvVarExamplesIdPatch**](docs/ComponentVersionEnvVarExampleAPI.md#apicomponentversionenvvarexamplesidpatch) | **Patch** /api/component_version_env_var_examples/{id} | Updates the ComponentVersionEnvVarExample resource. +*ComponentVersionEnvVarExampleAPI* | [**ApiComponentVersionEnvVarExamplesIdPut**](docs/ComponentVersionEnvVarExampleAPI.md#apicomponentversionenvvarexamplesidput) | **Put** /api/component_version_env_var_examples/{id} | Replaces the ComponentVersionEnvVarExample resource. +*ComponentVersionEnvVarExampleAPI* | [**ApiComponentVersionEnvVarExamplesPost**](docs/ComponentVersionEnvVarExampleAPI.md#apicomponentversionenvvarexamplespost) | **Post** /api/component_version_env_var_examples | Creates a ComponentVersionEnvVarExample resource. +*CredentialTypeAPI* | [**ApiCredentialTypesGetCollection**](docs/CredentialTypeAPI.md#apicredentialtypesgetcollection) | **Get** /api/credential_types | Retrieves the collection of CredentialType resources. +*CredentialTypeAPI* | [**ApiCredentialTypesIdDelete**](docs/CredentialTypeAPI.md#apicredentialtypesiddelete) | **Delete** /api/credential_types/{id} | Removes the CredentialType resource. +*CredentialTypeAPI* | [**ApiCredentialTypesIdGet**](docs/CredentialTypeAPI.md#apicredentialtypesidget) | **Get** /api/credential_types/{id} | Retrieves a CredentialType resource. +*CredentialTypeAPI* | [**ApiCredentialTypesIdPatch**](docs/CredentialTypeAPI.md#apicredentialtypesidpatch) | **Patch** /api/credential_types/{id} | Updates the CredentialType resource. +*CredentialTypeAPI* | [**ApiCredentialTypesIdPut**](docs/CredentialTypeAPI.md#apicredentialtypesidput) | **Put** /api/credential_types/{id} | Replaces the CredentialType resource. +*CredentialTypeAPI* | [**ApiCredentialTypesPost**](docs/CredentialTypeAPI.md#apicredentialtypespost) | **Post** /api/credential_types | Creates a CredentialType resource. +*CryptoKeyTypeAPI* | [**ApiCryptoKeyTypesIdGet**](docs/CryptoKeyTypeAPI.md#apicryptokeytypesidget) | **Get** /api/crypto_key_types/{id} | Retrieves a CryptoKeyType resource. +*DataTransferDataTypeAPI* | [**ApiDataTransferDataTypesGetCollection**](docs/DataTransferDataTypeAPI.md#apidatatransferdatatypesgetcollection) | **Get** /api/data_transfer_data_types | Retrieves the collection of DataTransferDataType resources. +*DataTransferDataTypeAPI* | [**ApiDataTransferDataTypesIdDelete**](docs/DataTransferDataTypeAPI.md#apidatatransferdatatypesiddelete) | **Delete** /api/data_transfer_data_types/{id} | Removes the DataTransferDataType resource. +*DataTransferDataTypeAPI* | [**ApiDataTransferDataTypesIdGet**](docs/DataTransferDataTypeAPI.md#apidatatransferdatatypesidget) | **Get** /api/data_transfer_data_types/{id} | Retrieves a DataTransferDataType resource. +*DataTransferDataTypeAPI* | [**ApiDataTransferDataTypesIdPatch**](docs/DataTransferDataTypeAPI.md#apidatatransferdatatypesidpatch) | **Patch** /api/data_transfer_data_types/{id} | Updates the DataTransferDataType resource. +*DataTransferDataTypeAPI* | [**ApiDataTransferDataTypesIdPut**](docs/DataTransferDataTypeAPI.md#apidatatransferdatatypesidput) | **Put** /api/data_transfer_data_types/{id} | Replaces the DataTransferDataType resource. +*DataTransferDataTypeAPI* | [**ApiDataTransferDataTypesPost**](docs/DataTransferDataTypeAPI.md#apidatatransferdatatypespost) | **Post** /api/data_transfer_data_types | Creates a DataTransferDataType resource. +*DataTransferTypeAPI* | [**ApiDataTransferTypesGetCollection**](docs/DataTransferTypeAPI.md#apidatatransfertypesgetcollection) | **Get** /api/data_transfer_types | Retrieves the collection of DataTransferType resources. +*DataTransferTypeAPI* | [**ApiDataTransferTypesIdDelete**](docs/DataTransferTypeAPI.md#apidatatransfertypesiddelete) | **Delete** /api/data_transfer_types/{id} | Removes the DataTransferType resource. +*DataTransferTypeAPI* | [**ApiDataTransferTypesIdGet**](docs/DataTransferTypeAPI.md#apidatatransfertypesidget) | **Get** /api/data_transfer_types/{id} | Retrieves a DataTransferType resource. +*DataTransferTypeAPI* | [**ApiDataTransferTypesIdPatch**](docs/DataTransferTypeAPI.md#apidatatransfertypesidpatch) | **Patch** /api/data_transfer_types/{id} | Updates the DataTransferType resource. +*DataTransferTypeAPI* | [**ApiDataTransferTypesIdPut**](docs/DataTransferTypeAPI.md#apidatatransfertypesidput) | **Put** /api/data_transfer_types/{id} | Replaces the DataTransferType resource. +*DataTransferTypeAPI* | [**ApiDataTransferTypesPost**](docs/DataTransferTypeAPI.md#apidatatransfertypespost) | **Post** /api/data_transfer_types | Creates a DataTransferType resource. +*EnvVarTypeAPI* | [**ApiEnvVarTypesGetCollection**](docs/EnvVarTypeAPI.md#apienvvartypesgetcollection) | **Get** /api/env_var_types | Retrieves the collection of EnvVarType resources. +*EnvVarTypeAPI* | [**ApiEnvVarTypesIdDelete**](docs/EnvVarTypeAPI.md#apienvvartypesiddelete) | **Delete** /api/env_var_types/{id} | Removes the EnvVarType resource. +*EnvVarTypeAPI* | [**ApiEnvVarTypesIdGet**](docs/EnvVarTypeAPI.md#apienvvartypesidget) | **Get** /api/env_var_types/{id} | Retrieves a EnvVarType resource. +*EnvVarTypeAPI* | [**ApiEnvVarTypesIdPatch**](docs/EnvVarTypeAPI.md#apienvvartypesidpatch) | **Patch** /api/env_var_types/{id} | Updates the EnvVarType resource. +*EnvVarTypeAPI* | [**ApiEnvVarTypesIdPut**](docs/EnvVarTypeAPI.md#apienvvartypesidput) | **Put** /api/env_var_types/{id} | Replaces the EnvVarType resource. +*EnvVarTypeAPI* | [**ApiEnvVarTypesPost**](docs/EnvVarTypeAPI.md#apienvvartypespost) | **Post** /api/env_var_types | Creates a EnvVarType resource. +*EnvVarValidationAPI* | [**ApiEnvVarValidationsGetCollection**](docs/EnvVarValidationAPI.md#apienvvarvalidationsgetcollection) | **Get** /api/env_var_validations | Retrieves the collection of EnvVarValidation resources. +*EnvVarValidationAPI* | [**ApiEnvVarValidationsIdDelete**](docs/EnvVarValidationAPI.md#apienvvarvalidationsiddelete) | **Delete** /api/env_var_validations/{id} | Removes the EnvVarValidation resource. +*EnvVarValidationAPI* | [**ApiEnvVarValidationsIdGet**](docs/EnvVarValidationAPI.md#apienvvarvalidationsidget) | **Get** /api/env_var_validations/{id} | Retrieves a EnvVarValidation resource. +*EnvVarValidationAPI* | [**ApiEnvVarValidationsIdPatch**](docs/EnvVarValidationAPI.md#apienvvarvalidationsidpatch) | **Patch** /api/env_var_validations/{id} | Updates the EnvVarValidation resource. +*EnvVarValidationAPI* | [**ApiEnvVarValidationsIdPut**](docs/EnvVarValidationAPI.md#apienvvarvalidationsidput) | **Put** /api/env_var_validations/{id} | Replaces the EnvVarValidation resource. +*EnvVarValidationAPI* | [**ApiEnvVarValidationsPost**](docs/EnvVarValidationAPI.md#apienvvarvalidationspost) | **Post** /api/env_var_validations | Creates a EnvVarValidation resource. +*EnvironmentAPI* | [**ApiEnvironmentsGetCollection**](docs/EnvironmentAPI.md#apienvironmentsgetcollection) | **Get** /api/environments | Retrieves the collection of Environment resources. +*EnvironmentAPI* | [**ApiEnvironmentsIdBuildAndDeployPatch**](docs/EnvironmentAPI.md#apienvironmentsidbuildanddeploypatch) | **Patch** /api/environments/{id}/build-and-deploy | Build commad for Environment +*EnvironmentAPI* | [**ApiEnvironmentsIdCostsGet**](docs/EnvironmentAPI.md#apienvironmentsidcostsget) | **Get** /api/environments/{id}/costs | Get all costs data that related to the Environment +*EnvironmentAPI* | [**ApiEnvironmentsIdDelete**](docs/EnvironmentAPI.md#apienvironmentsiddelete) | **Delete** /api/environments/{id} | Removes the Environment resource. +*EnvironmentAPI* | [**ApiEnvironmentsIdExportDatabasePut**](docs/EnvironmentAPI.md#apienvironmentsidexportdatabaseput) | **Put** /api/environments/{id}/export-database | Build commad for Environment +*EnvironmentAPI* | [**ApiEnvironmentsIdExportMediaPut**](docs/EnvironmentAPI.md#apienvironmentsidexportmediaput) | **Put** /api/environments/{id}/export-media | Build commad for Environment +*EnvironmentAPI* | [**ApiEnvironmentsIdGet**](docs/EnvironmentAPI.md#apienvironmentsidget) | **Get** /api/environments/{id} | Retrieves a Environment resource. +*EnvironmentAPI* | [**ApiEnvironmentsIdImportDatabasePost**](docs/EnvironmentAPI.md#apienvironmentsidimportdatabasepost) | **Post** /api/environments/{id}/import-database | Build commad for Environment +*EnvironmentAPI* | [**ApiEnvironmentsIdImportMediaPost**](docs/EnvironmentAPI.md#apienvironmentsidimportmediapost) | **Post** /api/environments/{id}/import-media | Build commad for Environment +*EnvironmentAPI* | [**ApiEnvironmentsIdLogsGet**](docs/EnvironmentAPI.md#apienvironmentsidlogsget) | **Get** /api/environments/{id}/logs | Create a request to view logs +*EnvironmentAPI* | [**ApiEnvironmentsIdPatch**](docs/EnvironmentAPI.md#apienvironmentsidpatch) | **Patch** /api/environments/{id} | Updates the Environment resource. +*EnvironmentAPI* | [**ApiEnvironmentsIdPut**](docs/EnvironmentAPI.md#apienvironmentsidput) | **Put** /api/environments/{id} | Replaces the Environment resource. +*EnvironmentAPI* | [**ApiEnvironmentsIdprogressbarGet**](docs/EnvironmentAPI.md#apienvironmentsidprogressbarget) | **Get** /api/environments/{id}/progressbar | Retrieves a Environment resource. +*EnvironmentAPI* | [**ApiEnvironmentsPost**](docs/EnvironmentAPI.md#apienvironmentspost) | **Post** /api/environments | Creates a Environment resource. +*EnvironmentAccessAPI* | [**ApiEnvironmentAccessesGetCollection**](docs/EnvironmentAccessAPI.md#apienvironmentaccessesgetcollection) | **Get** /api/environment_accesses | Retrieves the collection of EnvironmentAccess resources. +*EnvironmentAccessAPI* | [**ApiEnvironmentAccessesIdAllDataGet**](docs/EnvironmentAccessAPI.md#apienvironmentaccessesidalldataget) | **Get** /api/environment_accesses/{id}/all-data | Get all data of an EnvironmentAccess resource +*EnvironmentAccessAPI* | [**ApiEnvironmentAccessesIdDelete**](docs/EnvironmentAccessAPI.md#apienvironmentaccessesiddelete) | **Delete** /api/environment_accesses/{id} | Removes the EnvironmentAccess resource. +*EnvironmentAccessAPI* | [**ApiEnvironmentAccessesIdGet**](docs/EnvironmentAccessAPI.md#apienvironmentaccessesidget) | **Get** /api/environment_accesses/{id} | Retrieves a EnvironmentAccess resource. +*EnvironmentAccessAPI* | [**ApiEnvironmentAccessesIdPatch**](docs/EnvironmentAccessAPI.md#apienvironmentaccessesidpatch) | **Patch** /api/environment_accesses/{id} | Updates the EnvironmentAccess resource. +*EnvironmentAccessAPI* | [**ApiEnvironmentAccessesIdPut**](docs/EnvironmentAccessAPI.md#apienvironmentaccessesidput) | **Put** /api/environment_accesses/{id} | Replaces the EnvironmentAccess resource. +*EnvironmentAccessAPI* | [**ApiEnvironmentAccessesPost**](docs/EnvironmentAccessAPI.md#apienvironmentaccessespost) | **Post** /api/environment_accesses | Creates a EnvironmentAccess resource. +*EnvironmentAccessBackendAPI* | [**ApiEnvironmentAccessBackendsGetCollection**](docs/EnvironmentAccessBackendAPI.md#apienvironmentaccessbackendsgetcollection) | **Get** /api/environment_access_backends | Retrieves the collection of EnvironmentAccessBackend resources. +*EnvironmentAccessBackendAPI* | [**ApiEnvironmentAccessBackendsIdDelete**](docs/EnvironmentAccessBackendAPI.md#apienvironmentaccessbackendsiddelete) | **Delete** /api/environment_access_backends/{id} | Removes the EnvironmentAccessBackend resource. +*EnvironmentAccessBackendAPI* | [**ApiEnvironmentAccessBackendsIdGet**](docs/EnvironmentAccessBackendAPI.md#apienvironmentaccessbackendsidget) | **Get** /api/environment_access_backends/{id} | Retrieves a EnvironmentAccessBackend resource. +*EnvironmentAccessBackendAPI* | [**ApiEnvironmentAccessBackendsIdPatch**](docs/EnvironmentAccessBackendAPI.md#apienvironmentaccessbackendsidpatch) | **Patch** /api/environment_access_backends/{id} | Updates the EnvironmentAccessBackend resource. +*EnvironmentAccessBackendAPI* | [**ApiEnvironmentAccessBackendsIdPut**](docs/EnvironmentAccessBackendAPI.md#apienvironmentaccessbackendsidput) | **Put** /api/environment_access_backends/{id} | Replaces the EnvironmentAccessBackend resource. +*EnvironmentAccessBackendAPI* | [**ApiEnvironmentAccessBackendsPost**](docs/EnvironmentAccessBackendAPI.md#apienvironmentaccessbackendspost) | **Post** /api/environment_access_backends | Creates a EnvironmentAccessBackend resource. +*EnvironmentAccessDatabaseAPI* | [**ApiEnvironmentAccessDatabasesGetCollection**](docs/EnvironmentAccessDatabaseAPI.md#apienvironmentaccessdatabasesgetcollection) | **Get** /api/environment_access_databases | Retrieves the collection of EnvironmentAccessDatabase resources. +*EnvironmentAccessDatabaseAPI* | [**ApiEnvironmentAccessDatabasesIdDelete**](docs/EnvironmentAccessDatabaseAPI.md#apienvironmentaccessdatabasesiddelete) | **Delete** /api/environment_access_databases/{id} | Removes the EnvironmentAccessDatabase resource. +*EnvironmentAccessDatabaseAPI* | [**ApiEnvironmentAccessDatabasesIdGet**](docs/EnvironmentAccessDatabaseAPI.md#apienvironmentaccessdatabasesidget) | **Get** /api/environment_access_databases/{id} | Retrieves a EnvironmentAccessDatabase resource. +*EnvironmentAccessDatabaseAPI* | [**ApiEnvironmentAccessDatabasesIdPatch**](docs/EnvironmentAccessDatabaseAPI.md#apienvironmentaccessdatabasesidpatch) | **Patch** /api/environment_access_databases/{id} | Updates the EnvironmentAccessDatabase resource. +*EnvironmentAccessDatabaseAPI* | [**ApiEnvironmentAccessDatabasesIdPut**](docs/EnvironmentAccessDatabaseAPI.md#apienvironmentaccessdatabasesidput) | **Put** /api/environment_access_databases/{id} | Replaces the EnvironmentAccessDatabase resource. +*EnvironmentAccessDatabaseAPI* | [**ApiEnvironmentAccessDatabasesPost**](docs/EnvironmentAccessDatabaseAPI.md#apienvironmentaccessdatabasespost) | **Post** /api/environment_access_databases | Creates a EnvironmentAccessDatabase resource. +*EnvironmentAccessDevToolsAPI* | [**ApiEnvironmentAccessDevToolsGetCollection**](docs/EnvironmentAccessDevToolsAPI.md#apienvironmentaccessdevtoolsgetcollection) | **Get** /api/environment_access_dev_tools | Retrieves the collection of EnvironmentAccessDevTools resources. +*EnvironmentAccessDevToolsAPI* | [**ApiEnvironmentAccessDevToolsIdDelete**](docs/EnvironmentAccessDevToolsAPI.md#apienvironmentaccessdevtoolsiddelete) | **Delete** /api/environment_access_dev_tools/{id} | Removes the EnvironmentAccessDevTools resource. +*EnvironmentAccessDevToolsAPI* | [**ApiEnvironmentAccessDevToolsIdGet**](docs/EnvironmentAccessDevToolsAPI.md#apienvironmentaccessdevtoolsidget) | **Get** /api/environment_access_dev_tools/{id} | Retrieves a EnvironmentAccessDevTools resource. +*EnvironmentAccessDevToolsAPI* | [**ApiEnvironmentAccessDevToolsIdPatch**](docs/EnvironmentAccessDevToolsAPI.md#apienvironmentaccessdevtoolsidpatch) | **Patch** /api/environment_access_dev_tools/{id} | Updates the EnvironmentAccessDevTools resource. +*EnvironmentAccessDevToolsAPI* | [**ApiEnvironmentAccessDevToolsIdPut**](docs/EnvironmentAccessDevToolsAPI.md#apienvironmentaccessdevtoolsidput) | **Put** /api/environment_access_dev_tools/{id} | Replaces the EnvironmentAccessDevTools resource. +*EnvironmentAccessDevToolsAPI* | [**ApiEnvironmentAccessDevToolsPost**](docs/EnvironmentAccessDevToolsAPI.md#apienvironmentaccessdevtoolspost) | **Post** /api/environment_access_dev_tools | Creates a EnvironmentAccessDevTools resource. +*EnvironmentAccessFrontendAPI* | [**ApiEnvironmentAccessFrontendsGetCollection**](docs/EnvironmentAccessFrontendAPI.md#apienvironmentaccessfrontendsgetcollection) | **Get** /api/environment_access_frontends | Retrieves the collection of EnvironmentAccessFrontend resources. +*EnvironmentAccessFrontendAPI* | [**ApiEnvironmentAccessFrontendsIdDelete**](docs/EnvironmentAccessFrontendAPI.md#apienvironmentaccessfrontendsiddelete) | **Delete** /api/environment_access_frontends/{id} | Removes the EnvironmentAccessFrontend resource. +*EnvironmentAccessFrontendAPI* | [**ApiEnvironmentAccessFrontendsIdGet**](docs/EnvironmentAccessFrontendAPI.md#apienvironmentaccessfrontendsidget) | **Get** /api/environment_access_frontends/{id} | Retrieves a EnvironmentAccessFrontend resource. +*EnvironmentAccessFrontendAPI* | [**ApiEnvironmentAccessFrontendsIdPatch**](docs/EnvironmentAccessFrontendAPI.md#apienvironmentaccessfrontendsidpatch) | **Patch** /api/environment_access_frontends/{id} | Updates the EnvironmentAccessFrontend resource. +*EnvironmentAccessFrontendAPI* | [**ApiEnvironmentAccessFrontendsIdPut**](docs/EnvironmentAccessFrontendAPI.md#apienvironmentaccessfrontendsidput) | **Put** /api/environment_access_frontends/{id} | Replaces the EnvironmentAccessFrontend resource. +*EnvironmentAccessFrontendAPI* | [**ApiEnvironmentAccessFrontendsPost**](docs/EnvironmentAccessFrontendAPI.md#apienvironmentaccessfrontendspost) | **Post** /api/environment_access_frontends | Creates a EnvironmentAccessFrontend resource. +*EnvironmentAccessMailboxAPI* | [**ApiEnvironmentAccessMailboxesGetCollection**](docs/EnvironmentAccessMailboxAPI.md#apienvironmentaccessmailboxesgetcollection) | **Get** /api/environment_access_mailboxes | Retrieves the collection of EnvironmentAccessMailbox resources. +*EnvironmentAccessMailboxAPI* | [**ApiEnvironmentAccessMailboxesIdDelete**](docs/EnvironmentAccessMailboxAPI.md#apienvironmentaccessmailboxesiddelete) | **Delete** /api/environment_access_mailboxes/{id} | Removes the EnvironmentAccessMailbox resource. +*EnvironmentAccessMailboxAPI* | [**ApiEnvironmentAccessMailboxesIdGet**](docs/EnvironmentAccessMailboxAPI.md#apienvironmentaccessmailboxesidget) | **Get** /api/environment_access_mailboxes/{id} | Retrieves a EnvironmentAccessMailbox resource. +*EnvironmentAccessMailboxAPI* | [**ApiEnvironmentAccessMailboxesIdPatch**](docs/EnvironmentAccessMailboxAPI.md#apienvironmentaccessmailboxesidpatch) | **Patch** /api/environment_access_mailboxes/{id} | Updates the EnvironmentAccessMailbox resource. +*EnvironmentAccessMailboxAPI* | [**ApiEnvironmentAccessMailboxesIdPut**](docs/EnvironmentAccessMailboxAPI.md#apienvironmentaccessmailboxesidput) | **Put** /api/environment_access_mailboxes/{id} | Replaces the EnvironmentAccessMailbox resource. +*EnvironmentAccessMailboxAPI* | [**ApiEnvironmentAccessMailboxesPost**](docs/EnvironmentAccessMailboxAPI.md#apienvironmentaccessmailboxespost) | **Post** /api/environment_access_mailboxes | Creates a EnvironmentAccessMailbox resource. +*EnvironmentAccessRabbitAPI* | [**ApiEnvironmentAccessRabbitsGetCollection**](docs/EnvironmentAccessRabbitAPI.md#apienvironmentaccessrabbitsgetcollection) | **Get** /api/environment_access_rabbits | Retrieves the collection of EnvironmentAccessRabbit resources. +*EnvironmentAccessRabbitAPI* | [**ApiEnvironmentAccessRabbitsIdDelete**](docs/EnvironmentAccessRabbitAPI.md#apienvironmentaccessrabbitsiddelete) | **Delete** /api/environment_access_rabbits/{id} | Removes the EnvironmentAccessRabbit resource. +*EnvironmentAccessRabbitAPI* | [**ApiEnvironmentAccessRabbitsIdGet**](docs/EnvironmentAccessRabbitAPI.md#apienvironmentaccessrabbitsidget) | **Get** /api/environment_access_rabbits/{id} | Retrieves a EnvironmentAccessRabbit resource. +*EnvironmentAccessRabbitAPI* | [**ApiEnvironmentAccessRabbitsIdPatch**](docs/EnvironmentAccessRabbitAPI.md#apienvironmentaccessrabbitsidpatch) | **Patch** /api/environment_access_rabbits/{id} | Updates the EnvironmentAccessRabbit resource. +*EnvironmentAccessRabbitAPI* | [**ApiEnvironmentAccessRabbitsIdPut**](docs/EnvironmentAccessRabbitAPI.md#apienvironmentaccessrabbitsidput) | **Put** /api/environment_access_rabbits/{id} | Replaces the EnvironmentAccessRabbit resource. +*EnvironmentAccessRabbitAPI* | [**ApiEnvironmentAccessRabbitsPost**](docs/EnvironmentAccessRabbitAPI.md#apienvironmentaccessrabbitspost) | **Post** /api/environment_access_rabbits | Creates a EnvironmentAccessRabbit resource. +*EnvironmentAccessRedisAPI* | [**ApiEnvironmentAccessRedisGetCollection**](docs/EnvironmentAccessRedisAPI.md#apienvironmentaccessredisgetcollection) | **Get** /api/environment_access_redis | Retrieves the collection of EnvironmentAccessRedis resources. +*EnvironmentAccessRedisAPI* | [**ApiEnvironmentAccessRedisIdDelete**](docs/EnvironmentAccessRedisAPI.md#apienvironmentaccessredisiddelete) | **Delete** /api/environment_access_redis/{id} | Removes the EnvironmentAccessRedis resource. +*EnvironmentAccessRedisAPI* | [**ApiEnvironmentAccessRedisIdGet**](docs/EnvironmentAccessRedisAPI.md#apienvironmentaccessredisidget) | **Get** /api/environment_access_redis/{id} | Retrieves a EnvironmentAccessRedis resource. +*EnvironmentAccessRedisAPI* | [**ApiEnvironmentAccessRedisIdPatch**](docs/EnvironmentAccessRedisAPI.md#apienvironmentaccessredisidpatch) | **Patch** /api/environment_access_redis/{id} | Updates the EnvironmentAccessRedis resource. +*EnvironmentAccessRedisAPI* | [**ApiEnvironmentAccessRedisIdPut**](docs/EnvironmentAccessRedisAPI.md#apienvironmentaccessredisidput) | **Put** /api/environment_access_redis/{id} | Replaces the EnvironmentAccessRedis resource. +*EnvironmentAccessRedisAPI* | [**ApiEnvironmentAccessRedisPost**](docs/EnvironmentAccessRedisAPI.md#apienvironmentaccessredispost) | **Post** /api/environment_access_redis | Creates a EnvironmentAccessRedis resource. +*EnvironmentAccessWebshellAPI* | [**ApiEnvironmentAccessWebshellsGetCollection**](docs/EnvironmentAccessWebshellAPI.md#apienvironmentaccesswebshellsgetcollection) | **Get** /api/environment_access_webshells | Retrieves the collection of EnvironmentAccessWebshell resources. +*EnvironmentAccessWebshellAPI* | [**ApiEnvironmentAccessWebshellsIdDelete**](docs/EnvironmentAccessWebshellAPI.md#apienvironmentaccesswebshellsiddelete) | **Delete** /api/environment_access_webshells/{id} | Removes the EnvironmentAccessWebshell resource. +*EnvironmentAccessWebshellAPI* | [**ApiEnvironmentAccessWebshellsIdGet**](docs/EnvironmentAccessWebshellAPI.md#apienvironmentaccesswebshellsidget) | **Get** /api/environment_access_webshells/{id} | Retrieves a EnvironmentAccessWebshell resource. +*EnvironmentAccessWebshellAPI* | [**ApiEnvironmentAccessWebshellsIdPatch**](docs/EnvironmentAccessWebshellAPI.md#apienvironmentaccesswebshellsidpatch) | **Patch** /api/environment_access_webshells/{id} | Updates the EnvironmentAccessWebshell resource. +*EnvironmentAccessWebshellAPI* | [**ApiEnvironmentAccessWebshellsIdPut**](docs/EnvironmentAccessWebshellAPI.md#apienvironmentaccesswebshellsidput) | **Put** /api/environment_access_webshells/{id} | Replaces the EnvironmentAccessWebshell resource. +*EnvironmentAccessWebshellAPI* | [**ApiEnvironmentAccessWebshellsPost**](docs/EnvironmentAccessWebshellAPI.md#apienvironmentaccesswebshellspost) | **Post** /api/environment_access_webshells | Creates a EnvironmentAccessWebshell resource. +*EnvironmentComponentAPI* | [**ApiEnvironmentComponentsGetCollection**](docs/EnvironmentComponentAPI.md#apienvironmentcomponentsgetcollection) | **Get** /api/environment_components | Retrieves the collection of EnvironmentComponent resources. +*EnvironmentComponentAPI* | [**ApiEnvironmentComponentsIdDelete**](docs/EnvironmentComponentAPI.md#apienvironmentcomponentsiddelete) | **Delete** /api/environment_components/{id} | Removes the EnvironmentComponent resource. +*EnvironmentComponentAPI* | [**ApiEnvironmentComponentsIdGet**](docs/EnvironmentComponentAPI.md#apienvironmentcomponentsidget) | **Get** /api/environment_components/{id} | Retrieves a EnvironmentComponent resource. +*EnvironmentComponentAPI* | [**ApiEnvironmentComponentsIdPatch**](docs/EnvironmentComponentAPI.md#apienvironmentcomponentsidpatch) | **Patch** /api/environment_components/{id} | Updates the EnvironmentComponent resource. +*EnvironmentComponentAPI* | [**ApiEnvironmentComponentsIdPut**](docs/EnvironmentComponentAPI.md#apienvironmentcomponentsidput) | **Put** /api/environment_components/{id} | Replaces the EnvironmentComponent resource. +*EnvironmentComponentAPI* | [**ApiEnvironmentComponentsPost**](docs/EnvironmentComponentAPI.md#apienvironmentcomponentspost) | **Post** /api/environment_components | Creates a EnvironmentComponent resource. +*EnvironmentCustomDomainAPI* | [**ApiEnvironmentCustomDomainsGetCollection**](docs/EnvironmentCustomDomainAPI.md#apienvironmentcustomdomainsgetcollection) | **Get** /api/environment_custom_domains | Retrieves the collection of EnvironmentCustomDomain resources. +*EnvironmentCustomDomainAPI* | [**ApiEnvironmentCustomDomainsIdDelete**](docs/EnvironmentCustomDomainAPI.md#apienvironmentcustomdomainsiddelete) | **Delete** /api/environment_custom_domains/{id} | Removes the EnvironmentCustomDomain resource. +*EnvironmentCustomDomainAPI* | [**ApiEnvironmentCustomDomainsIdGet**](docs/EnvironmentCustomDomainAPI.md#apienvironmentcustomdomainsidget) | **Get** /api/environment_custom_domains/{id} | Retrieves a EnvironmentCustomDomain resource. +*EnvironmentCustomDomainAPI* | [**ApiEnvironmentCustomDomainsIdPatch**](docs/EnvironmentCustomDomainAPI.md#apienvironmentcustomdomainsidpatch) | **Patch** /api/environment_custom_domains/{id} | Updates the EnvironmentCustomDomain resource. +*EnvironmentCustomDomainAPI* | [**ApiEnvironmentCustomDomainsIdPut**](docs/EnvironmentCustomDomainAPI.md#apienvironmentcustomdomainsidput) | **Put** /api/environment_custom_domains/{id} | Replaces the EnvironmentCustomDomain resource. +*EnvironmentCustomDomainAPI* | [**ApiEnvironmentCustomDomainsPost**](docs/EnvironmentCustomDomainAPI.md#apienvironmentcustomdomainspost) | **Post** /api/environment_custom_domains | Creates a EnvironmentCustomDomain resource. +*EnvironmentEnvVarAPI* | [**ApiEnvironmentEnvVarsGetCollection**](docs/EnvironmentEnvVarAPI.md#apienvironmentenvvarsgetcollection) | **Get** /api/environment_env_vars | Retrieves the collection of EnvironmentEnvVar resources. +*EnvironmentEnvVarAPI* | [**ApiEnvironmentEnvVarsIdDelete**](docs/EnvironmentEnvVarAPI.md#apienvironmentenvvarsiddelete) | **Delete** /api/environment_env_vars/{id} | Removes the EnvironmentEnvVar resource. +*EnvironmentEnvVarAPI* | [**ApiEnvironmentEnvVarsIdGet**](docs/EnvironmentEnvVarAPI.md#apienvironmentenvvarsidget) | **Get** /api/environment_env_vars/{id} | Retrieves a EnvironmentEnvVar resource. +*EnvironmentEnvVarAPI* | [**ApiEnvironmentEnvVarsIdPatch**](docs/EnvironmentEnvVarAPI.md#apienvironmentenvvarsidpatch) | **Patch** /api/environment_env_vars/{id} | Updates the EnvironmentEnvVar resource. +*EnvironmentEnvVarAPI* | [**ApiEnvironmentEnvVarsIdPut**](docs/EnvironmentEnvVarAPI.md#apienvironmentenvvarsidput) | **Put** /api/environment_env_vars/{id} | Replaces the EnvironmentEnvVar resource. +*EnvironmentEnvVarAPI* | [**ApiEnvironmentEnvVarsPost**](docs/EnvironmentEnvVarAPI.md#apienvironmentenvvarspost) | **Post** /api/environment_env_vars | Creates a EnvironmentEnvVar resource. +*EnvironmentMagentoHostMappingAPI* | [**ApiEnvironmentMagentoHostMappingsGetCollection**](docs/EnvironmentMagentoHostMappingAPI.md#apienvironmentmagentohostmappingsgetcollection) | **Get** /api/environment_magento_host_mappings | Retrieves the collection of EnvironmentMagentoHostMapping resources. +*EnvironmentMagentoHostMappingAPI* | [**ApiEnvironmentMagentoHostMappingsIdDelete**](docs/EnvironmentMagentoHostMappingAPI.md#apienvironmentmagentohostmappingsiddelete) | **Delete** /api/environment_magento_host_mappings/{id} | Removes the EnvironmentMagentoHostMapping resource. +*EnvironmentMagentoHostMappingAPI* | [**ApiEnvironmentMagentoHostMappingsIdGet**](docs/EnvironmentMagentoHostMappingAPI.md#apienvironmentmagentohostmappingsidget) | **Get** /api/environment_magento_host_mappings/{id} | Retrieves a EnvironmentMagentoHostMapping resource. +*EnvironmentMagentoHostMappingAPI* | [**ApiEnvironmentMagentoHostMappingsIdPatch**](docs/EnvironmentMagentoHostMappingAPI.md#apienvironmentmagentohostmappingsidpatch) | **Patch** /api/environment_magento_host_mappings/{id} | Updates the EnvironmentMagentoHostMapping resource. +*EnvironmentMagentoHostMappingAPI* | [**ApiEnvironmentMagentoHostMappingsIdPut**](docs/EnvironmentMagentoHostMappingAPI.md#apienvironmentmagentohostmappingsidput) | **Put** /api/environment_magento_host_mappings/{id} | Replaces the EnvironmentMagentoHostMapping resource. +*EnvironmentMagentoHostMappingAPI* | [**ApiEnvironmentMagentoHostMappingsPost**](docs/EnvironmentMagentoHostMappingAPI.md#apienvironmentmagentohostmappingspost) | **Post** /api/environment_magento_host_mappings | Creates a EnvironmentMagentoHostMapping resource. +*EnvironmentMessageHistoryAPI* | [**ApiEnvironmentMessageHistoriesGetCollection**](docs/EnvironmentMessageHistoryAPI.md#apienvironmentmessagehistoriesgetcollection) | **Get** /api/environment_message_histories | Retrieves the collection of EnvironmentMessageHistory resources. +*EnvironmentMessageHistoryAPI* | [**ApiEnvironmentMessageHistoriesIdGet**](docs/EnvironmentMessageHistoryAPI.md#apienvironmentmessagehistoriesidget) | **Get** /api/environment_message_histories/{id} | Retrieves a EnvironmentMessageHistory resource. +*ExportedDataAPI* | [**ApiExportedDatasGetCollection**](docs/ExportedDataAPI.md#apiexporteddatasgetcollection) | **Get** /api/exported_datas | Retrieves the collection of ExportedData resources. +*ExportedDataAPI* | [**ApiExportedDatasIdDelete**](docs/ExportedDataAPI.md#apiexporteddatasiddelete) | **Delete** /api/exported_datas/{id} | Removes the ExportedData resource. +*ExportedDataAPI* | [**ApiExportedDatasIdGet**](docs/ExportedDataAPI.md#apiexporteddatasidget) | **Get** /api/exported_datas/{id} | Retrieves a ExportedData resource. +*ExportedDataAPI* | [**ApiExportedDatasIdPatch**](docs/ExportedDataAPI.md#apiexporteddatasidpatch) | **Patch** /api/exported_datas/{id} | Updates the ExportedData resource. +*ExportedDataAPI* | [**ApiExportedDatasIdPut**](docs/ExportedDataAPI.md#apiexporteddatasidput) | **Put** /api/exported_datas/{id} | Replaces the ExportedData resource. +*ExportedDataAPI* | [**ApiExportedDatasPost**](docs/ExportedDataAPI.md#apiexporteddataspost) | **Post** /api/exported_datas | Creates a ExportedData resource. +*GitAPI* | [**ApiGitsGetCollection**](docs/GitAPI.md#apigitsgetcollection) | **Get** /api/gits | Retrieves the collection of Git resources. +*GitAPI* | [**ApiGitsIdConnectTestGet**](docs/GitAPI.md#apigitsidconnecttestget) | **Get** /api/gits/{id}/connect-test | Get information about the repository connection +*GitAPI* | [**ApiGitsIdDelete**](docs/GitAPI.md#apigitsiddelete) | **Delete** /api/gits/{id} | Removes the Git resource. +*GitAPI* | [**ApiGitsIdGet**](docs/GitAPI.md#apigitsidget) | **Get** /api/gits/{id} | Retrieves a Git resource. +*GitAPI* | [**ApiGitsIdPatch**](docs/GitAPI.md#apigitsidpatch) | **Patch** /api/gits/{id} | Updates the Git resource. +*GitAPI* | [**ApiGitsIdPut**](docs/GitAPI.md#apigitsidput) | **Put** /api/gits/{id} | Replaces the Git resource. +*GitAPI* | [**ApiGitsPost**](docs/GitAPI.md#apigitspost) | **Post** /api/gits | Creates a Git resource. +*GitTypeAPI* | [**ApiGitTypesGetCollection**](docs/GitTypeAPI.md#apigittypesgetcollection) | **Get** /api/git_types | Retrieves the collection of GitType resources. +*GitTypeAPI* | [**ApiGitTypesIdDelete**](docs/GitTypeAPI.md#apigittypesiddelete) | **Delete** /api/git_types/{id} | Removes the GitType resource. +*GitTypeAPI* | [**ApiGitTypesIdGet**](docs/GitTypeAPI.md#apigittypesidget) | **Get** /api/git_types/{id} | Retrieves a GitType resource. +*GitTypeAPI* | [**ApiGitTypesIdPatch**](docs/GitTypeAPI.md#apigittypesidpatch) | **Patch** /api/git_types/{id} | Updates the GitType resource. +*GitTypeAPI* | [**ApiGitTypesIdPut**](docs/GitTypeAPI.md#apigittypesidput) | **Put** /api/git_types/{id} | Replaces the GitType resource. +*GitTypeAPI* | [**ApiGitTypesPost**](docs/GitTypeAPI.md#apigittypespost) | **Post** /api/git_types | Creates a GitType resource. +*ImportedDataAPI* | [**ApiImportedDatasGetCollection**](docs/ImportedDataAPI.md#apiimporteddatasgetcollection) | **Get** /api/imported_datas | Retrieves the collection of ImportedData resources. +*ImportedDataAPI* | [**ApiImportedDatasIdDelete**](docs/ImportedDataAPI.md#apiimporteddatasiddelete) | **Delete** /api/imported_datas/{id} | Removes the ImportedData resource. +*ImportedDataAPI* | [**ApiImportedDatasIdGet**](docs/ImportedDataAPI.md#apiimporteddatasidget) | **Get** /api/imported_datas/{id} | Retrieves a ImportedData resource. +*ImportedDataAPI* | [**ApiImportedDatasIdPatch**](docs/ImportedDataAPI.md#apiimporteddatasidpatch) | **Patch** /api/imported_datas/{id} | Updates the ImportedData resource. +*ImportedDataAPI* | [**ApiImportedDatasIdPut**](docs/ImportedDataAPI.md#apiimporteddatasidput) | **Put** /api/imported_datas/{id} | Replaces the ImportedData resource. +*ImportedDataAPI* | [**ApiImportedDatasPost**](docs/ImportedDataAPI.md#apiimporteddataspost) | **Post** /api/imported_datas | Creates a ImportedData resource. +*InvitationAPI* | [**ApiInvitationsGetCollection**](docs/InvitationAPI.md#apiinvitationsgetcollection) | **Get** /api/invitations | Retrieves the collection of Invitation resources. +*InvitationAPI* | [**ApiInvitationsIdDelete**](docs/InvitationAPI.md#apiinvitationsiddelete) | **Delete** /api/invitations/{id} | Removes the Invitation resource. +*InvitationAPI* | [**ApiInvitationsIdGet**](docs/InvitationAPI.md#apiinvitationsidget) | **Get** /api/invitations/{id} | Retrieves a Invitation resource. +*InvitationAPI* | [**ApiInvitationsIdPatch**](docs/InvitationAPI.md#apiinvitationsidpatch) | **Patch** /api/invitations/{id} | Updates the Invitation resource. +*InvitationAPI* | [**ApiInvitationsIdPut**](docs/InvitationAPI.md#apiinvitationsidput) | **Put** /api/invitations/{id} | Replaces the Invitation resource. +*InvitationAPI* | [**ApiInvitationsPost**](docs/InvitationAPI.md#apiinvitationspost) | **Post** /api/invitations | Creates a Invitation resource. +*MiscellaneousAPI* | [**PostCredentialsItem**](docs/MiscellaneousAPI.md#postcredentialsitem) | **Post** /api/authentication_token | Get JWT token to login. +*MiscellaneousAPI* | [**PostValidateEnvVar**](docs/MiscellaneousAPI.md#postvalidateenvvar) | **Post** /api/env_var_validation | It checks the validation of an environment variable definition +*OrganisationAPI* | [**ApiOrganisationsGetCollection**](docs/OrganisationAPI.md#apiorganisationsgetcollection) | **Get** /api/organisations | Retrieves the collection of Organisation resources. +*OrganisationAPI* | [**ApiOrganisationsIdDelete**](docs/OrganisationAPI.md#apiorganisationsiddelete) | **Delete** /api/organisations/{id} | Removes the Organisation resource. +*OrganisationAPI* | [**ApiOrganisationsIdGet**](docs/OrganisationAPI.md#apiorganisationsidget) | **Get** /api/organisations/{id} | Retrieves a Organisation resource. +*OrganisationAPI* | [**ApiOrganisationsIdPatch**](docs/OrganisationAPI.md#apiorganisationsidpatch) | **Patch** /api/organisations/{id} | Updates the Organisation resource. +*OrganisationAPI* | [**ApiOrganisationsIdPut**](docs/OrganisationAPI.md#apiorganisationsidput) | **Put** /api/organisations/{id} | Replaces the Organisation resource. +*OrganisationAPI* | [**ApiOrganisationsPost**](docs/OrganisationAPI.md#apiorganisationspost) | **Post** /api/organisations | Creates a Organisation resource. +*OrganisationEnvVarAPI* | [**ApiOrganisationEnvVarsGetCollection**](docs/OrganisationEnvVarAPI.md#apiorganisationenvvarsgetcollection) | **Get** /api/organisation_env_vars | Retrieves the collection of OrganisationEnvVar resources. +*OrganisationEnvVarAPI* | [**ApiOrganisationEnvVarsIdDelete**](docs/OrganisationEnvVarAPI.md#apiorganisationenvvarsiddelete) | **Delete** /api/organisation_env_vars/{id} | Removes the OrganisationEnvVar resource. +*OrganisationEnvVarAPI* | [**ApiOrganisationEnvVarsIdGet**](docs/OrganisationEnvVarAPI.md#apiorganisationenvvarsidget) | **Get** /api/organisation_env_vars/{id} | Retrieves a OrganisationEnvVar resource. +*OrganisationEnvVarAPI* | [**ApiOrganisationEnvVarsIdPatch**](docs/OrganisationEnvVarAPI.md#apiorganisationenvvarsidpatch) | **Patch** /api/organisation_env_vars/{id} | Updates the OrganisationEnvVar resource. +*OrganisationEnvVarAPI* | [**ApiOrganisationEnvVarsIdPut**](docs/OrganisationEnvVarAPI.md#apiorganisationenvvarsidput) | **Put** /api/organisation_env_vars/{id} | Replaces the OrganisationEnvVar resource. +*OrganisationEnvVarAPI* | [**ApiOrganisationEnvVarsPost**](docs/OrganisationEnvVarAPI.md#apiorganisationenvvarspost) | **Post** /api/organisation_env_vars | Creates a OrganisationEnvVar resource. +*PriceAPI* | [**ApiPricesGetCollection**](docs/PriceAPI.md#apipricesgetcollection) | **Get** /api/prices | Retrieves the collection of Price resources. +*PriceAPI* | [**ApiPricesIdDelete**](docs/PriceAPI.md#apipricesiddelete) | **Delete** /api/prices/{id} | Removes the Price resource. +*PriceAPI* | [**ApiPricesIdGet**](docs/PriceAPI.md#apipricesidget) | **Get** /api/prices/{id} | Retrieves a Price resource. +*PriceAPI* | [**ApiPricesIdPatch**](docs/PriceAPI.md#apipricesidpatch) | **Patch** /api/prices/{id} | Updates the Price resource. +*PriceAPI* | [**ApiPricesIdPut**](docs/PriceAPI.md#apipricesidput) | **Put** /api/prices/{id} | Replaces the Price resource. +*PriceAPI* | [**ApiPricesPost**](docs/PriceAPI.md#apipricespost) | **Post** /api/prices | Creates a Price resource. +*ProductAPI* | [**ApiProductsGetCollection**](docs/ProductAPI.md#apiproductsgetcollection) | **Get** /api/products | Retrieves the collection of Product resources. +*ProductAPI* | [**ApiProductsIdDelete**](docs/ProductAPI.md#apiproductsiddelete) | **Delete** /api/products/{id} | Removes the Product resource. +*ProductAPI* | [**ApiProductsIdGet**](docs/ProductAPI.md#apiproductsidget) | **Get** /api/products/{id} | Retrieves a Product resource. +*ProductAPI* | [**ApiProductsIdPatch**](docs/ProductAPI.md#apiproductsidpatch) | **Patch** /api/products/{id} | Updates the Product resource. +*ProductAPI* | [**ApiProductsIdPut**](docs/ProductAPI.md#apiproductsidput) | **Put** /api/products/{id} | Replaces the Product resource. +*ProductAPI* | [**ApiProductsPost**](docs/ProductAPI.md#apiproductspost) | **Post** /api/products | Creates a Product resource. +*ProjectAPI* | [**ApiProjectsGetCollection**](docs/ProjectAPI.md#apiprojectsgetcollection) | **Get** /api/projects | Retrieves the collection of Project resources. +*ProjectAPI* | [**ApiProjectsIdDelete**](docs/ProjectAPI.md#apiprojectsiddelete) | **Delete** /api/projects/{id} | Removes the Project resource. +*ProjectAPI* | [**ApiProjectsIdGet**](docs/ProjectAPI.md#apiprojectsidget) | **Get** /api/projects/{id} | Retrieves a Project resource. +*ProjectAPI* | [**ApiProjectsIdPatch**](docs/ProjectAPI.md#apiprojectsidpatch) | **Patch** /api/projects/{id} | Updates the Project resource. +*ProjectAPI* | [**ApiProjectsIdPut**](docs/ProjectAPI.md#apiprojectsidput) | **Put** /api/projects/{id} | Replaces the Project resource. +*ProjectAPI* | [**ApiProjectsIdcostsGet**](docs/ProjectAPI.md#apiprojectsidcostsget) | **Get** /api/projects/{id}/costs | Retrieves a Project resource. +*ProjectAPI* | [**ApiProjectsPost**](docs/ProjectAPI.md#apiprojectspost) | **Post** /api/projects | Creates a Project resource. +*ProjectAccessAPI* | [**ApiProjectAccessesGetCollection**](docs/ProjectAccessAPI.md#apiprojectaccessesgetcollection) | **Get** /api/project_accesses | Retrieves the collection of ProjectAccess resources. +*ProjectAccessAPI* | [**ApiProjectAccessesIdDelete**](docs/ProjectAccessAPI.md#apiprojectaccessesiddelete) | **Delete** /api/project_accesses/{id} | Removes the ProjectAccess resource. +*ProjectAccessAPI* | [**ApiProjectAccessesIdGet**](docs/ProjectAccessAPI.md#apiprojectaccessesidget) | **Get** /api/project_accesses/{id} | Retrieves a ProjectAccess resource. +*ProjectAccessAPI* | [**ApiProjectAccessesIdPatch**](docs/ProjectAccessAPI.md#apiprojectaccessesidpatch) | **Patch** /api/project_accesses/{id} | Updates the ProjectAccess resource. +*ProjectAccessAPI* | [**ApiProjectAccessesIdPut**](docs/ProjectAccessAPI.md#apiprojectaccessesidput) | **Put** /api/project_accesses/{id} | Replaces the ProjectAccess resource. +*ProjectAccessAPI* | [**ApiProjectAccessesPost**](docs/ProjectAccessAPI.md#apiprojectaccessespost) | **Post** /api/project_accesses | Creates a ProjectAccess resource. +*ProjectAccessGitAPI* | [**ApiProjectAccessGitsGetCollection**](docs/ProjectAccessGitAPI.md#apiprojectaccessgitsgetcollection) | **Get** /api/project_access_gits | Retrieves the collection of ProjectAccessGit resources. +*ProjectAccessGitAPI* | [**ApiProjectAccessGitsIdDelete**](docs/ProjectAccessGitAPI.md#apiprojectaccessgitsiddelete) | **Delete** /api/project_access_gits/{id} | Removes the ProjectAccessGit resource. +*ProjectAccessGitAPI* | [**ApiProjectAccessGitsIdGet**](docs/ProjectAccessGitAPI.md#apiprojectaccessgitsidget) | **Get** /api/project_access_gits/{id} | Retrieves a ProjectAccessGit resource. +*ProjectAccessGitAPI* | [**ApiProjectAccessGitsIdPatch**](docs/ProjectAccessGitAPI.md#apiprojectaccessgitsidpatch) | **Patch** /api/project_access_gits/{id} | Updates the ProjectAccessGit resource. +*ProjectAccessGitAPI* | [**ApiProjectAccessGitsIdPut**](docs/ProjectAccessGitAPI.md#apiprojectaccessgitsidput) | **Put** /api/project_access_gits/{id} | Replaces the ProjectAccessGit resource. +*ProjectAccessGitAPI* | [**ApiProjectAccessGitsPost**](docs/ProjectAccessGitAPI.md#apiprojectaccessgitspost) | **Post** /api/project_access_gits | Creates a ProjectAccessGit resource. +*ProjectAccessRegistryAPI* | [**ApiProjectAccessRegistriesGetCollection**](docs/ProjectAccessRegistryAPI.md#apiprojectaccessregistriesgetcollection) | **Get** /api/project_access_registries | Retrieves the collection of ProjectAccessRegistry resources. +*ProjectAccessRegistryAPI* | [**ApiProjectAccessRegistriesIdDelete**](docs/ProjectAccessRegistryAPI.md#apiprojectaccessregistriesiddelete) | **Delete** /api/project_access_registries/{id} | Removes the ProjectAccessRegistry resource. +*ProjectAccessRegistryAPI* | [**ApiProjectAccessRegistriesIdGet**](docs/ProjectAccessRegistryAPI.md#apiprojectaccessregistriesidget) | **Get** /api/project_access_registries/{id} | Retrieves a ProjectAccessRegistry resource. +*ProjectAccessRegistryAPI* | [**ApiProjectAccessRegistriesIdPatch**](docs/ProjectAccessRegistryAPI.md#apiprojectaccessregistriesidpatch) | **Patch** /api/project_access_registries/{id} | Updates the ProjectAccessRegistry resource. +*ProjectAccessRegistryAPI* | [**ApiProjectAccessRegistriesIdPut**](docs/ProjectAccessRegistryAPI.md#apiprojectaccessregistriesidput) | **Put** /api/project_access_registries/{id} | Replaces the ProjectAccessRegistry resource. +*ProjectAccessRegistryAPI* | [**ApiProjectAccessRegistriesPost**](docs/ProjectAccessRegistryAPI.md#apiprojectaccessregistriespost) | **Post** /api/project_access_registries | Creates a ProjectAccessRegistry resource. +*ProjectAccessServiceAccountAPI* | [**ApiProjectAccessServiceAccountsGetCollection**](docs/ProjectAccessServiceAccountAPI.md#apiprojectaccessserviceaccountsgetcollection) | **Get** /api/project_access_service_accounts | Retrieves the collection of ProjectAccessServiceAccount resources. +*ProjectAccessServiceAccountAPI* | [**ApiProjectAccessServiceAccountsIdDelete**](docs/ProjectAccessServiceAccountAPI.md#apiprojectaccessserviceaccountsiddelete) | **Delete** /api/project_access_service_accounts/{id} | Removes the ProjectAccessServiceAccount resource. +*ProjectAccessServiceAccountAPI* | [**ApiProjectAccessServiceAccountsIdGet**](docs/ProjectAccessServiceAccountAPI.md#apiprojectaccessserviceaccountsidget) | **Get** /api/project_access_service_accounts/{id} | Retrieves a ProjectAccessServiceAccount resource. +*ProjectAccessServiceAccountAPI* | [**ApiProjectAccessServiceAccountsIdPatch**](docs/ProjectAccessServiceAccountAPI.md#apiprojectaccessserviceaccountsidpatch) | **Patch** /api/project_access_service_accounts/{id} | Updates the ProjectAccessServiceAccount resource. +*ProjectAccessServiceAccountAPI* | [**ApiProjectAccessServiceAccountsIdPut**](docs/ProjectAccessServiceAccountAPI.md#apiprojectaccessserviceaccountsidput) | **Put** /api/project_access_service_accounts/{id} | Replaces the ProjectAccessServiceAccount resource. +*ProjectAccessServiceAccountAPI* | [**ApiProjectAccessServiceAccountsPost**](docs/ProjectAccessServiceAccountAPI.md#apiprojectaccessserviceaccountspost) | **Post** /api/project_access_service_accounts | Creates a ProjectAccessServiceAccount resource. +*ProjectEnvVarAPI* | [**ApiProjectEnvVarsGetCollection**](docs/ProjectEnvVarAPI.md#apiprojectenvvarsgetcollection) | **Get** /api/project_env_vars | Retrieves the collection of ProjectEnvVar resources. +*ProjectEnvVarAPI* | [**ApiProjectEnvVarsIdDelete**](docs/ProjectEnvVarAPI.md#apiprojectenvvarsiddelete) | **Delete** /api/project_env_vars/{id} | Removes the ProjectEnvVar resource. +*ProjectEnvVarAPI* | [**ApiProjectEnvVarsIdGet**](docs/ProjectEnvVarAPI.md#apiprojectenvvarsidget) | **Get** /api/project_env_vars/{id} | Retrieves a ProjectEnvVar resource. +*ProjectEnvVarAPI* | [**ApiProjectEnvVarsIdPatch**](docs/ProjectEnvVarAPI.md#apiprojectenvvarsidpatch) | **Patch** /api/project_env_vars/{id} | Updates the ProjectEnvVar resource. +*ProjectEnvVarAPI* | [**ApiProjectEnvVarsIdPut**](docs/ProjectEnvVarAPI.md#apiprojectenvvarsidput) | **Put** /api/project_env_vars/{id} | Replaces the ProjectEnvVar resource. +*ProjectEnvVarAPI* | [**ApiProjectEnvVarsPost**](docs/ProjectEnvVarAPI.md#apiprojectenvvarspost) | **Post** /api/project_env_vars | Creates a ProjectEnvVar resource. +*ProjectTypeAPI* | [**ApiProjectTypesGetCollection**](docs/ProjectTypeAPI.md#apiprojecttypesgetcollection) | **Get** /api/project_types | Retrieves the collection of ProjectType resources. +*ProjectTypeAPI* | [**ApiProjectTypesIdDelete**](docs/ProjectTypeAPI.md#apiprojecttypesiddelete) | **Delete** /api/project_types/{id} | Removes the ProjectType resource. +*ProjectTypeAPI* | [**ApiProjectTypesIdGet**](docs/ProjectTypeAPI.md#apiprojecttypesidget) | **Get** /api/project_types/{id} | Retrieves a ProjectType resource. +*ProjectTypeAPI* | [**ApiProjectTypesIdPatch**](docs/ProjectTypeAPI.md#apiprojecttypesidpatch) | **Patch** /api/project_types/{id} | Updates the ProjectType resource. +*ProjectTypeAPI* | [**ApiProjectTypesIdPut**](docs/ProjectTypeAPI.md#apiprojecttypesidput) | **Put** /api/project_types/{id} | Replaces the ProjectType resource. +*ProjectTypeAPI* | [**ApiProjectTypesPost**](docs/ProjectTypeAPI.md#apiprojecttypespost) | **Post** /api/project_types | Creates a ProjectType resource. +*ProjectTypeVersionAPI* | [**ApiProjectTypeVersionsGetCollection**](docs/ProjectTypeVersionAPI.md#apiprojecttypeversionsgetcollection) | **Get** /api/project_type_versions | Retrieves the collection of ProjectTypeVersion resources. +*ProjectTypeVersionAPI* | [**ApiProjectTypeVersionsIdDelete**](docs/ProjectTypeVersionAPI.md#apiprojecttypeversionsiddelete) | **Delete** /api/project_type_versions/{id} | Removes the ProjectTypeVersion resource. +*ProjectTypeVersionAPI* | [**ApiProjectTypeVersionsIdGet**](docs/ProjectTypeVersionAPI.md#apiprojecttypeversionsidget) | **Get** /api/project_type_versions/{id} | Retrieves a ProjectTypeVersion resource. +*ProjectTypeVersionAPI* | [**ApiProjectTypeVersionsIdPatch**](docs/ProjectTypeVersionAPI.md#apiprojecttypeversionsidpatch) | **Patch** /api/project_type_versions/{id} | Updates the ProjectTypeVersion resource. +*ProjectTypeVersionAPI* | [**ApiProjectTypeVersionsIdPut**](docs/ProjectTypeVersionAPI.md#apiprojecttypeversionsidput) | **Put** /api/project_type_versions/{id} | Replaces the ProjectTypeVersion resource. +*ProjectTypeVersionAPI* | [**ApiProjectTypeVersionsPost**](docs/ProjectTypeVersionAPI.md#apiprojecttypeversionspost) | **Post** /api/project_type_versions | Creates a ProjectTypeVersion resource. +*ProjectTypeVersionEnvVarAPI* | [**ApiProjectTypeVersionEnvVarsGetCollection**](docs/ProjectTypeVersionEnvVarAPI.md#apiprojecttypeversionenvvarsgetcollection) | **Get** /api/project_type_version_env_vars | Retrieves the collection of ProjectTypeVersionEnvVar resources. +*ProjectTypeVersionEnvVarAPI* | [**ApiProjectTypeVersionEnvVarsIdDelete**](docs/ProjectTypeVersionEnvVarAPI.md#apiprojecttypeversionenvvarsiddelete) | **Delete** /api/project_type_version_env_vars/{id} | Removes the ProjectTypeVersionEnvVar resource. +*ProjectTypeVersionEnvVarAPI* | [**ApiProjectTypeVersionEnvVarsIdGet**](docs/ProjectTypeVersionEnvVarAPI.md#apiprojecttypeversionenvvarsidget) | **Get** /api/project_type_version_env_vars/{id} | Retrieves a ProjectTypeVersionEnvVar resource. +*ProjectTypeVersionEnvVarAPI* | [**ApiProjectTypeVersionEnvVarsIdPatch**](docs/ProjectTypeVersionEnvVarAPI.md#apiprojecttypeversionenvvarsidpatch) | **Patch** /api/project_type_version_env_vars/{id} | Updates the ProjectTypeVersionEnvVar resource. +*ProjectTypeVersionEnvVarAPI* | [**ApiProjectTypeVersionEnvVarsIdPut**](docs/ProjectTypeVersionEnvVarAPI.md#apiprojecttypeversionenvvarsidput) | **Put** /api/project_type_version_env_vars/{id} | Replaces the ProjectTypeVersionEnvVar resource. +*ProjectTypeVersionEnvVarAPI* | [**ApiProjectTypeVersionEnvVarsPost**](docs/ProjectTypeVersionEnvVarAPI.md#apiprojecttypeversionenvvarspost) | **Post** /api/project_type_version_env_vars | Creates a ProjectTypeVersionEnvVar resource. +*ProjectTypeVersionEnvVarExampleAPI* | [**ApiProjectTypeVersionEnvVarExamplesGetCollection**](docs/ProjectTypeVersionEnvVarExampleAPI.md#apiprojecttypeversionenvvarexamplesgetcollection) | **Get** /api/project_type_version_env_var_examples | Retrieves the collection of ProjectTypeVersionEnvVarExample resources. +*ProjectTypeVersionEnvVarExampleAPI* | [**ApiProjectTypeVersionEnvVarExamplesIdDelete**](docs/ProjectTypeVersionEnvVarExampleAPI.md#apiprojecttypeversionenvvarexamplesiddelete) | **Delete** /api/project_type_version_env_var_examples/{id} | Removes the ProjectTypeVersionEnvVarExample resource. +*ProjectTypeVersionEnvVarExampleAPI* | [**ApiProjectTypeVersionEnvVarExamplesIdGet**](docs/ProjectTypeVersionEnvVarExampleAPI.md#apiprojecttypeversionenvvarexamplesidget) | **Get** /api/project_type_version_env_var_examples/{id} | Retrieves a ProjectTypeVersionEnvVarExample resource. +*ProjectTypeVersionEnvVarExampleAPI* | [**ApiProjectTypeVersionEnvVarExamplesIdPatch**](docs/ProjectTypeVersionEnvVarExampleAPI.md#apiprojecttypeversionenvvarexamplesidpatch) | **Patch** /api/project_type_version_env_var_examples/{id} | Updates the ProjectTypeVersionEnvVarExample resource. +*ProjectTypeVersionEnvVarExampleAPI* | [**ApiProjectTypeVersionEnvVarExamplesIdPut**](docs/ProjectTypeVersionEnvVarExampleAPI.md#apiprojecttypeversionenvvarexamplesidput) | **Put** /api/project_type_version_env_var_examples/{id} | Replaces the ProjectTypeVersionEnvVarExample resource. +*ProjectTypeVersionEnvVarExampleAPI* | [**ApiProjectTypeVersionEnvVarExamplesPost**](docs/ProjectTypeVersionEnvVarExampleAPI.md#apiprojecttypeversionenvvarexamplespost) | **Post** /api/project_type_version_env_var_examples | Creates a ProjectTypeVersionEnvVarExample resource. +*ProviderAPI* | [**ApiProvidersGetCollection**](docs/ProviderAPI.md#apiprovidersgetcollection) | **Get** /api/providers | Retrieves the collection of Provider resources. +*ProviderAPI* | [**ApiProvidersIdDelete**](docs/ProviderAPI.md#apiprovidersiddelete) | **Delete** /api/providers/{id} | Removes the Provider resource. +*ProviderAPI* | [**ApiProvidersIdGet**](docs/ProviderAPI.md#apiprovidersidget) | **Get** /api/providers/{id} | Retrieves a Provider resource. +*ProviderAPI* | [**ApiProvidersIdPatch**](docs/ProviderAPI.md#apiprovidersidpatch) | **Patch** /api/providers/{id} | Updates the Provider resource. +*ProviderAPI* | [**ApiProvidersIdPut**](docs/ProviderAPI.md#apiprovidersidput) | **Put** /api/providers/{id} | Replaces the Provider resource. +*ProviderAPI* | [**ApiProvidersPost**](docs/ProviderAPI.md#apiproviderspost) | **Post** /api/providers | Creates a Provider resource. +*ResourceTypeAPI* | [**ApiResourceTypesGetCollection**](docs/ResourceTypeAPI.md#apiresourcetypesgetcollection) | **Get** /api/resource_types | Retrieves the collection of ResourceType resources. +*ResourceTypeAPI* | [**ApiResourceTypesIdDelete**](docs/ResourceTypeAPI.md#apiresourcetypesiddelete) | **Delete** /api/resource_types/{id} | Removes the ResourceType resource. +*ResourceTypeAPI* | [**ApiResourceTypesIdGet**](docs/ResourceTypeAPI.md#apiresourcetypesidget) | **Get** /api/resource_types/{id} | Retrieves a ResourceType resource. +*ResourceTypeAPI* | [**ApiResourceTypesIdPatch**](docs/ResourceTypeAPI.md#apiresourcetypesidpatch) | **Patch** /api/resource_types/{id} | Updates the ResourceType resource. +*ResourceTypeAPI* | [**ApiResourceTypesIdPut**](docs/ResourceTypeAPI.md#apiresourcetypesidput) | **Put** /api/resource_types/{id} | Replaces the ResourceType resource. +*ResourceTypeAPI* | [**ApiResourceTypesPost**](docs/ResourceTypeAPI.md#apiresourcetypespost) | **Post** /api/resource_types | Creates a ResourceType resource. +*ResourceTypeLimitAPI* | [**ApiResourceTypeLimitsGetCollection**](docs/ResourceTypeLimitAPI.md#apiresourcetypelimitsgetcollection) | **Get** /api/resource_type_limits | Retrieves the collection of ResourceTypeLimit resources. +*ResourceTypeLimitAPI* | [**ApiResourceTypeLimitsIdDelete**](docs/ResourceTypeLimitAPI.md#apiresourcetypelimitsiddelete) | **Delete** /api/resource_type_limits/{id} | Removes the ResourceTypeLimit resource. +*ResourceTypeLimitAPI* | [**ApiResourceTypeLimitsIdGet**](docs/ResourceTypeLimitAPI.md#apiresourcetypelimitsidget) | **Get** /api/resource_type_limits/{id} | Retrieves a ResourceTypeLimit resource. +*ResourceTypeLimitAPI* | [**ApiResourceTypeLimitsIdPatch**](docs/ResourceTypeLimitAPI.md#apiresourcetypelimitsidpatch) | **Patch** /api/resource_type_limits/{id} | Updates the ResourceTypeLimit resource. +*ResourceTypeLimitAPI* | [**ApiResourceTypeLimitsIdPut**](docs/ResourceTypeLimitAPI.md#apiresourcetypelimitsidput) | **Put** /api/resource_type_limits/{id} | Replaces the ResourceTypeLimit resource. +*ResourceTypeLimitAPI* | [**ApiResourceTypeLimitsPost**](docs/ResourceTypeLimitAPI.md#apiresourcetypelimitspost) | **Post** /api/resource_type_limits | Creates a ResourceTypeLimit resource. +*RoleGroupAPI* | [**ApiRoleGroupsGetCollection**](docs/RoleGroupAPI.md#apirolegroupsgetcollection) | **Get** /api/role_groups | Retrieves the collection of RoleGroup resources. +*RoleGroupAPI* | [**ApiRoleGroupsIdDelete**](docs/RoleGroupAPI.md#apirolegroupsiddelete) | **Delete** /api/role_groups/{id} | Removes the RoleGroup resource. +*RoleGroupAPI* | [**ApiRoleGroupsIdGet**](docs/RoleGroupAPI.md#apirolegroupsidget) | **Get** /api/role_groups/{id} | Retrieves a RoleGroup resource. +*RoleGroupAPI* | [**ApiRoleGroupsIdPatch**](docs/RoleGroupAPI.md#apirolegroupsidpatch) | **Patch** /api/role_groups/{id} | Updates the RoleGroup resource. +*RoleGroupAPI* | [**ApiRoleGroupsIdPut**](docs/RoleGroupAPI.md#apirolegroupsidput) | **Put** /api/role_groups/{id} | Replaces the RoleGroup resource. +*RoleGroupAPI* | [**ApiRoleGroupsPost**](docs/RoleGroupAPI.md#apirolegroupspost) | **Post** /api/role_groups | Creates a RoleGroup resource. +*StateAPI* | [**ApiStatesGetCollection**](docs/StateAPI.md#apistatesgetcollection) | **Get** /api/states | Retrieves the collection of State resources. +*StateAPI* | [**ApiStatesIdDelete**](docs/StateAPI.md#apistatesiddelete) | **Delete** /api/states/{id} | Removes the State resource. +*StateAPI* | [**ApiStatesIdGet**](docs/StateAPI.md#apistatesidget) | **Get** /api/states/{id} | Retrieves a State resource. +*StateAPI* | [**ApiStatesIdPatch**](docs/StateAPI.md#apistatesidpatch) | **Patch** /api/states/{id} | Updates the State resource. +*StateAPI* | [**ApiStatesIdPut**](docs/StateAPI.md#apistatesidput) | **Put** /api/states/{id} | Replaces the State resource. +*StateAPI* | [**ApiStatesPost**](docs/StateAPI.md#apistatespost) | **Post** /api/states | Creates a State resource. +*StateByInfraAPI* | [**ApiStateByInfrasGetCollection**](docs/StateByInfraAPI.md#apistatebyinfrasgetcollection) | **Get** /api/state_by_infras | Retrieves the collection of StateByInfra resources. +*StateByInfraAPI* | [**ApiStateByInfrasIdDelete**](docs/StateByInfraAPI.md#apistatebyinfrasiddelete) | **Delete** /api/state_by_infras/{id} | Removes the StateByInfra resource. +*StateByInfraAPI* | [**ApiStateByInfrasIdGet**](docs/StateByInfraAPI.md#apistatebyinfrasidget) | **Get** /api/state_by_infras/{id} | Retrieves a StateByInfra resource. +*StateByInfraAPI* | [**ApiStateByInfrasIdPatch**](docs/StateByInfraAPI.md#apistatebyinfrasidpatch) | **Patch** /api/state_by_infras/{id} | Updates the StateByInfra resource. +*StateByInfraAPI* | [**ApiStateByInfrasIdPut**](docs/StateByInfraAPI.md#apistatebyinfrasidput) | **Put** /api/state_by_infras/{id} | Replaces the StateByInfra resource. +*StateByInfraAPI* | [**ApiStateByInfrasPost**](docs/StateByInfraAPI.md#apistatebyinfraspost) | **Post** /api/state_by_infras | Creates a StateByInfra resource. +*TeamAPI* | [**ApiTeamsGetCollection**](docs/TeamAPI.md#apiteamsgetcollection) | **Get** /api/teams | Retrieves the collection of Team resources. +*TeamAPI* | [**ApiTeamsIdDelete**](docs/TeamAPI.md#apiteamsiddelete) | **Delete** /api/teams/{id} | Removes the Team resource. +*TeamAPI* | [**ApiTeamsIdGet**](docs/TeamAPI.md#apiteamsidget) | **Get** /api/teams/{id} | Retrieves a Team resource. +*TeamAPI* | [**ApiTeamsIdPatch**](docs/TeamAPI.md#apiteamsidpatch) | **Patch** /api/teams/{id} | Updates the Team resource. +*TeamAPI* | [**ApiTeamsIdPut**](docs/TeamAPI.md#apiteamsidput) | **Put** /api/teams/{id} | Replaces the Team resource. +*TeamAPI* | [**ApiTeamsIduserRolePut**](docs/TeamAPI.md#apiteamsiduserroleput) | **Put** /api/teams/{id}/user-role | Replaces the Team resource. +*TeamAPI* | [**ApiTeamsPost**](docs/TeamAPI.md#apiteamspost) | **Post** /api/teams | Creates a Team resource. +*TeamEnvVarAPI* | [**ApiTeamEnvVarsGetCollection**](docs/TeamEnvVarAPI.md#apiteamenvvarsgetcollection) | **Get** /api/team_env_vars | Retrieves the collection of TeamEnvVar resources. +*TeamEnvVarAPI* | [**ApiTeamEnvVarsIdDelete**](docs/TeamEnvVarAPI.md#apiteamenvvarsiddelete) | **Delete** /api/team_env_vars/{id} | Removes the TeamEnvVar resource. +*TeamEnvVarAPI* | [**ApiTeamEnvVarsIdGet**](docs/TeamEnvVarAPI.md#apiteamenvvarsidget) | **Get** /api/team_env_vars/{id} | Retrieves a TeamEnvVar resource. +*TeamEnvVarAPI* | [**ApiTeamEnvVarsIdPatch**](docs/TeamEnvVarAPI.md#apiteamenvvarsidpatch) | **Patch** /api/team_env_vars/{id} | Updates the TeamEnvVar resource. +*TeamEnvVarAPI* | [**ApiTeamEnvVarsIdPut**](docs/TeamEnvVarAPI.md#apiteamenvvarsidput) | **Put** /api/team_env_vars/{id} | Replaces the TeamEnvVar resource. +*TeamEnvVarAPI* | [**ApiTeamEnvVarsPost**](docs/TeamEnvVarAPI.md#apiteamenvvarspost) | **Post** /api/team_env_vars | Creates a TeamEnvVar resource. +*TemplateEnvironmentAPI* | [**ApiTemplateEnvironmentsGetCollection**](docs/TemplateEnvironmentAPI.md#apitemplateenvironmentsgetcollection) | **Get** /api/template_environments | Retrieves the collection of TemplateEnvironment resources. +*TemplateEnvironmentAPI* | [**ApiTemplateEnvironmentsIdDelete**](docs/TemplateEnvironmentAPI.md#apitemplateenvironmentsiddelete) | **Delete** /api/template_environments/{id} | Removes the TemplateEnvironment resource. +*TemplateEnvironmentAPI* | [**ApiTemplateEnvironmentsIdGet**](docs/TemplateEnvironmentAPI.md#apitemplateenvironmentsidget) | **Get** /api/template_environments/{id} | Retrieves a TemplateEnvironment resource. +*TemplateEnvironmentAPI* | [**ApiTemplateEnvironmentsIdPatch**](docs/TemplateEnvironmentAPI.md#apitemplateenvironmentsidpatch) | **Patch** /api/template_environments/{id} | Updates the TemplateEnvironment resource. +*TemplateEnvironmentAPI* | [**ApiTemplateEnvironmentsIdPut**](docs/TemplateEnvironmentAPI.md#apitemplateenvironmentsidput) | **Put** /api/template_environments/{id} | Replaces the TemplateEnvironment resource. +*TemplateEnvironmentAPI* | [**ApiTemplateEnvironmentsPost**](docs/TemplateEnvironmentAPI.md#apitemplateenvironmentspost) | **Post** /api/template_environments | Creates a TemplateEnvironment resource. +*TemplateProjectAPI* | [**ApiTemplateProjectsGetCollection**](docs/TemplateProjectAPI.md#apitemplateprojectsgetcollection) | **Get** /api/template_projects | Retrieves the collection of TemplateProject resources. +*TemplateProjectAPI* | [**ApiTemplateProjectsIdDelete**](docs/TemplateProjectAPI.md#apitemplateprojectsiddelete) | **Delete** /api/template_projects/{id} | Removes the TemplateProject resource. +*TemplateProjectAPI* | [**ApiTemplateProjectsIdGet**](docs/TemplateProjectAPI.md#apitemplateprojectsidget) | **Get** /api/template_projects/{id} | Retrieves a TemplateProject resource. +*TemplateProjectAPI* | [**ApiTemplateProjectsIdPatch**](docs/TemplateProjectAPI.md#apitemplateprojectsidpatch) | **Patch** /api/template_projects/{id} | Updates the TemplateProject resource. +*TemplateProjectAPI* | [**ApiTemplateProjectsIdPut**](docs/TemplateProjectAPI.md#apitemplateprojectsidput) | **Put** /api/template_projects/{id} | Replaces the TemplateProject resource. +*TemplateProjectAPI* | [**ApiTemplateProjectsPost**](docs/TemplateProjectAPI.md#apitemplateprojectspost) | **Post** /api/template_projects | Creates a TemplateProject resource. +*UserAPI* | [**ApiUsersActivatePut**](docs/UserAPI.md#apiusersactivateput) | **Put** /api/users/activate | User activation entry point +*UserAPI* | [**ApiUsersCheckEmailGet**](docs/UserAPI.md#apiuserscheckemailget) | **Get** /api/users/check-email | Check the email existence +*UserAPI* | [**ApiUsersCheckUsernameGet**](docs/UserAPI.md#apiuserscheckusernameget) | **Get** /api/users/check-username | Check the username existence +*UserAPI* | [**ApiUsersDiscoverMercureGet**](docs/UserAPI.md#apiusersdiscovermercureget) | **Get** /api/users/discover_mercure | Retrieve cookie for Mercure authentication +*UserAPI* | [**ApiUsersForgotPasswordPut**](docs/UserAPI.md#apiusersforgotpasswordput) | **Put** /api/users/forgot-password | Restore password through email +*UserAPI* | [**ApiUsersGetCollection**](docs/UserAPI.md#apiusersgetcollection) | **Get** /api/users | Retrieves the collection of User resources. +*UserAPI* | [**ApiUsersIdAdministrateGet**](docs/UserAPI.md#apiusersidadministrateget) | **Get** /api/users/{id}/administrate | Get authentication data from another user +*UserAPI* | [**ApiUsersIdDelete**](docs/UserAPI.md#apiusersiddelete) | **Delete** /api/users/{id} | Removes the User resource. +*UserAPI* | [**ApiUsersIdFinanceCostsGet**](docs/UserAPI.md#apiusersidfinancecostsget) | **Get** /api/users/{id}/finance/costs | Get resource costs information +*UserAPI* | [**ApiUsersIdFinanceDetachCardPatch**](docs/UserAPI.md#apiusersidfinancedetachcardpatch) | **Patch** /api/users/{id}/finance/detach-card | Detach a payment method from the user +*UserAPI* | [**ApiUsersIdFinanceInvoicesGet**](docs/UserAPI.md#apiusersidfinanceinvoicesget) | **Get** /api/users/{id}/finance/invoices | Get invoices and some necessary data from payment module +*UserAPI* | [**ApiUsersIdFinancePayPatch**](docs/UserAPI.md#apiusersidfinancepaypatch) | **Patch** /api/users/{id}/finance/pay | Initiate a payment for the user +*UserAPI* | [**ApiUsersIdFinanceSubscribeInfoGet**](docs/UserAPI.md#apiusersidfinancesubscribeinfoget) | **Get** /api/users/{id}/finance/subscribe-info | Get payment module's access token +*UserAPI* | [**ApiUsersIdGet**](docs/UserAPI.md#apiusersidget) | **Get** /api/users/{id} | Retrieves a User resource. +*UserAPI* | [**ApiUsersIdPatch**](docs/UserAPI.md#apiusersidpatch) | **Patch** /api/users/{id} | Updates the User resource. +*UserAPI* | [**ApiUsersIdPut**](docs/UserAPI.md#apiusersidput) | **Put** /api/users/{id} | Replaces the User resource. +*UserAPI* | [**ApiUsersIdRemoveAccountDelete**](docs/UserAPI.md#apiusersidremoveaccountdelete) | **Delete** /api/users/{id}/remove-account | User can delete itself +*UserAPI* | [**ApiUsersPost**](docs/UserAPI.md#apiuserspost) | **Post** /api/users | Creates a User resource. +*UserAPI* | [**ApiUsersRegisterPost**](docs/UserAPI.md#apiusersregisterpost) | **Post** /api/users/register | User creation entry point +*UserAPI* | [**ApiUsersResetPasswordPut**](docs/UserAPI.md#apiusersresetpasswordput) | **Put** /api/users/reset-password | Change the current password + + +## Documentation For Models + + - [AbstractEnvVar](docs/AbstractEnvVar.md) + - [AbstractEnvironment](docs/AbstractEnvironment.md) + - [AbstractProject](docs/AbstractProject.md) + - [AccessCode](docs/AccessCode.md) + - [ApiGitsIdConnectTestGet200Response](docs/ApiGitsIdConnectTestGet200Response.md) + - [ApiUsersCheckEmailGet200Response](docs/ApiUsersCheckEmailGet200Response.md) + - [ApiUsersForgotPasswordPut200Response](docs/ApiUsersForgotPasswordPut200Response.md) + - [ApiUsersForgotPasswordPutRequest](docs/ApiUsersForgotPasswordPutRequest.md) + - [ApiUsersIdFinanceSubscribeInfoGet200Response](docs/ApiUsersIdFinanceSubscribeInfoGet200Response.md) + - [AuthenticationCredentials](docs/AuthenticationCredentials.md) + - [AuthenticationToken](docs/AuthenticationToken.md) + - [AuthenticationTokenData](docs/AuthenticationTokenData.md) + - [AuthenticationTokenDataTeamsInner](docs/AuthenticationTokenDataTeamsInner.md) + - [Cluster](docs/Cluster.md) + - [ClusterClusterWithProvider](docs/ClusterClusterWithProvider.md) + - [Component](docs/Component.md) + - [ComponentResourceLimit](docs/ComponentResourceLimit.md) + - [ComponentVersion](docs/ComponentVersion.md) + - [ComponentVersionEnvVar](docs/ComponentVersionEnvVar.md) + - [ComponentVersionEnvVarExample](docs/ComponentVersionEnvVarExample.md) + - [CredentialType](docs/CredentialType.md) + - [CryptoKeyType](docs/CryptoKeyType.md) + - [DataTransferDataType](docs/DataTransferDataType.md) + - [DataTransferType](docs/DataTransferType.md) + - [EnvVarType](docs/EnvVarType.md) + - [EnvVarValidation](docs/EnvVarValidation.md) + - [EnvironmentAccess](docs/EnvironmentAccess.md) + - [EnvironmentAccessAllDataResponse](docs/EnvironmentAccessAllDataResponse.md) + - [EnvironmentAccessBackend](docs/EnvironmentAccessBackend.md) + - [EnvironmentAccessDatabase](docs/EnvironmentAccessDatabase.md) + - [EnvironmentAccessDevTools](docs/EnvironmentAccessDevTools.md) + - [EnvironmentAccessFrontend](docs/EnvironmentAccessFrontend.md) + - [EnvironmentAccessMailbox](docs/EnvironmentAccessMailbox.md) + - [EnvironmentAccessRabbit](docs/EnvironmentAccessRabbit.md) + - [EnvironmentAccessRedis](docs/EnvironmentAccessRedis.md) + - [EnvironmentAccessWebshell](docs/EnvironmentAccessWebshell.md) + - [EnvironmentComponent](docs/EnvironmentComponent.md) + - [EnvironmentComponentEnvironmentInput](docs/EnvironmentComponentEnvironmentInput.md) + - [EnvironmentComponentEnvironmentOutput](docs/EnvironmentComponentEnvironmentOutput.md) + - [EnvironmentComponentTemplateEnvironmentInput](docs/EnvironmentComponentTemplateEnvironmentInput.md) + - [EnvironmentComponentTemplateEnvironmentOutput](docs/EnvironmentComponentTemplateEnvironmentOutput.md) + - [EnvironmentCosts](docs/EnvironmentCosts.md) + - [EnvironmentCostsUuid](docs/EnvironmentCostsUuid.md) + - [EnvironmentCustomDomain](docs/EnvironmentCustomDomain.md) + - [EnvironmentCustomDomainEnvironmentInput](docs/EnvironmentCustomDomainEnvironmentInput.md) + - [EnvironmentCustomDomainEnvironmentOutput](docs/EnvironmentCustomDomainEnvironmentOutput.md) + - [EnvironmentEnvVar](docs/EnvironmentEnvVar.md) + - [EnvironmentEnvVarEnvironmentInput](docs/EnvironmentEnvVarEnvironmentInput.md) + - [EnvironmentEnvVarEnvironmentOutput](docs/EnvironmentEnvVarEnvironmentOutput.md) + - [EnvironmentEnvVarTemplateEnvironmentInput](docs/EnvironmentEnvVarTemplateEnvironmentInput.md) + - [EnvironmentEnvVarTemplateEnvironmentOutput](docs/EnvironmentEnvVarTemplateEnvironmentOutput.md) + - [EnvironmentEnvironmentInput](docs/EnvironmentEnvironmentInput.md) + - [EnvironmentEnvironmentOutput](docs/EnvironmentEnvironmentOutput.md) + - [EnvironmentLogStreamResponse](docs/EnvironmentLogStreamResponse.md) + - [EnvironmentMagentoHostMapping](docs/EnvironmentMagentoHostMapping.md) + - [EnvironmentMagentoHostMappingEnvironmentInput](docs/EnvironmentMagentoHostMappingEnvironmentInput.md) + - [EnvironmentMagentoHostMappingEnvironmentOutput](docs/EnvironmentMagentoHostMappingEnvironmentOutput.md) + - [EnvironmentMessageHistory](docs/EnvironmentMessageHistory.md) + - [ExportedData](docs/ExportedData.md) + - [FinanceApiTokenResponse](docs/FinanceApiTokenResponse.md) + - [FinanceCostsResponse](docs/FinanceCostsResponse.md) + - [FinanceCostsResponseSummary](docs/FinanceCostsResponseSummary.md) + - [FinanceInvoicesResponse](docs/FinanceInvoicesResponse.md) + - [GitGitInput](docs/GitGitInput.md) + - [GitGitOutput](docs/GitGitOutput.md) + - [GitType](docs/GitType.md) + - [ImportedData](docs/ImportedData.md) + - [InvitationInvitationInput](docs/InvitationInvitationInput.md) + - [InvitationInvitationOutput](docs/InvitationInvitationOutput.md) + - [MercureDiscoverResponse](docs/MercureDiscoverResponse.md) + - [OrganisationEnvVar](docs/OrganisationEnvVar.md) + - [OrganisationEnvVarOrganisationInput](docs/OrganisationEnvVarOrganisationInput.md) + - [OrganisationEnvVarOrganisationOutput](docs/OrganisationEnvVarOrganisationOutput.md) + - [OrganisationOrganisationInput](docs/OrganisationOrganisationInput.md) + - [OrganisationOrganisationOutput](docs/OrganisationOrganisationOutput.md) + - [Price](docs/Price.md) + - [PriceProductInput](docs/PriceProductInput.md) + - [PriceProductOutput](docs/PriceProductOutput.md) + - [Product](docs/Product.md) + - [ProductProductInput](docs/ProductProductInput.md) + - [ProductProductOutput](docs/ProductProductOutput.md) + - [ProjectAccess](docs/ProjectAccess.md) + - [ProjectAccessGit](docs/ProjectAccessGit.md) + - [ProjectAccessGitProjectOutput](docs/ProjectAccessGitProjectOutput.md) + - [ProjectAccessProjectOutput](docs/ProjectAccessProjectOutput.md) + - [ProjectAccessRegistry](docs/ProjectAccessRegistry.md) + - [ProjectAccessRegistryProjectOutput](docs/ProjectAccessRegistryProjectOutput.md) + - [ProjectAccessServiceAccount](docs/ProjectAccessServiceAccount.md) + - [ProjectAccessServiceAccountProjectOutput](docs/ProjectAccessServiceAccountProjectOutput.md) + - [ProjectEnvVar](docs/ProjectEnvVar.md) + - [ProjectEnvVarProjectInput](docs/ProjectEnvVarProjectInput.md) + - [ProjectEnvVarProjectOutput](docs/ProjectEnvVarProjectOutput.md) + - [ProjectEnvVarTemplateProjectInput](docs/ProjectEnvVarTemplateProjectInput.md) + - [ProjectEnvVarTemplateProjectOutput](docs/ProjectEnvVarTemplateProjectOutput.md) + - [ProjectProjectInput](docs/ProjectProjectInput.md) + - [ProjectProjectOutput](docs/ProjectProjectOutput.md) + - [ProjectType](docs/ProjectType.md) + - [ProjectTypeVersion](docs/ProjectTypeVersion.md) + - [ProjectTypeVersionEnvVar](docs/ProjectTypeVersionEnvVar.md) + - [ProjectTypeVersionEnvVarExample](docs/ProjectTypeVersionEnvVarExample.md) + - [Provider](docs/Provider.md) + - [ProviderClusterWithProvider](docs/ProviderClusterWithProvider.md) + - [ResourceTypeLimit](docs/ResourceTypeLimit.md) + - [ResourceTypeLimitResourceTypeInput](docs/ResourceTypeLimitResourceTypeInput.md) + - [ResourceTypeLimitResourceTypeOutput](docs/ResourceTypeLimitResourceTypeOutput.md) + - [ResourceTypeResourceTypeInput](docs/ResourceTypeResourceTypeInput.md) + - [ResourceTypeResourceTypeOutput](docs/ResourceTypeResourceTypeOutput.md) + - [RoleGroup](docs/RoleGroup.md) + - [State](docs/State.md) + - [StateByInfra](docs/StateByInfra.md) + - [TeamEnvVar](docs/TeamEnvVar.md) + - [TeamEnvVarTeamInput](docs/TeamEnvVarTeamInput.md) + - [TeamEnvVarTeamOutput](docs/TeamEnvVarTeamOutput.md) + - [TeamTeamInput](docs/TeamTeamInput.md) + - [TeamTeamInputTeamUsersInner](docs/TeamTeamInputTeamUsersInner.md) + - [TeamTeamOutput](docs/TeamTeamOutput.md) + - [TemplateEnvironmentTemplateEnvironmentInput](docs/TemplateEnvironmentTemplateEnvironmentInput.md) + - [TemplateEnvironmentTemplateEnvironmentOutput](docs/TemplateEnvironmentTemplateEnvironmentOutput.md) + - [TemplateProjectTemplateProjectInput](docs/TemplateProjectTemplateProjectInput.md) + - [TemplateProjectTemplateProjectOutput](docs/TemplateProjectTemplateProjectOutput.md) + - [User](docs/User.md) + - [UserTeamRolesInner](docs/UserTeamRolesInner.md) + - [ValidateEnvVarRequest](docs/ValidateEnvVarRequest.md) + - [ValidateEnvVarResponse](docs/ValidateEnvVarResponse.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### apiKey + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request. + +Example + +```golang +auth := context.WithValue( + context.Background(), + sw.ContextAPIKeys, + map[string]sw.APIKey{ + "Authorization": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` + +### JWT + +- **Type**: HTTP Bearer token authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + + + diff --git a/pkg/api/rewardcloud/api/openapi.yaml b/pkg/api/rewardcloud/api/openapi.yaml new file mode 100644 index 0000000..6a385de --- /dev/null +++ b/pkg/api/rewardcloud/api/openapi.yaml @@ -0,0 +1,21403 @@ +openapi: 3.1.0 +info: + description: It is an API for Reward Cloud project in ITG Commerce + title: Reward Cloud + version: v0.7.0-alpha +servers: +- description: "" + url: / +security: +- apiKey: [] +paths: + /api/access_codes: + get: + deprecated: false + description: Retrieves the collection of AccessCode resources. + operationId: api_access_codes_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: accessCode + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "accessCode[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/AccessCode' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/AccessCode' + type: array + description: AccessCode collection + summary: Retrieves the collection of AccessCode resources. + tags: + - AccessCode + post: + deprecated: false + description: Creates a AccessCode resource. + operationId: api_access_codes_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + description: The new AccessCode resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + description: AccessCode resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a AccessCode resource. + tags: + - AccessCode + /api/access_codes/{id}: + delete: + deprecated: false + description: Removes the AccessCode resource. + operationId: api_access_codes_id_delete + parameters: + - allowReserved: false + deprecated: false + description: AccessCode identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: AccessCode resource deleted + "404": + description: Resource not found + summary: Removes the AccessCode resource. + tags: + - AccessCode + get: + deprecated: false + description: Retrieves a AccessCode resource. + operationId: api_access_codes_id_get + parameters: + - allowReserved: false + deprecated: false + description: AccessCode identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + description: AccessCode resource + "404": + description: Resource not found + summary: Retrieves a AccessCode resource. + tags: + - AccessCode + patch: + deprecated: false + description: Updates the AccessCode resource. + operationId: api_access_codes_id_patch + parameters: + - allowReserved: false + deprecated: false + description: AccessCode identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/AccessCode' + description: The updated AccessCode resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + description: AccessCode resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the AccessCode resource. + tags: + - AccessCode + put: + deprecated: false + description: Replaces the AccessCode resource. + operationId: api_access_codes_id_put + parameters: + - allowReserved: false + deprecated: false + description: AccessCode identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + description: The updated AccessCode resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AccessCode' + text/html: + schema: + $ref: '#/components/schemas/AccessCode' + description: AccessCode resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the AccessCode resource. + tags: + - AccessCode + /api/authentication_token: + post: + operationId: postCredentialsItem + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Authentication.Credentials' + description: Generate new JWT Token + required: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Authentication.Token' + description: Get JWT token + security: [] + summary: Get JWT token to login. + tags: + - Miscellaneous + /api/clusters: + get: + deprecated: false + description: Retrieves the collection of Cluster resources. + operationId: api_clusters_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: provider + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "provider[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Cluster' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Cluster' + type: array + description: Cluster collection + summary: Retrieves the collection of Cluster resources. + tags: + - Cluster + post: + deprecated: false + description: Creates a Cluster resource. + operationId: api_clusters_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + description: The new Cluster resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + description: Cluster resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Cluster resource. + tags: + - Cluster + /api/clusters/get-with-provider: + get: + deprecated: false + description: Retrieves the collection of Cluster resources. + operationId: api_clustersget-with-provider_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: provider + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "provider[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + type: array + description: Cluster collection + summary: Retrieves the collection of Cluster resources. + tags: + - Cluster + /api/clusters/{id}: + delete: + deprecated: false + description: Removes the Cluster resource. + operationId: api_clusters_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Cluster identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Cluster resource deleted + "404": + description: Resource not found + summary: Removes the Cluster resource. + tags: + - Cluster + get: + deprecated: false + description: Retrieves a Cluster resource. + operationId: api_clusters_id_get + parameters: + - allowReserved: false + deprecated: false + description: Cluster identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + description: Cluster resource + "404": + description: Resource not found + summary: Retrieves a Cluster resource. + tags: + - Cluster + patch: + deprecated: false + description: Updates the Cluster resource. + operationId: api_clusters_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Cluster identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Cluster' + description: The updated Cluster resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + description: Cluster resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Cluster resource. + tags: + - Cluster + put: + deprecated: false + description: Replaces the Cluster resource. + operationId: api_clusters_id_put + parameters: + - allowReserved: false + deprecated: false + description: Cluster identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + description: The updated Cluster resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster' + text/html: + schema: + $ref: '#/components/schemas/Cluster' + description: Cluster resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Cluster resource. + tags: + - Cluster + /api/clusters/{id}/get-with-provider: + get: + deprecated: false + description: Retrieves a Cluster resource. + operationId: api_clusters_idget-with-provider_get + parameters: + - allowReserved: false + deprecated: false + description: Cluster identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + text/html: + schema: + $ref: '#/components/schemas/Cluster-Cluster.withProvider' + description: Cluster resource + "404": + description: Resource not found + summary: Retrieves a Cluster resource. + tags: + - Cluster + /api/component_resource_limits: + get: + deprecated: false + description: Retrieves the collection of ComponentResourceLimit resources. + operationId: api_component_resource_limits_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectTypeVersion + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectTypeVersion[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: resourceType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "resourceType[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: componentVersion + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "componentVersion[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ComponentResourceLimit' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ComponentResourceLimit' + type: array + description: ComponentResourceLimit collection + summary: Retrieves the collection of ComponentResourceLimit resources. + tags: + - ComponentResourceLimit + post: + deprecated: false + description: Creates a ComponentResourceLimit resource. + operationId: api_component_resource_limits_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + description: The new ComponentResourceLimit resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + description: ComponentResourceLimit resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ComponentResourceLimit resource. + tags: + - ComponentResourceLimit + /api/component_resource_limits/{id}: + delete: + deprecated: false + description: Removes the ComponentResourceLimit resource. + operationId: api_component_resource_limits_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ComponentResourceLimit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ComponentResourceLimit resource deleted + "404": + description: Resource not found + summary: Removes the ComponentResourceLimit resource. + tags: + - ComponentResourceLimit + get: + deprecated: false + description: Retrieves a ComponentResourceLimit resource. + operationId: api_component_resource_limits_id_get + parameters: + - allowReserved: false + deprecated: false + description: ComponentResourceLimit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + description: ComponentResourceLimit resource + "404": + description: Resource not found + summary: Retrieves a ComponentResourceLimit resource. + tags: + - ComponentResourceLimit + patch: + deprecated: false + description: Updates the ComponentResourceLimit resource. + operationId: api_component_resource_limits_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ComponentResourceLimit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + description: The updated ComponentResourceLimit resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + description: ComponentResourceLimit resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ComponentResourceLimit resource. + tags: + - ComponentResourceLimit + put: + deprecated: false + description: Replaces the ComponentResourceLimit resource. + operationId: api_component_resource_limits_id_put + parameters: + - allowReserved: false + deprecated: false + description: ComponentResourceLimit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + description: The updated ComponentResourceLimit resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + text/html: + schema: + $ref: '#/components/schemas/ComponentResourceLimit' + description: ComponentResourceLimit resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ComponentResourceLimit resource. + tags: + - ComponentResourceLimit + /api/component_version_env_var_examples: + get: + deprecated: false + description: Retrieves the collection of ComponentVersionEnvVarExample resources. + operationId: api_component_version_env_var_examples_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + type: array + description: ComponentVersionEnvVarExample collection + summary: Retrieves the collection of ComponentVersionEnvVarExample resources. + tags: + - ComponentVersionEnvVarExample + post: + deprecated: false + description: Creates a ComponentVersionEnvVarExample resource. + operationId: api_component_version_env_var_examples_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + description: The new ComponentVersionEnvVarExample resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + description: ComponentVersionEnvVarExample resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ComponentVersionEnvVarExample resource. + tags: + - ComponentVersionEnvVarExample + /api/component_version_env_var_examples/{id}: + delete: + deprecated: false + description: Removes the ComponentVersionEnvVarExample resource. + operationId: api_component_version_env_var_examples_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersionEnvVarExample identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ComponentVersionEnvVarExample resource deleted + "404": + description: Resource not found + summary: Removes the ComponentVersionEnvVarExample resource. + tags: + - ComponentVersionEnvVarExample + get: + deprecated: false + description: Retrieves a ComponentVersionEnvVarExample resource. + operationId: api_component_version_env_var_examples_id_get + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersionEnvVarExample identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + description: ComponentVersionEnvVarExample resource + "404": + description: Resource not found + summary: Retrieves a ComponentVersionEnvVarExample resource. + tags: + - ComponentVersionEnvVarExample + patch: + deprecated: false + description: Updates the ComponentVersionEnvVarExample resource. + operationId: api_component_version_env_var_examples_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersionEnvVarExample identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + description: The updated ComponentVersionEnvVarExample resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + description: ComponentVersionEnvVarExample resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ComponentVersionEnvVarExample resource. + tags: + - ComponentVersionEnvVarExample + put: + deprecated: false + description: Replaces the ComponentVersionEnvVarExample resource. + operationId: api_component_version_env_var_examples_id_put + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersionEnvVarExample identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + description: The updated ComponentVersionEnvVarExample resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVarExample' + description: ComponentVersionEnvVarExample resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ComponentVersionEnvVarExample resource. + tags: + - ComponentVersionEnvVarExample + /api/component_version_env_vars: + get: + deprecated: false + description: Retrieves the collection of ComponentVersionEnvVar resources. + operationId: api_component_version_env_vars_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: componentVersion + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "componentVersion[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: envVarValidations + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "envVarValidations[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ComponentVersionEnvVar' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ComponentVersionEnvVar' + type: array + description: ComponentVersionEnvVar collection + summary: Retrieves the collection of ComponentVersionEnvVar resources. + tags: + - ComponentVersionEnvVar + post: + deprecated: false + description: Creates a ComponentVersionEnvVar resource. + operationId: api_component_version_env_vars_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + description: The new ComponentVersionEnvVar resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + description: ComponentVersionEnvVar resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ComponentVersionEnvVar resource. + tags: + - ComponentVersionEnvVar + /api/component_version_env_vars/{id}: + delete: + deprecated: false + description: Removes the ComponentVersionEnvVar resource. + operationId: api_component_version_env_vars_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersionEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ComponentVersionEnvVar resource deleted + "404": + description: Resource not found + summary: Removes the ComponentVersionEnvVar resource. + tags: + - ComponentVersionEnvVar + get: + deprecated: false + description: Retrieves a ComponentVersionEnvVar resource. + operationId: api_component_version_env_vars_id_get + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersionEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + description: ComponentVersionEnvVar resource + "404": + description: Resource not found + summary: Retrieves a ComponentVersionEnvVar resource. + tags: + - ComponentVersionEnvVar + patch: + deprecated: false + description: Updates the ComponentVersionEnvVar resource. + operationId: api_component_version_env_vars_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersionEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + description: The updated ComponentVersionEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + description: ComponentVersionEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ComponentVersionEnvVar resource. + tags: + - ComponentVersionEnvVar + put: + deprecated: false + description: Replaces the ComponentVersionEnvVar resource. + operationId: api_component_version_env_vars_id_put + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersionEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + description: The updated ComponentVersionEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersionEnvVar' + description: ComponentVersionEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ComponentVersionEnvVar resource. + tags: + - ComponentVersionEnvVar + /api/component_versions: + get: + deprecated: false + description: Retrieves the collection of ComponentVersion resources. + operationId: api_component_versions_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[version]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: id + required: false + schema: + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "id[]" + required: false + schema: + items: + type: integer + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: component + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "component[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ComponentVersion' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ComponentVersion' + type: array + description: ComponentVersion collection + summary: Retrieves the collection of ComponentVersion resources. + tags: + - ComponentVersion + post: + deprecated: false + description: Creates a ComponentVersion resource. + operationId: api_component_versions_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + description: The new ComponentVersion resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + description: ComponentVersion resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ComponentVersion resource. + tags: + - ComponentVersion + /api/component_versions/{id}: + delete: + deprecated: false + description: Removes the ComponentVersion resource. + operationId: api_component_versions_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersion identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ComponentVersion resource deleted + "404": + description: Resource not found + summary: Removes the ComponentVersion resource. + tags: + - ComponentVersion + get: + deprecated: false + description: Retrieves a ComponentVersion resource. + operationId: api_component_versions_id_get + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersion identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + description: ComponentVersion resource + "404": + description: Resource not found + summary: Retrieves a ComponentVersion resource. + tags: + - ComponentVersion + patch: + deprecated: false + description: Updates the ComponentVersion resource. + operationId: api_component_versions_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersion identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ComponentVersion' + description: The updated ComponentVersion resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + description: ComponentVersion resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ComponentVersion resource. + tags: + - ComponentVersion + put: + deprecated: false + description: Replaces the ComponentVersion resource. + operationId: api_component_versions_id_put + parameters: + - allowReserved: false + deprecated: false + description: ComponentVersion identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + description: The updated ComponentVersion resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentVersion' + text/html: + schema: + $ref: '#/components/schemas/ComponentVersion' + description: ComponentVersion resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ComponentVersion resource. + tags: + - ComponentVersion + /api/components: + get: + deprecated: false + description: Retrieves the collection of Component resources. + operationId: api_components_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[name]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: id + required: false + schema: + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "id[]" + required: false + schema: + items: + type: integer + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Component' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Component' + type: array + description: Component collection + summary: Retrieves the collection of Component resources. + tags: + - Component + post: + deprecated: false + description: Creates a Component resource. + operationId: api_components_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + description: The new Component resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + description: Component resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Component resource. + tags: + - Component + /api/components/{id}: + delete: + deprecated: false + description: Removes the Component resource. + operationId: api_components_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Component identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Component resource deleted + "404": + description: Resource not found + summary: Removes the Component resource. + tags: + - Component + get: + deprecated: false + description: Retrieves a Component resource. + operationId: api_components_id_get + parameters: + - allowReserved: false + deprecated: false + description: Component identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + description: Component resource + "404": + description: Resource not found + summary: Retrieves a Component resource. + tags: + - Component + patch: + deprecated: false + description: Updates the Component resource. + operationId: api_components_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Component identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Component' + description: The updated Component resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + description: Component resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Component resource. + tags: + - Component + put: + deprecated: false + description: Replaces the Component resource. + operationId: api_components_id_put + parameters: + - allowReserved: false + deprecated: false + description: Component identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + description: The updated Component resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + text/html: + schema: + $ref: '#/components/schemas/Component' + description: Component resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Component resource. + tags: + - Component + /api/credential_types: + get: + deprecated: false + description: Retrieves the collection of CredentialType resources. + operationId: api_credential_types_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/CredentialType' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/CredentialType' + type: array + description: CredentialType collection + summary: Retrieves the collection of CredentialType resources. + tags: + - CredentialType + post: + deprecated: false + description: Creates a CredentialType resource. + operationId: api_credential_types_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + description: The new CredentialType resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + description: CredentialType resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a CredentialType resource. + tags: + - CredentialType + /api/credential_types/{id}: + delete: + deprecated: false + description: Removes the CredentialType resource. + operationId: api_credential_types_id_delete + parameters: + - allowReserved: false + deprecated: false + description: CredentialType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: CredentialType resource deleted + "404": + description: Resource not found + summary: Removes the CredentialType resource. + tags: + - CredentialType + get: + deprecated: false + description: Retrieves a CredentialType resource. + operationId: api_credential_types_id_get + parameters: + - allowReserved: false + deprecated: false + description: CredentialType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + description: CredentialType resource + "404": + description: Resource not found + summary: Retrieves a CredentialType resource. + tags: + - CredentialType + patch: + deprecated: false + description: Updates the CredentialType resource. + operationId: api_credential_types_id_patch + parameters: + - allowReserved: false + deprecated: false + description: CredentialType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/CredentialType' + description: The updated CredentialType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + description: CredentialType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the CredentialType resource. + tags: + - CredentialType + put: + deprecated: false + description: Replaces the CredentialType resource. + operationId: api_credential_types_id_put + parameters: + - allowReserved: false + deprecated: false + description: CredentialType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + description: The updated CredentialType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialType' + text/html: + schema: + $ref: '#/components/schemas/CredentialType' + description: CredentialType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the CredentialType resource. + tags: + - CredentialType + /api/crypto_key_types/{id}: + get: + deprecated: false + description: Retrieves a CryptoKeyType resource. + operationId: api_crypto_key_types_id_get + parameters: + - allowReserved: false + deprecated: false + description: CryptoKeyType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CryptoKeyType' + text/html: + schema: + $ref: '#/components/schemas/CryptoKeyType' + description: CryptoKeyType resource + "404": + description: Resource not found + summary: Retrieves a CryptoKeyType resource. + tags: + - CryptoKeyType + /api/data_transfer_data_types: + get: + deprecated: false + description: Retrieves the collection of DataTransferDataType resources. + operationId: api_data_transfer_data_types_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/DataTransferDataType' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/DataTransferDataType' + type: array + description: DataTransferDataType collection + summary: Retrieves the collection of DataTransferDataType resources. + tags: + - DataTransferDataType + post: + deprecated: false + description: Creates a DataTransferDataType resource. + operationId: api_data_transfer_data_types_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + description: The new DataTransferDataType resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + description: DataTransferDataType resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a DataTransferDataType resource. + tags: + - DataTransferDataType + /api/data_transfer_data_types/{id}: + delete: + deprecated: false + description: Removes the DataTransferDataType resource. + operationId: api_data_transfer_data_types_id_delete + parameters: + - allowReserved: false + deprecated: false + description: DataTransferDataType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: DataTransferDataType resource deleted + "404": + description: Resource not found + summary: Removes the DataTransferDataType resource. + tags: + - DataTransferDataType + get: + deprecated: false + description: Retrieves a DataTransferDataType resource. + operationId: api_data_transfer_data_types_id_get + parameters: + - allowReserved: false + deprecated: false + description: DataTransferDataType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + description: DataTransferDataType resource + "404": + description: Resource not found + summary: Retrieves a DataTransferDataType resource. + tags: + - DataTransferDataType + patch: + deprecated: false + description: Updates the DataTransferDataType resource. + operationId: api_data_transfer_data_types_id_patch + parameters: + - allowReserved: false + deprecated: false + description: DataTransferDataType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + description: The updated DataTransferDataType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + description: DataTransferDataType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the DataTransferDataType resource. + tags: + - DataTransferDataType + put: + deprecated: false + description: Replaces the DataTransferDataType resource. + operationId: api_data_transfer_data_types_id_put + parameters: + - allowReserved: false + deprecated: false + description: DataTransferDataType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + description: The updated DataTransferDataType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferDataType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferDataType' + description: DataTransferDataType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the DataTransferDataType resource. + tags: + - DataTransferDataType + /api/data_transfer_types: + get: + deprecated: false + description: Retrieves the collection of DataTransferType resources. + operationId: api_data_transfer_types_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/DataTransferType' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/DataTransferType' + type: array + description: DataTransferType collection + summary: Retrieves the collection of DataTransferType resources. + tags: + - DataTransferType + post: + deprecated: false + description: Creates a DataTransferType resource. + operationId: api_data_transfer_types_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + description: The new DataTransferType resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + description: DataTransferType resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a DataTransferType resource. + tags: + - DataTransferType + /api/data_transfer_types/{id}: + delete: + deprecated: false + description: Removes the DataTransferType resource. + operationId: api_data_transfer_types_id_delete + parameters: + - allowReserved: false + deprecated: false + description: DataTransferType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: DataTransferType resource deleted + "404": + description: Resource not found + summary: Removes the DataTransferType resource. + tags: + - DataTransferType + get: + deprecated: false + description: Retrieves a DataTransferType resource. + operationId: api_data_transfer_types_id_get + parameters: + - allowReserved: false + deprecated: false + description: DataTransferType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + description: DataTransferType resource + "404": + description: Resource not found + summary: Retrieves a DataTransferType resource. + tags: + - DataTransferType + patch: + deprecated: false + description: Updates the DataTransferType resource. + operationId: api_data_transfer_types_id_patch + parameters: + - allowReserved: false + deprecated: false + description: DataTransferType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/DataTransferType' + description: The updated DataTransferType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + description: DataTransferType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the DataTransferType resource. + tags: + - DataTransferType + put: + deprecated: false + description: Replaces the DataTransferType resource. + operationId: api_data_transfer_types_id_put + parameters: + - allowReserved: false + deprecated: false + description: DataTransferType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + description: The updated DataTransferType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransferType' + text/html: + schema: + $ref: '#/components/schemas/DataTransferType' + description: DataTransferType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the DataTransferType resource. + tags: + - DataTransferType + /api/env_var_types: + get: + deprecated: false + description: Retrieves the collection of EnvVarType resources. + operationId: api_env_var_types_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvVarType' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvVarType' + type: array + description: EnvVarType collection + summary: Retrieves the collection of EnvVarType resources. + tags: + - EnvVarType + post: + deprecated: false + description: Creates a EnvVarType resource. + operationId: api_env_var_types_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + description: The new EnvVarType resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + description: EnvVarType resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvVarType resource. + tags: + - EnvVarType + /api/env_var_types/{id}: + delete: + deprecated: false + description: Removes the EnvVarType resource. + operationId: api_env_var_types_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvVarType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvVarType resource deleted + "404": + description: Resource not found + summary: Removes the EnvVarType resource. + tags: + - EnvVarType + get: + deprecated: false + description: Retrieves a EnvVarType resource. + operationId: api_env_var_types_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvVarType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + description: EnvVarType resource + "404": + description: Resource not found + summary: Retrieves a EnvVarType resource. + tags: + - EnvVarType + patch: + deprecated: false + description: Updates the EnvVarType resource. + operationId: api_env_var_types_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvVarType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvVarType' + description: The updated EnvVarType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + description: EnvVarType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvVarType resource. + tags: + - EnvVarType + put: + deprecated: false + description: Replaces the EnvVarType resource. + operationId: api_env_var_types_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvVarType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + description: The updated EnvVarType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarType' + text/html: + schema: + $ref: '#/components/schemas/EnvVarType' + description: EnvVarType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvVarType resource. + tags: + - EnvVarType + /api/env_var_validation: + post: + description: |- + It will check a any EnvVar's definition validation by this entity. The entity can contain + more than one validation. Then it will test all of them and reply w/ their messages. + operationId: postValidateEnvVar + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateEnvVar.Request' + description: Let the system to check a word to validate by definition(s). + Both are REQUIRED! + required: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateEnvVar.Response' + description: It will returns w/ an object + "201": + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing EnvVarDefinition + security: [] + summary: It checks the validation of an environment variable definition + tags: + - Miscellaneous + /api/env_var_validations: + get: + deprecated: false + description: Retrieves the collection of EnvVarValidation resources. + operationId: api_env_var_validations_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvVarValidation' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvVarValidation' + type: array + description: EnvVarValidation collection + summary: Retrieves the collection of EnvVarValidation resources. + tags: + - EnvVarValidation + post: + deprecated: false + description: Creates a EnvVarValidation resource. + operationId: api_env_var_validations_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + description: The new EnvVarValidation resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + description: EnvVarValidation resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvVarValidation resource. + tags: + - EnvVarValidation + /api/env_var_validations/{id}: + delete: + deprecated: false + description: Removes the EnvVarValidation resource. + operationId: api_env_var_validations_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvVarValidation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvVarValidation resource deleted + "404": + description: Resource not found + summary: Removes the EnvVarValidation resource. + tags: + - EnvVarValidation + get: + deprecated: false + description: Retrieves a EnvVarValidation resource. + operationId: api_env_var_validations_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvVarValidation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + description: EnvVarValidation resource + "404": + description: Resource not found + summary: Retrieves a EnvVarValidation resource. + tags: + - EnvVarValidation + patch: + deprecated: false + description: Updates the EnvVarValidation resource. + operationId: api_env_var_validations_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvVarValidation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + description: The updated EnvVarValidation resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + description: EnvVarValidation resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvVarValidation resource. + tags: + - EnvVarValidation + put: + deprecated: false + description: Replaces the EnvVarValidation resource. + operationId: api_env_var_validations_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvVarValidation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + description: The updated EnvVarValidation resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvVarValidation' + text/html: + schema: + $ref: '#/components/schemas/EnvVarValidation' + description: EnvVarValidation resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvVarValidation resource. + tags: + - EnvVarValidation + /api/environment_access_backends: + get: + deprecated: false + description: Retrieves the collection of EnvironmentAccessBackend resources. + operationId: api_environment_access_backends_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessBackend' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessBackend' + type: array + description: EnvironmentAccessBackend collection + summary: Retrieves the collection of EnvironmentAccessBackend resources. + tags: + - EnvironmentAccessBackend + post: + deprecated: false + description: Creates a EnvironmentAccessBackend resource. + operationId: api_environment_access_backends_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + description: The new EnvironmentAccessBackend resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + description: EnvironmentAccessBackend resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentAccessBackend resource. + tags: + - EnvironmentAccessBackend + /api/environment_access_backends/{id}: + delete: + deprecated: false + description: Removes the EnvironmentAccessBackend resource. + operationId: api_environment_access_backends_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessBackend identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentAccessBackend resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentAccessBackend resource. + tags: + - EnvironmentAccessBackend + get: + deprecated: false + description: Retrieves a EnvironmentAccessBackend resource. + operationId: api_environment_access_backends_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessBackend identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + description: EnvironmentAccessBackend resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentAccessBackend resource. + tags: + - EnvironmentAccessBackend + patch: + deprecated: false + description: Updates the EnvironmentAccessBackend resource. + operationId: api_environment_access_backends_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessBackend identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + description: The updated EnvironmentAccessBackend resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + description: EnvironmentAccessBackend resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentAccessBackend resource. + tags: + - EnvironmentAccessBackend + put: + deprecated: false + description: Replaces the EnvironmentAccessBackend resource. + operationId: api_environment_access_backends_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessBackend identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + description: The updated EnvironmentAccessBackend resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessBackend' + description: EnvironmentAccessBackend resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentAccessBackend resource. + tags: + - EnvironmentAccessBackend + /api/environment_access_databases: + get: + deprecated: false + description: Retrieves the collection of EnvironmentAccessDatabase resources. + operationId: api_environment_access_databases_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + type: array + description: EnvironmentAccessDatabase collection + summary: Retrieves the collection of EnvironmentAccessDatabase resources. + tags: + - EnvironmentAccessDatabase + post: + deprecated: false + description: Creates a EnvironmentAccessDatabase resource. + operationId: api_environment_access_databases_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + description: The new EnvironmentAccessDatabase resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + description: EnvironmentAccessDatabase resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentAccessDatabase resource. + tags: + - EnvironmentAccessDatabase + /api/environment_access_databases/{id}: + delete: + deprecated: false + description: Removes the EnvironmentAccessDatabase resource. + operationId: api_environment_access_databases_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessDatabase identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentAccessDatabase resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentAccessDatabase resource. + tags: + - EnvironmentAccessDatabase + get: + deprecated: false + description: Retrieves a EnvironmentAccessDatabase resource. + operationId: api_environment_access_databases_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessDatabase identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + description: EnvironmentAccessDatabase resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentAccessDatabase resource. + tags: + - EnvironmentAccessDatabase + patch: + deprecated: false + description: Updates the EnvironmentAccessDatabase resource. + operationId: api_environment_access_databases_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessDatabase identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + description: The updated EnvironmentAccessDatabase resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + description: EnvironmentAccessDatabase resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentAccessDatabase resource. + tags: + - EnvironmentAccessDatabase + put: + deprecated: false + description: Replaces the EnvironmentAccessDatabase resource. + operationId: api_environment_access_databases_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessDatabase identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + description: The updated EnvironmentAccessDatabase resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDatabase' + description: EnvironmentAccessDatabase resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentAccessDatabase resource. + tags: + - EnvironmentAccessDatabase + /api/environment_access_dev_tools: + get: + deprecated: false + description: Retrieves the collection of EnvironmentAccessDevTools resources. + operationId: api_environment_access_dev_tools_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + type: array + description: EnvironmentAccessDevTools collection + summary: Retrieves the collection of EnvironmentAccessDevTools resources. + tags: + - EnvironmentAccessDevTools + post: + deprecated: false + description: Creates a EnvironmentAccessDevTools resource. + operationId: api_environment_access_dev_tools_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + description: The new EnvironmentAccessDevTools resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + description: EnvironmentAccessDevTools resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentAccessDevTools resource. + tags: + - EnvironmentAccessDevTools + /api/environment_access_dev_tools/{id}: + delete: + deprecated: false + description: Removes the EnvironmentAccessDevTools resource. + operationId: api_environment_access_dev_tools_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessDevTools identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentAccessDevTools resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentAccessDevTools resource. + tags: + - EnvironmentAccessDevTools + get: + deprecated: false + description: Retrieves a EnvironmentAccessDevTools resource. + operationId: api_environment_access_dev_tools_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessDevTools identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + description: EnvironmentAccessDevTools resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentAccessDevTools resource. + tags: + - EnvironmentAccessDevTools + patch: + deprecated: false + description: Updates the EnvironmentAccessDevTools resource. + operationId: api_environment_access_dev_tools_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessDevTools identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + description: The updated EnvironmentAccessDevTools resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + description: EnvironmentAccessDevTools resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentAccessDevTools resource. + tags: + - EnvironmentAccessDevTools + put: + deprecated: false + description: Replaces the EnvironmentAccessDevTools resource. + operationId: api_environment_access_dev_tools_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessDevTools identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + description: The updated EnvironmentAccessDevTools resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessDevTools' + description: EnvironmentAccessDevTools resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentAccessDevTools resource. + tags: + - EnvironmentAccessDevTools + /api/environment_access_frontends: + get: + deprecated: false + description: Retrieves the collection of EnvironmentAccessFrontend resources. + operationId: api_environment_access_frontends_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + type: array + description: EnvironmentAccessFrontend collection + summary: Retrieves the collection of EnvironmentAccessFrontend resources. + tags: + - EnvironmentAccessFrontend + post: + deprecated: false + description: Creates a EnvironmentAccessFrontend resource. + operationId: api_environment_access_frontends_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + description: The new EnvironmentAccessFrontend resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + description: EnvironmentAccessFrontend resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentAccessFrontend resource. + tags: + - EnvironmentAccessFrontend + /api/environment_access_frontends/{id}: + delete: + deprecated: false + description: Removes the EnvironmentAccessFrontend resource. + operationId: api_environment_access_frontends_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessFrontend identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentAccessFrontend resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentAccessFrontend resource. + tags: + - EnvironmentAccessFrontend + get: + deprecated: false + description: Retrieves a EnvironmentAccessFrontend resource. + operationId: api_environment_access_frontends_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessFrontend identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + description: EnvironmentAccessFrontend resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentAccessFrontend resource. + tags: + - EnvironmentAccessFrontend + patch: + deprecated: false + description: Updates the EnvironmentAccessFrontend resource. + operationId: api_environment_access_frontends_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessFrontend identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + description: The updated EnvironmentAccessFrontend resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + description: EnvironmentAccessFrontend resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentAccessFrontend resource. + tags: + - EnvironmentAccessFrontend + put: + deprecated: false + description: Replaces the EnvironmentAccessFrontend resource. + operationId: api_environment_access_frontends_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessFrontend identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + description: The updated EnvironmentAccessFrontend resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessFrontend' + description: EnvironmentAccessFrontend resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentAccessFrontend resource. + tags: + - EnvironmentAccessFrontend + /api/environment_access_mailboxes: + get: + deprecated: false + description: Retrieves the collection of EnvironmentAccessMailbox resources. + operationId: api_environment_access_mailboxes_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + type: array + description: EnvironmentAccessMailbox collection + summary: Retrieves the collection of EnvironmentAccessMailbox resources. + tags: + - EnvironmentAccessMailbox + post: + deprecated: false + description: Creates a EnvironmentAccessMailbox resource. + operationId: api_environment_access_mailboxes_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + description: The new EnvironmentAccessMailbox resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + description: EnvironmentAccessMailbox resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentAccessMailbox resource. + tags: + - EnvironmentAccessMailbox + /api/environment_access_mailboxes/{id}: + delete: + deprecated: false + description: Removes the EnvironmentAccessMailbox resource. + operationId: api_environment_access_mailboxes_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessMailbox identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentAccessMailbox resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentAccessMailbox resource. + tags: + - EnvironmentAccessMailbox + get: + deprecated: false + description: Retrieves a EnvironmentAccessMailbox resource. + operationId: api_environment_access_mailboxes_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessMailbox identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + description: EnvironmentAccessMailbox resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentAccessMailbox resource. + tags: + - EnvironmentAccessMailbox + patch: + deprecated: false + description: Updates the EnvironmentAccessMailbox resource. + operationId: api_environment_access_mailboxes_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessMailbox identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + description: The updated EnvironmentAccessMailbox resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + description: EnvironmentAccessMailbox resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentAccessMailbox resource. + tags: + - EnvironmentAccessMailbox + put: + deprecated: false + description: Replaces the EnvironmentAccessMailbox resource. + operationId: api_environment_access_mailboxes_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessMailbox identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + description: The updated EnvironmentAccessMailbox resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessMailbox' + description: EnvironmentAccessMailbox resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentAccessMailbox resource. + tags: + - EnvironmentAccessMailbox + /api/environment_access_rabbits: + get: + deprecated: false + description: Retrieves the collection of EnvironmentAccessRabbit resources. + operationId: api_environment_access_rabbits_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + type: array + description: EnvironmentAccessRabbit collection + summary: Retrieves the collection of EnvironmentAccessRabbit resources. + tags: + - EnvironmentAccessRabbit + post: + deprecated: false + description: Creates a EnvironmentAccessRabbit resource. + operationId: api_environment_access_rabbits_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + description: The new EnvironmentAccessRabbit resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + description: EnvironmentAccessRabbit resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentAccessRabbit resource. + tags: + - EnvironmentAccessRabbit + /api/environment_access_rabbits/{id}: + delete: + deprecated: false + description: Removes the EnvironmentAccessRabbit resource. + operationId: api_environment_access_rabbits_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessRabbit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentAccessRabbit resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentAccessRabbit resource. + tags: + - EnvironmentAccessRabbit + get: + deprecated: false + description: Retrieves a EnvironmentAccessRabbit resource. + operationId: api_environment_access_rabbits_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessRabbit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + description: EnvironmentAccessRabbit resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentAccessRabbit resource. + tags: + - EnvironmentAccessRabbit + patch: + deprecated: false + description: Updates the EnvironmentAccessRabbit resource. + operationId: api_environment_access_rabbits_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessRabbit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + description: The updated EnvironmentAccessRabbit resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + description: EnvironmentAccessRabbit resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentAccessRabbit resource. + tags: + - EnvironmentAccessRabbit + put: + deprecated: false + description: Replaces the EnvironmentAccessRabbit resource. + operationId: api_environment_access_rabbits_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessRabbit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + description: The updated EnvironmentAccessRabbit resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRabbit' + description: EnvironmentAccessRabbit resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentAccessRabbit resource. + tags: + - EnvironmentAccessRabbit + /api/environment_access_redis: + get: + deprecated: false + description: Retrieves the collection of EnvironmentAccessRedis resources. + operationId: api_environment_access_redis_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessRedis' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessRedis' + type: array + description: EnvironmentAccessRedis collection + summary: Retrieves the collection of EnvironmentAccessRedis resources. + tags: + - EnvironmentAccessRedis + post: + deprecated: false + description: Creates a EnvironmentAccessRedis resource. + operationId: api_environment_access_redis_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + description: The new EnvironmentAccessRedis resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + description: EnvironmentAccessRedis resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentAccessRedis resource. + tags: + - EnvironmentAccessRedis + /api/environment_access_redis/{id}: + delete: + deprecated: false + description: Removes the EnvironmentAccessRedis resource. + operationId: api_environment_access_redis_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessRedis identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentAccessRedis resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentAccessRedis resource. + tags: + - EnvironmentAccessRedis + get: + deprecated: false + description: Retrieves a EnvironmentAccessRedis resource. + operationId: api_environment_access_redis_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessRedis identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + description: EnvironmentAccessRedis resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentAccessRedis resource. + tags: + - EnvironmentAccessRedis + patch: + deprecated: false + description: Updates the EnvironmentAccessRedis resource. + operationId: api_environment_access_redis_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessRedis identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + description: The updated EnvironmentAccessRedis resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + description: EnvironmentAccessRedis resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentAccessRedis resource. + tags: + - EnvironmentAccessRedis + put: + deprecated: false + description: Replaces the EnvironmentAccessRedis resource. + operationId: api_environment_access_redis_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessRedis identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + description: The updated EnvironmentAccessRedis resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessRedis' + description: EnvironmentAccessRedis resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentAccessRedis resource. + tags: + - EnvironmentAccessRedis + /api/environment_access_webshells: + get: + deprecated: false + description: Retrieves the collection of EnvironmentAccessWebshell resources. + operationId: api_environment_access_webshells_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + type: array + description: EnvironmentAccessWebshell collection + summary: Retrieves the collection of EnvironmentAccessWebshell resources. + tags: + - EnvironmentAccessWebshell + post: + deprecated: false + description: Creates a EnvironmentAccessWebshell resource. + operationId: api_environment_access_webshells_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + description: The new EnvironmentAccessWebshell resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + description: EnvironmentAccessWebshell resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentAccessWebshell resource. + tags: + - EnvironmentAccessWebshell + /api/environment_access_webshells/{id}: + delete: + deprecated: false + description: Removes the EnvironmentAccessWebshell resource. + operationId: api_environment_access_webshells_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessWebshell identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentAccessWebshell resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentAccessWebshell resource. + tags: + - EnvironmentAccessWebshell + get: + deprecated: false + description: Retrieves a EnvironmentAccessWebshell resource. + operationId: api_environment_access_webshells_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessWebshell identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + description: EnvironmentAccessWebshell resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentAccessWebshell resource. + tags: + - EnvironmentAccessWebshell + patch: + deprecated: false + description: Updates the EnvironmentAccessWebshell resource. + operationId: api_environment_access_webshells_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessWebshell identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + description: The updated EnvironmentAccessWebshell resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + description: EnvironmentAccessWebshell resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentAccessWebshell resource. + tags: + - EnvironmentAccessWebshell + put: + deprecated: false + description: Replaces the EnvironmentAccessWebshell resource. + operationId: api_environment_access_webshells_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccessWebshell identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + description: The updated EnvironmentAccessWebshell resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccessWebshell' + description: EnvironmentAccessWebshell resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentAccessWebshell resource. + tags: + - EnvironmentAccessWebshell + /api/environment_accesses: + get: + deprecated: false + description: Retrieves the collection of EnvironmentAccess resources. + operationId: api_environment_accesses_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: environment + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "environment[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: frontend + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "frontend[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: backend + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "backend[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: database + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "database[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: devTools + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "devTools[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: redis + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "redis[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: rabbit + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "rabbit[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: mailbox + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "mailbox[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: webshell + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "webshell[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccess' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentAccess' + type: array + description: EnvironmentAccess collection + summary: Retrieves the collection of EnvironmentAccess resources. + tags: + - EnvironmentAccess + post: + deprecated: false + description: Creates a EnvironmentAccess resource. + operationId: api_environment_accesses_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + description: The new EnvironmentAccess resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + description: EnvironmentAccess resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentAccess resource. + tags: + - EnvironmentAccess + /api/environment_accesses/{id}: + delete: + deprecated: false + description: Removes the EnvironmentAccess resource. + operationId: api_environment_accesses_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccess identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentAccess resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentAccess resource. + tags: + - EnvironmentAccess + get: + deprecated: false + description: Retrieves a EnvironmentAccess resource. + operationId: api_environment_accesses_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccess identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + description: EnvironmentAccess resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentAccess resource. + tags: + - EnvironmentAccess + patch: + deprecated: false + description: Updates the EnvironmentAccess resource. + operationId: api_environment_accesses_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccess identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + description: The updated EnvironmentAccess resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + description: EnvironmentAccess resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentAccess resource. + tags: + - EnvironmentAccess + put: + deprecated: false + description: Replaces the EnvironmentAccess resource. + operationId: api_environment_accesses_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentAccess identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + description: The updated EnvironmentAccess resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentAccess' + description: EnvironmentAccess resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentAccess resource. + tags: + - EnvironmentAccess + /api/environment_accesses/{id}/all-data: + get: + description: Gets all data what is related to the EnvironmentAccess resource + and its children + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.AllDataResponse' + description: All data of EnvironmentAccess queried successful + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentAccess.AllDataResponse' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing User + summary: Get all data of an EnvironmentAccess resource + tags: + - EnvironmentAccess + /api/environment_components: + get: + deprecated: false + description: Retrieves the collection of EnvironmentComponent resources. + operationId: api_environment_components_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: componentVersion + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "componentVersion[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: environment + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "environment[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentComponent' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentComponent' + type: array + description: EnvironmentComponent collection + summary: Retrieves the collection of EnvironmentComponent resources. + tags: + - EnvironmentComponent + post: + deprecated: false + description: Creates a EnvironmentComponent resource. + operationId: api_environment_components_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + description: The new EnvironmentComponent resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + description: EnvironmentComponent resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentComponent resource. + tags: + - EnvironmentComponent + /api/environment_components/{id}: + delete: + deprecated: false + description: Removes the EnvironmentComponent resource. + operationId: api_environment_components_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentComponent identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentComponent resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentComponent resource. + tags: + - EnvironmentComponent + get: + deprecated: false + description: Retrieves a EnvironmentComponent resource. + operationId: api_environment_components_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentComponent identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + description: EnvironmentComponent resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentComponent resource. + tags: + - EnvironmentComponent + patch: + deprecated: false + description: Updates the EnvironmentComponent resource. + operationId: api_environment_components_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentComponent identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + description: The updated EnvironmentComponent resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + description: EnvironmentComponent resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentComponent resource. + tags: + - EnvironmentComponent + put: + deprecated: false + description: Replaces the EnvironmentComponent resource. + operationId: api_environment_components_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentComponent identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + description: The updated EnvironmentComponent resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentComponent' + description: EnvironmentComponent resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentComponent resource. + tags: + - EnvironmentComponent + /api/environment_custom_domains: + get: + deprecated: false + description: Retrieves the collection of EnvironmentCustomDomain resources. + operationId: api_environment_custom_domains_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: environment + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "environment[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentCustomDomain' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentCustomDomain' + type: array + description: EnvironmentCustomDomain collection + summary: Retrieves the collection of EnvironmentCustomDomain resources. + tags: + - EnvironmentCustomDomain + post: + deprecated: false + description: Creates a EnvironmentCustomDomain resource. + operationId: api_environment_custom_domains_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + description: The new EnvironmentCustomDomain resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + description: EnvironmentCustomDomain resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentCustomDomain resource. + tags: + - EnvironmentCustomDomain + /api/environment_custom_domains/{id}: + delete: + deprecated: false + description: Removes the EnvironmentCustomDomain resource. + operationId: api_environment_custom_domains_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentCustomDomain identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentCustomDomain resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentCustomDomain resource. + tags: + - EnvironmentCustomDomain + get: + deprecated: false + description: Retrieves a EnvironmentCustomDomain resource. + operationId: api_environment_custom_domains_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentCustomDomain identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + description: EnvironmentCustomDomain resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentCustomDomain resource. + tags: + - EnvironmentCustomDomain + patch: + deprecated: false + description: Updates the EnvironmentCustomDomain resource. + operationId: api_environment_custom_domains_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentCustomDomain identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + description: The updated EnvironmentCustomDomain resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + description: EnvironmentCustomDomain resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentCustomDomain resource. + tags: + - EnvironmentCustomDomain + put: + deprecated: false + description: Replaces the EnvironmentCustomDomain resource. + operationId: api_environment_custom_domains_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentCustomDomain identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + description: The updated EnvironmentCustomDomain resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentCustomDomain' + description: EnvironmentCustomDomain resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentCustomDomain resource. + tags: + - EnvironmentCustomDomain + /api/environment_env_vars: + get: + deprecated: false + description: Retrieves the collection of EnvironmentEnvVar resources. + operationId: api_environment_env_vars_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: environment + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "environment[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: envVarType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "envVarType[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentEnvVar' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentEnvVar' + type: array + description: EnvironmentEnvVar collection + summary: Retrieves the collection of EnvironmentEnvVar resources. + tags: + - EnvironmentEnvVar + post: + deprecated: false + description: Creates a EnvironmentEnvVar resource. + operationId: api_environment_env_vars_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + description: The new EnvironmentEnvVar resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + description: EnvironmentEnvVar resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentEnvVar resource. + tags: + - EnvironmentEnvVar + /api/environment_env_vars/{id}: + delete: + deprecated: false + description: Removes the EnvironmentEnvVar resource. + operationId: api_environment_env_vars_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentEnvVar resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentEnvVar resource. + tags: + - EnvironmentEnvVar + get: + deprecated: false + description: Retrieves a EnvironmentEnvVar resource. + operationId: api_environment_env_vars_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + description: EnvironmentEnvVar resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentEnvVar resource. + tags: + - EnvironmentEnvVar + patch: + deprecated: false + description: Updates the EnvironmentEnvVar resource. + operationId: api_environment_env_vars_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + description: The updated EnvironmentEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + description: EnvironmentEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentEnvVar resource. + tags: + - EnvironmentEnvVar + put: + deprecated: false + description: Replaces the EnvironmentEnvVar resource. + operationId: api_environment_env_vars_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + description: The updated EnvironmentEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentEnvVar' + description: EnvironmentEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentEnvVar resource. + tags: + - EnvironmentEnvVar + /api/environment_magento_host_mappings: + get: + deprecated: false + description: Retrieves the collection of EnvironmentMagentoHostMapping resources. + operationId: api_environment_magento_host_mappings_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: environment + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "environment[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + type: array + description: EnvironmentMagentoHostMapping collection + summary: Retrieves the collection of EnvironmentMagentoHostMapping resources. + tags: + - EnvironmentMagentoHostMapping + post: + deprecated: false + description: Creates a EnvironmentMagentoHostMapping resource. + operationId: api_environment_magento_host_mappings_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + description: The new EnvironmentMagentoHostMapping resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + description: EnvironmentMagentoHostMapping resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a EnvironmentMagentoHostMapping resource. + tags: + - EnvironmentMagentoHostMapping + /api/environment_magento_host_mappings/{id}: + delete: + deprecated: false + description: Removes the EnvironmentMagentoHostMapping resource. + operationId: api_environment_magento_host_mappings_id_delete + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentMagentoHostMapping identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: EnvironmentMagentoHostMapping resource deleted + "404": + description: Resource not found + summary: Removes the EnvironmentMagentoHostMapping resource. + tags: + - EnvironmentMagentoHostMapping + get: + deprecated: false + description: Retrieves a EnvironmentMagentoHostMapping resource. + operationId: api_environment_magento_host_mappings_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentMagentoHostMapping identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + description: EnvironmentMagentoHostMapping resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentMagentoHostMapping resource. + tags: + - EnvironmentMagentoHostMapping + patch: + deprecated: false + description: Updates the EnvironmentMagentoHostMapping resource. + operationId: api_environment_magento_host_mappings_id_patch + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentMagentoHostMapping identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + description: The updated EnvironmentMagentoHostMapping resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + description: EnvironmentMagentoHostMapping resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the EnvironmentMagentoHostMapping resource. + tags: + - EnvironmentMagentoHostMapping + put: + deprecated: false + description: Replaces the EnvironmentMagentoHostMapping resource. + operationId: api_environment_magento_host_mappings_id_put + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentMagentoHostMapping identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + description: The updated EnvironmentMagentoHostMapping resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping' + description: EnvironmentMagentoHostMapping resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the EnvironmentMagentoHostMapping resource. + tags: + - EnvironmentMagentoHostMapping + /api/environment_message_histories: + get: + deprecated: false + description: Retrieves the collection of EnvironmentMessageHistory resources. + operationId: api_environment_message_histories_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/EnvironmentMessageHistory' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/EnvironmentMessageHistory' + type: array + description: EnvironmentMessageHistory collection + summary: Retrieves the collection of EnvironmentMessageHistory resources. + tags: + - EnvironmentMessageHistory + /api/environment_message_histories/{id}: + get: + deprecated: false + description: Retrieves a EnvironmentMessageHistory resource. + operationId: api_environment_message_histories_id_get + parameters: + - allowReserved: false + deprecated: false + description: EnvironmentMessageHistory identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentMessageHistory' + text/html: + schema: + $ref: '#/components/schemas/EnvironmentMessageHistory' + description: EnvironmentMessageHistory resource + "404": + description: Resource not found + summary: Retrieves a EnvironmentMessageHistory resource. + tags: + - EnvironmentMessageHistory + /api/environments: + get: + deprecated: false + description: Retrieves the collection of Environment resources. + operationId: api_environments_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: id + required: false + schema: + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "id[]" + required: false + schema: + items: + type: integer + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: project + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "project[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: project.team.id + required: false + schema: + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "project.team.id[]" + required: false + schema: + items: + type: integer + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: provider + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "provider[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: state + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "state[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: cluster + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "cluster[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: environmentAccess + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "environmentAccess[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: stateByInfra + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "stateByInfra[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + example: "1" + explode: false + in: query + name: "state[not]" + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + example: "[1,2,3]" + explode: false + in: query + name: "state[not][]" + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[updatedAt]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Environment-Environment.output' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Environment-Environment.output' + type: array + description: Environment collection + summary: Retrieves the collection of Environment resources. + tags: + - Environment + post: + deprecated: false + description: Creates a Environment resource. + operationId: api_environments_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + description: The new Environment resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + description: Environment resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Environment resource. + tags: + - Environment + /api/environments/{id}: + delete: + deprecated: false + description: Removes the Environment resource. + operationId: api_environments_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Environment identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Environment resource deleted + "404": + description: Resource not found + summary: Removes the Environment resource. + tags: + - Environment + get: + deprecated: false + description: Retrieves a Environment resource. + operationId: api_environments_id_get + parameters: + - allowReserved: false + deprecated: false + description: Environment identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + description: Environment resource + "404": + description: Resource not found + summary: Retrieves a Environment resource. + tags: + - Environment + patch: + deprecated: false + description: Updates the Environment resource. + operationId: api_environments_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Environment identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + description: The updated Environment resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + description: Environment resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Environment resource. + tags: + - Environment + put: + deprecated: false + description: Replaces the Environment resource. + operationId: api_environments_id_put + parameters: + - allowReserved: false + deprecated: false + description: Environment identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.input' + description: The updated Environment resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + description: Environment resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Environment resource. + tags: + - Environment + /api/environments/{id}/build-and-deploy: + patch: + description: It sends a Build command through the Amqp to the infrastructure + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + description: "" + required: false + responses: + "200": + content: + application/json: + schema: + type: object + description: The process has been finished successfully + "201": + content: + application/json: + schema: + type: object + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing Environment + summary: Build commad for Environment + tags: + - Environment + /api/environments/{id}/costs: + get: + description: These costs data is came from Kubernetes (Kubecost) + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Environment.Costs' + description: The process has been finished successfully + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Environment.Costs' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing Environment + summary: Get all costs data that related to the Environment + tags: + - Environment + /api/environments/{id}/export-database: + put: + description: It sends a Build command through the Amqp to the infrastructure + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + description: "" + required: false + responses: + "200": + content: + application/json: + schema: + type: object + description: The process has been finished successfully + "201": + content: + application/json: + schema: + type: object + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing Environment + summary: Build commad for Environment + tags: + - Environment + /api/environments/{id}/export-media: + put: + description: It sends a Build command through the Amqp to the infrastructure + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + description: "" + required: false + responses: + "200": + content: + application/json: + schema: + type: object + description: The process has been finished successfully + "201": + content: + application/json: + schema: + type: object + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing Environment + summary: Build commad for Environment + tags: + - Environment + /api/environments/{id}/import-database: + post: + description: It sends a Build command through the Amqp to the infrastructure + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + description: "" + required: false + responses: + "200": + content: + application/json: + schema: + type: object + description: The process has been finished successfully + "201": + content: + application/json: + schema: + type: object + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing Environment + summary: Build commad for Environment + tags: + - Environment + /api/environments/{id}/import-media: + post: + description: It sends a Build command through the Amqp to the infrastructure + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + description: "" + required: false + responses: + "200": + content: + application/json: + schema: + type: object + description: The process has been finished successfully + "201": + content: + application/json: + schema: + type: object + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing Environment + summary: Build commad for Environment + tags: + - Environment + /api/environments/{id}/logs: + get: + description: It sends a request to infra to stream logs to a mercure topic. + The topic is in the response + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + - allowReserved: false + deprecated: false + description: "" + explode: false + in: header + name: x-filters + required: false + schema: + type: string + style: simple + - allowReserved: false + deprecated: false + description: "" + explode: false + in: header + name: x-offset + required: false + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Environment.LogStreamResponse' + description: The log request has been sent successfully + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Environment.LogStreamResponse' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing Environment + summary: Create a request to view logs + tags: + - Environment + /api/environments/{id}/progressbar: + get: + deprecated: false + description: Retrieves a Environment resource. + operationId: api_environments_idprogressbar_get + parameters: + - allowReserved: false + deprecated: false + description: Environment identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + text/html: + schema: + $ref: '#/components/schemas/Environment-Environment.output' + description: Environment resource + "404": + description: Resource not found + summary: Retrieves a Environment resource. + tags: + - Environment + /api/exported_datas: + get: + deprecated: false + description: Retrieves the collection of ExportedData resources. + operationId: api_exported_datas_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: dataTransferDataType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "dataTransferDataType[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: environment + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "environment[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: state + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "state[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[createdAt]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[updatedAt]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ExportedData' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ExportedData' + type: array + description: ExportedData collection + summary: Retrieves the collection of ExportedData resources. + tags: + - ExportedData + post: + deprecated: false + description: Creates a ExportedData resource. + operationId: api_exported_datas_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + description: The new ExportedData resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + description: ExportedData resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ExportedData resource. + tags: + - ExportedData + /api/exported_datas/{id}: + delete: + deprecated: false + description: Removes the ExportedData resource. + operationId: api_exported_datas_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ExportedData identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ExportedData resource deleted + "404": + description: Resource not found + summary: Removes the ExportedData resource. + tags: + - ExportedData + get: + deprecated: false + description: Retrieves a ExportedData resource. + operationId: api_exported_datas_id_get + parameters: + - allowReserved: false + deprecated: false + description: ExportedData identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + description: ExportedData resource + "404": + description: Resource not found + summary: Retrieves a ExportedData resource. + tags: + - ExportedData + patch: + deprecated: false + description: Updates the ExportedData resource. + operationId: api_exported_datas_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ExportedData identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ExportedData' + description: The updated ExportedData resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + description: ExportedData resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ExportedData resource. + tags: + - ExportedData + put: + deprecated: false + description: Replaces the ExportedData resource. + operationId: api_exported_datas_id_put + parameters: + - allowReserved: false + deprecated: false + description: ExportedData identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + description: The updated ExportedData resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExportedData' + text/html: + schema: + $ref: '#/components/schemas/ExportedData' + description: ExportedData resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ExportedData resource. + tags: + - ExportedData + /api/git_types: + get: + deprecated: false + description: Retrieves the collection of GitType resources. + operationId: api_git_types_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/GitType' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/GitType' + type: array + description: GitType collection + summary: Retrieves the collection of GitType resources. + tags: + - GitType + post: + deprecated: false + description: Creates a GitType resource. + operationId: api_git_types_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + description: The new GitType resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + description: GitType resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a GitType resource. + tags: + - GitType + /api/git_types/{id}: + delete: + deprecated: false + description: Removes the GitType resource. + operationId: api_git_types_id_delete + parameters: + - allowReserved: false + deprecated: false + description: GitType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: GitType resource deleted + "404": + description: Resource not found + summary: Removes the GitType resource. + tags: + - GitType + get: + deprecated: false + description: Retrieves a GitType resource. + operationId: api_git_types_id_get + parameters: + - allowReserved: false + deprecated: false + description: GitType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + description: GitType resource + "404": + description: Resource not found + summary: Retrieves a GitType resource. + tags: + - GitType + patch: + deprecated: false + description: Updates the GitType resource. + operationId: api_git_types_id_patch + parameters: + - allowReserved: false + deprecated: false + description: GitType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/GitType' + description: The updated GitType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + description: GitType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the GitType resource. + tags: + - GitType + put: + deprecated: false + description: Replaces the GitType resource. + operationId: api_git_types_id_put + parameters: + - allowReserved: false + deprecated: false + description: GitType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + description: The updated GitType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GitType' + text/html: + schema: + $ref: '#/components/schemas/GitType' + description: GitType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the GitType resource. + tags: + - GitType + /api/gits: + get: + deprecated: false + description: Retrieves the collection of Git resources. + operationId: api_gits_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: project + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "project[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: gitType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "gitType[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: credentialType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "credentialType[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: cryptoKeyType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "cryptoKeyType[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Git-Git.output' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Git-Git.output' + type: array + description: Git collection + summary: Retrieves the collection of Git resources. + tags: + - Git + post: + deprecated: false + description: Creates a Git resource. + operationId: api_gits_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.input' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.input' + description: The new Git resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + description: Git resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Git resource. + tags: + - Git + /api/gits/{id}: + delete: + deprecated: false + description: Removes the Git resource. + operationId: api_gits_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Git identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Git resource deleted + "404": + description: Resource not found + summary: Removes the Git resource. + tags: + - Git + get: + deprecated: false + description: Retrieves a Git resource. + operationId: api_gits_id_get + parameters: + - allowReserved: false + deprecated: false + description: Git identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + description: Git resource + "404": + description: Resource not found + summary: Retrieves a Git resource. + tags: + - Git + patch: + deprecated: false + description: Updates the Git resource. + operationId: api_gits_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Git identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Git-Git.input' + description: The updated Git resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + description: Git resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Git resource. + tags: + - Git + put: + deprecated: false + description: Replaces the Git resource. + operationId: api_gits_id_put + parameters: + - allowReserved: false + deprecated: false + description: Git identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.input' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.input' + description: The updated Git resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Git-Git.output' + text/html: + schema: + $ref: '#/components/schemas/Git-Git.output' + description: Git resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Git resource. + tags: + - Git + /api/gits/{id}/connect-test: + get: + description: It will tests the repository connection by the added credentials + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/_api_gits__id__connect_test_get_200_response' + description: The query run successfully + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/_api_gits__id__connect_test_get_200_response' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing Git + summary: Get information about the repository connection + tags: + - Git + /api/imported_datas: + get: + deprecated: false + description: Retrieves the collection of ImportedData resources. + operationId: api_imported_datas_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: environment + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "environment[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: dataTransferDataType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "dataTransferDataType[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: state + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "state[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[createdAt]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[updatedAt]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ImportedData' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ImportedData' + type: array + description: ImportedData collection + summary: Retrieves the collection of ImportedData resources. + tags: + - ImportedData + post: + deprecated: false + description: Creates a ImportedData resource. + operationId: api_imported_datas_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + description: The new ImportedData resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + description: ImportedData resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ImportedData resource. + tags: + - ImportedData + /api/imported_datas/{id}: + delete: + deprecated: false + description: Removes the ImportedData resource. + operationId: api_imported_datas_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ImportedData identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ImportedData resource deleted + "404": + description: Resource not found + summary: Removes the ImportedData resource. + tags: + - ImportedData + get: + deprecated: false + description: Retrieves a ImportedData resource. + operationId: api_imported_datas_id_get + parameters: + - allowReserved: false + deprecated: false + description: ImportedData identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + description: ImportedData resource + "404": + description: Resource not found + summary: Retrieves a ImportedData resource. + tags: + - ImportedData + patch: + deprecated: false + description: Updates the ImportedData resource. + operationId: api_imported_datas_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ImportedData identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ImportedData' + description: The updated ImportedData resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + description: ImportedData resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ImportedData resource. + tags: + - ImportedData + put: + deprecated: false + description: Replaces the ImportedData resource. + operationId: api_imported_datas_id_put + parameters: + - allowReserved: false + deprecated: false + description: ImportedData identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + description: The updated ImportedData resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ImportedData' + text/html: + schema: + $ref: '#/components/schemas/ImportedData' + description: ImportedData resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ImportedData resource. + tags: + - ImportedData + /api/invitations: + get: + deprecated: false + description: Retrieves the collection of Invitation resources. + operationId: api_invitations_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: id + required: false + schema: + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "id[]" + required: false + schema: + items: + type: integer + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: user + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "user[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: team + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "team[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: state + required: false + schema: + type: boolean + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "state[]" + required: false + schema: + items: + type: boolean + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[updatedAt]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Invitation-Invitation.output' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Invitation-Invitation.output' + type: array + description: Invitation collection + summary: Retrieves the collection of Invitation resources. + tags: + - Invitation + post: + deprecated: false + description: Creates a Invitation resource. + operationId: api_invitations_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + description: The new Invitation resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + description: Invitation resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Invitation resource. + tags: + - Invitation + /api/invitations/{id}: + delete: + deprecated: false + description: Removes the Invitation resource. + operationId: api_invitations_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Invitation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Invitation resource deleted + "404": + description: Resource not found + summary: Removes the Invitation resource. + tags: + - Invitation + get: + deprecated: false + description: Retrieves a Invitation resource. + operationId: api_invitations_id_get + parameters: + - allowReserved: false + deprecated: false + description: Invitation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + description: Invitation resource + "404": + description: Resource not found + summary: Retrieves a Invitation resource. + tags: + - Invitation + patch: + deprecated: false + description: Updates the Invitation resource. + operationId: api_invitations_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Invitation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + description: The updated Invitation resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + description: Invitation resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Invitation resource. + tags: + - Invitation + put: + deprecated: false + description: Replaces the Invitation resource. + operationId: api_invitations_id_put + parameters: + - allowReserved: false + deprecated: false + description: Invitation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.input' + description: The updated Invitation resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + text/html: + schema: + $ref: '#/components/schemas/Invitation-Invitation.output' + description: Invitation resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Invitation resource. + tags: + - Invitation + /api/organisation_env_vars: + get: + deprecated: false + description: Retrieves the collection of OrganisationEnvVar resources. + operationId: api_organisation_env_vars_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: organisation + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "organisation[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: envVarType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "envVarType[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/OrganisationEnvVar' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/OrganisationEnvVar' + type: array + description: OrganisationEnvVar collection + summary: Retrieves the collection of OrganisationEnvVar resources. + tags: + - OrganisationEnvVar + post: + deprecated: false + description: Creates a OrganisationEnvVar resource. + operationId: api_organisation_env_vars_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + description: The new OrganisationEnvVar resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + description: OrganisationEnvVar resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a OrganisationEnvVar resource. + tags: + - OrganisationEnvVar + /api/organisation_env_vars/{id}: + delete: + deprecated: false + description: Removes the OrganisationEnvVar resource. + operationId: api_organisation_env_vars_id_delete + parameters: + - allowReserved: false + deprecated: false + description: OrganisationEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: OrganisationEnvVar resource deleted + "404": + description: Resource not found + summary: Removes the OrganisationEnvVar resource. + tags: + - OrganisationEnvVar + get: + deprecated: false + description: Retrieves a OrganisationEnvVar resource. + operationId: api_organisation_env_vars_id_get + parameters: + - allowReserved: false + deprecated: false + description: OrganisationEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + description: OrganisationEnvVar resource + "404": + description: Resource not found + summary: Retrieves a OrganisationEnvVar resource. + tags: + - OrganisationEnvVar + patch: + deprecated: false + description: Updates the OrganisationEnvVar resource. + operationId: api_organisation_env_vars_id_patch + parameters: + - allowReserved: false + deprecated: false + description: OrganisationEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + description: The updated OrganisationEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + description: OrganisationEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the OrganisationEnvVar resource. + tags: + - OrganisationEnvVar + put: + deprecated: false + description: Replaces the OrganisationEnvVar resource. + operationId: api_organisation_env_vars_id_put + parameters: + - allowReserved: false + deprecated: false + description: OrganisationEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + description: The updated OrganisationEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + text/html: + schema: + $ref: '#/components/schemas/OrganisationEnvVar' + description: OrganisationEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the OrganisationEnvVar resource. + tags: + - OrganisationEnvVar + /api/organisations: + get: + deprecated: false + description: Retrieves the collection of Organisation resources. + operationId: api_organisations_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: name + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "name[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: stateByInfra + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "stateByInfra[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: team + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "team[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Organisation-Organisation.output' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Organisation-Organisation.output' + type: array + description: Organisation collection + summary: Retrieves the collection of Organisation resources. + tags: + - Organisation + post: + deprecated: false + description: Creates a Organisation resource. + operationId: api_organisations_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + description: The new Organisation resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + description: Organisation resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Organisation resource. + tags: + - Organisation + /api/organisations/{id}: + delete: + deprecated: false + description: Removes the Organisation resource. + operationId: api_organisations_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Organisation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Organisation resource deleted + "404": + description: Resource not found + summary: Removes the Organisation resource. + tags: + - Organisation + get: + deprecated: false + description: Retrieves a Organisation resource. + operationId: api_organisations_id_get + parameters: + - allowReserved: false + deprecated: false + description: Organisation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + description: Organisation resource + "404": + description: Resource not found + summary: Retrieves a Organisation resource. + tags: + - Organisation + patch: + deprecated: false + description: Updates the Organisation resource. + operationId: api_organisations_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Organisation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + description: The updated Organisation resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + description: Organisation resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Organisation resource. + tags: + - Organisation + put: + deprecated: false + description: Replaces the Organisation resource. + operationId: api_organisations_id_put + parameters: + - allowReserved: false + deprecated: false + description: Organisation identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.input' + description: The updated Organisation resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + text/html: + schema: + $ref: '#/components/schemas/Organisation-Organisation.output' + description: Organisation resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Organisation resource. + tags: + - Organisation + /api/prices: + get: + deprecated: false + description: Retrieves the collection of Price resources. + operationId: api_prices_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: product + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "product[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Price' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Price' + type: array + description: Price collection + summary: Retrieves the collection of Price resources. + tags: + - Price + post: + deprecated: false + description: Creates a Price resource. + operationId: api_prices_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + description: The new Price resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + description: Price resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Price resource. + tags: + - Price + /api/prices/{id}: + delete: + deprecated: false + description: Removes the Price resource. + operationId: api_prices_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Price identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Price resource deleted + "404": + description: Resource not found + summary: Removes the Price resource. + tags: + - Price + get: + deprecated: false + description: Retrieves a Price resource. + operationId: api_prices_id_get + parameters: + - allowReserved: false + deprecated: false + description: Price identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + description: Price resource + "404": + description: Resource not found + summary: Retrieves a Price resource. + tags: + - Price + patch: + deprecated: false + description: Updates the Price resource. + operationId: api_prices_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Price identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Price' + description: The updated Price resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + description: Price resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Price resource. + tags: + - Price + put: + deprecated: false + description: Replaces the Price resource. + operationId: api_prices_id_put + parameters: + - allowReserved: false + deprecated: false + description: Price identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + description: The updated Price resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Price' + text/html: + schema: + $ref: '#/components/schemas/Price' + description: Price resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Price resource. + tags: + - Price + /api/products: + get: + deprecated: false + description: Retrieves the collection of Product resources. + operationId: api_products_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: defaultPrice + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "defaultPrice[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: cluster + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "cluster[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Product-Product.output' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Product-Product.output' + type: array + description: Product collection + summary: Retrieves the collection of Product resources. + tags: + - Product + post: + deprecated: false + description: Creates a Product resource. + operationId: api_products_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.input' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.input' + description: The new Product resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + description: Product resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Product resource. + tags: + - Product + /api/products/{id}: + delete: + deprecated: false + description: Removes the Product resource. + operationId: api_products_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Product identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Product resource deleted + "404": + description: Resource not found + summary: Removes the Product resource. + tags: + - Product + get: + deprecated: false + description: Retrieves a Product resource. + operationId: api_products_id_get + parameters: + - allowReserved: false + deprecated: false + description: Product identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + description: Product resource + "404": + description: Resource not found + summary: Retrieves a Product resource. + tags: + - Product + patch: + deprecated: false + description: Updates the Product resource. + operationId: api_products_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Product identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Product-Product.input' + description: The updated Product resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + description: Product resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Product resource. + tags: + - Product + put: + deprecated: false + description: Replaces the Product resource. + operationId: api_products_id_put + parameters: + - allowReserved: false + deprecated: false + description: Product identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.input' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.input' + description: The updated Product resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Product-Product.output' + text/html: + schema: + $ref: '#/components/schemas/Product-Product.output' + description: Product resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Product resource. + tags: + - Product + /api/project_access_gits: + get: + deprecated: false + description: Retrieves the collection of ProjectAccessGit resources. + operationId: api_project_access_gits_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectAccess + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectAccess[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ProjectAccessGit' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ProjectAccessGit' + type: array + description: ProjectAccessGit collection + summary: Retrieves the collection of ProjectAccessGit resources. + tags: + - ProjectAccessGit + post: + deprecated: false + description: Creates a ProjectAccessGit resource. + operationId: api_project_access_gits_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + description: The new ProjectAccessGit resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + description: ProjectAccessGit resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ProjectAccessGit resource. + tags: + - ProjectAccessGit + /api/project_access_gits/{id}: + delete: + deprecated: false + description: Removes the ProjectAccessGit resource. + operationId: api_project_access_gits_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessGit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ProjectAccessGit resource deleted + "404": + description: Resource not found + summary: Removes the ProjectAccessGit resource. + tags: + - ProjectAccessGit + get: + deprecated: false + description: Retrieves a ProjectAccessGit resource. + operationId: api_project_access_gits_id_get + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessGit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + description: ProjectAccessGit resource + "404": + description: Resource not found + summary: Retrieves a ProjectAccessGit resource. + tags: + - ProjectAccessGit + patch: + deprecated: false + description: Updates the ProjectAccessGit resource. + operationId: api_project_access_gits_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessGit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + description: The updated ProjectAccessGit resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + description: ProjectAccessGit resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ProjectAccessGit resource. + tags: + - ProjectAccessGit + put: + deprecated: false + description: Replaces the ProjectAccessGit resource. + operationId: api_project_access_gits_id_put + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessGit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + description: The updated ProjectAccessGit resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessGit' + description: ProjectAccessGit resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ProjectAccessGit resource. + tags: + - ProjectAccessGit + /api/project_access_registries: + get: + deprecated: false + description: Retrieves the collection of ProjectAccessRegistry resources. + operationId: api_project_access_registries_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectAccess + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectAccess[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ProjectAccessRegistry' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ProjectAccessRegistry' + type: array + description: ProjectAccessRegistry collection + summary: Retrieves the collection of ProjectAccessRegistry resources. + tags: + - ProjectAccessRegistry + post: + deprecated: false + description: Creates a ProjectAccessRegistry resource. + operationId: api_project_access_registries_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + description: The new ProjectAccessRegistry resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + description: ProjectAccessRegistry resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ProjectAccessRegistry resource. + tags: + - ProjectAccessRegistry + /api/project_access_registries/{id}: + delete: + deprecated: false + description: Removes the ProjectAccessRegistry resource. + operationId: api_project_access_registries_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessRegistry identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ProjectAccessRegistry resource deleted + "404": + description: Resource not found + summary: Removes the ProjectAccessRegistry resource. + tags: + - ProjectAccessRegistry + get: + deprecated: false + description: Retrieves a ProjectAccessRegistry resource. + operationId: api_project_access_registries_id_get + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessRegistry identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + description: ProjectAccessRegistry resource + "404": + description: Resource not found + summary: Retrieves a ProjectAccessRegistry resource. + tags: + - ProjectAccessRegistry + patch: + deprecated: false + description: Updates the ProjectAccessRegistry resource. + operationId: api_project_access_registries_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessRegistry identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + description: The updated ProjectAccessRegistry resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + description: ProjectAccessRegistry resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ProjectAccessRegistry resource. + tags: + - ProjectAccessRegistry + put: + deprecated: false + description: Replaces the ProjectAccessRegistry resource. + operationId: api_project_access_registries_id_put + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessRegistry identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + description: The updated ProjectAccessRegistry resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessRegistry' + description: ProjectAccessRegistry resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ProjectAccessRegistry resource. + tags: + - ProjectAccessRegistry + /api/project_access_service_accounts: + get: + deprecated: false + description: Retrieves the collection of ProjectAccessServiceAccount resources. + operationId: api_project_access_service_accounts_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectAccess + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectAccess[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + type: array + description: ProjectAccessServiceAccount collection + summary: Retrieves the collection of ProjectAccessServiceAccount resources. + tags: + - ProjectAccessServiceAccount + post: + deprecated: false + description: Creates a ProjectAccessServiceAccount resource. + operationId: api_project_access_service_accounts_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + description: The new ProjectAccessServiceAccount resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + description: ProjectAccessServiceAccount resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ProjectAccessServiceAccount resource. + tags: + - ProjectAccessServiceAccount + /api/project_access_service_accounts/{id}: + delete: + deprecated: false + description: Removes the ProjectAccessServiceAccount resource. + operationId: api_project_access_service_accounts_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessServiceAccount identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ProjectAccessServiceAccount resource deleted + "404": + description: Resource not found + summary: Removes the ProjectAccessServiceAccount resource. + tags: + - ProjectAccessServiceAccount + get: + deprecated: false + description: Retrieves a ProjectAccessServiceAccount resource. + operationId: api_project_access_service_accounts_id_get + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessServiceAccount identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + description: ProjectAccessServiceAccount resource + "404": + description: Resource not found + summary: Retrieves a ProjectAccessServiceAccount resource. + tags: + - ProjectAccessServiceAccount + patch: + deprecated: false + description: Updates the ProjectAccessServiceAccount resource. + operationId: api_project_access_service_accounts_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessServiceAccount identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + description: The updated ProjectAccessServiceAccount resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + description: ProjectAccessServiceAccount resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ProjectAccessServiceAccount resource. + tags: + - ProjectAccessServiceAccount + put: + deprecated: false + description: Replaces the ProjectAccessServiceAccount resource. + operationId: api_project_access_service_accounts_id_put + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccessServiceAccount identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + description: The updated ProjectAccessServiceAccount resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccessServiceAccount' + description: ProjectAccessServiceAccount resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ProjectAccessServiceAccount resource. + tags: + - ProjectAccessServiceAccount + /api/project_accesses: + get: + deprecated: false + description: Retrieves the collection of ProjectAccess resources. + operationId: api_project_accesses_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectAccessGit + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectAccessGit[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectAccessRegistry + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectAccessRegistry[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectAccessServiceAccount + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectAccessServiceAccount[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ProjectAccess' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ProjectAccess' + type: array + description: ProjectAccess collection + summary: Retrieves the collection of ProjectAccess resources. + tags: + - ProjectAccess + post: + deprecated: false + description: Creates a ProjectAccess resource. + operationId: api_project_accesses_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + description: The new ProjectAccess resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + description: ProjectAccess resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ProjectAccess resource. + tags: + - ProjectAccess + /api/project_accesses/{id}: + delete: + deprecated: false + description: Removes the ProjectAccess resource. + operationId: api_project_accesses_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccess identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ProjectAccess resource deleted + "404": + description: Resource not found + summary: Removes the ProjectAccess resource. + tags: + - ProjectAccess + get: + deprecated: false + description: Retrieves a ProjectAccess resource. + operationId: api_project_accesses_id_get + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccess identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + description: ProjectAccess resource + "404": + description: Resource not found + summary: Retrieves a ProjectAccess resource. + tags: + - ProjectAccess + patch: + deprecated: false + description: Updates the ProjectAccess resource. + operationId: api_project_accesses_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccess identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectAccess' + description: The updated ProjectAccess resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + description: ProjectAccess resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ProjectAccess resource. + tags: + - ProjectAccess + put: + deprecated: false + description: Replaces the ProjectAccess resource. + operationId: api_project_accesses_id_put + parameters: + - allowReserved: false + deprecated: false + description: ProjectAccess identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + description: The updated ProjectAccess resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccess' + text/html: + schema: + $ref: '#/components/schemas/ProjectAccess' + description: ProjectAccess resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ProjectAccess resource. + tags: + - ProjectAccess + /api/project_env_vars: + get: + deprecated: false + description: Retrieves the collection of ProjectEnvVar resources. + operationId: api_project_env_vars_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: project + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "project[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: envVarType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "envVarType[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ProjectEnvVar' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ProjectEnvVar' + type: array + description: ProjectEnvVar collection + summary: Retrieves the collection of ProjectEnvVar resources. + tags: + - ProjectEnvVar + post: + deprecated: false + description: Creates a ProjectEnvVar resource. + operationId: api_project_env_vars_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + description: The new ProjectEnvVar resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + description: ProjectEnvVar resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ProjectEnvVar resource. + tags: + - ProjectEnvVar + /api/project_env_vars/{id}: + delete: + deprecated: false + description: Removes the ProjectEnvVar resource. + operationId: api_project_env_vars_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ProjectEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ProjectEnvVar resource deleted + "404": + description: Resource not found + summary: Removes the ProjectEnvVar resource. + tags: + - ProjectEnvVar + get: + deprecated: false + description: Retrieves a ProjectEnvVar resource. + operationId: api_project_env_vars_id_get + parameters: + - allowReserved: false + deprecated: false + description: ProjectEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + description: ProjectEnvVar resource + "404": + description: Resource not found + summary: Retrieves a ProjectEnvVar resource. + tags: + - ProjectEnvVar + patch: + deprecated: false + description: Updates the ProjectEnvVar resource. + operationId: api_project_env_vars_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ProjectEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + description: The updated ProjectEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + description: ProjectEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ProjectEnvVar resource. + tags: + - ProjectEnvVar + put: + deprecated: false + description: Replaces the ProjectEnvVar resource. + operationId: api_project_env_vars_id_put + parameters: + - allowReserved: false + deprecated: false + description: ProjectEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + description: The updated ProjectEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectEnvVar' + description: ProjectEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ProjectEnvVar resource. + tags: + - ProjectEnvVar + /api/project_type_version_env_var_examples: + get: + deprecated: false + description: Retrieves the collection of ProjectTypeVersionEnvVarExample resources. + operationId: api_project_type_version_env_var_examples_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectTypeVersionEnvVar + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectTypeVersionEnvVar[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + type: array + description: ProjectTypeVersionEnvVarExample collection + summary: Retrieves the collection of ProjectTypeVersionEnvVarExample resources. + tags: + - ProjectTypeVersionEnvVarExample + post: + deprecated: false + description: Creates a ProjectTypeVersionEnvVarExample resource. + operationId: api_project_type_version_env_var_examples_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + description: The new ProjectTypeVersionEnvVarExample resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + description: ProjectTypeVersionEnvVarExample resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ProjectTypeVersionEnvVarExample resource. + tags: + - ProjectTypeVersionEnvVarExample + /api/project_type_version_env_var_examples/{id}: + delete: + deprecated: false + description: Removes the ProjectTypeVersionEnvVarExample resource. + operationId: api_project_type_version_env_var_examples_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersionEnvVarExample identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ProjectTypeVersionEnvVarExample resource deleted + "404": + description: Resource not found + summary: Removes the ProjectTypeVersionEnvVarExample resource. + tags: + - ProjectTypeVersionEnvVarExample + get: + deprecated: false + description: Retrieves a ProjectTypeVersionEnvVarExample resource. + operationId: api_project_type_version_env_var_examples_id_get + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersionEnvVarExample identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + description: ProjectTypeVersionEnvVarExample resource + "404": + description: Resource not found + summary: Retrieves a ProjectTypeVersionEnvVarExample resource. + tags: + - ProjectTypeVersionEnvVarExample + patch: + deprecated: false + description: Updates the ProjectTypeVersionEnvVarExample resource. + operationId: api_project_type_version_env_var_examples_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersionEnvVarExample identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + description: The updated ProjectTypeVersionEnvVarExample resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + description: ProjectTypeVersionEnvVarExample resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ProjectTypeVersionEnvVarExample resource. + tags: + - ProjectTypeVersionEnvVarExample + put: + deprecated: false + description: Replaces the ProjectTypeVersionEnvVarExample resource. + operationId: api_project_type_version_env_var_examples_id_put + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersionEnvVarExample identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + description: The updated ProjectTypeVersionEnvVarExample resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVarExample' + description: ProjectTypeVersionEnvVarExample resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ProjectTypeVersionEnvVarExample resource. + tags: + - ProjectTypeVersionEnvVarExample + /api/project_type_version_env_vars: + get: + deprecated: false + description: Retrieves the collection of ProjectTypeVersionEnvVar resources. + operationId: api_project_type_version_env_vars_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectTypeVersion + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectTypeVersion[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: envVarValidations + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "envVarValidations[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + type: array + description: ProjectTypeVersionEnvVar collection + summary: Retrieves the collection of ProjectTypeVersionEnvVar resources. + tags: + - ProjectTypeVersionEnvVar + post: + deprecated: false + description: Creates a ProjectTypeVersionEnvVar resource. + operationId: api_project_type_version_env_vars_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + description: The new ProjectTypeVersionEnvVar resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + description: ProjectTypeVersionEnvVar resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ProjectTypeVersionEnvVar resource. + tags: + - ProjectTypeVersionEnvVar + /api/project_type_version_env_vars/{id}: + delete: + deprecated: false + description: Removes the ProjectTypeVersionEnvVar resource. + operationId: api_project_type_version_env_vars_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersionEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ProjectTypeVersionEnvVar resource deleted + "404": + description: Resource not found + summary: Removes the ProjectTypeVersionEnvVar resource. + tags: + - ProjectTypeVersionEnvVar + get: + deprecated: false + description: Retrieves a ProjectTypeVersionEnvVar resource. + operationId: api_project_type_version_env_vars_id_get + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersionEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + description: ProjectTypeVersionEnvVar resource + "404": + description: Resource not found + summary: Retrieves a ProjectTypeVersionEnvVar resource. + tags: + - ProjectTypeVersionEnvVar + patch: + deprecated: false + description: Updates the ProjectTypeVersionEnvVar resource. + operationId: api_project_type_version_env_vars_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersionEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + description: The updated ProjectTypeVersionEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + description: ProjectTypeVersionEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ProjectTypeVersionEnvVar resource. + tags: + - ProjectTypeVersionEnvVar + put: + deprecated: false + description: Replaces the ProjectTypeVersionEnvVar resource. + operationId: api_project_type_version_env_vars_id_put + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersionEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + description: The updated ProjectTypeVersionEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersionEnvVar' + description: ProjectTypeVersionEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ProjectTypeVersionEnvVar resource. + tags: + - ProjectTypeVersionEnvVar + /api/project_type_versions: + get: + deprecated: false + description: Retrieves the collection of ProjectTypeVersion resources. + operationId: api_project_type_versions_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectType[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ProjectTypeVersion' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ProjectTypeVersion' + type: array + description: ProjectTypeVersion collection + summary: Retrieves the collection of ProjectTypeVersion resources. + tags: + - ProjectTypeVersion + post: + deprecated: false + description: Creates a ProjectTypeVersion resource. + operationId: api_project_type_versions_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + description: The new ProjectTypeVersion resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + description: ProjectTypeVersion resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ProjectTypeVersion resource. + tags: + - ProjectTypeVersion + /api/project_type_versions/{id}: + delete: + deprecated: false + description: Removes the ProjectTypeVersion resource. + operationId: api_project_type_versions_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersion identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ProjectTypeVersion resource deleted + "404": + description: Resource not found + summary: Removes the ProjectTypeVersion resource. + tags: + - ProjectTypeVersion + get: + deprecated: false + description: Retrieves a ProjectTypeVersion resource. + operationId: api_project_type_versions_id_get + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersion identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + description: ProjectTypeVersion resource + "404": + description: Resource not found + summary: Retrieves a ProjectTypeVersion resource. + tags: + - ProjectTypeVersion + patch: + deprecated: false + description: Updates the ProjectTypeVersion resource. + operationId: api_project_type_versions_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersion identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + description: The updated ProjectTypeVersion resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + description: ProjectTypeVersion resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ProjectTypeVersion resource. + tags: + - ProjectTypeVersion + put: + deprecated: false + description: Replaces the ProjectTypeVersion resource. + operationId: api_project_type_versions_id_put + parameters: + - allowReserved: false + deprecated: false + description: ProjectTypeVersion identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + description: The updated ProjectTypeVersion resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + text/html: + schema: + $ref: '#/components/schemas/ProjectTypeVersion' + description: ProjectTypeVersion resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ProjectTypeVersion resource. + tags: + - ProjectTypeVersion + /api/project_types: + get: + deprecated: false + description: Retrieves the collection of ProjectType resources. + operationId: api_project_types_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[name]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ProjectType' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ProjectType' + type: array + description: ProjectType collection + summary: Retrieves the collection of ProjectType resources. + tags: + - ProjectType + post: + deprecated: false + description: Creates a ProjectType resource. + operationId: api_project_types_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + description: The new ProjectType resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + description: ProjectType resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ProjectType resource. + tags: + - ProjectType + /api/project_types/{id}: + delete: + deprecated: false + description: Removes the ProjectType resource. + operationId: api_project_types_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ProjectType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ProjectType resource deleted + "404": + description: Resource not found + summary: Removes the ProjectType resource. + tags: + - ProjectType + get: + deprecated: false + description: Retrieves a ProjectType resource. + operationId: api_project_types_id_get + parameters: + - allowReserved: false + deprecated: false + description: ProjectType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + description: ProjectType resource + "404": + description: Resource not found + summary: Retrieves a ProjectType resource. + tags: + - ProjectType + patch: + deprecated: false + description: Updates the ProjectType resource. + operationId: api_project_types_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ProjectType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ProjectType' + description: The updated ProjectType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + description: ProjectType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ProjectType resource. + tags: + - ProjectType + put: + deprecated: false + description: Replaces the ProjectType resource. + operationId: api_project_types_id_put + parameters: + - allowReserved: false + deprecated: false + description: ProjectType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + description: The updated ProjectType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectType' + text/html: + schema: + $ref: '#/components/schemas/ProjectType' + description: ProjectType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ProjectType resource. + tags: + - ProjectType + /api/projects: + get: + deprecated: false + description: Retrieves the collection of Project resources. + operationId: api_projects_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: team.organisation.id + required: false + schema: + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "team.organisation.id[]" + required: false + schema: + items: + type: integer + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: state + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "state[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: git + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "git[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: team + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "team[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: stateByInfra + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "stateByInfra[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "createdAt[before]" + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "createdAt[strictly_before]" + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "createdAt[after]" + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "createdAt[strictly_after]" + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectTypeVersion + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectTypeVersion[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[updatedAt]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Project-Project.output' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Project-Project.output' + type: array + description: Project collection + summary: Retrieves the collection of Project resources. + tags: + - Project + post: + deprecated: false + description: Creates a Project resource. + operationId: api_projects_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.input' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.input' + description: The new Project resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + description: Project resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Project resource. + tags: + - Project + /api/projects/{id}: + delete: + deprecated: false + description: Removes the Project resource. + operationId: api_projects_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Project identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Project resource deleted + "404": + description: Resource not found + summary: Removes the Project resource. + tags: + - Project + get: + deprecated: false + description: Retrieves a Project resource. + operationId: api_projects_id_get + parameters: + - allowReserved: false + deprecated: false + description: Project identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + description: Project resource + "404": + description: Resource not found + summary: Retrieves a Project resource. + tags: + - Project + patch: + deprecated: false + description: Updates the Project resource. + operationId: api_projects_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Project identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Project-Project.input' + description: The updated Project resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + description: Project resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Project resource. + tags: + - Project + put: + deprecated: false + description: Replaces the Project resource. + operationId: api_projects_id_put + parameters: + - allowReserved: false + deprecated: false + description: Project identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.input' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.input' + description: The updated Project resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + description: Project resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Project resource. + tags: + - Project + /api/projects/{id}/costs: + get: + deprecated: false + description: Retrieves a Project resource. + operationId: api_projects_idcosts_get + parameters: + - allowReserved: false + deprecated: false + description: Project identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Project-Project.output' + text/html: + schema: + $ref: '#/components/schemas/Project-Project.output' + description: Project resource + "404": + description: Resource not found + summary: Retrieves a Project resource. + tags: + - Project + /api/providers: + get: + deprecated: false + description: Retrieves the collection of Provider resources. + operationId: api_providers_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Provider' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Provider' + type: array + description: Provider collection + summary: Retrieves the collection of Provider resources. + tags: + - Provider + post: + deprecated: false + description: Creates a Provider resource. + operationId: api_providers_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + description: The new Provider resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + description: Provider resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Provider resource. + tags: + - Provider + /api/providers/{id}: + delete: + deprecated: false + description: Removes the Provider resource. + operationId: api_providers_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Provider identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Provider resource deleted + "404": + description: Resource not found + summary: Removes the Provider resource. + tags: + - Provider + get: + deprecated: false + description: Retrieves a Provider resource. + operationId: api_providers_id_get + parameters: + - allowReserved: false + deprecated: false + description: Provider identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + description: Provider resource + "404": + description: Resource not found + summary: Retrieves a Provider resource. + tags: + - Provider + patch: + deprecated: false + description: Updates the Provider resource. + operationId: api_providers_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Provider identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Provider' + description: The updated Provider resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + description: Provider resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Provider resource. + tags: + - Provider + put: + deprecated: false + description: Replaces the Provider resource. + operationId: api_providers_id_put + parameters: + - allowReserved: false + deprecated: false + description: Provider identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + description: The updated Provider resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Provider' + text/html: + schema: + $ref: '#/components/schemas/Provider' + description: Provider resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Provider resource. + tags: + - Provider + /api/resource_type_limits: + get: + deprecated: false + description: Retrieves the collection of ResourceTypeLimit resources. + operationId: api_resource_type_limits_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ResourceTypeLimit' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ResourceTypeLimit' + type: array + description: ResourceTypeLimit collection + summary: Retrieves the collection of ResourceTypeLimit resources. + tags: + - ResourceTypeLimit + post: + deprecated: false + description: Creates a ResourceTypeLimit resource. + operationId: api_resource_type_limits_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + description: The new ResourceTypeLimit resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + description: ResourceTypeLimit resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ResourceTypeLimit resource. + tags: + - ResourceTypeLimit + /api/resource_type_limits/{id}: + delete: + deprecated: false + description: Removes the ResourceTypeLimit resource. + operationId: api_resource_type_limits_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ResourceTypeLimit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ResourceTypeLimit resource deleted + "404": + description: Resource not found + summary: Removes the ResourceTypeLimit resource. + tags: + - ResourceTypeLimit + get: + deprecated: false + description: Retrieves a ResourceTypeLimit resource. + operationId: api_resource_type_limits_id_get + parameters: + - allowReserved: false + deprecated: false + description: ResourceTypeLimit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + description: ResourceTypeLimit resource + "404": + description: Resource not found + summary: Retrieves a ResourceTypeLimit resource. + tags: + - ResourceTypeLimit + patch: + deprecated: false + description: Updates the ResourceTypeLimit resource. + operationId: api_resource_type_limits_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ResourceTypeLimit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + description: The updated ResourceTypeLimit resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + description: ResourceTypeLimit resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ResourceTypeLimit resource. + tags: + - ResourceTypeLimit + put: + deprecated: false + description: Replaces the ResourceTypeLimit resource. + operationId: api_resource_type_limits_id_put + parameters: + - allowReserved: false + deprecated: false + description: ResourceTypeLimit identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + description: The updated ResourceTypeLimit resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + text/html: + schema: + $ref: '#/components/schemas/ResourceTypeLimit' + description: ResourceTypeLimit resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ResourceTypeLimit resource. + tags: + - ResourceTypeLimit + /api/resource_types: + get: + deprecated: false + description: Retrieves the collection of ResourceType resources. + operationId: api_resource_types_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: resourceTypeLimit + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "resourceTypeLimit[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + type: array + description: ResourceType collection + summary: Retrieves the collection of ResourceType resources. + tags: + - ResourceType + post: + deprecated: false + description: Creates a ResourceType resource. + operationId: api_resource_types_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + description: The new ResourceType resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + description: ResourceType resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a ResourceType resource. + tags: + - ResourceType + /api/resource_types/{id}: + delete: + deprecated: false + description: Removes the ResourceType resource. + operationId: api_resource_types_id_delete + parameters: + - allowReserved: false + deprecated: false + description: ResourceType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: ResourceType resource deleted + "404": + description: Resource not found + summary: Removes the ResourceType resource. + tags: + - ResourceType + get: + deprecated: false + description: Retrieves a ResourceType resource. + operationId: api_resource_types_id_get + parameters: + - allowReserved: false + deprecated: false + description: ResourceType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + description: ResourceType resource + "404": + description: Resource not found + summary: Retrieves a ResourceType resource. + tags: + - ResourceType + patch: + deprecated: false + description: Updates the ResourceType resource. + operationId: api_resource_types_id_patch + parameters: + - allowReserved: false + deprecated: false + description: ResourceType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + description: The updated ResourceType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + description: ResourceType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the ResourceType resource. + tags: + - ResourceType + put: + deprecated: false + description: Replaces the ResourceType resource. + operationId: api_resource_types_id_put + parameters: + - allowReserved: false + deprecated: false + description: ResourceType identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.input' + description: The updated ResourceType resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + text/html: + schema: + $ref: '#/components/schemas/ResourceType-ResourceType.output' + description: ResourceType resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the ResourceType resource. + tags: + - ResourceType + /api/role_groups: + get: + deprecated: false + description: Retrieves the collection of RoleGroup resources. + operationId: api_role_groups_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: name + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/RoleGroup' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/RoleGroup' + type: array + description: RoleGroup collection + summary: Retrieves the collection of RoleGroup resources. + tags: + - RoleGroup + post: + deprecated: false + description: Creates a RoleGroup resource. + operationId: api_role_groups_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + description: The new RoleGroup resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + description: RoleGroup resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a RoleGroup resource. + tags: + - RoleGroup + /api/role_groups/{id}: + delete: + deprecated: false + description: Removes the RoleGroup resource. + operationId: api_role_groups_id_delete + parameters: + - allowReserved: false + deprecated: false + description: RoleGroup identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: RoleGroup resource deleted + "404": + description: Resource not found + summary: Removes the RoleGroup resource. + tags: + - RoleGroup + get: + deprecated: false + description: Retrieves a RoleGroup resource. + operationId: api_role_groups_id_get + parameters: + - allowReserved: false + deprecated: false + description: RoleGroup identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + description: RoleGroup resource + "404": + description: Resource not found + summary: Retrieves a RoleGroup resource. + tags: + - RoleGroup + patch: + deprecated: false + description: Updates the RoleGroup resource. + operationId: api_role_groups_id_patch + parameters: + - allowReserved: false + deprecated: false + description: RoleGroup identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/RoleGroup' + description: The updated RoleGroup resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + description: RoleGroup resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the RoleGroup resource. + tags: + - RoleGroup + put: + deprecated: false + description: Replaces the RoleGroup resource. + operationId: api_role_groups_id_put + parameters: + - allowReserved: false + deprecated: false + description: RoleGroup identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + description: The updated RoleGroup resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RoleGroup' + text/html: + schema: + $ref: '#/components/schemas/RoleGroup' + description: RoleGroup resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the RoleGroup resource. + tags: + - RoleGroup + /api/state_by_infras: + get: + deprecated: false + description: Retrieves the collection of StateByInfra resources. + operationId: api_state_by_infras_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/StateByInfra' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/StateByInfra' + type: array + description: StateByInfra collection + summary: Retrieves the collection of StateByInfra resources. + tags: + - StateByInfra + post: + deprecated: false + description: Creates a StateByInfra resource. + operationId: api_state_by_infras_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + description: The new StateByInfra resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + description: StateByInfra resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a StateByInfra resource. + tags: + - StateByInfra + /api/state_by_infras/{id}: + delete: + deprecated: false + description: Removes the StateByInfra resource. + operationId: api_state_by_infras_id_delete + parameters: + - allowReserved: false + deprecated: false + description: StateByInfra identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: StateByInfra resource deleted + "404": + description: Resource not found + summary: Removes the StateByInfra resource. + tags: + - StateByInfra + get: + deprecated: false + description: Retrieves a StateByInfra resource. + operationId: api_state_by_infras_id_get + parameters: + - allowReserved: false + deprecated: false + description: StateByInfra identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + description: StateByInfra resource + "404": + description: Resource not found + summary: Retrieves a StateByInfra resource. + tags: + - StateByInfra + patch: + deprecated: false + description: Updates the StateByInfra resource. + operationId: api_state_by_infras_id_patch + parameters: + - allowReserved: false + deprecated: false + description: StateByInfra identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/StateByInfra' + description: The updated StateByInfra resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + description: StateByInfra resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the StateByInfra resource. + tags: + - StateByInfra + put: + deprecated: false + description: Replaces the StateByInfra resource. + operationId: api_state_by_infras_id_put + parameters: + - allowReserved: false + deprecated: false + description: StateByInfra identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + description: The updated StateByInfra resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StateByInfra' + text/html: + schema: + $ref: '#/components/schemas/StateByInfra' + description: StateByInfra resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the StateByInfra resource. + tags: + - StateByInfra + /api/states: + get: + deprecated: false + description: Retrieves the collection of State resources. + operationId: api_states_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: id + required: false + schema: + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "id[]" + required: false + schema: + items: + type: integer + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: seqNumber + required: false + schema: + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "seqNumber[]" + required: false + schema: + items: + type: integer + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[name]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/State' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/State' + type: array + description: State collection + summary: Retrieves the collection of State resources. + tags: + - State + post: + deprecated: false + description: Creates a State resource. + operationId: api_states_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + description: The new State resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + description: State resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a State resource. + tags: + - State + /api/states/{id}: + delete: + deprecated: false + description: Removes the State resource. + operationId: api_states_id_delete + parameters: + - allowReserved: false + deprecated: false + description: State identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: State resource deleted + "404": + description: Resource not found + summary: Removes the State resource. + tags: + - State + get: + deprecated: false + description: Retrieves a State resource. + operationId: api_states_id_get + parameters: + - allowReserved: false + deprecated: false + description: State identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + description: State resource + "404": + description: Resource not found + summary: Retrieves a State resource. + tags: + - State + patch: + deprecated: false + description: Updates the State resource. + operationId: api_states_id_patch + parameters: + - allowReserved: false + deprecated: false + description: State identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/State' + description: The updated State resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + description: State resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the State resource. + tags: + - State + put: + deprecated: false + description: Replaces the State resource. + operationId: api_states_id_put + parameters: + - allowReserved: false + deprecated: false + description: State identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + description: The updated State resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/State' + text/html: + schema: + $ref: '#/components/schemas/State' + description: State resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the State resource. + tags: + - State + /api/team_env_vars: + get: + deprecated: false + description: Retrieves the collection of TeamEnvVar resources. + operationId: api_team_env_vars_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: team + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "team[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: envVarType + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "envVarType[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TeamEnvVar' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/TeamEnvVar' + type: array + description: TeamEnvVar collection + summary: Retrieves the collection of TeamEnvVar resources. + tags: + - TeamEnvVar + post: + deprecated: false + description: Creates a TeamEnvVar resource. + operationId: api_team_env_vars_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + description: The new TeamEnvVar resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + description: TeamEnvVar resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a TeamEnvVar resource. + tags: + - TeamEnvVar + /api/team_env_vars/{id}: + delete: + deprecated: false + description: Removes the TeamEnvVar resource. + operationId: api_team_env_vars_id_delete + parameters: + - allowReserved: false + deprecated: false + description: TeamEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: TeamEnvVar resource deleted + "404": + description: Resource not found + summary: Removes the TeamEnvVar resource. + tags: + - TeamEnvVar + get: + deprecated: false + description: Retrieves a TeamEnvVar resource. + operationId: api_team_env_vars_id_get + parameters: + - allowReserved: false + deprecated: false + description: TeamEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + description: TeamEnvVar resource + "404": + description: Resource not found + summary: Retrieves a TeamEnvVar resource. + tags: + - TeamEnvVar + patch: + deprecated: false + description: Updates the TeamEnvVar resource. + operationId: api_team_env_vars_id_patch + parameters: + - allowReserved: false + deprecated: false + description: TeamEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + description: The updated TeamEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + description: TeamEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the TeamEnvVar resource. + tags: + - TeamEnvVar + put: + deprecated: false + description: Replaces the TeamEnvVar resource. + operationId: api_team_env_vars_id_put + parameters: + - allowReserved: false + deprecated: false + description: TeamEnvVar identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + description: The updated TeamEnvVar resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TeamEnvVar' + text/html: + schema: + $ref: '#/components/schemas/TeamEnvVar' + description: TeamEnvVar resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the TeamEnvVar resource. + tags: + - TeamEnvVar + /api/teams: + get: + deprecated: false + description: Retrieves the collection of Team resources. + operationId: api_teams_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "exists[organisation]" + required: false + schema: + type: boolean + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: name + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: user + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "user[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: organisation + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "organisation[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: stateByInfra + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "stateByInfra[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Team-Team.output' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/Team-Team.output' + type: array + description: Team collection + summary: Retrieves the collection of Team resources. + tags: + - Team + post: + deprecated: false + description: Creates a Team resource. + operationId: api_teams_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.input' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.input' + description: The new Team resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + description: Team resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a Team resource. + tags: + - Team + /api/teams/{id}: + delete: + deprecated: false + description: Removes the Team resource. + operationId: api_teams_id_delete + parameters: + - allowReserved: false + deprecated: false + description: Team identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Team resource deleted + "404": + description: Resource not found + summary: Removes the Team resource. + tags: + - Team + get: + deprecated: false + description: Retrieves a Team resource. + operationId: api_teams_id_get + parameters: + - allowReserved: false + deprecated: false + description: Team identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + description: Team resource + "404": + description: Resource not found + summary: Retrieves a Team resource. + tags: + - Team + patch: + deprecated: false + description: Updates the Team resource. + operationId: api_teams_id_patch + parameters: + - allowReserved: false + deprecated: false + description: Team identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Team-Team.input' + description: The updated Team resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + description: Team resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the Team resource. + tags: + - Team + put: + deprecated: false + description: Replaces the Team resource. + operationId: api_teams_id_put + parameters: + - allowReserved: false + deprecated: false + description: Team identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.input' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.input' + description: The updated Team resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + description: Team resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Team resource. + tags: + - Team + /api/teams/{id}/user-role: + put: + deprecated: false + description: Replaces the Team resource. + operationId: api_teams_iduser-role_put + parameters: + - allowReserved: false + deprecated: false + description: Team identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.input' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.input' + description: The updated Team resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Team-Team.output' + text/html: + schema: + $ref: '#/components/schemas/Team-Team.output' + description: Team resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the Team resource. + tags: + - Team + /api/template_environments: + get: + deprecated: false + description: Retrieves the collection of TemplateEnvironment resources. + operationId: api_template_environments_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: id + required: false + schema: + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "id[]" + required: false + schema: + items: + type: integer + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: templateProject + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "templateProject[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[updatedAt]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + type: array + description: TemplateEnvironment collection + summary: Retrieves the collection of TemplateEnvironment resources. + tags: + - TemplateEnvironment + post: + deprecated: false + description: Creates a TemplateEnvironment resource. + operationId: api_template_environments_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + description: The new TemplateEnvironment resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + description: TemplateEnvironment resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a TemplateEnvironment resource. + tags: + - TemplateEnvironment + /api/template_environments/{id}: + delete: + deprecated: false + description: Removes the TemplateEnvironment resource. + operationId: api_template_environments_id_delete + parameters: + - allowReserved: false + deprecated: false + description: TemplateEnvironment identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: TemplateEnvironment resource deleted + "404": + description: Resource not found + summary: Removes the TemplateEnvironment resource. + tags: + - TemplateEnvironment + get: + deprecated: false + description: Retrieves a TemplateEnvironment resource. + operationId: api_template_environments_id_get + parameters: + - allowReserved: false + deprecated: false + description: TemplateEnvironment identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + description: TemplateEnvironment resource + "404": + description: Resource not found + summary: Retrieves a TemplateEnvironment resource. + tags: + - TemplateEnvironment + patch: + deprecated: false + description: Updates the TemplateEnvironment resource. + operationId: api_template_environments_id_patch + parameters: + - allowReserved: false + deprecated: false + description: TemplateEnvironment identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + description: The updated TemplateEnvironment resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + description: TemplateEnvironment resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the TemplateEnvironment resource. + tags: + - TemplateEnvironment + put: + deprecated: false + description: Replaces the TemplateEnvironment resource. + operationId: api_template_environments_id_put + parameters: + - allowReserved: false + deprecated: false + description: TemplateEnvironment identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.input' + description: The updated TemplateEnvironment resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateEnvironment-TemplateEnvironment.output' + description: TemplateEnvironment resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the TemplateEnvironment resource. + tags: + - TemplateEnvironment + /api/template_projects: + get: + deprecated: false + description: Retrieves the collection of TemplateProject resources. + operationId: api_template_projects_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: projectTypeVersion + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "projectTypeVersion[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: "order[updatedAt]" + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + type: array + description: TemplateProject collection + summary: Retrieves the collection of TemplateProject resources. + tags: + - TemplateProject + post: + deprecated: false + description: Creates a TemplateProject resource. + operationId: api_template_projects_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + description: The new TemplateProject resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + description: TemplateProject resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a TemplateProject resource. + tags: + - TemplateProject + /api/template_projects/{id}: + delete: + deprecated: false + description: Removes the TemplateProject resource. + operationId: api_template_projects_id_delete + parameters: + - allowReserved: false + deprecated: false + description: TemplateProject identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: TemplateProject resource deleted + "404": + description: Resource not found + summary: Removes the TemplateProject resource. + tags: + - TemplateProject + get: + deprecated: false + description: Retrieves a TemplateProject resource. + operationId: api_template_projects_id_get + parameters: + - allowReserved: false + deprecated: false + description: TemplateProject identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + description: TemplateProject resource + "404": + description: Resource not found + summary: Retrieves a TemplateProject resource. + tags: + - TemplateProject + patch: + deprecated: false + description: Updates the TemplateProject resource. + operationId: api_template_projects_id_patch + parameters: + - allowReserved: false + deprecated: false + description: TemplateProject identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + description: The updated TemplateProject resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + description: TemplateProject resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the TemplateProject resource. + tags: + - TemplateProject + put: + deprecated: false + description: Replaces the TemplateProject resource. + operationId: api_template_projects_id_put + parameters: + - allowReserved: false + deprecated: false + description: TemplateProject identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.input' + description: The updated TemplateProject resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + text/html: + schema: + $ref: '#/components/schemas/TemplateProject-TemplateProject.output' + description: TemplateProject resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the TemplateProject resource. + tags: + - TemplateProject + /api/users: + get: + deprecated: false + description: Retrieves the collection of User resources. + operationId: api_users_get_collection + parameters: + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The collection page number + explode: false + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: The number of items per page + explode: false + in: query + name: itemsPerPage + required: false + schema: + default: 30 + minimum: 0 + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: id + required: false + schema: + type: integer + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "id[]" + required: false + schema: + items: + type: integer + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: roleGroup + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "roleGroup[]" + required: false + schema: + items: + type: string + type: array + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: team + required: false + schema: + type: string + style: form + - allowEmptyValue: true + allowReserved: false + deprecated: false + description: "" + explode: true + in: query + name: "team[]" + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + text/html: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: User collection + summary: Retrieves the collection of User resources. + tags: + - User + post: + deprecated: false + description: Creates a User resource. + operationId: api_users_post + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + description: The new User resource + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + description: User resource created + "400": + description: Invalid input + "422": + description: Unprocessable entity + summary: Creates a User resource. + tags: + - User + /api/users/activate: + put: + description: "If you have the correct hash string, you can activate your freshly\ + \ registered user" + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: hash + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + type: object + description: The user has been activated successfully + "201": + content: + application/json: + schema: + type: object + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + summary: User activation entry point + tags: + - User + /api/users/check-email: + get: + description: This entry point checks an email address' existence in database + parameters: + - allowEmptyValue: false + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: email + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/_api_users_check_email_get_200_response' + description: The query has been requested successfully + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/_api_users_check_email_get_200_response' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + summary: Check the email existence + tags: + - User + /api/users/check-username: + get: + description: This entry point checks an username's existence in database + parameters: + - allowEmptyValue: false + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: username + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/_api_users_check_email_get_200_response' + description: The query has been requested successfully + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/_api_users_check_email_get_200_response' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + summary: Check the username existence + tags: + - User + /api/users/discover_mercure: + get: + description: |2- + + It will discovers for mercure JWT token for you - w/ take consideration your permissions + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Mercure.DiscoverResponse' + description: Successfully authenticated for Mercure protocol + headers: + Set-Cookie: + description: Its name is mercureAuthorization + explode: false + schema: + type: string + style: simple + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Mercure.DiscoverResponse' + description: The same as the HTTP 200 + headers: + Set-Cookie: + description: Its name is mercureAuthorization + explode: false + schema: + type: string + style: simple + "403": + description: You have no permission to query this + security: + - cookieAuth: [] + summary: Retrieve cookie for Mercure authentication + tags: + - User + /api/users/forgot-password: + put: + description: "If the user exists, we will send an email to restore password" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_api_users_forgot_password_put_request' + description: "" + required: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/_api_users_forgot_password_put_200_response' + description: The email sent successfully + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/_api_users_forgot_password_put_200_response' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + summary: Restore password through email + tags: + - User + /api/users/register: + post: + description: An unauthenticated user can create its own account in database + responses: + "200": + content: + application/json: + schema: + type: object + description: User resource created + "201": + content: + application/json: + schema: + type: object + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing User + summary: User creation entry point + tags: + - User + /api/users/reset-password: + put: + description: The user can change his password if he has the current password + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: "" + required: false + responses: + "200": + content: + application/json: + schema: + type: object + description: The email sent successfully + "201": + content: + application/json: + schema: + type: object + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + summary: Change the current password + tags: + - User + /api/users/{id}: + delete: + deprecated: false + description: Removes the User resource. + operationId: api_users_id_delete + parameters: + - allowReserved: false + deprecated: false + description: User identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: User resource deleted + "404": + description: Resource not found + summary: Removes the User resource. + tags: + - User + get: + deprecated: false + description: Retrieves a User resource. + operationId: api_users_id_get + parameters: + - allowReserved: false + deprecated: false + description: User identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + description: User resource + "404": + description: Resource not found + summary: Retrieves a User resource. + tags: + - User + patch: + deprecated: false + description: Updates the User resource. + operationId: api_users_id_patch + parameters: + - allowReserved: false + deprecated: false + description: User identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/User' + description: The updated User resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + description: User resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Updates the User resource. + tags: + - User + put: + deprecated: false + description: Replaces the User resource. + operationId: api_users_id_put + parameters: + - allowReserved: false + deprecated: false + description: User identifier + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + description: The updated User resource + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + description: User resource updated + "400": + description: Invalid input + "422": + description: Unprocessable entity + "404": + description: Resource not found + summary: Replaces the User resource. + tags: + - User + /api/users/{id}/administrate: + get: + description: An administrator user can control another non-admin user i.e. through + the UI + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.ApiTokenResponse' + description: User administrate request granted. Authentication success + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.ApiTokenResponse' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing User + summary: Get authentication data from another user + tags: + - User + /api/users/{id}/finance/costs: + get: + description: "You can query the summary of costs of CPU, memory and storage" + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.CostsResponse' + description: The query is queried successfully + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.CostsResponse' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing User + summary: Get resource costs information + tags: + - User + /api/users/{id}/finance/detach-card: + patch: + description: "WARNING! It is a permanent, irreversible process" + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + - allowEmptyValue: false + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: paymentMethodId + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + type: object + description: The response is an empty object on success + "201": + content: + application/json: + schema: + type: object + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing User + summary: Detach a payment method from the user + tags: + - User + /api/users/{id}/finance/invoices: + get: + description: |2- + + You You can retrieve all user related customer, + payment methods and invoices data from Stripe + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.InvoicesResponse' + description: The query is queried successfully + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Finance.InvoicesResponse' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing User + summary: Get invoices and some necessary data from payment module + tags: + - User + /api/users/{id}/finance/pay: + patch: + description: It sends a payment initiative to the payment API through our API + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + - allowEmptyValue: false + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: invoiceId + required: true + schema: + type: string + style: form + - allowEmptyValue: false + allowReserved: false + deprecated: false + description: "" + explode: false + in: query + name: paymentMethodId + required: true + schema: + type: string + style: form + responses: + "200": + description: "The response contains all invoices. This is documented here\ + \ - \n https://stripe.com/docs/api/invoices/list?lang=php" + "201": + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing User + summary: Initiate a payment for the user + tags: + - User + /api/users/{id}/finance/subscribe-info: + get: + description: Stripe access token information can be retrieved through this entry + point + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/_api_users__id__finance_subscribe_info_get_200_response' + description: Subscription successful + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/_api_users__id__finance_subscribe_info_get_200_response' + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing User + summary: Get payment module's access token + tags: + - User + /api/users/{id}/remove-account: + delete: + description: User can delete its whole account w/ its all data + parameters: + - allowReserved: false + deprecated: false + description: "" + explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + type: object + description: User resource deleted + "201": + content: + application/json: + schema: + type: object + description: The same as the HTTP 200 + "403": + description: You have no permission to query this + "404": + description: Missing User + summary: User can delete itself + tags: + - User +components: + examples: {} + headers: {} + parameters: {} + requestBodies: {} + responses: {} + schemas: + AbstractEnvVar: + deprecated: false + description: "" + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + rawValue: rawValue + isEncrypted: true + id: 6 + envVarType: https://example.com/ + uuid: uuid + value: value + key: key + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + rawValue: + nullable: true + readOnly: true + type: string + AbstractEnvironment: + deprecated: false + description: "" + example: + environmentComponent: + - environmentComponent + - environmentComponent + memory: 9 + updatedBy: updatedBy + envVar: + - envVar + - envVar + cpu: 7 + storage: 3 + isStripDatabase: true + uuid: uuid + isInitSampleData: true + createdAt: 2000-01-23T04:56:07.000+00:00 + createdBy: createdBy + isAllowOutgoingEmails: true + name: name + codeName: codeName + id: 2 + dataTransferSettings: dataTransferSettings + isAllowHtaccessDevtoolsProtection: true + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + dataTransferSettings: + nullable: true + type: string + isStripDatabase: + nullable: true + type: boolean + isAllowOutgoingEmails: + nullable: true + type: boolean + isAllowHtaccessDevtoolsProtection: + nullable: true + type: boolean + isInitSampleData: + nullable: true + type: boolean + envVar: + items: + type: string + type: array + environmentComponent: + items: + type: string + type: array + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + AbstractProject: + deprecated: false + description: "" + example: + memory: 5 + code: code + color: color + cpu: 1 + storage: 5 + isInitProjectSkeleton: true + componentVersion: + - componentVersion + - componentVersion + isActive: true + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + projectTypeVersion: https://example.com/ + name: name + codeName: codeName + projectEnvVar: + - projectEnvVar + - projectEnvVar + id: 6 + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + isActive: + nullable: true + type: boolean + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + code: + nullable: true + type: string + color: + nullable: true + type: string + isInitProjectSkeleton: + nullable: true + type: boolean + componentVersion: + items: + type: string + type: array + projectTypeVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + projectEnvVar: + items: + type: string + type: array + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + AccessCode: + deprecated: false + description: Class AccessCode + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + accessCode: accessCode + usedAt: 2000-01-23T04:56:07.000+00:00 + id: 0 + uuid: uuid + user: https://example.com/ + userId: userId + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + accessCode: + nullable: true + type: string + user: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + userId: + nullable: true + readOnly: true + type: string + usedAt: + format: date-time + nullable: true + type: string + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + Cluster: + deprecated: false + description: Class Cluster + example: + updatedBy: updatedBy + oidcClientID: oidcClientID + uuid: uuid + clusterCertificateAuthorityData: clusterCertificateAuthorityData + oidcClientSecret: oidcClientSecret + products: + - https://example.com/ + - https://example.com/ + oidcIssuerUrl: oidcIssuerUrl + createdAt: 2000-01-23T04:56:07.000+00:00 + isDefault: true + environment: + - https://example.com/ + - https://example.com/ + provider: https://example.com/ + createdBy: createdBy + kubecostUser: kubecostUser + name: Hetzner EU + codeName: dev-rc-worker-1-hetzner-eu + changeKubecostPass: changeKubecostPass + clusterServer: clusterServer + id: 0 + kubecostUrl: kubecostUrl + kubecostPass: kubecostPass + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + description: This is the 'Display name' in the infrastructure + example: Hetzner EU + type: string + codeName: + description: This is the cluster's name in the infrastructure + example: dev-rc-worker-1-hetzner-eu + type: string + kubecostUrl: + nullable: true + type: string + kubecostUser: + nullable: true + type: string + kubecostPass: + nullable: true + type: string + changeKubecostPass: + nullable: true + type: string + isDefault: + nullable: true + type: boolean + clusterServer: + nullable: true + type: string + clusterCertificateAuthorityData: + nullable: true + type: string + oidcIssuerUrl: + nullable: true + type: string + oidcClientID: + nullable: true + type: string + oidcClientSecret: + nullable: true + type: string + environment: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + provider: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + products: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + Cluster-Cluster.withProvider: + deprecated: false + description: Class Cluster + example: + provider: + name: name + name: Hetzner EU + properties: + name: + description: This is the 'Display name' in the infrastructure + example: Hetzner EU + type: string + provider: + $ref: '#/components/schemas/Provider-Cluster.withProvider' + Component: + deprecated: false + description: Class Component + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + projectTypeVersion: + - https://example.com/ + - https://example.com/ + name: name + codeName: codeName + id: 0 + componentVersion: + - https://example.com/ + - https://example.com/ + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + componentVersion: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + projectTypeVersion: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ComponentResourceLimit: + deprecated: false + description: Class ComponentResourceLimit + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + minValue: 6 + updatedBy: updatedBy + createdBy: createdBy + maxValue: 1 + projectTypeVersion: https://example.com/ + id: 0 + componentVersion: https://example.com/ + uuid: uuid + resourceType: https://example.com/ + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + minValue: + nullable: true + type: integer + maxValue: + nullable: true + type: integer + projectTypeVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + resourceType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + componentVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ComponentVersion: + deprecated: false + description: Class ComponentVersion + example: + environmentComponent: + - https://example.com/ + - https://example.com/ + updatedBy: updatedBy + project: + - memory: 5 + code: code + color: color + cpu: 1 + storage: 5 + isInitProjectSkeleton: true + componentVersion: + - componentVersion + - componentVersion + isActive: true + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + projectTypeVersion: https://example.com/ + name: name + codeName: codeName + projectEnvVar: + - projectEnvVar + - projectEnvVar + id: 6 + updatedAt: 2000-01-23T04:56:07.000+00:00 + - memory: 5 + code: code + color: color + cpu: 1 + storage: 5 + isInitProjectSkeleton: true + componentVersion: + - componentVersion + - componentVersion + isActive: true + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + projectTypeVersion: https://example.com/ + name: name + codeName: codeName + projectEnvVar: + - projectEnvVar + - projectEnvVar + id: 6 + updatedAt: 2000-01-23T04:56:07.000+00:00 + uuid: uuid + version: version + componentResourceLimit: + - https://example.com/ + - https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + component: https://example.com/ + createdBy: createdBy + componentVersionEnvVar: + - https://example.com/ + - https://example.com/ + id: 0 + projectTypeVersions: + - https://example.com/ + - https://example.com/ + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + version: + nullable: true + type: string + component: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + componentVersionEnvVar: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + project: + items: + $ref: '#/components/schemas/AbstractProject' + type: array + environmentComponent: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + componentResourceLimit: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + projectTypeVersions: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ComponentVersionEnvVar: + deprecated: false + description: Class ComponentVersionEnvVar + example: + note: note + isRequired: true + updatedBy: updatedBy + envVarValidations: + - https://example.com/ + - https://example.com/ + componentVersion: https://example.com/ + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + componentVersionEnvVarExample: + - https://example.com/ + - https://example.com/ + createdBy: createdBy + isEncrypted: true + id: 0 + key: key + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + componentVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + componentVersionEnvVarExample: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + key: + nullable: true + type: string + note: + nullable: true + type: string + isRequired: + nullable: true + type: boolean + isEncrypted: + nullable: true + type: boolean + envVarValidations: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + ComponentVersionEnvVarExample: + deprecated: false + description: Class ComponentVersionEnvVarExample + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + isDefault: true + updatedBy: updatedBy + createdBy: createdBy + componentVersionEnvVar: https://example.com/ + id: 0 + uuid: uuid + value: value + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + value: + nullable: true + type: string + isDefault: + nullable: true + type: boolean + componentVersionEnvVar: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + CredentialType: + deprecated: false + description: Class CredentialType + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + git: + - https://example.com/ + - https://example.com/ + updatedBy: updatedBy + createdBy: createdBy + name: name + codeName: codeName + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + git: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + CryptoKeyType: + deprecated: false + description: Class CryptoKeyType + example: + gits: + - https://example.com/ + - https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + name: name + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + type: string + gits: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + DataTransferDataType: + deprecated: false + description: Class DataTransferDataType + example: + importedData: + - https://example.com/ + - https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + exportedData: + - https://example.com/ + - https://example.com/ + name: name + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + exportedData: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + importedData: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + DataTransferType: + deprecated: false + description: Class DataTransferType + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + name: name + codeName: codeName + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvVarType: + deprecated: false + description: Class EnvVarType + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + isDefault: true + updatedBy: updatedBy + envVar: + - createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + rawValue: rawValue + isEncrypted: true + id: 6 + envVarType: https://example.com/ + uuid: uuid + value: value + key: key + updatedAt: 2000-01-23T04:56:07.000+00:00 + - createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + rawValue: rawValue + isEncrypted: true + id: 6 + envVarType: https://example.com/ + uuid: uuid + value: value + key: key + updatedAt: 2000-01-23T04:56:07.000+00:00 + createdBy: createdBy + name: name + codeName: codeName + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + isDefault: + nullable: true + type: boolean + envVar: + items: + $ref: '#/components/schemas/AbstractEnvVar' + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvVarValidation: + deprecated: false + description: Class EnvVarValidation + example: + regexp: regexp + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + validationMessage: validationMessage + name: name + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + regexp: + nullable: true + type: string + validationMessage: + nullable: true + type: string + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + Environment-Environment.input: + deprecated: false + description: Class Environment + properties: + templateIri: + nullable: true + type: string + project: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + provider: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + state: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + cluster: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + exportedData: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + importedData: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + environmentCustomDomain: + items: + $ref: '#/components/schemas/EnvironmentCustomDomain-Environment.input' + type: array + environmentMagentoHostMapping: + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping-Environment.input' + type: array + targetRefName: + nullable: true + type: string + name: + nullable: true + type: string + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + dataTransferSettings: + nullable: true + type: string + isStripDatabase: + nullable: true + type: boolean + isAllowOutgoingEmails: + nullable: true + type: boolean + isAllowHtaccessDevtoolsProtection: + nullable: true + type: boolean + isInitSampleData: + nullable: true + type: boolean + envVar: + items: + $ref: '#/components/schemas/EnvironmentEnvVar-Environment.input' + type: array + environmentComponent: + items: + $ref: '#/components/schemas/EnvironmentComponent-Environment.input' + type: array + Environment-Environment.output: + deprecated: false + description: Class Environment + example: + cluster: https://example.com/ + environmentAccess: https://example.com/ + stateByInfra: https://example.com/ + memory: 1 + project: https://example.com/ + storage: 5 + uuid: uuid + importedData: + - https://example.com/ + - https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + provider: https://example.com/ + targetRefName: targetRefName + codeName: codeName + state: https://example.com/ + id: 0 + dataTransferSettings: dataTransferSettings + updatedAt: 2000-01-23T04:56:07.000+00:00 + environmentComponent: + - node: 9 + memory: 2 + cpu: 5 + storage: 7 + componentVersion: https://example.com/ + - node: 9 + memory: 2 + cpu: 5 + storage: 7 + componentVersion: https://example.com/ + envVar: + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + environmentMagentoHostMapping: + - mageRunCode: mageRunCode + hostname: hostname + mageRunType: mageRunType + - mageRunCode: mageRunCode + hostname: hostname + mageRunType: mageRunType + cpu: 6 + isStripDatabase: true + environmentCustomDomain: + - hostname: hostname + certificateData: certificateData + certificateKey: certificateKey + - hostname: hostname + certificateData: certificateData + certificateKey: certificateKey + isInitSampleData: true + exportedData: + - https://example.com/ + - https://example.com/ + isAllowOutgoingEmails: true + name: name + templateIri: templateIri + isAllowHtaccessDevtoolsProtection: true + properties: + templateIri: + nullable: true + type: string + project: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + provider: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + state: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + cluster: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + environmentAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + exportedData: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + importedData: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + stateByInfra: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + environmentCustomDomain: + items: + $ref: '#/components/schemas/EnvironmentCustomDomain-Environment.output' + type: array + environmentMagentoHostMapping: + items: + $ref: '#/components/schemas/EnvironmentMagentoHostMapping-Environment.output' + type: array + targetRefName: + nullable: true + type: string + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + dataTransferSettings: + nullable: true + type: string + isStripDatabase: + nullable: true + type: boolean + isAllowOutgoingEmails: + nullable: true + type: boolean + isAllowHtaccessDevtoolsProtection: + nullable: true + type: boolean + isInitSampleData: + nullable: true + type: boolean + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + envVar: + items: + $ref: '#/components/schemas/EnvironmentEnvVar-Environment.output' + type: array + environmentComponent: + items: + $ref: '#/components/schemas/EnvironmentComponent-Environment.output' + type: array + EnvironmentAccess: + deprecated: false + description: Class EnvironmentAccess + example: + updatedBy: updatedBy + uuid: uuid + redis: https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + environment: https://example.com/ + database: https://example.com/ + mailbox: https://example.com/ + createdBy: createdBy + rabbit: https://example.com/ + backend: https://example.com/ + id: 0 + devTools: https://example.com/ + webshell: https://example.com/ + frontend: https://example.com/ + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + environment: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + frontend: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + backend: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + database: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + devTools: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + redis: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + rabbit: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + mailbox: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + webshell: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentAccessBackend: + deprecated: false + description: Class EnvironmentAccessBackend + example: + environmentAccess: https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + password: password + updatedBy: updatedBy + createdBy: createdBy + id: 0 + uuid: uuid + url: url + username: username + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + url: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + environmentAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentAccessDatabase: + deprecated: false + description: Class EnvironmentAccessDatabase + example: + environmentAccess: https://example.com/ + updatedBy: updatedBy + scheme: scheme + uuid: uuid + url: url + createdAt: 2000-01-23T04:56:07.000+00:00 + password: password + port: 6 + createdBy: createdBy + host: host + id: 0 + rootPassword: rootPassword + username: username + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + url: + nullable: true + type: string + host: + nullable: true + type: string + port: + nullable: true + type: integer + scheme: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + rootPassword: + nullable: true + type: string + environmentAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentAccessDevTools: + deprecated: false + description: Class EnvironmentAccessDevTools + example: + environmentAccess: https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + password: password + updatedBy: updatedBy + createdBy: createdBy + id: 0 + uuid: uuid + url: url + username: username + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + url: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + environmentAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentAccessFrontend: + deprecated: false + description: Class EnvironmentAccessFrontend + example: + path: path + environmentAccess: https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + domain: domain + id: 0 + uuid: uuid + url: url + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + domain: + nullable: true + type: string + path: + nullable: true + type: string + url: + nullable: true + type: string + environmentAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentAccessMailbox: + deprecated: false + description: Class EnvironmentAccessMailbox + example: + environmentAccess: https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + id: 0 + uuid: uuid + url: url + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + url: + nullable: true + type: string + environmentAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentAccessRabbit: + deprecated: false + description: Class EnvironmentAccessRabbit + example: + environmentAccess: https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + password: password + updatedBy: updatedBy + port: 6 + createdBy: createdBy + host: host + id: 0 + uuid: uuid + url: url + username: username + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + url: + nullable: true + type: string + host: + nullable: true + type: string + port: + nullable: true + type: integer + username: + nullable: true + type: string + password: + nullable: true + type: string + environmentAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentAccessRedis: + deprecated: false + description: Class EnvironmentAccessRedis + example: + environmentAccess: https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + password: password + updatedBy: updatedBy + port: 6 + createdBy: createdBy + host: host + id: 0 + uuid: uuid + url: url + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + url: + nullable: true + type: string + host: + nullable: true + type: string + port: + nullable: true + type: integer + password: + nullable: true + type: string + environmentAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentAccessWebshell: + deprecated: false + description: Class EnvironmentAccessWebshell + example: + environmentAccess: https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + password: password + updatedBy: updatedBy + createdBy: createdBy + id: 0 + uuid: uuid + url: url + username: username + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + url: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + environmentAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentComponent: + deprecated: false + description: Class EnvironmentComponent + example: + node: 5 + createdAt: 2000-01-23T04:56:07.000+00:00 + environment: + environmentComponent: + - environmentComponent + - environmentComponent + memory: 9 + updatedBy: updatedBy + envVar: + - envVar + - envVar + cpu: 7 + storage: 3 + isStripDatabase: true + uuid: uuid + isInitSampleData: true + createdAt: 2000-01-23T04:56:07.000+00:00 + createdBy: createdBy + isAllowOutgoingEmails: true + name: name + codeName: codeName + id: 2 + dataTransferSettings: dataTransferSettings + isAllowHtaccessDevtoolsProtection: true + updatedAt: 2000-01-23T04:56:07.000+00:00 + memory: 1 + updatedBy: updatedBy + createdBy: createdBy + cpu: 6 + id: 0 + storage: 5 + componentVersion: https://example.com/ + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + node: + nullable: true + type: integer + componentVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + environment: + $ref: '#/components/schemas/AbstractEnvironment' + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentComponent-Environment.input: + deprecated: false + description: Class EnvironmentComponent + properties: + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + node: + nullable: true + type: integer + componentVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + EnvironmentComponent-Environment.output: + deprecated: false + description: "" + example: + node: 9 + memory: 2 + cpu: 5 + storage: 7 + componentVersion: https://example.com/ + properties: + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + node: + nullable: true + type: integer + componentVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + EnvironmentComponent-TemplateEnvironment.input: + deprecated: false + description: Class EnvironmentComponent + properties: + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + node: + nullable: true + type: integer + componentVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + EnvironmentComponent-TemplateEnvironment.output: + deprecated: false + description: "" + example: + node: 9 + memory: 2 + cpu: 5 + storage: 7 + componentVersion: https://example.com/ + properties: + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + node: + nullable: true + type: integer + componentVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + EnvironmentCustomDomain: + deprecated: false + description: Class EnvironmentCustomDomain + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + hostname: hostname + environment: https://example.com/ + updatedBy: updatedBy + createdBy: createdBy + certificateData: certificateData + certificateKey: certificateKey + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + hostname: + nullable: true + type: string + certificateData: + nullable: true + type: string + certificateKey: + nullable: true + type: string + environment: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentCustomDomain-Environment.input: + deprecated: false + description: Class EnvironmentCustomDomain + properties: + hostname: + nullable: true + type: string + certificateData: + nullable: true + type: string + certificateKey: + nullable: true + type: string + EnvironmentCustomDomain-Environment.output: + deprecated: false + description: "" + example: + hostname: hostname + certificateData: certificateData + certificateKey: certificateKey + properties: + hostname: + nullable: true + type: string + certificateData: + nullable: true + type: string + certificateKey: + nullable: true + type: string + EnvironmentEnvVar: + deprecated: false + description: "" + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + environment: + environmentComponent: + - environmentComponent + - environmentComponent + memory: 9 + updatedBy: updatedBy + envVar: + - envVar + - envVar + cpu: 7 + storage: 3 + isStripDatabase: true + uuid: uuid + isInitSampleData: true + createdAt: 2000-01-23T04:56:07.000+00:00 + createdBy: createdBy + isAllowOutgoingEmails: true + name: name + codeName: codeName + id: 2 + dataTransferSettings: dataTransferSettings + isAllowHtaccessDevtoolsProtection: true + updatedAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + rawValue: rawValue + isEncrypted: true + id: 0 + envVarType: https://example.com/ + uuid: uuid + value: value + key: key + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + environment: + $ref: '#/components/schemas/AbstractEnvironment' + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + rawValue: + nullable: true + readOnly: true + type: string + EnvironmentEnvVar-Environment.input: + deprecated: false + description: Class EnvVar + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + EnvironmentEnvVar-Environment.output: + deprecated: false + description: "" + example: + isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + EnvironmentEnvVar-TemplateEnvironment.input: + deprecated: false + description: Class EnvVar + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + EnvironmentEnvVar-TemplateEnvironment.output: + deprecated: false + description: "" + example: + envVarType: https://example.com/ + value: value + key: key + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + EnvironmentMagentoHostMapping: + deprecated: false + description: Class EnvironmentCustomDomain + example: + mageRunCode: mageRunCode + createdAt: 2000-01-23T04:56:07.000+00:00 + hostname: hostname + environment: https://example.com/ + updatedBy: updatedBy + createdBy: createdBy + id: 0 + mageRunType: mageRunType + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + hostname: + nullable: true + type: string + mageRunCode: + nullable: true + type: string + mageRunType: + nullable: true + type: string + environment: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + EnvironmentMagentoHostMapping-Environment.input: + deprecated: false + description: Class EnvironmentCustomDomain + properties: + hostname: + nullable: true + type: string + mageRunCode: + nullable: true + type: string + mageRunType: + nullable: true + type: string + EnvironmentMagentoHostMapping-Environment.output: + deprecated: false + description: "" + example: + mageRunCode: mageRunCode + hostname: hostname + mageRunType: mageRunType + properties: + hostname: + nullable: true + type: string + mageRunCode: + nullable: true + type: string + mageRunType: + nullable: true + type: string + EnvironmentMessageHistory: + deprecated: false + description: "" + example: + rcStatus: 1 + entityUuid: entityUuid + entityType: entityType + message: message + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + environment: https://example.com/ + action: action + header: header + eventAt: eventAt + id: 0 + dataTransferId: dataTransferId + status: status + statusCode: 6 + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + environment: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + entityType: + nullable: true + type: string + action: + nullable: true + type: string + status: + nullable: true + type: string + statusCode: + nullable: true + type: integer + rcStatus: + nullable: true + type: integer + message: + nullable: true + type: string + header: + nullable: true + type: string + eventAt: + nullable: true + type: string + entityUuid: + nullable: true + type: string + dataTransferId: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ExportedData: + deprecated: false + description: Class ExportedData + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + environment: https://example.com/ + updatedBy: updatedBy + createdBy: createdBy + dataTransferDataType: https://example.com/ + id: 0 + state: https://example.com/ + isStripDatabase: true + uuid: uuid + url: url + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + url: + nullable: true + type: string + isStripDatabase: + nullable: true + type: boolean + dataTransferDataType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + environment: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + state: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + Git-Git.input: + deprecated: false + description: Class Git + properties: + repo: + nullable: true + type: string + path: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + gitType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + credentialType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + cryptoKeyType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + Git-Git.output: + deprecated: false + description: Class Git + example: + credentialType: https://example.com/ + path: path + password: password + gitType: https://example.com/ + repo: repo + id: 0 + publicKey: publicKey + cryptoKeyType: https://example.com/ + uuid: uuid + username: username + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + repo: + nullable: true + type: string + path: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + publicKey: + nullable: true + type: string + gitType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + credentialType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + cryptoKeyType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + GitType: + deprecated: false + description: Class GitType + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + git: + - https://example.com/ + - https://example.com/ + updatedBy: updatedBy + createdBy: createdBy + name: name + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + git: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ImportedData: + deprecated: false + description: Class ImportedData + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + environment: https://example.com/ + updatedBy: updatedBy + createdBy: createdBy + dataTransferDataType: https://example.com/ + id: 0 + state: https://example.com/ + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + environment: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + dataTransferDataType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + state: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + Invitation-Invitation.input: + deprecated: false + description: Class Invitation + properties: + user: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + team: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + email: + nullable: true + type: string + Invitation-Invitation.output: + deprecated: false + description: Class Invitation + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + expiredAt: 2000-01-23T04:56:07.000+00:00 + id: 0 + team: https://example.com/ + state: true + uuid: uuid + user: https://example.com/ + email: email + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + user: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + team: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + state: + type: boolean + email: + nullable: true + type: string + createdAt: + format: date-time + type: string + expiredAt: + format: date-time + nullable: true + type: string + Organisation-Organisation.input: + deprecated: false + description: Class Organisation + properties: + name: + nullable: true + type: string + codeName: + nullable: true + type: string + isDefault: + description: User related property - One user can only have 1 pcs default + Organisation + nullable: true + type: boolean + team: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + organisationEnvVar: + items: + $ref: '#/components/schemas/OrganisationEnvVar-Organisation.input' + type: array + Organisation-Organisation.output: + deprecated: false + description: Class Organisation + example: + organisationEnvVar: + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + stateByInfra: https://example.com/ + isDefault: true + defaultUserName: defaultUserName + name: name + codeName: codeName + defaultUser: https://example.com/ + id: 0 + team: + - https://example.com/ + - https://example.com/ + uuid: uuid + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + isDefault: + description: User related property - One user can only have 1 pcs default + Organisation + nullable: true + type: boolean + team: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + organisationEnvVar: + items: + $ref: '#/components/schemas/OrganisationEnvVar-Organisation.output' + type: array + stateByInfra: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + defaultUser: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + defaultUserName: + nullable: true + type: string + OrganisationEnvVar: + deprecated: false + description: Class OrganisationEnvVar + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + rawValue: rawValue + isEncrypted: true + organisation: https://example.com/ + id: 0 + envVarType: https://example.com/ + uuid: uuid + value: value + key: key + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + organisation: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + rawValue: + nullable: true + readOnly: true + type: string + OrganisationEnvVar-Organisation.input: + deprecated: false + description: Class OrganisationEnvVar + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + OrganisationEnvVar-Organisation.output: + deprecated: false + description: "" + example: + isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + Price: + deprecated: false + description: Class Price + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + amount: 6.027456183070403 + product: + defaultPrice: https://example.com/ + cluster: https://example.com/ + metadata: + - metadata + - metadata + updatedBy: updatedBy + description: description + isActive: true + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + createdBy: createdBy + paymentId: paymentId + name: name + id: 1 + prices: + - https://example.com/ + - https://example.com/ + updatedAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + paymentId: paymentId + currency: currency + id: 0 + isActive: true + uuid: uuid + products: + - https://example.com/ + - https://example.com/ + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + paymentId: + nullable: true + type: string + amount: + nullable: true + type: number + currency: + nullable: true + type: string + isActive: + nullable: true + type: boolean + product: + $ref: '#/components/schemas/Product' + products: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + Price-Product.input: + deprecated: false + description: Class Price + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + paymentId: + nullable: true + type: string + amount: + nullable: true + type: number + currency: + nullable: true + type: string + isActive: + nullable: true + type: boolean + Price-Product.output: + deprecated: false + description: "" + example: + amount: 0.8008281904610115 + paymentId: paymentId + currency: currency + isActive: true + properties: + paymentId: + nullable: true + type: string + amount: + nullable: true + type: number + currency: + nullable: true + type: string + isActive: + nullable: true + type: boolean + Product: + deprecated: false + description: "" + example: + defaultPrice: https://example.com/ + cluster: https://example.com/ + metadata: + - metadata + - metadata + updatedBy: updatedBy + description: description + isActive: true + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + createdBy: createdBy + paymentId: paymentId + name: name + id: 1 + prices: + - https://example.com/ + - https://example.com/ + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + paymentId: + nullable: true + type: string + name: + nullable: true + type: string + description: + nullable: true + type: string + metadata: + items: + type: string + type: array + isActive: + nullable: true + type: boolean + prices: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + defaultPrice: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + cluster: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + Product-Product.input: + deprecated: false + description: Class Product + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + paymentId: + nullable: true + type: string + name: + nullable: true + type: string + description: + nullable: true + type: string + metadata: + items: + type: string + type: array + isActive: + nullable: true + type: boolean + prices: + items: + $ref: '#/components/schemas/Price-Product.input' + type: array + defaultPrice: + $ref: '#/components/schemas/Price-Product.input' + cluster: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + Product-Product.output: + deprecated: false + description: Class Product + example: + defaultPrice: + amount: 0.8008281904610115 + paymentId: paymentId + currency: currency + isActive: true + cluster: https://example.com/ + metadata: + - metadata + - metadata + paymentId: paymentId + name: name + description: description + isActive: true + prices: + - amount: 0.8008281904610115 + paymentId: paymentId + currency: currency + isActive: true + - amount: 0.8008281904610115 + paymentId: paymentId + currency: currency + isActive: true + properties: + paymentId: + nullable: true + type: string + name: + nullable: true + type: string + description: + nullable: true + type: string + metadata: + items: + type: string + type: array + isActive: + nullable: true + type: boolean + prices: + items: + $ref: '#/components/schemas/Price-Product.output' + type: array + defaultPrice: + $ref: '#/components/schemas/Price-Product.output' + cluster: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + Project-Project.input: + deprecated: false + description: Class Project + properties: + templateIri: + nullable: true + type: string + git: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + team: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + environment: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + name: + nullable: true + type: string + isActive: + nullable: true + type: boolean + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + code: + nullable: true + type: string + color: + nullable: true + type: string + isInitProjectSkeleton: + nullable: true + type: boolean + componentVersion: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + projectTypeVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + projectEnvVar: + items: + $ref: '#/components/schemas/ProjectEnvVar-Project.input' + type: array + Project-Project.output: + deprecated: false + description: Class Project + example: + stateByInfra: https://example.com/ + memory: 5 + code: code + color: color + projectAccess: + projectAccessServiceAccount: + password: password + email: email + username: username + projectAccessRegistry: + password: password + instance: instance + quota: 6 + url: url + email: email + username: username + projectAccessGit: + path: path + password: password + isExternal: true + sshPrivateKey: sshPrivateKey + url: url + email: email + username: username + id: 0 + uuid: uuid + cpu: 5 + team: https://example.com/ + storage: 2 + isInitProjectSkeleton: true + componentVersion: + - https://example.com/ + - https://example.com/ + isActive: true + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + environment: + - https://example.com/ + - https://example.com/ + git: https://example.com/ + projectTypeVersion: https://example.com/ + name: name + codeName: codeName + projectEnvVar: + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + state: https://example.com/ + id: 1 + templateIri: templateIri + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + templateIri: + nullable: true + type: string + state: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + git: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + team: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + environment: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + projectAccess: + $ref: '#/components/schemas/ProjectAccess-Project.output' + stateByInfra: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + isActive: + nullable: true + type: boolean + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + code: + nullable: true + type: string + color: + nullable: true + type: string + isInitProjectSkeleton: + nullable: true + type: boolean + componentVersion: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + projectTypeVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + projectEnvVar: + items: + $ref: '#/components/schemas/ProjectEnvVar-Project.output' + type: array + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ProjectAccess: + deprecated: false + description: Class ProjectAccess + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + projectAccessServiceAccount: https://example.com/ + projectAccessRegistry: https://example.com/ + updatedBy: updatedBy + projectAccessGit: https://example.com/ + createdBy: createdBy + project: https://example.com/ + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + project: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + projectAccessGit: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + projectAccessRegistry: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + projectAccessServiceAccount: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ProjectAccess-Project.output: + deprecated: false + description: "" + example: + projectAccessServiceAccount: + password: password + email: email + username: username + projectAccessRegistry: + password: password + instance: instance + quota: 6 + url: url + email: email + username: username + projectAccessGit: + path: path + password: password + isExternal: true + sshPrivateKey: sshPrivateKey + url: url + email: email + username: username + id: 0 + uuid: uuid + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + projectAccessGit: + $ref: '#/components/schemas/ProjectAccessGit-Project.output' + projectAccessRegistry: + $ref: '#/components/schemas/ProjectAccessRegistry-Project.output' + projectAccessServiceAccount: + $ref: '#/components/schemas/ProjectAccessServiceAccount-Project.output' + ProjectAccessGit: + deprecated: false + description: Class ProjectAccessGit + example: + updatedBy: updatedBy + isExternal: true + projectAccess: https://example.com/ + uuid: uuid + url: url + path: path + createdAt: 2000-01-23T04:56:07.000+00:00 + password: password + sshPrivateKey: sshPrivateKey + createdBy: createdBy + id: 0 + email: email + username: username + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + isExternal: + nullable: true + type: boolean + url: + nullable: true + type: string + path: + nullable: true + type: string + username: + nullable: true + type: string + email: + nullable: true + type: string + password: + nullable: true + type: string + sshPrivateKey: + nullable: true + type: string + projectAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ProjectAccessGit-Project.output: + deprecated: false + description: "" + example: + path: path + password: password + isExternal: true + sshPrivateKey: sshPrivateKey + url: url + email: email + username: username + properties: + isExternal: + nullable: true + type: boolean + url: + nullable: true + type: string + path: + nullable: true + type: string + username: + nullable: true + type: string + email: + nullable: true + type: string + password: + nullable: true + type: string + sshPrivateKey: + nullable: true + type: string + ProjectAccessRegistry: + deprecated: false + description: Class ProjectAccessRegistry + example: + instance: instance + updatedBy: updatedBy + projectAccess: https://example.com/ + uuid: uuid + url: url + createdAt: 2000-01-23T04:56:07.000+00:00 + password: password + createdBy: createdBy + quota: 6 + id: 0 + email: email + username: username + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + quota: + nullable: true + type: integer + instance: + nullable: true + type: string + url: + nullable: true + type: string + email: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + projectAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ProjectAccessRegistry-Project.output: + deprecated: false + description: "" + example: + password: password + instance: instance + quota: 6 + url: url + email: email + username: username + properties: + quota: + nullable: true + type: integer + instance: + nullable: true + type: string + url: + nullable: true + type: string + email: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + ProjectAccessServiceAccount: + deprecated: false + description: Class ProjectAccessServiceAccount + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + password: password + updatedBy: updatedBy + createdBy: createdBy + projectAccess: https://example.com/ + id: 0 + uuid: uuid + email: email + username: username + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + email: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + projectAccess: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ProjectAccessServiceAccount-Project.output: + deprecated: false + description: "" + example: + password: password + email: email + username: username + properties: + email: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + ProjectEnvVar: + deprecated: false + description: "" + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + rawValue: rawValue + isEncrypted: true + project: + memory: 5 + code: code + color: color + cpu: 1 + storage: 5 + isInitProjectSkeleton: true + componentVersion: + - componentVersion + - componentVersion + isActive: true + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + projectTypeVersion: https://example.com/ + name: name + codeName: codeName + projectEnvVar: + - projectEnvVar + - projectEnvVar + id: 6 + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: 0 + envVarType: https://example.com/ + uuid: uuid + value: value + key: key + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + project: + $ref: '#/components/schemas/AbstractProject' + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + rawValue: + nullable: true + readOnly: true + type: string + ProjectEnvVar-Project.input: + deprecated: false + description: Class ProjectEnvVar + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + ProjectEnvVar-Project.output: + deprecated: false + description: "" + example: + isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + ProjectEnvVar-TemplateProject.input: + deprecated: false + description: Class ProjectEnvVar + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + ProjectEnvVar-TemplateProject.output: + deprecated: false + description: "" + example: + envVarType: https://example.com/ + value: value + key: key + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + ProjectType: + deprecated: false + description: Class ProjectType + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + projectTypeVersion: + - https://example.com/ + - https://example.com/ + name: name + codeName: codeName + logo: logo + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + logo: + nullable: true + type: string + projectTypeVersion: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ProjectTypeVersion: + deprecated: false + description: Class ProjectTypeVersion + example: + componentResourceLimit: + - https://example.com/ + - https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + requiredComponent: + - https://example.com/ + - https://example.com/ + updatedBy: updatedBy + componentVersions: + - https://example.com/ + - https://example.com/ + createdBy: createdBy + projectType: https://example.com/ + id: 0 + uuid: uuid + version: version + projectTypeVersionEnvVar: + - https://example.com/ + - https://example.com/ + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + version: + nullable: true + type: string + projectType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + projectTypeVersionEnvVar: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + componentResourceLimit: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + requiredComponent: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + componentVersions: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ProjectTypeVersionEnvVar: + deprecated: false + description: Class ProjectTypeEnvVar + example: + note: note + isRequired: true + updatedBy: updatedBy + envVarValidations: + - https://example.com/ + - https://example.com/ + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + createdBy: createdBy + projectTypeVersion: https://example.com/ + isEncrypted: true + projectTypeVersionEnvVarExample: + - https://example.com/ + - https://example.com/ + id: 0 + key: key + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + projectTypeVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + projectTypeVersionEnvVarExample: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + key: + nullable: true + type: string + note: + nullable: true + type: string + isRequired: + nullable: true + type: boolean + isEncrypted: + nullable: true + type: boolean + envVarValidations: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + ProjectTypeVersionEnvVarExample: + deprecated: false + description: Class ProjectTypeEnvVarExample + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + isDefault: true + updatedBy: updatedBy + createdBy: createdBy + id: 0 + uuid: uuid + value: value + projectTypeVersionEnvVar: https://example.com/ + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + value: + nullable: true + type: string + isDefault: + nullable: true + type: boolean + projectTypeVersionEnvVar: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + Provider: + deprecated: false + description: Class Provider + example: + cluster: + - https://example.com/ + - https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + isDefault: true + environment: + - https://example.com/ + - https://example.com/ + updatedBy: updatedBy + createdBy: createdBy + name: name + codeName: codeName + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + isDefault: + nullable: true + type: boolean + environment: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + cluster: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + Provider-Cluster.withProvider: + deprecated: false + description: "" + example: + name: name + properties: + name: + nullable: true + type: string + ResourceType-ResourceType.input: + deprecated: false + description: Class ResourceType + properties: + name: + nullable: true + type: string + resourceTypeLimit: + $ref: '#/components/schemas/ResourceTypeLimit-ResourceType.input' + ResourceType-ResourceType.output: + deprecated: false + description: Class ResourceType + example: + name: name + resourceTypeLimit: + componentMinValue: 5 + componentMaxValue: 2 + projectMinValue: 0 + environmentMinValue: 1 + environmentMaxValue: 5 + projectMaxValue: 6 + properties: + name: + nullable: true + type: string + resourceTypeLimit: + $ref: '#/components/schemas/ResourceTypeLimit-ResourceType.output' + ResourceTypeLimit: + deprecated: false + description: Class ResourceTypeLimit + example: + componentMinValue: 2 + componentMaxValue: 7 + createdAt: 2000-01-23T04:56:07.000+00:00 + projectMinValue: 6 + updatedBy: updatedBy + createdBy: createdBy + environmentMinValue: 5 + environmentMaxValue: 5 + id: 0 + projectMaxValue: 1 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + projectMinValue: + nullable: true + type: integer + projectMaxValue: + nullable: true + type: integer + environmentMinValue: + nullable: true + type: integer + environmentMaxValue: + nullable: true + type: integer + componentMinValue: + nullable: true + type: integer + componentMaxValue: + nullable: true + type: integer + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + ResourceTypeLimit-ResourceType.input: + deprecated: false + description: Class ResourceTypeLimit + properties: + projectMinValue: + nullable: true + type: integer + projectMaxValue: + nullable: true + type: integer + environmentMinValue: + nullable: true + type: integer + environmentMaxValue: + nullable: true + type: integer + componentMinValue: + nullable: true + type: integer + componentMaxValue: + nullable: true + type: integer + ResourceTypeLimit-ResourceType.output: + deprecated: false + description: "" + example: + componentMinValue: 5 + componentMaxValue: 2 + projectMinValue: 0 + environmentMinValue: 1 + environmentMaxValue: 5 + projectMaxValue: 6 + properties: + projectMinValue: + nullable: true + type: integer + projectMaxValue: + nullable: true + type: integer + environmentMinValue: + nullable: true + type: integer + environmentMaxValue: + nullable: true + type: integer + componentMinValue: + nullable: true + type: integer + componentMaxValue: + nullable: true + type: integer + RoleGroup: + deprecated: false + description: Class RoleGroup + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + roles: + - roles + - roles + name: name + id: 0 + uuid: uuid + users: + - https://example.com/ + - https://example.com/ + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + type: string + roles: + items: + type: string + type: array + users: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + State: + deprecated: false + description: Class State + example: + importedData: + - https://example.com/ + - https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + environment: + - https://example.com/ + - https://example.com/ + updatedBy: updatedBy + createdBy: createdBy + name: name + project: + - https://example.com/ + - https://example.com/ + seqNumber: 6 + id: 0 + uuid: uuid + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + seqNumber: + nullable: true + type: integer + project: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + environment: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + importedData: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + StateByInfra: + deprecated: false + description: Class StateByInfra + example: + updatedBy: updatedBy + messageInfo: messageInfo + lastInfraEventAt: lastInfraEventAt + organisation: https://example.com/ + project: https://example.com/ + team: https://example.com/ + message: message + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + environment: https://example.com/ + createdBy: createdBy + id: 0 + status: status + statusCode: 6 + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + status: + nullable: true + type: string + statusCode: + nullable: true + type: integer + message: + nullable: true + type: string + messageInfo: + nullable: true + type: string + lastInfraEventAt: + nullable: true + type: string + organisation: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + team: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + project: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + environment: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + Team-Team.input: + deprecated: false + description: Class Team + properties: + name: + nullable: true + type: string + codeName: + nullable: true + type: string + isDefault: + description: User related property - One user can only have 1 pcs default + Team + nullable: true + type: boolean + user: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + teamUsers: + items: + $ref: '#/components/schemas/Team_Team_input_teamUsers_inner' + type: array + project: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + organisation: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + teamEnvVar: + items: + $ref: '#/components/schemas/TeamEnvVar-Team.input' + type: array + Team-Team.output: + deprecated: false + description: Class Team + example: + stateByInfra: https://example.com/ + defaultUserName: defaultUserName + project: + - https://example.com/ + - https://example.com/ + organisation: https://example.com/ + uuid: uuid + isDefault: true + teamUsers: + - user: user + roleGroup: roleGroup + - user: user + roleGroup: roleGroup + teamEnvVar: + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + name: name + codeName: codeName + defaultUser: https://example.com/ + id: 0 + user: + - https://example.com/ + - https://example.com/ + properties: + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + isDefault: + description: User related property - One user can only have 1 pcs default + Team + nullable: true + type: boolean + user: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + teamUsers: + items: + $ref: '#/components/schemas/Team_Team_input_teamUsers_inner' + type: array + project: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + organisation: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + teamEnvVar: + items: + $ref: '#/components/schemas/TeamEnvVar-Team.output' + type: array + stateByInfra: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + defaultUser: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + defaultUserName: + nullable: true + type: string + TeamEnvVar: + deprecated: false + description: Class TeamEnvVar + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + updatedBy: updatedBy + createdBy: createdBy + rawValue: rawValue + isEncrypted: true + team: https://example.com/ + id: 0 + envVarType: https://example.com/ + uuid: uuid + value: value + key: key + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + team: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + rawValue: + nullable: true + readOnly: true + type: string + TeamEnvVar-Team.input: + deprecated: false + description: Class TeamEnvVar + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + TeamEnvVar-Team.output: + deprecated: false + description: "" + example: + isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + properties: + key: + nullable: true + type: string + value: + nullable: true + type: string + isEncrypted: + nullable: true + type: boolean + envVarType: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + TemplateEnvironment-TemplateEnvironment.input: + deprecated: false + description: Class TemplateEnvironment + properties: + templateProject: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + name: + nullable: true + type: string + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + dataTransferSettings: + nullable: true + type: string + isStripDatabase: + nullable: true + type: boolean + isAllowOutgoingEmails: + nullable: true + type: boolean + isAllowHtaccessDevtoolsProtection: + nullable: true + type: boolean + isInitSampleData: + nullable: true + type: boolean + envVar: + items: + $ref: '#/components/schemas/EnvironmentEnvVar-TemplateEnvironment.input' + type: array + environmentComponent: + items: + $ref: '#/components/schemas/EnvironmentComponent-TemplateEnvironment.input' + type: array + TemplateEnvironment-TemplateEnvironment.output: + deprecated: false + description: Class TemplateEnvironment + example: + templateProject: https://example.com/ + environmentComponent: + - node: 9 + memory: 2 + cpu: 5 + storage: 7 + componentVersion: https://example.com/ + - node: 9 + memory: 2 + cpu: 5 + storage: 7 + componentVersion: https://example.com/ + memory: 1 + envVar: + - envVarType: https://example.com/ + value: value + key: key + - envVarType: https://example.com/ + value: value + key: key + cpu: 6 + storage: 5 + isStripDatabase: true + uuid: uuid + isInitSampleData: true + createdAt: 2000-01-23T04:56:07.000+00:00 + isAllowOutgoingEmails: true + name: name + codeName: codeName + id: 0 + dataTransferSettings: dataTransferSettings + isAllowHtaccessDevtoolsProtection: true + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + templateProject: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + dataTransferSettings: + nullable: true + type: string + isStripDatabase: + nullable: true + type: boolean + isAllowOutgoingEmails: + nullable: true + type: boolean + isAllowHtaccessDevtoolsProtection: + nullable: true + type: boolean + isInitSampleData: + nullable: true + type: boolean + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + envVar: + items: + $ref: '#/components/schemas/EnvironmentEnvVar-TemplateEnvironment.output' + type: array + environmentComponent: + items: + $ref: '#/components/schemas/EnvironmentComponent-TemplateEnvironment.output' + type: array + TemplateProject-TemplateProject.input: + deprecated: false + description: Class ProjectTemplate + properties: + description: + nullable: true + type: string + templateEnvironment: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + name: + nullable: true + type: string + isActive: + nullable: true + type: boolean + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + code: + nullable: true + type: string + color: + nullable: true + type: string + isInitProjectSkeleton: + nullable: true + type: boolean + componentVersion: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + projectTypeVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + projectEnvVar: + items: + $ref: '#/components/schemas/ProjectEnvVar-TemplateProject.input' + type: array + TemplateProject-TemplateProject.output: + deprecated: false + description: Class ProjectTemplate + example: + memory: 1 + code: code + color: color + description: description + cpu: 6 + storage: 5 + isInitProjectSkeleton: true + componentVersion: + - https://example.com/ + - https://example.com/ + isActive: true + uuid: uuid + createdAt: 2000-01-23T04:56:07.000+00:00 + projectTypeVersion: https://example.com/ + templateEnvironment: + - https://example.com/ + - https://example.com/ + name: name + codeName: codeName + projectEnvVar: + - envVarType: https://example.com/ + value: value + key: key + - envVarType: https://example.com/ + value: value + key: key + id: 0 + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + description: + nullable: true + type: string + templateEnvironment: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + id: + readOnly: true + type: integer + uuid: + readOnly: true + type: string + name: + nullable: true + type: string + codeName: + nullable: true + type: string + isActive: + nullable: true + type: boolean + cpu: + nullable: true + type: integer + memory: + nullable: true + type: integer + storage: + nullable: true + type: integer + code: + nullable: true + type: string + color: + nullable: true + type: string + isInitProjectSkeleton: + nullable: true + type: boolean + componentVersion: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + projectTypeVersion: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + projectEnvVar: + items: + $ref: '#/components/schemas/ProjectEnvVar-TemplateProject.output' + type: array + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + User: + deprecated: false + description: Class User + example: + updatedBy: updatedBy + salt: salt + roles: + - roles + - roles + team: + - https://example.com/ + - https://example.com/ + uuid: uuid + teamRoles: + - team: team + roleGroup: roleGroup + - team: team + roleGroup: roleGroup + passwordHash: passwordHash + changePassword: changePassword + currentPassword: currentPassword + createdAt: 2000-01-23T04:56:07.000+00:00 + password: password + createdBy: createdBy + userIdentifier: userIdentifier + paymentId: paymentId + isEnabled: true + authenticatorId: 6 + currency: currency + id: 0 + fullname: fullname + roleGroup: https://example.com/ + email: email + activationHash: activationHash + username: username + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + readOnly: true + type: integer + uuid: + nullable: true + readOnly: true + type: string + paymentId: + nullable: true + type: string + authenticatorId: + nullable: true + type: integer + fullname: + nullable: true + type: string + email: + nullable: true + type: string + username: + nullable: true + type: string + roles: + items: + type: string + type: array + currency: + nullable: true + type: string + password: + type: string + changePassword: + nullable: true + type: string + currentPassword: + nullable: true + type: string + isEnabled: + type: boolean + passwordHash: + nullable: true + type: string + activationHash: + nullable: true + type: string + roleGroup: + example: https://example.com/ + format: iri-reference + nullable: true + type: string + owl:maxCardinality: 1 + team: + items: + example: https://example.com/ + format: iri-reference + type: string + type: array + teamRoles: + items: + $ref: '#/components/schemas/User_teamRoles_inner' + type: array + createdBy: + nullable: true + type: string + updatedBy: + nullable: true + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + userIdentifier: + readOnly: true + type: string + salt: + description: not needed when using the "bcrypt" algorithm in security.yaml + nullable: true + readOnly: true + type: string + EnvironmentAccess.AllDataResponse: + $ref: '#/components/schemas/EnvironmentAccess' + Environment.Costs: + example: + uuid: + costs: + - "{}" + - "{}" + environment: + cluster: https://example.com/ + environmentAccess: https://example.com/ + stateByInfra: https://example.com/ + memory: 1 + project: https://example.com/ + storage: 5 + uuid: uuid + importedData: + - https://example.com/ + - https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + provider: https://example.com/ + targetRefName: targetRefName + codeName: codeName + state: https://example.com/ + id: 0 + dataTransferSettings: dataTransferSettings + updatedAt: 2000-01-23T04:56:07.000+00:00 + environmentComponent: + - node: 9 + memory: 2 + cpu: 5 + storage: 7 + componentVersion: https://example.com/ + - node: 9 + memory: 2 + cpu: 5 + storage: 7 + componentVersion: https://example.com/ + envVar: + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + environmentMagentoHostMapping: + - mageRunCode: mageRunCode + hostname: hostname + mageRunType: mageRunType + - mageRunCode: mageRunCode + hostname: hostname + mageRunType: mageRunType + cpu: 6 + isStripDatabase: true + environmentCustomDomain: + - hostname: hostname + certificateData: certificateData + certificateKey: certificateKey + - hostname: hostname + certificateData: certificateData + certificateKey: certificateKey + isInitSampleData: true + exportedData: + - https://example.com/ + - https://example.com/ + isAllowOutgoingEmails: true + name: name + templateIri: templateIri + isAllowHtaccessDevtoolsProtection: true + properties: + uuid: + $ref: '#/components/schemas/Environment_Costs_uuid' + Environment.LogStreamResponse: + example: + topic: topic + token: token + properties: + topic: + type: string + token: + type: string + Authentication.Token: + example: + data: + teams: + - uuid: uuid + - uuid: uuid + roles: + - roles + - roles + id: 0 + fullname: fullname + token: token + properties: + token: + readOnly: true + type: string + data: + $ref: '#/components/schemas/Authentication_Token_data' + Authentication.Credentials: + properties: + id: + example: johndoe@example.com OR johndoe + type: string + password: + example: password + type: string + ValidateEnvVar.Request: + properties: + word: + type: string + iri: + type: string + ValidateEnvVar.Response: + example: + isValid: true + messages: + - messages + - messages + properties: + isValid: + type: boolean + messages: + items: + type: string + type: array + Finance.InvoicesResponse: + example: + costomer: "{}" + invoices: + - "{}" + - "{}" + paymentMethods: + - "{}" + - "{}" + properties: + costomer: + type: object + paymentMethods: + items: + type: object + type: array + invoices: + items: + type: object + type: array + Finance.CostsResponse: + example: + summary: + cpuCoreHours: 0 + pvByteHours: 1 + ramCost: 5 + ramByteHours: 6 + cpuCost: 5 + pvCost: 2 + properties: + summary: + $ref: '#/components/schemas/Finance_CostsResponse_summary' + Mercure.DiscoverResponse: + example: + data: + - data + - data + properties: + data: + items: + type: string + type: array + Finance.ApiTokenResponse: + example: + data: + teams: + - uuid: uuid + - uuid: uuid + roles: + - roles + - roles + id: 0 + fullname: fullname + token: token + properties: + token: + type: string + data: + $ref: '#/components/schemas/Authentication_Token_data' + _api_gits__id__connect_test_get_200_response: + example: + isSuccessful: true + properties: + isSuccessful: + type: boolean + _api_users_check_email_get_200_response: + example: + isNotExists: true + properties: + isNotExists: + type: boolean + _api_users_forgot_password_put_request: + properties: + email: + type: string + _api_users_forgot_password_put_200_response: + example: + msg: msg + error: true + properties: + msg: + type: string + error: + type: boolean + _api_users__id__finance_subscribe_info_get_200_response: + example: + clientSecret: clientSecret + properties: + clientSecret: + type: string + Team_Team_input_teamUsers_inner: + example: + user: user + roleGroup: roleGroup + properties: + user: + type: string + roleGroup: + type: string + User_teamRoles_inner: + example: + team: team + roleGroup: roleGroup + properties: + team: + type: string + roleGroup: + type: string + Environment_Costs_uuid: + example: + costs: + - "{}" + - "{}" + environment: + cluster: https://example.com/ + environmentAccess: https://example.com/ + stateByInfra: https://example.com/ + memory: 1 + project: https://example.com/ + storage: 5 + uuid: uuid + importedData: + - https://example.com/ + - https://example.com/ + createdAt: 2000-01-23T04:56:07.000+00:00 + provider: https://example.com/ + targetRefName: targetRefName + codeName: codeName + state: https://example.com/ + id: 0 + dataTransferSettings: dataTransferSettings + updatedAt: 2000-01-23T04:56:07.000+00:00 + environmentComponent: + - node: 9 + memory: 2 + cpu: 5 + storage: 7 + componentVersion: https://example.com/ + - node: 9 + memory: 2 + cpu: 5 + storage: 7 + componentVersion: https://example.com/ + envVar: + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + - isEncrypted: true + envVarType: https://example.com/ + value: value + key: key + environmentMagentoHostMapping: + - mageRunCode: mageRunCode + hostname: hostname + mageRunType: mageRunType + - mageRunCode: mageRunCode + hostname: hostname + mageRunType: mageRunType + cpu: 6 + isStripDatabase: true + environmentCustomDomain: + - hostname: hostname + certificateData: certificateData + certificateKey: certificateKey + - hostname: hostname + certificateData: certificateData + certificateKey: certificateKey + isInitSampleData: true + exportedData: + - https://example.com/ + - https://example.com/ + isAllowOutgoingEmails: true + name: name + templateIri: templateIri + isAllowHtaccessDevtoolsProtection: true + properties: + costs: + items: + type: object + type: array + environment: + $ref: '#/components/schemas/Environment-Environment.output' + Authentication_Token_data_teams_inner: + example: + uuid: uuid + properties: + uuid: + type: string + Authentication_Token_data: + example: + teams: + - uuid: uuid + - uuid: uuid + roles: + - roles + - roles + id: 0 + fullname: fullname + properties: + id: + type: integer + fullname: + type: string + roles: + items: + type: string + type: array + teams: + items: + $ref: '#/components/schemas/Authentication_Token_data_teams_inner' + type: array + Finance_CostsResponse_summary: + example: + cpuCoreHours: 0 + pvByteHours: 1 + ramCost: 5 + ramByteHours: 6 + cpuCost: 5 + pvCost: 2 + properties: + cpuCoreHours: + type: integer + ramByteHours: + type: integer + pvByteHours: + type: integer + cpuCost: + type: integer + ramCost: + type: integer + pvCost: + type: integer + securitySchemes: + apiKey: + description: Value for the Authorization header parameter. + in: header + name: Authorization + type: apiKey + JWT: + bearerFormat: JWT + scheme: bearer + type: http diff --git a/pkg/api/rewardcloud/api_access_code.go b/pkg/api/rewardcloud/api_access_code.go new file mode 100644 index 0000000..5ef1cac --- /dev/null +++ b/pkg/api/rewardcloud/api_access_code.go @@ -0,0 +1,800 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// AccessCodeAPIService AccessCodeAPI service +type AccessCodeAPIService service + +type AccessCodeAPIApiAccessCodesGetCollectionRequest struct { + ctx context.Context + ApiService *AccessCodeAPIService + page *int32 + itemsPerPage *int32 + accessCode *string + accessCode2 *[]string +} + +// The collection page number +func (r AccessCodeAPIApiAccessCodesGetCollectionRequest) Page(page int32) AccessCodeAPIApiAccessCodesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r AccessCodeAPIApiAccessCodesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) AccessCodeAPIApiAccessCodesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r AccessCodeAPIApiAccessCodesGetCollectionRequest) AccessCode(accessCode string) AccessCodeAPIApiAccessCodesGetCollectionRequest { + r.accessCode = &accessCode + return r +} + +func (r AccessCodeAPIApiAccessCodesGetCollectionRequest) AccessCode2(accessCode2 []string) AccessCodeAPIApiAccessCodesGetCollectionRequest { + r.accessCode2 = &accessCode2 + return r +} + +func (r AccessCodeAPIApiAccessCodesGetCollectionRequest) Execute() ([]AccessCode, *http.Response, error) { + return r.ApiService.ApiAccessCodesGetCollectionExecute(r) +} + +/* +ApiAccessCodesGetCollection Retrieves the collection of AccessCode resources. + +Retrieves the collection of AccessCode resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return AccessCodeAPIApiAccessCodesGetCollectionRequest +*/ +func (a *AccessCodeAPIService) ApiAccessCodesGetCollection(ctx context.Context) AccessCodeAPIApiAccessCodesGetCollectionRequest { + return AccessCodeAPIApiAccessCodesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []AccessCode +func (a *AccessCodeAPIService) ApiAccessCodesGetCollectionExecute(r AccessCodeAPIApiAccessCodesGetCollectionRequest) ([]AccessCode, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AccessCode + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessCodeAPIService.ApiAccessCodesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/access_codes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.accessCode != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "accessCode", r.accessCode, "") + } + if r.accessCode2 != nil { + t := *r.accessCode2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "accessCode[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "accessCode[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AccessCodeAPIApiAccessCodesIdDeleteRequest struct { + ctx context.Context + ApiService *AccessCodeAPIService + id string +} + +func (r AccessCodeAPIApiAccessCodesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiAccessCodesIdDeleteExecute(r) +} + +/* +ApiAccessCodesIdDelete Removes the AccessCode resource. + +Removes the AccessCode resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id AccessCode identifier + @return AccessCodeAPIApiAccessCodesIdDeleteRequest +*/ +func (a *AccessCodeAPIService) ApiAccessCodesIdDelete(ctx context.Context, id string) AccessCodeAPIApiAccessCodesIdDeleteRequest { + return AccessCodeAPIApiAccessCodesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *AccessCodeAPIService) ApiAccessCodesIdDeleteExecute(r AccessCodeAPIApiAccessCodesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessCodeAPIService.ApiAccessCodesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/access_codes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type AccessCodeAPIApiAccessCodesIdGetRequest struct { + ctx context.Context + ApiService *AccessCodeAPIService + id string +} + +func (r AccessCodeAPIApiAccessCodesIdGetRequest) Execute() (*AccessCode, *http.Response, error) { + return r.ApiService.ApiAccessCodesIdGetExecute(r) +} + +/* +ApiAccessCodesIdGet Retrieves a AccessCode resource. + +Retrieves a AccessCode resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id AccessCode identifier + @return AccessCodeAPIApiAccessCodesIdGetRequest +*/ +func (a *AccessCodeAPIService) ApiAccessCodesIdGet(ctx context.Context, id string) AccessCodeAPIApiAccessCodesIdGetRequest { + return AccessCodeAPIApiAccessCodesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return AccessCode +func (a *AccessCodeAPIService) ApiAccessCodesIdGetExecute(r AccessCodeAPIApiAccessCodesIdGetRequest) (*AccessCode, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccessCode + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessCodeAPIService.ApiAccessCodesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/access_codes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AccessCodeAPIApiAccessCodesIdPatchRequest struct { + ctx context.Context + ApiService *AccessCodeAPIService + accessCode *AccessCode + id string +} + +// The updated AccessCode resource +func (r AccessCodeAPIApiAccessCodesIdPatchRequest) AccessCode(accessCode AccessCode) AccessCodeAPIApiAccessCodesIdPatchRequest { + r.accessCode = &accessCode + return r +} + +func (r AccessCodeAPIApiAccessCodesIdPatchRequest) Execute() (*AccessCode, *http.Response, error) { + return r.ApiService.ApiAccessCodesIdPatchExecute(r) +} + +/* +ApiAccessCodesIdPatch Updates the AccessCode resource. + +Updates the AccessCode resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id AccessCode identifier + @return AccessCodeAPIApiAccessCodesIdPatchRequest +*/ +func (a *AccessCodeAPIService) ApiAccessCodesIdPatch(ctx context.Context, id string) AccessCodeAPIApiAccessCodesIdPatchRequest { + return AccessCodeAPIApiAccessCodesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return AccessCode +func (a *AccessCodeAPIService) ApiAccessCodesIdPatchExecute(r AccessCodeAPIApiAccessCodesIdPatchRequest) (*AccessCode, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccessCode + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessCodeAPIService.ApiAccessCodesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/access_codes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.accessCode == nil { + return localVarReturnValue, nil, reportError("accessCode is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.accessCode + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AccessCodeAPIApiAccessCodesIdPutRequest struct { + ctx context.Context + ApiService *AccessCodeAPIService + accessCode *AccessCode + id string +} + +// The updated AccessCode resource +func (r AccessCodeAPIApiAccessCodesIdPutRequest) AccessCode(accessCode AccessCode) AccessCodeAPIApiAccessCodesIdPutRequest { + r.accessCode = &accessCode + return r +} + +func (r AccessCodeAPIApiAccessCodesIdPutRequest) Execute() (*AccessCode, *http.Response, error) { + return r.ApiService.ApiAccessCodesIdPutExecute(r) +} + +/* +ApiAccessCodesIdPut Replaces the AccessCode resource. + +Replaces the AccessCode resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id AccessCode identifier + @return AccessCodeAPIApiAccessCodesIdPutRequest +*/ +func (a *AccessCodeAPIService) ApiAccessCodesIdPut(ctx context.Context, id string) AccessCodeAPIApiAccessCodesIdPutRequest { + return AccessCodeAPIApiAccessCodesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return AccessCode +func (a *AccessCodeAPIService) ApiAccessCodesIdPutExecute(r AccessCodeAPIApiAccessCodesIdPutRequest) (*AccessCode, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccessCode + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessCodeAPIService.ApiAccessCodesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/access_codes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.accessCode == nil { + return localVarReturnValue, nil, reportError("accessCode is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.accessCode + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AccessCodeAPIApiAccessCodesPostRequest struct { + ctx context.Context + ApiService *AccessCodeAPIService + accessCode *AccessCode +} + +// The new AccessCode resource +func (r AccessCodeAPIApiAccessCodesPostRequest) AccessCode(accessCode AccessCode) AccessCodeAPIApiAccessCodesPostRequest { + r.accessCode = &accessCode + return r +} + +func (r AccessCodeAPIApiAccessCodesPostRequest) Execute() (*AccessCode, *http.Response, error) { + return r.ApiService.ApiAccessCodesPostExecute(r) +} + +/* +ApiAccessCodesPost Creates a AccessCode resource. + +Creates a AccessCode resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return AccessCodeAPIApiAccessCodesPostRequest +*/ +func (a *AccessCodeAPIService) ApiAccessCodesPost(ctx context.Context) AccessCodeAPIApiAccessCodesPostRequest { + return AccessCodeAPIApiAccessCodesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return AccessCode +func (a *AccessCodeAPIService) ApiAccessCodesPostExecute(r AccessCodeAPIApiAccessCodesPostRequest) (*AccessCode, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccessCode + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessCodeAPIService.ApiAccessCodesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/access_codes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.accessCode == nil { + return localVarReturnValue, nil, reportError("accessCode is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.accessCode + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_cluster.go b/pkg/api/rewardcloud/api_cluster.go new file mode 100644 index 0000000..4965003 --- /dev/null +++ b/pkg/api/rewardcloud/api_cluster.go @@ -0,0 +1,1084 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ClusterAPIService ClusterAPI service +type ClusterAPIService service + +type ClusterAPIApiClustersGetCollectionRequest struct { + ctx context.Context + ApiService *ClusterAPIService + page *int32 + itemsPerPage *int32 + provider *string + provider2 *[]string +} + +// The collection page number +func (r ClusterAPIApiClustersGetCollectionRequest) Page(page int32) ClusterAPIApiClustersGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ClusterAPIApiClustersGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ClusterAPIApiClustersGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ClusterAPIApiClustersGetCollectionRequest) Provider(provider string) ClusterAPIApiClustersGetCollectionRequest { + r.provider = &provider + return r +} + +func (r ClusterAPIApiClustersGetCollectionRequest) Provider2(provider2 []string) ClusterAPIApiClustersGetCollectionRequest { + r.provider2 = &provider2 + return r +} + +func (r ClusterAPIApiClustersGetCollectionRequest) Execute() ([]Cluster, *http.Response, error) { + return r.ApiService.ApiClustersGetCollectionExecute(r) +} + +/* +ApiClustersGetCollection Retrieves the collection of Cluster resources. + +Retrieves the collection of Cluster resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ClusterAPIApiClustersGetCollectionRequest +*/ +func (a *ClusterAPIService) ApiClustersGetCollection(ctx context.Context) ClusterAPIApiClustersGetCollectionRequest { + return ClusterAPIApiClustersGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []Cluster +func (a *ClusterAPIService) ApiClustersGetCollectionExecute(r ClusterAPIApiClustersGetCollectionRequest) ([]Cluster, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Cluster + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClusterAPIService.ApiClustersGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/clusters" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.provider != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "provider", r.provider, "") + } + if r.provider2 != nil { + t := *r.provider2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "provider[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "provider[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ClusterAPIApiClustersIdDeleteRequest struct { + ctx context.Context + ApiService *ClusterAPIService + id string +} + +func (r ClusterAPIApiClustersIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiClustersIdDeleteExecute(r) +} + +/* +ApiClustersIdDelete Removes the Cluster resource. + +Removes the Cluster resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Cluster identifier + @return ClusterAPIApiClustersIdDeleteRequest +*/ +func (a *ClusterAPIService) ApiClustersIdDelete(ctx context.Context, id string) ClusterAPIApiClustersIdDeleteRequest { + return ClusterAPIApiClustersIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ClusterAPIService) ApiClustersIdDeleteExecute(r ClusterAPIApiClustersIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClusterAPIService.ApiClustersIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/clusters/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ClusterAPIApiClustersIdGetRequest struct { + ctx context.Context + ApiService *ClusterAPIService + id string +} + +func (r ClusterAPIApiClustersIdGetRequest) Execute() (*Cluster, *http.Response, error) { + return r.ApiService.ApiClustersIdGetExecute(r) +} + +/* +ApiClustersIdGet Retrieves a Cluster resource. + +Retrieves a Cluster resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Cluster identifier + @return ClusterAPIApiClustersIdGetRequest +*/ +func (a *ClusterAPIService) ApiClustersIdGet(ctx context.Context, id string) ClusterAPIApiClustersIdGetRequest { + return ClusterAPIApiClustersIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Cluster +func (a *ClusterAPIService) ApiClustersIdGetExecute(r ClusterAPIApiClustersIdGetRequest) (*Cluster, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Cluster + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClusterAPIService.ApiClustersIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/clusters/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ClusterAPIApiClustersIdPatchRequest struct { + ctx context.Context + ApiService *ClusterAPIService + cluster *Cluster + id string +} + +// The updated Cluster resource +func (r ClusterAPIApiClustersIdPatchRequest) Cluster(cluster Cluster) ClusterAPIApiClustersIdPatchRequest { + r.cluster = &cluster + return r +} + +func (r ClusterAPIApiClustersIdPatchRequest) Execute() (*Cluster, *http.Response, error) { + return r.ApiService.ApiClustersIdPatchExecute(r) +} + +/* +ApiClustersIdPatch Updates the Cluster resource. + +Updates the Cluster resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Cluster identifier + @return ClusterAPIApiClustersIdPatchRequest +*/ +func (a *ClusterAPIService) ApiClustersIdPatch(ctx context.Context, id string) ClusterAPIApiClustersIdPatchRequest { + return ClusterAPIApiClustersIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Cluster +func (a *ClusterAPIService) ApiClustersIdPatchExecute(r ClusterAPIApiClustersIdPatchRequest) (*Cluster, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Cluster + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClusterAPIService.ApiClustersIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/clusters/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cluster == nil { + return localVarReturnValue, nil, reportError("cluster is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cluster + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ClusterAPIApiClustersIdPutRequest struct { + ctx context.Context + ApiService *ClusterAPIService + cluster *Cluster + id string +} + +// The updated Cluster resource +func (r ClusterAPIApiClustersIdPutRequest) Cluster(cluster Cluster) ClusterAPIApiClustersIdPutRequest { + r.cluster = &cluster + return r +} + +func (r ClusterAPIApiClustersIdPutRequest) Execute() (*Cluster, *http.Response, error) { + return r.ApiService.ApiClustersIdPutExecute(r) +} + +/* +ApiClustersIdPut Replaces the Cluster resource. + +Replaces the Cluster resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Cluster identifier + @return ClusterAPIApiClustersIdPutRequest +*/ +func (a *ClusterAPIService) ApiClustersIdPut(ctx context.Context, id string) ClusterAPIApiClustersIdPutRequest { + return ClusterAPIApiClustersIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Cluster +func (a *ClusterAPIService) ApiClustersIdPutExecute(r ClusterAPIApiClustersIdPutRequest) (*Cluster, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Cluster + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClusterAPIService.ApiClustersIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/clusters/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cluster == nil { + return localVarReturnValue, nil, reportError("cluster is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cluster + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ClusterAPIApiClustersIdgetWithProviderGetRequest struct { + ctx context.Context + ApiService *ClusterAPIService + id string +} + +func (r ClusterAPIApiClustersIdgetWithProviderGetRequest) Execute() (*ClusterClusterWithProvider, *http.Response, error) { + return r.ApiService.ApiClustersIdgetWithProviderGetExecute(r) +} + +/* +ApiClustersIdgetWithProviderGet Retrieves a Cluster resource. + +Retrieves a Cluster resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Cluster identifier + @return ClusterAPIApiClustersIdgetWithProviderGetRequest +*/ +func (a *ClusterAPIService) ApiClustersIdgetWithProviderGet(ctx context.Context, id string) ClusterAPIApiClustersIdgetWithProviderGetRequest { + return ClusterAPIApiClustersIdgetWithProviderGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ClusterClusterWithProvider +func (a *ClusterAPIService) ApiClustersIdgetWithProviderGetExecute(r ClusterAPIApiClustersIdgetWithProviderGetRequest) (*ClusterClusterWithProvider, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ClusterClusterWithProvider + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClusterAPIService.ApiClustersIdgetWithProviderGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/clusters/{id}/get-with-provider" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ClusterAPIApiClustersPostRequest struct { + ctx context.Context + ApiService *ClusterAPIService + cluster *Cluster +} + +// The new Cluster resource +func (r ClusterAPIApiClustersPostRequest) Cluster(cluster Cluster) ClusterAPIApiClustersPostRequest { + r.cluster = &cluster + return r +} + +func (r ClusterAPIApiClustersPostRequest) Execute() (*Cluster, *http.Response, error) { + return r.ApiService.ApiClustersPostExecute(r) +} + +/* +ApiClustersPost Creates a Cluster resource. + +Creates a Cluster resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ClusterAPIApiClustersPostRequest +*/ +func (a *ClusterAPIService) ApiClustersPost(ctx context.Context) ClusterAPIApiClustersPostRequest { + return ClusterAPIApiClustersPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return Cluster +func (a *ClusterAPIService) ApiClustersPostExecute(r ClusterAPIApiClustersPostRequest) (*Cluster, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Cluster + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClusterAPIService.ApiClustersPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/clusters" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cluster == nil { + return localVarReturnValue, nil, reportError("cluster is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cluster + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ClusterAPIApiClustersgetWithProviderGetCollectionRequest struct { + ctx context.Context + ApiService *ClusterAPIService + page *int32 + itemsPerPage *int32 + provider *string + provider2 *[]string +} + +// The collection page number +func (r ClusterAPIApiClustersgetWithProviderGetCollectionRequest) Page(page int32) ClusterAPIApiClustersgetWithProviderGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ClusterAPIApiClustersgetWithProviderGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ClusterAPIApiClustersgetWithProviderGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ClusterAPIApiClustersgetWithProviderGetCollectionRequest) Provider(provider string) ClusterAPIApiClustersgetWithProviderGetCollectionRequest { + r.provider = &provider + return r +} + +func (r ClusterAPIApiClustersgetWithProviderGetCollectionRequest) Provider2(provider2 []string) ClusterAPIApiClustersgetWithProviderGetCollectionRequest { + r.provider2 = &provider2 + return r +} + +func (r ClusterAPIApiClustersgetWithProviderGetCollectionRequest) Execute() ([]ClusterClusterWithProvider, *http.Response, error) { + return r.ApiService.ApiClustersgetWithProviderGetCollectionExecute(r) +} + +/* +ApiClustersgetWithProviderGetCollection Retrieves the collection of Cluster resources. + +Retrieves the collection of Cluster resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ClusterAPIApiClustersgetWithProviderGetCollectionRequest +*/ +func (a *ClusterAPIService) ApiClustersgetWithProviderGetCollection(ctx context.Context) ClusterAPIApiClustersgetWithProviderGetCollectionRequest { + return ClusterAPIApiClustersgetWithProviderGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ClusterClusterWithProvider +func (a *ClusterAPIService) ApiClustersgetWithProviderGetCollectionExecute(r ClusterAPIApiClustersgetWithProviderGetCollectionRequest) ([]ClusterClusterWithProvider, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ClusterClusterWithProvider + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClusterAPIService.ApiClustersgetWithProviderGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/clusters/get-with-provider" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.provider != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "provider", r.provider, "") + } + if r.provider2 != nil { + t := *r.provider2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "provider[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "provider[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_component.go b/pkg/api/rewardcloud/api_component.go new file mode 100644 index 0000000..6484db5 --- /dev/null +++ b/pkg/api/rewardcloud/api_component.go @@ -0,0 +1,809 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ComponentAPIService ComponentAPI service +type ComponentAPIService service + +type ComponentAPIApiComponentsGetCollectionRequest struct { + ctx context.Context + ApiService *ComponentAPIService + page *int32 + itemsPerPage *int32 + orderName *string + id *int32 + id2 *[]int32 +} + +// The collection page number +func (r ComponentAPIApiComponentsGetCollectionRequest) Page(page int32) ComponentAPIApiComponentsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ComponentAPIApiComponentsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ComponentAPIApiComponentsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ComponentAPIApiComponentsGetCollectionRequest) OrderName(orderName string) ComponentAPIApiComponentsGetCollectionRequest { + r.orderName = &orderName + return r +} + +func (r ComponentAPIApiComponentsGetCollectionRequest) Id(id int32) ComponentAPIApiComponentsGetCollectionRequest { + r.id = &id + return r +} + +func (r ComponentAPIApiComponentsGetCollectionRequest) Id2(id2 []int32) ComponentAPIApiComponentsGetCollectionRequest { + r.id2 = &id2 + return r +} + +func (r ComponentAPIApiComponentsGetCollectionRequest) Execute() ([]Component, *http.Response, error) { + return r.ApiService.ApiComponentsGetCollectionExecute(r) +} + +/* +ApiComponentsGetCollection Retrieves the collection of Component resources. + +Retrieves the collection of Component resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ComponentAPIApiComponentsGetCollectionRequest +*/ +func (a *ComponentAPIService) ApiComponentsGetCollection(ctx context.Context) ComponentAPIApiComponentsGetCollectionRequest { + return ComponentAPIApiComponentsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []Component +func (a *ComponentAPIService) ApiComponentsGetCollectionExecute(r ComponentAPIApiComponentsGetCollectionRequest) ([]Component, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Component + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentAPIService.ApiComponentsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/components" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.orderName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[name]", r.orderName, "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + } + if r.id2 != nil { + t := *r.id2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentAPIApiComponentsIdDeleteRequest struct { + ctx context.Context + ApiService *ComponentAPIService + id string +} + +func (r ComponentAPIApiComponentsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiComponentsIdDeleteExecute(r) +} + +/* +ApiComponentsIdDelete Removes the Component resource. + +Removes the Component resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Component identifier + @return ComponentAPIApiComponentsIdDeleteRequest +*/ +func (a *ComponentAPIService) ApiComponentsIdDelete(ctx context.Context, id string) ComponentAPIApiComponentsIdDeleteRequest { + return ComponentAPIApiComponentsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ComponentAPIService) ApiComponentsIdDeleteExecute(r ComponentAPIApiComponentsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentAPIService.ApiComponentsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/components/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ComponentAPIApiComponentsIdGetRequest struct { + ctx context.Context + ApiService *ComponentAPIService + id string +} + +func (r ComponentAPIApiComponentsIdGetRequest) Execute() (*Component, *http.Response, error) { + return r.ApiService.ApiComponentsIdGetExecute(r) +} + +/* +ApiComponentsIdGet Retrieves a Component resource. + +Retrieves a Component resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Component identifier + @return ComponentAPIApiComponentsIdGetRequest +*/ +func (a *ComponentAPIService) ApiComponentsIdGet(ctx context.Context, id string) ComponentAPIApiComponentsIdGetRequest { + return ComponentAPIApiComponentsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Component +func (a *ComponentAPIService) ApiComponentsIdGetExecute(r ComponentAPIApiComponentsIdGetRequest) (*Component, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Component + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentAPIService.ApiComponentsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/components/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentAPIApiComponentsIdPatchRequest struct { + ctx context.Context + ApiService *ComponentAPIService + component *Component + id string +} + +// The updated Component resource +func (r ComponentAPIApiComponentsIdPatchRequest) Component(component Component) ComponentAPIApiComponentsIdPatchRequest { + r.component = &component + return r +} + +func (r ComponentAPIApiComponentsIdPatchRequest) Execute() (*Component, *http.Response, error) { + return r.ApiService.ApiComponentsIdPatchExecute(r) +} + +/* +ApiComponentsIdPatch Updates the Component resource. + +Updates the Component resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Component identifier + @return ComponentAPIApiComponentsIdPatchRequest +*/ +func (a *ComponentAPIService) ApiComponentsIdPatch(ctx context.Context, id string) ComponentAPIApiComponentsIdPatchRequest { + return ComponentAPIApiComponentsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Component +func (a *ComponentAPIService) ApiComponentsIdPatchExecute(r ComponentAPIApiComponentsIdPatchRequest) (*Component, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Component + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentAPIService.ApiComponentsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/components/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.component == nil { + return localVarReturnValue, nil, reportError("component is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.component + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentAPIApiComponentsIdPutRequest struct { + ctx context.Context + ApiService *ComponentAPIService + component *Component + id string +} + +// The updated Component resource +func (r ComponentAPIApiComponentsIdPutRequest) Component(component Component) ComponentAPIApiComponentsIdPutRequest { + r.component = &component + return r +} + +func (r ComponentAPIApiComponentsIdPutRequest) Execute() (*Component, *http.Response, error) { + return r.ApiService.ApiComponentsIdPutExecute(r) +} + +/* +ApiComponentsIdPut Replaces the Component resource. + +Replaces the Component resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Component identifier + @return ComponentAPIApiComponentsIdPutRequest +*/ +func (a *ComponentAPIService) ApiComponentsIdPut(ctx context.Context, id string) ComponentAPIApiComponentsIdPutRequest { + return ComponentAPIApiComponentsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Component +func (a *ComponentAPIService) ApiComponentsIdPutExecute(r ComponentAPIApiComponentsIdPutRequest) (*Component, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Component + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentAPIService.ApiComponentsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/components/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.component == nil { + return localVarReturnValue, nil, reportError("component is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.component + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentAPIApiComponentsPostRequest struct { + ctx context.Context + ApiService *ComponentAPIService + component *Component +} + +// The new Component resource +func (r ComponentAPIApiComponentsPostRequest) Component(component Component) ComponentAPIApiComponentsPostRequest { + r.component = &component + return r +} + +func (r ComponentAPIApiComponentsPostRequest) Execute() (*Component, *http.Response, error) { + return r.ApiService.ApiComponentsPostExecute(r) +} + +/* +ApiComponentsPost Creates a Component resource. + +Creates a Component resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ComponentAPIApiComponentsPostRequest +*/ +func (a *ComponentAPIService) ApiComponentsPost(ctx context.Context) ComponentAPIApiComponentsPostRequest { + return ComponentAPIApiComponentsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return Component +func (a *ComponentAPIService) ApiComponentsPostExecute(r ComponentAPIApiComponentsPostRequest) (*Component, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Component + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentAPIService.ApiComponentsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/components" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.component == nil { + return localVarReturnValue, nil, reportError("component is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.component + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_component_resource_limit.go b/pkg/api/rewardcloud/api_component_resource_limit.go new file mode 100644 index 0000000..ec28bbd --- /dev/null +++ b/pkg/api/rewardcloud/api_component_resource_limit.go @@ -0,0 +1,852 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ComponentResourceLimitAPIService ComponentResourceLimitAPI service +type ComponentResourceLimitAPIService service + +type ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest struct { + ctx context.Context + ApiService *ComponentResourceLimitAPIService + page *int32 + itemsPerPage *int32 + projectTypeVersion *string + projectTypeVersion2 *[]string + resourceType *string + resourceType2 *[]string + componentVersion *string + componentVersion2 *[]string +} + +// The collection page number +func (r ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest) Page(page int32) ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest) ProjectTypeVersion(projectTypeVersion string) ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest { + r.projectTypeVersion = &projectTypeVersion + return r +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest) ProjectTypeVersion2(projectTypeVersion2 []string) ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest { + r.projectTypeVersion2 = &projectTypeVersion2 + return r +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest) ResourceType(resourceType string) ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest { + r.resourceType = &resourceType + return r +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest) ResourceType2(resourceType2 []string) ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest { + r.resourceType2 = &resourceType2 + return r +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest) ComponentVersion(componentVersion string) ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest { + r.componentVersion = &componentVersion + return r +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest) ComponentVersion2(componentVersion2 []string) ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest { + r.componentVersion2 = &componentVersion2 + return r +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest) Execute() ([]ComponentResourceLimit, *http.Response, error) { + return r.ApiService.ApiComponentResourceLimitsGetCollectionExecute(r) +} + +/* +ApiComponentResourceLimitsGetCollection Retrieves the collection of ComponentResourceLimit resources. + +Retrieves the collection of ComponentResourceLimit resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest +*/ +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsGetCollection(ctx context.Context) ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest { + return ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ComponentResourceLimit +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsGetCollectionExecute(r ComponentResourceLimitAPIApiComponentResourceLimitsGetCollectionRequest) ([]ComponentResourceLimit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ComponentResourceLimit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentResourceLimitAPIService.ApiComponentResourceLimitsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_resource_limits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.projectTypeVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion", r.projectTypeVersion, "") + } + if r.projectTypeVersion2 != nil { + t := *r.projectTypeVersion2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion[]", t, "multi") + } + } + if r.resourceType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "resourceType", r.resourceType, "") + } + if r.resourceType2 != nil { + t := *r.resourceType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "resourceType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "resourceType[]", t, "multi") + } + } + if r.componentVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "componentVersion", r.componentVersion, "") + } + if r.componentVersion2 != nil { + t := *r.componentVersion2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "componentVersion[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "componentVersion[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentResourceLimitAPIApiComponentResourceLimitsIdDeleteRequest struct { + ctx context.Context + ApiService *ComponentResourceLimitAPIService + id string +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiComponentResourceLimitsIdDeleteExecute(r) +} + +/* +ApiComponentResourceLimitsIdDelete Removes the ComponentResourceLimit resource. + +Removes the ComponentResourceLimit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentResourceLimit identifier + @return ComponentResourceLimitAPIApiComponentResourceLimitsIdDeleteRequest +*/ +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsIdDelete(ctx context.Context, id string) ComponentResourceLimitAPIApiComponentResourceLimitsIdDeleteRequest { + return ComponentResourceLimitAPIApiComponentResourceLimitsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsIdDeleteExecute(r ComponentResourceLimitAPIApiComponentResourceLimitsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentResourceLimitAPIService.ApiComponentResourceLimitsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_resource_limits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ComponentResourceLimitAPIApiComponentResourceLimitsIdGetRequest struct { + ctx context.Context + ApiService *ComponentResourceLimitAPIService + id string +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsIdGetRequest) Execute() (*ComponentResourceLimit, *http.Response, error) { + return r.ApiService.ApiComponentResourceLimitsIdGetExecute(r) +} + +/* +ApiComponentResourceLimitsIdGet Retrieves a ComponentResourceLimit resource. + +Retrieves a ComponentResourceLimit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentResourceLimit identifier + @return ComponentResourceLimitAPIApiComponentResourceLimitsIdGetRequest +*/ +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsIdGet(ctx context.Context, id string) ComponentResourceLimitAPIApiComponentResourceLimitsIdGetRequest { + return ComponentResourceLimitAPIApiComponentResourceLimitsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentResourceLimit +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsIdGetExecute(r ComponentResourceLimitAPIApiComponentResourceLimitsIdGetRequest) (*ComponentResourceLimit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentResourceLimit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentResourceLimitAPIService.ApiComponentResourceLimitsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_resource_limits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentResourceLimitAPIApiComponentResourceLimitsIdPatchRequest struct { + ctx context.Context + ApiService *ComponentResourceLimitAPIService + componentResourceLimit *ComponentResourceLimit + id string +} + +// The updated ComponentResourceLimit resource +func (r ComponentResourceLimitAPIApiComponentResourceLimitsIdPatchRequest) ComponentResourceLimit(componentResourceLimit ComponentResourceLimit) ComponentResourceLimitAPIApiComponentResourceLimitsIdPatchRequest { + r.componentResourceLimit = &componentResourceLimit + return r +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsIdPatchRequest) Execute() (*ComponentResourceLimit, *http.Response, error) { + return r.ApiService.ApiComponentResourceLimitsIdPatchExecute(r) +} + +/* +ApiComponentResourceLimitsIdPatch Updates the ComponentResourceLimit resource. + +Updates the ComponentResourceLimit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentResourceLimit identifier + @return ComponentResourceLimitAPIApiComponentResourceLimitsIdPatchRequest +*/ +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsIdPatch(ctx context.Context, id string) ComponentResourceLimitAPIApiComponentResourceLimitsIdPatchRequest { + return ComponentResourceLimitAPIApiComponentResourceLimitsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentResourceLimit +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsIdPatchExecute(r ComponentResourceLimitAPIApiComponentResourceLimitsIdPatchRequest) (*ComponentResourceLimit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentResourceLimit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentResourceLimitAPIService.ApiComponentResourceLimitsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_resource_limits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentResourceLimit == nil { + return localVarReturnValue, nil, reportError("componentResourceLimit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentResourceLimit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentResourceLimitAPIApiComponentResourceLimitsIdPutRequest struct { + ctx context.Context + ApiService *ComponentResourceLimitAPIService + componentResourceLimit *ComponentResourceLimit + id string +} + +// The updated ComponentResourceLimit resource +func (r ComponentResourceLimitAPIApiComponentResourceLimitsIdPutRequest) ComponentResourceLimit(componentResourceLimit ComponentResourceLimit) ComponentResourceLimitAPIApiComponentResourceLimitsIdPutRequest { + r.componentResourceLimit = &componentResourceLimit + return r +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsIdPutRequest) Execute() (*ComponentResourceLimit, *http.Response, error) { + return r.ApiService.ApiComponentResourceLimitsIdPutExecute(r) +} + +/* +ApiComponentResourceLimitsIdPut Replaces the ComponentResourceLimit resource. + +Replaces the ComponentResourceLimit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentResourceLimit identifier + @return ComponentResourceLimitAPIApiComponentResourceLimitsIdPutRequest +*/ +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsIdPut(ctx context.Context, id string) ComponentResourceLimitAPIApiComponentResourceLimitsIdPutRequest { + return ComponentResourceLimitAPIApiComponentResourceLimitsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentResourceLimit +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsIdPutExecute(r ComponentResourceLimitAPIApiComponentResourceLimitsIdPutRequest) (*ComponentResourceLimit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentResourceLimit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentResourceLimitAPIService.ApiComponentResourceLimitsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_resource_limits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentResourceLimit == nil { + return localVarReturnValue, nil, reportError("componentResourceLimit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentResourceLimit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentResourceLimitAPIApiComponentResourceLimitsPostRequest struct { + ctx context.Context + ApiService *ComponentResourceLimitAPIService + componentResourceLimit *ComponentResourceLimit +} + +// The new ComponentResourceLimit resource +func (r ComponentResourceLimitAPIApiComponentResourceLimitsPostRequest) ComponentResourceLimit(componentResourceLimit ComponentResourceLimit) ComponentResourceLimitAPIApiComponentResourceLimitsPostRequest { + r.componentResourceLimit = &componentResourceLimit + return r +} + +func (r ComponentResourceLimitAPIApiComponentResourceLimitsPostRequest) Execute() (*ComponentResourceLimit, *http.Response, error) { + return r.ApiService.ApiComponentResourceLimitsPostExecute(r) +} + +/* +ApiComponentResourceLimitsPost Creates a ComponentResourceLimit resource. + +Creates a ComponentResourceLimit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ComponentResourceLimitAPIApiComponentResourceLimitsPostRequest +*/ +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsPost(ctx context.Context) ComponentResourceLimitAPIApiComponentResourceLimitsPostRequest { + return ComponentResourceLimitAPIApiComponentResourceLimitsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ComponentResourceLimit +func (a *ComponentResourceLimitAPIService) ApiComponentResourceLimitsPostExecute(r ComponentResourceLimitAPIApiComponentResourceLimitsPostRequest) (*ComponentResourceLimit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentResourceLimit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentResourceLimitAPIService.ApiComponentResourceLimitsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_resource_limits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentResourceLimit == nil { + return localVarReturnValue, nil, reportError("componentResourceLimit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentResourceLimit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_component_version.go b/pkg/api/rewardcloud/api_component_version.go new file mode 100644 index 0000000..23c430e --- /dev/null +++ b/pkg/api/rewardcloud/api_component_version.go @@ -0,0 +1,835 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ComponentVersionAPIService ComponentVersionAPI service +type ComponentVersionAPIService service + +type ComponentVersionAPIApiComponentVersionsGetCollectionRequest struct { + ctx context.Context + ApiService *ComponentVersionAPIService + page *int32 + itemsPerPage *int32 + orderVersion *string + id *int32 + id2 *[]int32 + component *string + component2 *[]string +} + +// The collection page number +func (r ComponentVersionAPIApiComponentVersionsGetCollectionRequest) Page(page int32) ComponentVersionAPIApiComponentVersionsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ComponentVersionAPIApiComponentVersionsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ComponentVersionAPIApiComponentVersionsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ComponentVersionAPIApiComponentVersionsGetCollectionRequest) OrderVersion(orderVersion string) ComponentVersionAPIApiComponentVersionsGetCollectionRequest { + r.orderVersion = &orderVersion + return r +} + +func (r ComponentVersionAPIApiComponentVersionsGetCollectionRequest) Id(id int32) ComponentVersionAPIApiComponentVersionsGetCollectionRequest { + r.id = &id + return r +} + +func (r ComponentVersionAPIApiComponentVersionsGetCollectionRequest) Id2(id2 []int32) ComponentVersionAPIApiComponentVersionsGetCollectionRequest { + r.id2 = &id2 + return r +} + +func (r ComponentVersionAPIApiComponentVersionsGetCollectionRequest) Component(component string) ComponentVersionAPIApiComponentVersionsGetCollectionRequest { + r.component = &component + return r +} + +func (r ComponentVersionAPIApiComponentVersionsGetCollectionRequest) Component2(component2 []string) ComponentVersionAPIApiComponentVersionsGetCollectionRequest { + r.component2 = &component2 + return r +} + +func (r ComponentVersionAPIApiComponentVersionsGetCollectionRequest) Execute() ([]ComponentVersion, *http.Response, error) { + return r.ApiService.ApiComponentVersionsGetCollectionExecute(r) +} + +/* +ApiComponentVersionsGetCollection Retrieves the collection of ComponentVersion resources. + +Retrieves the collection of ComponentVersion resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ComponentVersionAPIApiComponentVersionsGetCollectionRequest +*/ +func (a *ComponentVersionAPIService) ApiComponentVersionsGetCollection(ctx context.Context) ComponentVersionAPIApiComponentVersionsGetCollectionRequest { + return ComponentVersionAPIApiComponentVersionsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ComponentVersion +func (a *ComponentVersionAPIService) ApiComponentVersionsGetCollectionExecute(r ComponentVersionAPIApiComponentVersionsGetCollectionRequest) ([]ComponentVersion, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ComponentVersion + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionAPIService.ApiComponentVersionsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_versions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.orderVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[version]", r.orderVersion, "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + } + if r.id2 != nil { + t := *r.id2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", t, "multi") + } + } + if r.component != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "component", r.component, "") + } + if r.component2 != nil { + t := *r.component2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "component[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "component[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionAPIApiComponentVersionsIdDeleteRequest struct { + ctx context.Context + ApiService *ComponentVersionAPIService + id string +} + +func (r ComponentVersionAPIApiComponentVersionsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiComponentVersionsIdDeleteExecute(r) +} + +/* +ApiComponentVersionsIdDelete Removes the ComponentVersion resource. + +Removes the ComponentVersion resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersion identifier + @return ComponentVersionAPIApiComponentVersionsIdDeleteRequest +*/ +func (a *ComponentVersionAPIService) ApiComponentVersionsIdDelete(ctx context.Context, id string) ComponentVersionAPIApiComponentVersionsIdDeleteRequest { + return ComponentVersionAPIApiComponentVersionsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ComponentVersionAPIService) ApiComponentVersionsIdDeleteExecute(r ComponentVersionAPIApiComponentVersionsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionAPIService.ApiComponentVersionsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_versions/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ComponentVersionAPIApiComponentVersionsIdGetRequest struct { + ctx context.Context + ApiService *ComponentVersionAPIService + id string +} + +func (r ComponentVersionAPIApiComponentVersionsIdGetRequest) Execute() (*ComponentVersion, *http.Response, error) { + return r.ApiService.ApiComponentVersionsIdGetExecute(r) +} + +/* +ApiComponentVersionsIdGet Retrieves a ComponentVersion resource. + +Retrieves a ComponentVersion resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersion identifier + @return ComponentVersionAPIApiComponentVersionsIdGetRequest +*/ +func (a *ComponentVersionAPIService) ApiComponentVersionsIdGet(ctx context.Context, id string) ComponentVersionAPIApiComponentVersionsIdGetRequest { + return ComponentVersionAPIApiComponentVersionsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentVersion +func (a *ComponentVersionAPIService) ApiComponentVersionsIdGetExecute(r ComponentVersionAPIApiComponentVersionsIdGetRequest) (*ComponentVersion, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersion + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionAPIService.ApiComponentVersionsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_versions/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionAPIApiComponentVersionsIdPatchRequest struct { + ctx context.Context + ApiService *ComponentVersionAPIService + componentVersion *ComponentVersion + id string +} + +// The updated ComponentVersion resource +func (r ComponentVersionAPIApiComponentVersionsIdPatchRequest) ComponentVersion(componentVersion ComponentVersion) ComponentVersionAPIApiComponentVersionsIdPatchRequest { + r.componentVersion = &componentVersion + return r +} + +func (r ComponentVersionAPIApiComponentVersionsIdPatchRequest) Execute() (*ComponentVersion, *http.Response, error) { + return r.ApiService.ApiComponentVersionsIdPatchExecute(r) +} + +/* +ApiComponentVersionsIdPatch Updates the ComponentVersion resource. + +Updates the ComponentVersion resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersion identifier + @return ComponentVersionAPIApiComponentVersionsIdPatchRequest +*/ +func (a *ComponentVersionAPIService) ApiComponentVersionsIdPatch(ctx context.Context, id string) ComponentVersionAPIApiComponentVersionsIdPatchRequest { + return ComponentVersionAPIApiComponentVersionsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentVersion +func (a *ComponentVersionAPIService) ApiComponentVersionsIdPatchExecute(r ComponentVersionAPIApiComponentVersionsIdPatchRequest) (*ComponentVersion, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersion + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionAPIService.ApiComponentVersionsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_versions/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentVersion == nil { + return localVarReturnValue, nil, reportError("componentVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentVersion + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionAPIApiComponentVersionsIdPutRequest struct { + ctx context.Context + ApiService *ComponentVersionAPIService + componentVersion *ComponentVersion + id string +} + +// The updated ComponentVersion resource +func (r ComponentVersionAPIApiComponentVersionsIdPutRequest) ComponentVersion(componentVersion ComponentVersion) ComponentVersionAPIApiComponentVersionsIdPutRequest { + r.componentVersion = &componentVersion + return r +} + +func (r ComponentVersionAPIApiComponentVersionsIdPutRequest) Execute() (*ComponentVersion, *http.Response, error) { + return r.ApiService.ApiComponentVersionsIdPutExecute(r) +} + +/* +ApiComponentVersionsIdPut Replaces the ComponentVersion resource. + +Replaces the ComponentVersion resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersion identifier + @return ComponentVersionAPIApiComponentVersionsIdPutRequest +*/ +func (a *ComponentVersionAPIService) ApiComponentVersionsIdPut(ctx context.Context, id string) ComponentVersionAPIApiComponentVersionsIdPutRequest { + return ComponentVersionAPIApiComponentVersionsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentVersion +func (a *ComponentVersionAPIService) ApiComponentVersionsIdPutExecute(r ComponentVersionAPIApiComponentVersionsIdPutRequest) (*ComponentVersion, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersion + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionAPIService.ApiComponentVersionsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_versions/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentVersion == nil { + return localVarReturnValue, nil, reportError("componentVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentVersion + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionAPIApiComponentVersionsPostRequest struct { + ctx context.Context + ApiService *ComponentVersionAPIService + componentVersion *ComponentVersion +} + +// The new ComponentVersion resource +func (r ComponentVersionAPIApiComponentVersionsPostRequest) ComponentVersion(componentVersion ComponentVersion) ComponentVersionAPIApiComponentVersionsPostRequest { + r.componentVersion = &componentVersion + return r +} + +func (r ComponentVersionAPIApiComponentVersionsPostRequest) Execute() (*ComponentVersion, *http.Response, error) { + return r.ApiService.ApiComponentVersionsPostExecute(r) +} + +/* +ApiComponentVersionsPost Creates a ComponentVersion resource. + +Creates a ComponentVersion resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ComponentVersionAPIApiComponentVersionsPostRequest +*/ +func (a *ComponentVersionAPIService) ApiComponentVersionsPost(ctx context.Context) ComponentVersionAPIApiComponentVersionsPostRequest { + return ComponentVersionAPIApiComponentVersionsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ComponentVersion +func (a *ComponentVersionAPIService) ApiComponentVersionsPostExecute(r ComponentVersionAPIApiComponentVersionsPostRequest) (*ComponentVersion, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersion + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionAPIService.ApiComponentVersionsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_versions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentVersion == nil { + return localVarReturnValue, nil, reportError("componentVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentVersion + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_component_version_env_var.go b/pkg/api/rewardcloud/api_component_version_env_var.go new file mode 100644 index 0000000..73dfc1f --- /dev/null +++ b/pkg/api/rewardcloud/api_component_version_env_var.go @@ -0,0 +1,826 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ComponentVersionEnvVarAPIService ComponentVersionEnvVarAPI service +type ComponentVersionEnvVarAPIService service + +type ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarAPIService + page *int32 + itemsPerPage *int32 + componentVersion *string + componentVersion2 *[]string + envVarValidations *string + envVarValidations2 *[]string +} + +// The collection page number +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest) Page(page int32) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest) ComponentVersion(componentVersion string) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest { + r.componentVersion = &componentVersion + return r +} + +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest) ComponentVersion2(componentVersion2 []string) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest { + r.componentVersion2 = &componentVersion2 + return r +} + +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest) EnvVarValidations(envVarValidations string) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest { + r.envVarValidations = &envVarValidations + return r +} + +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest) EnvVarValidations2(envVarValidations2 []string) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest { + r.envVarValidations2 = &envVarValidations2 + return r +} + +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest) Execute() ([]ComponentVersionEnvVar, *http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarsGetCollectionExecute(r) +} + +/* +ApiComponentVersionEnvVarsGetCollection Retrieves the collection of ComponentVersionEnvVar resources. + +Retrieves the collection of ComponentVersionEnvVar resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest +*/ +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsGetCollection(ctx context.Context) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest { + return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ComponentVersionEnvVar +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsGetCollectionExecute(r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsGetCollectionRequest) ([]ComponentVersionEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ComponentVersionEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarAPIService.ApiComponentVersionEnvVarsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.componentVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "componentVersion", r.componentVersion, "") + } + if r.componentVersion2 != nil { + t := *r.componentVersion2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "componentVersion[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "componentVersion[]", t, "multi") + } + } + if r.envVarValidations != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarValidations", r.envVarValidations, "") + } + if r.envVarValidations2 != nil { + t := *r.envVarValidations2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarValidations[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarValidations[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdDeleteRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarAPIService + id string +} + +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarsIdDeleteExecute(r) +} + +/* +ApiComponentVersionEnvVarsIdDelete Removes the ComponentVersionEnvVar resource. + +Removes the ComponentVersionEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersionEnvVar identifier + @return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdDeleteRequest +*/ +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsIdDelete(ctx context.Context, id string) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdDeleteRequest { + return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsIdDeleteExecute(r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarAPIService.ApiComponentVersionEnvVarsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdGetRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarAPIService + id string +} + +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdGetRequest) Execute() (*ComponentVersionEnvVar, *http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarsIdGetExecute(r) +} + +/* +ApiComponentVersionEnvVarsIdGet Retrieves a ComponentVersionEnvVar resource. + +Retrieves a ComponentVersionEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersionEnvVar identifier + @return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdGetRequest +*/ +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsIdGet(ctx context.Context, id string) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdGetRequest { + return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentVersionEnvVar +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsIdGetExecute(r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdGetRequest) (*ComponentVersionEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersionEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarAPIService.ApiComponentVersionEnvVarsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPatchRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarAPIService + componentVersionEnvVar *ComponentVersionEnvVar + id string +} + +// The updated ComponentVersionEnvVar resource +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPatchRequest) ComponentVersionEnvVar(componentVersionEnvVar ComponentVersionEnvVar) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPatchRequest { + r.componentVersionEnvVar = &componentVersionEnvVar + return r +} + +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPatchRequest) Execute() (*ComponentVersionEnvVar, *http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarsIdPatchExecute(r) +} + +/* +ApiComponentVersionEnvVarsIdPatch Updates the ComponentVersionEnvVar resource. + +Updates the ComponentVersionEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersionEnvVar identifier + @return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPatchRequest +*/ +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsIdPatch(ctx context.Context, id string) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPatchRequest { + return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentVersionEnvVar +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsIdPatchExecute(r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPatchRequest) (*ComponentVersionEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersionEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarAPIService.ApiComponentVersionEnvVarsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentVersionEnvVar == nil { + return localVarReturnValue, nil, reportError("componentVersionEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentVersionEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPutRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarAPIService + componentVersionEnvVar *ComponentVersionEnvVar + id string +} + +// The updated ComponentVersionEnvVar resource +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPutRequest) ComponentVersionEnvVar(componentVersionEnvVar ComponentVersionEnvVar) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPutRequest { + r.componentVersionEnvVar = &componentVersionEnvVar + return r +} + +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPutRequest) Execute() (*ComponentVersionEnvVar, *http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarsIdPutExecute(r) +} + +/* +ApiComponentVersionEnvVarsIdPut Replaces the ComponentVersionEnvVar resource. + +Replaces the ComponentVersionEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersionEnvVar identifier + @return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPutRequest +*/ +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsIdPut(ctx context.Context, id string) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPutRequest { + return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentVersionEnvVar +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsIdPutExecute(r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsIdPutRequest) (*ComponentVersionEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersionEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarAPIService.ApiComponentVersionEnvVarsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentVersionEnvVar == nil { + return localVarReturnValue, nil, reportError("componentVersionEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentVersionEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionEnvVarAPIApiComponentVersionEnvVarsPostRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarAPIService + componentVersionEnvVar *ComponentVersionEnvVar +} + +// The new ComponentVersionEnvVar resource +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsPostRequest) ComponentVersionEnvVar(componentVersionEnvVar ComponentVersionEnvVar) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsPostRequest { + r.componentVersionEnvVar = &componentVersionEnvVar + return r +} + +func (r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsPostRequest) Execute() (*ComponentVersionEnvVar, *http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarsPostExecute(r) +} + +/* +ApiComponentVersionEnvVarsPost Creates a ComponentVersionEnvVar resource. + +Creates a ComponentVersionEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsPostRequest +*/ +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsPost(ctx context.Context) ComponentVersionEnvVarAPIApiComponentVersionEnvVarsPostRequest { + return ComponentVersionEnvVarAPIApiComponentVersionEnvVarsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ComponentVersionEnvVar +func (a *ComponentVersionEnvVarAPIService) ApiComponentVersionEnvVarsPostExecute(r ComponentVersionEnvVarAPIApiComponentVersionEnvVarsPostRequest) (*ComponentVersionEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersionEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarAPIService.ApiComponentVersionEnvVarsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentVersionEnvVar == nil { + return localVarReturnValue, nil, reportError("componentVersionEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentVersionEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_component_version_env_var_example.go b/pkg/api/rewardcloud/api_component_version_env_var_example.go new file mode 100644 index 0000000..c2bb1ee --- /dev/null +++ b/pkg/api/rewardcloud/api_component_version_env_var_example.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// ComponentVersionEnvVarExampleAPIService ComponentVersionEnvVarExampleAPI service +type ComponentVersionEnvVarExampleAPIService service + +type ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesGetCollectionRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarExampleAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesGetCollectionRequest) Page(page int32) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesGetCollectionRequest) Execute() ([]ComponentVersionEnvVarExample, *http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarExamplesGetCollectionExecute(r) +} + +/* +ApiComponentVersionEnvVarExamplesGetCollection Retrieves the collection of ComponentVersionEnvVarExample resources. + +Retrieves the collection of ComponentVersionEnvVarExample resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesGetCollectionRequest +*/ +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesGetCollection(ctx context.Context) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesGetCollectionRequest { + return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ComponentVersionEnvVarExample +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesGetCollectionExecute(r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesGetCollectionRequest) ([]ComponentVersionEnvVarExample, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ComponentVersionEnvVarExample + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarExampleAPIService.ApiComponentVersionEnvVarExamplesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_var_examples" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdDeleteRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarExampleAPIService + id string +} + +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarExamplesIdDeleteExecute(r) +} + +/* +ApiComponentVersionEnvVarExamplesIdDelete Removes the ComponentVersionEnvVarExample resource. + +Removes the ComponentVersionEnvVarExample resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersionEnvVarExample identifier + @return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdDeleteRequest +*/ +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesIdDelete(ctx context.Context, id string) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdDeleteRequest { + return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesIdDeleteExecute(r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarExampleAPIService.ApiComponentVersionEnvVarExamplesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_var_examples/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdGetRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarExampleAPIService + id string +} + +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdGetRequest) Execute() (*ComponentVersionEnvVarExample, *http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarExamplesIdGetExecute(r) +} + +/* +ApiComponentVersionEnvVarExamplesIdGet Retrieves a ComponentVersionEnvVarExample resource. + +Retrieves a ComponentVersionEnvVarExample resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersionEnvVarExample identifier + @return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdGetRequest +*/ +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesIdGet(ctx context.Context, id string) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdGetRequest { + return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentVersionEnvVarExample +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesIdGetExecute(r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdGetRequest) (*ComponentVersionEnvVarExample, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersionEnvVarExample + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarExampleAPIService.ApiComponentVersionEnvVarExamplesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_var_examples/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPatchRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarExampleAPIService + componentVersionEnvVarExample *ComponentVersionEnvVarExample + id string +} + +// The updated ComponentVersionEnvVarExample resource +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPatchRequest) ComponentVersionEnvVarExample(componentVersionEnvVarExample ComponentVersionEnvVarExample) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPatchRequest { + r.componentVersionEnvVarExample = &componentVersionEnvVarExample + return r +} + +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPatchRequest) Execute() (*ComponentVersionEnvVarExample, *http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarExamplesIdPatchExecute(r) +} + +/* +ApiComponentVersionEnvVarExamplesIdPatch Updates the ComponentVersionEnvVarExample resource. + +Updates the ComponentVersionEnvVarExample resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersionEnvVarExample identifier + @return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPatchRequest +*/ +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesIdPatch(ctx context.Context, id string) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPatchRequest { + return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentVersionEnvVarExample +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesIdPatchExecute(r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPatchRequest) (*ComponentVersionEnvVarExample, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersionEnvVarExample + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarExampleAPIService.ApiComponentVersionEnvVarExamplesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_var_examples/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentVersionEnvVarExample == nil { + return localVarReturnValue, nil, reportError("componentVersionEnvVarExample is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentVersionEnvVarExample + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPutRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarExampleAPIService + componentVersionEnvVarExample *ComponentVersionEnvVarExample + id string +} + +// The updated ComponentVersionEnvVarExample resource +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPutRequest) ComponentVersionEnvVarExample(componentVersionEnvVarExample ComponentVersionEnvVarExample) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPutRequest { + r.componentVersionEnvVarExample = &componentVersionEnvVarExample + return r +} + +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPutRequest) Execute() (*ComponentVersionEnvVarExample, *http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarExamplesIdPutExecute(r) +} + +/* +ApiComponentVersionEnvVarExamplesIdPut Replaces the ComponentVersionEnvVarExample resource. + +Replaces the ComponentVersionEnvVarExample resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ComponentVersionEnvVarExample identifier + @return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPutRequest +*/ +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesIdPut(ctx context.Context, id string) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPutRequest { + return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ComponentVersionEnvVarExample +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesIdPutExecute(r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesIdPutRequest) (*ComponentVersionEnvVarExample, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersionEnvVarExample + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarExampleAPIService.ApiComponentVersionEnvVarExamplesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_var_examples/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentVersionEnvVarExample == nil { + return localVarReturnValue, nil, reportError("componentVersionEnvVarExample is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentVersionEnvVarExample + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesPostRequest struct { + ctx context.Context + ApiService *ComponentVersionEnvVarExampleAPIService + componentVersionEnvVarExample *ComponentVersionEnvVarExample +} + +// The new ComponentVersionEnvVarExample resource +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesPostRequest) ComponentVersionEnvVarExample(componentVersionEnvVarExample ComponentVersionEnvVarExample) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesPostRequest { + r.componentVersionEnvVarExample = &componentVersionEnvVarExample + return r +} + +func (r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesPostRequest) Execute() (*ComponentVersionEnvVarExample, *http.Response, error) { + return r.ApiService.ApiComponentVersionEnvVarExamplesPostExecute(r) +} + +/* +ApiComponentVersionEnvVarExamplesPost Creates a ComponentVersionEnvVarExample resource. + +Creates a ComponentVersionEnvVarExample resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesPostRequest +*/ +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesPost(ctx context.Context) ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesPostRequest { + return ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ComponentVersionEnvVarExample +func (a *ComponentVersionEnvVarExampleAPIService) ApiComponentVersionEnvVarExamplesPostExecute(r ComponentVersionEnvVarExampleAPIApiComponentVersionEnvVarExamplesPostRequest) (*ComponentVersionEnvVarExample, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentVersionEnvVarExample + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentVersionEnvVarExampleAPIService.ApiComponentVersionEnvVarExamplesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/component_version_env_var_examples" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.componentVersionEnvVarExample == nil { + return localVarReturnValue, nil, reportError("componentVersionEnvVarExample is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.componentVersionEnvVarExample + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_credential_type.go b/pkg/api/rewardcloud/api_credential_type.go new file mode 100644 index 0000000..514b58b --- /dev/null +++ b/pkg/api/rewardcloud/api_credential_type.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// CredentialTypeAPIService CredentialTypeAPI service +type CredentialTypeAPIService service + +type CredentialTypeAPIApiCredentialTypesGetCollectionRequest struct { + ctx context.Context + ApiService *CredentialTypeAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r CredentialTypeAPIApiCredentialTypesGetCollectionRequest) Page(page int32) CredentialTypeAPIApiCredentialTypesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r CredentialTypeAPIApiCredentialTypesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) CredentialTypeAPIApiCredentialTypesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r CredentialTypeAPIApiCredentialTypesGetCollectionRequest) Execute() ([]CredentialType, *http.Response, error) { + return r.ApiService.ApiCredentialTypesGetCollectionExecute(r) +} + +/* +ApiCredentialTypesGetCollection Retrieves the collection of CredentialType resources. + +Retrieves the collection of CredentialType resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return CredentialTypeAPIApiCredentialTypesGetCollectionRequest +*/ +func (a *CredentialTypeAPIService) ApiCredentialTypesGetCollection(ctx context.Context) CredentialTypeAPIApiCredentialTypesGetCollectionRequest { + return CredentialTypeAPIApiCredentialTypesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []CredentialType +func (a *CredentialTypeAPIService) ApiCredentialTypesGetCollectionExecute(r CredentialTypeAPIApiCredentialTypesGetCollectionRequest) ([]CredentialType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CredentialType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CredentialTypeAPIService.ApiCredentialTypesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/credential_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type CredentialTypeAPIApiCredentialTypesIdDeleteRequest struct { + ctx context.Context + ApiService *CredentialTypeAPIService + id string +} + +func (r CredentialTypeAPIApiCredentialTypesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiCredentialTypesIdDeleteExecute(r) +} + +/* +ApiCredentialTypesIdDelete Removes the CredentialType resource. + +Removes the CredentialType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id CredentialType identifier + @return CredentialTypeAPIApiCredentialTypesIdDeleteRequest +*/ +func (a *CredentialTypeAPIService) ApiCredentialTypesIdDelete(ctx context.Context, id string) CredentialTypeAPIApiCredentialTypesIdDeleteRequest { + return CredentialTypeAPIApiCredentialTypesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *CredentialTypeAPIService) ApiCredentialTypesIdDeleteExecute(r CredentialTypeAPIApiCredentialTypesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CredentialTypeAPIService.ApiCredentialTypesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/credential_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type CredentialTypeAPIApiCredentialTypesIdGetRequest struct { + ctx context.Context + ApiService *CredentialTypeAPIService + id string +} + +func (r CredentialTypeAPIApiCredentialTypesIdGetRequest) Execute() (*CredentialType, *http.Response, error) { + return r.ApiService.ApiCredentialTypesIdGetExecute(r) +} + +/* +ApiCredentialTypesIdGet Retrieves a CredentialType resource. + +Retrieves a CredentialType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id CredentialType identifier + @return CredentialTypeAPIApiCredentialTypesIdGetRequest +*/ +func (a *CredentialTypeAPIService) ApiCredentialTypesIdGet(ctx context.Context, id string) CredentialTypeAPIApiCredentialTypesIdGetRequest { + return CredentialTypeAPIApiCredentialTypesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return CredentialType +func (a *CredentialTypeAPIService) ApiCredentialTypesIdGetExecute(r CredentialTypeAPIApiCredentialTypesIdGetRequest) (*CredentialType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CredentialType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CredentialTypeAPIService.ApiCredentialTypesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/credential_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type CredentialTypeAPIApiCredentialTypesIdPatchRequest struct { + ctx context.Context + ApiService *CredentialTypeAPIService + credentialType *CredentialType + id string +} + +// The updated CredentialType resource +func (r CredentialTypeAPIApiCredentialTypesIdPatchRequest) CredentialType(credentialType CredentialType) CredentialTypeAPIApiCredentialTypesIdPatchRequest { + r.credentialType = &credentialType + return r +} + +func (r CredentialTypeAPIApiCredentialTypesIdPatchRequest) Execute() (*CredentialType, *http.Response, error) { + return r.ApiService.ApiCredentialTypesIdPatchExecute(r) +} + +/* +ApiCredentialTypesIdPatch Updates the CredentialType resource. + +Updates the CredentialType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id CredentialType identifier + @return CredentialTypeAPIApiCredentialTypesIdPatchRequest +*/ +func (a *CredentialTypeAPIService) ApiCredentialTypesIdPatch(ctx context.Context, id string) CredentialTypeAPIApiCredentialTypesIdPatchRequest { + return CredentialTypeAPIApiCredentialTypesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return CredentialType +func (a *CredentialTypeAPIService) ApiCredentialTypesIdPatchExecute(r CredentialTypeAPIApiCredentialTypesIdPatchRequest) (*CredentialType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CredentialType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CredentialTypeAPIService.ApiCredentialTypesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/credential_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.credentialType == nil { + return localVarReturnValue, nil, reportError("credentialType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.credentialType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type CredentialTypeAPIApiCredentialTypesIdPutRequest struct { + ctx context.Context + ApiService *CredentialTypeAPIService + credentialType *CredentialType + id string +} + +// The updated CredentialType resource +func (r CredentialTypeAPIApiCredentialTypesIdPutRequest) CredentialType(credentialType CredentialType) CredentialTypeAPIApiCredentialTypesIdPutRequest { + r.credentialType = &credentialType + return r +} + +func (r CredentialTypeAPIApiCredentialTypesIdPutRequest) Execute() (*CredentialType, *http.Response, error) { + return r.ApiService.ApiCredentialTypesIdPutExecute(r) +} + +/* +ApiCredentialTypesIdPut Replaces the CredentialType resource. + +Replaces the CredentialType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id CredentialType identifier + @return CredentialTypeAPIApiCredentialTypesIdPutRequest +*/ +func (a *CredentialTypeAPIService) ApiCredentialTypesIdPut(ctx context.Context, id string) CredentialTypeAPIApiCredentialTypesIdPutRequest { + return CredentialTypeAPIApiCredentialTypesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return CredentialType +func (a *CredentialTypeAPIService) ApiCredentialTypesIdPutExecute(r CredentialTypeAPIApiCredentialTypesIdPutRequest) (*CredentialType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CredentialType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CredentialTypeAPIService.ApiCredentialTypesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/credential_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.credentialType == nil { + return localVarReturnValue, nil, reportError("credentialType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.credentialType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type CredentialTypeAPIApiCredentialTypesPostRequest struct { + ctx context.Context + ApiService *CredentialTypeAPIService + credentialType *CredentialType +} + +// The new CredentialType resource +func (r CredentialTypeAPIApiCredentialTypesPostRequest) CredentialType(credentialType CredentialType) CredentialTypeAPIApiCredentialTypesPostRequest { + r.credentialType = &credentialType + return r +} + +func (r CredentialTypeAPIApiCredentialTypesPostRequest) Execute() (*CredentialType, *http.Response, error) { + return r.ApiService.ApiCredentialTypesPostExecute(r) +} + +/* +ApiCredentialTypesPost Creates a CredentialType resource. + +Creates a CredentialType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return CredentialTypeAPIApiCredentialTypesPostRequest +*/ +func (a *CredentialTypeAPIService) ApiCredentialTypesPost(ctx context.Context) CredentialTypeAPIApiCredentialTypesPostRequest { + return CredentialTypeAPIApiCredentialTypesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CredentialType +func (a *CredentialTypeAPIService) ApiCredentialTypesPostExecute(r CredentialTypeAPIApiCredentialTypesPostRequest) (*CredentialType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CredentialType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CredentialTypeAPIService.ApiCredentialTypesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/credential_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.credentialType == nil { + return localVarReturnValue, nil, reportError("credentialType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.credentialType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_crypto_key_type.go b/pkg/api/rewardcloud/api_crypto_key_type.go new file mode 100644 index 0000000..c0e29f7 --- /dev/null +++ b/pkg/api/rewardcloud/api_crypto_key_type.go @@ -0,0 +1,141 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// CryptoKeyTypeAPIService CryptoKeyTypeAPI service +type CryptoKeyTypeAPIService service + +type CryptoKeyTypeAPIApiCryptoKeyTypesIdGetRequest struct { + ctx context.Context + ApiService *CryptoKeyTypeAPIService + id string +} + +func (r CryptoKeyTypeAPIApiCryptoKeyTypesIdGetRequest) Execute() (*CryptoKeyType, *http.Response, error) { + return r.ApiService.ApiCryptoKeyTypesIdGetExecute(r) +} + +/* +ApiCryptoKeyTypesIdGet Retrieves a CryptoKeyType resource. + +Retrieves a CryptoKeyType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id CryptoKeyType identifier + @return CryptoKeyTypeAPIApiCryptoKeyTypesIdGetRequest +*/ +func (a *CryptoKeyTypeAPIService) ApiCryptoKeyTypesIdGet(ctx context.Context, id string) CryptoKeyTypeAPIApiCryptoKeyTypesIdGetRequest { + return CryptoKeyTypeAPIApiCryptoKeyTypesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return CryptoKeyType +func (a *CryptoKeyTypeAPIService) ApiCryptoKeyTypesIdGetExecute(r CryptoKeyTypeAPIApiCryptoKeyTypesIdGetRequest) (*CryptoKeyType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CryptoKeyType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CryptoKeyTypeAPIService.ApiCryptoKeyTypesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/crypto_key_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_data_transfer_data_type.go b/pkg/api/rewardcloud/api_data_transfer_data_type.go new file mode 100644 index 0000000..9eb4e0e --- /dev/null +++ b/pkg/api/rewardcloud/api_data_transfer_data_type.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// DataTransferDataTypeAPIService DataTransferDataTypeAPI service +type DataTransferDataTypeAPIService service + +type DataTransferDataTypeAPIApiDataTransferDataTypesGetCollectionRequest struct { + ctx context.Context + ApiService *DataTransferDataTypeAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r DataTransferDataTypeAPIApiDataTransferDataTypesGetCollectionRequest) Page(page int32) DataTransferDataTypeAPIApiDataTransferDataTypesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r DataTransferDataTypeAPIApiDataTransferDataTypesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) DataTransferDataTypeAPIApiDataTransferDataTypesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r DataTransferDataTypeAPIApiDataTransferDataTypesGetCollectionRequest) Execute() ([]DataTransferDataType, *http.Response, error) { + return r.ApiService.ApiDataTransferDataTypesGetCollectionExecute(r) +} + +/* +ApiDataTransferDataTypesGetCollection Retrieves the collection of DataTransferDataType resources. + +Retrieves the collection of DataTransferDataType resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DataTransferDataTypeAPIApiDataTransferDataTypesGetCollectionRequest +*/ +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesGetCollection(ctx context.Context) DataTransferDataTypeAPIApiDataTransferDataTypesGetCollectionRequest { + return DataTransferDataTypeAPIApiDataTransferDataTypesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []DataTransferDataType +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesGetCollectionExecute(r DataTransferDataTypeAPIApiDataTransferDataTypesGetCollectionRequest) ([]DataTransferDataType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DataTransferDataType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferDataTypeAPIService.ApiDataTransferDataTypesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_data_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DataTransferDataTypeAPIApiDataTransferDataTypesIdDeleteRequest struct { + ctx context.Context + ApiService *DataTransferDataTypeAPIService + id string +} + +func (r DataTransferDataTypeAPIApiDataTransferDataTypesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiDataTransferDataTypesIdDeleteExecute(r) +} + +/* +ApiDataTransferDataTypesIdDelete Removes the DataTransferDataType resource. + +Removes the DataTransferDataType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id DataTransferDataType identifier + @return DataTransferDataTypeAPIApiDataTransferDataTypesIdDeleteRequest +*/ +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesIdDelete(ctx context.Context, id string) DataTransferDataTypeAPIApiDataTransferDataTypesIdDeleteRequest { + return DataTransferDataTypeAPIApiDataTransferDataTypesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesIdDeleteExecute(r DataTransferDataTypeAPIApiDataTransferDataTypesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferDataTypeAPIService.ApiDataTransferDataTypesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_data_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type DataTransferDataTypeAPIApiDataTransferDataTypesIdGetRequest struct { + ctx context.Context + ApiService *DataTransferDataTypeAPIService + id string +} + +func (r DataTransferDataTypeAPIApiDataTransferDataTypesIdGetRequest) Execute() (*DataTransferDataType, *http.Response, error) { + return r.ApiService.ApiDataTransferDataTypesIdGetExecute(r) +} + +/* +ApiDataTransferDataTypesIdGet Retrieves a DataTransferDataType resource. + +Retrieves a DataTransferDataType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id DataTransferDataType identifier + @return DataTransferDataTypeAPIApiDataTransferDataTypesIdGetRequest +*/ +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesIdGet(ctx context.Context, id string) DataTransferDataTypeAPIApiDataTransferDataTypesIdGetRequest { + return DataTransferDataTypeAPIApiDataTransferDataTypesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return DataTransferDataType +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesIdGetExecute(r DataTransferDataTypeAPIApiDataTransferDataTypesIdGetRequest) (*DataTransferDataType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataTransferDataType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferDataTypeAPIService.ApiDataTransferDataTypesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_data_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DataTransferDataTypeAPIApiDataTransferDataTypesIdPatchRequest struct { + ctx context.Context + ApiService *DataTransferDataTypeAPIService + dataTransferDataType *DataTransferDataType + id string +} + +// The updated DataTransferDataType resource +func (r DataTransferDataTypeAPIApiDataTransferDataTypesIdPatchRequest) DataTransferDataType(dataTransferDataType DataTransferDataType) DataTransferDataTypeAPIApiDataTransferDataTypesIdPatchRequest { + r.dataTransferDataType = &dataTransferDataType + return r +} + +func (r DataTransferDataTypeAPIApiDataTransferDataTypesIdPatchRequest) Execute() (*DataTransferDataType, *http.Response, error) { + return r.ApiService.ApiDataTransferDataTypesIdPatchExecute(r) +} + +/* +ApiDataTransferDataTypesIdPatch Updates the DataTransferDataType resource. + +Updates the DataTransferDataType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id DataTransferDataType identifier + @return DataTransferDataTypeAPIApiDataTransferDataTypesIdPatchRequest +*/ +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesIdPatch(ctx context.Context, id string) DataTransferDataTypeAPIApiDataTransferDataTypesIdPatchRequest { + return DataTransferDataTypeAPIApiDataTransferDataTypesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return DataTransferDataType +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesIdPatchExecute(r DataTransferDataTypeAPIApiDataTransferDataTypesIdPatchRequest) (*DataTransferDataType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataTransferDataType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferDataTypeAPIService.ApiDataTransferDataTypesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_data_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dataTransferDataType == nil { + return localVarReturnValue, nil, reportError("dataTransferDataType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dataTransferDataType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DataTransferDataTypeAPIApiDataTransferDataTypesIdPutRequest struct { + ctx context.Context + ApiService *DataTransferDataTypeAPIService + dataTransferDataType *DataTransferDataType + id string +} + +// The updated DataTransferDataType resource +func (r DataTransferDataTypeAPIApiDataTransferDataTypesIdPutRequest) DataTransferDataType(dataTransferDataType DataTransferDataType) DataTransferDataTypeAPIApiDataTransferDataTypesIdPutRequest { + r.dataTransferDataType = &dataTransferDataType + return r +} + +func (r DataTransferDataTypeAPIApiDataTransferDataTypesIdPutRequest) Execute() (*DataTransferDataType, *http.Response, error) { + return r.ApiService.ApiDataTransferDataTypesIdPutExecute(r) +} + +/* +ApiDataTransferDataTypesIdPut Replaces the DataTransferDataType resource. + +Replaces the DataTransferDataType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id DataTransferDataType identifier + @return DataTransferDataTypeAPIApiDataTransferDataTypesIdPutRequest +*/ +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesIdPut(ctx context.Context, id string) DataTransferDataTypeAPIApiDataTransferDataTypesIdPutRequest { + return DataTransferDataTypeAPIApiDataTransferDataTypesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return DataTransferDataType +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesIdPutExecute(r DataTransferDataTypeAPIApiDataTransferDataTypesIdPutRequest) (*DataTransferDataType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataTransferDataType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferDataTypeAPIService.ApiDataTransferDataTypesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_data_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dataTransferDataType == nil { + return localVarReturnValue, nil, reportError("dataTransferDataType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dataTransferDataType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DataTransferDataTypeAPIApiDataTransferDataTypesPostRequest struct { + ctx context.Context + ApiService *DataTransferDataTypeAPIService + dataTransferDataType *DataTransferDataType +} + +// The new DataTransferDataType resource +func (r DataTransferDataTypeAPIApiDataTransferDataTypesPostRequest) DataTransferDataType(dataTransferDataType DataTransferDataType) DataTransferDataTypeAPIApiDataTransferDataTypesPostRequest { + r.dataTransferDataType = &dataTransferDataType + return r +} + +func (r DataTransferDataTypeAPIApiDataTransferDataTypesPostRequest) Execute() (*DataTransferDataType, *http.Response, error) { + return r.ApiService.ApiDataTransferDataTypesPostExecute(r) +} + +/* +ApiDataTransferDataTypesPost Creates a DataTransferDataType resource. + +Creates a DataTransferDataType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DataTransferDataTypeAPIApiDataTransferDataTypesPostRequest +*/ +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesPost(ctx context.Context) DataTransferDataTypeAPIApiDataTransferDataTypesPostRequest { + return DataTransferDataTypeAPIApiDataTransferDataTypesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DataTransferDataType +func (a *DataTransferDataTypeAPIService) ApiDataTransferDataTypesPostExecute(r DataTransferDataTypeAPIApiDataTransferDataTypesPostRequest) (*DataTransferDataType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataTransferDataType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferDataTypeAPIService.ApiDataTransferDataTypesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_data_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dataTransferDataType == nil { + return localVarReturnValue, nil, reportError("dataTransferDataType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dataTransferDataType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_data_transfer_type.go b/pkg/api/rewardcloud/api_data_transfer_type.go new file mode 100644 index 0000000..c01f02a --- /dev/null +++ b/pkg/api/rewardcloud/api_data_transfer_type.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// DataTransferTypeAPIService DataTransferTypeAPI service +type DataTransferTypeAPIService service + +type DataTransferTypeAPIApiDataTransferTypesGetCollectionRequest struct { + ctx context.Context + ApiService *DataTransferTypeAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r DataTransferTypeAPIApiDataTransferTypesGetCollectionRequest) Page(page int32) DataTransferTypeAPIApiDataTransferTypesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r DataTransferTypeAPIApiDataTransferTypesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) DataTransferTypeAPIApiDataTransferTypesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r DataTransferTypeAPIApiDataTransferTypesGetCollectionRequest) Execute() ([]DataTransferType, *http.Response, error) { + return r.ApiService.ApiDataTransferTypesGetCollectionExecute(r) +} + +/* +ApiDataTransferTypesGetCollection Retrieves the collection of DataTransferType resources. + +Retrieves the collection of DataTransferType resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DataTransferTypeAPIApiDataTransferTypesGetCollectionRequest +*/ +func (a *DataTransferTypeAPIService) ApiDataTransferTypesGetCollection(ctx context.Context) DataTransferTypeAPIApiDataTransferTypesGetCollectionRequest { + return DataTransferTypeAPIApiDataTransferTypesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []DataTransferType +func (a *DataTransferTypeAPIService) ApiDataTransferTypesGetCollectionExecute(r DataTransferTypeAPIApiDataTransferTypesGetCollectionRequest) ([]DataTransferType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DataTransferType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferTypeAPIService.ApiDataTransferTypesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DataTransferTypeAPIApiDataTransferTypesIdDeleteRequest struct { + ctx context.Context + ApiService *DataTransferTypeAPIService + id string +} + +func (r DataTransferTypeAPIApiDataTransferTypesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiDataTransferTypesIdDeleteExecute(r) +} + +/* +ApiDataTransferTypesIdDelete Removes the DataTransferType resource. + +Removes the DataTransferType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id DataTransferType identifier + @return DataTransferTypeAPIApiDataTransferTypesIdDeleteRequest +*/ +func (a *DataTransferTypeAPIService) ApiDataTransferTypesIdDelete(ctx context.Context, id string) DataTransferTypeAPIApiDataTransferTypesIdDeleteRequest { + return DataTransferTypeAPIApiDataTransferTypesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *DataTransferTypeAPIService) ApiDataTransferTypesIdDeleteExecute(r DataTransferTypeAPIApiDataTransferTypesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferTypeAPIService.ApiDataTransferTypesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type DataTransferTypeAPIApiDataTransferTypesIdGetRequest struct { + ctx context.Context + ApiService *DataTransferTypeAPIService + id string +} + +func (r DataTransferTypeAPIApiDataTransferTypesIdGetRequest) Execute() (*DataTransferType, *http.Response, error) { + return r.ApiService.ApiDataTransferTypesIdGetExecute(r) +} + +/* +ApiDataTransferTypesIdGet Retrieves a DataTransferType resource. + +Retrieves a DataTransferType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id DataTransferType identifier + @return DataTransferTypeAPIApiDataTransferTypesIdGetRequest +*/ +func (a *DataTransferTypeAPIService) ApiDataTransferTypesIdGet(ctx context.Context, id string) DataTransferTypeAPIApiDataTransferTypesIdGetRequest { + return DataTransferTypeAPIApiDataTransferTypesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return DataTransferType +func (a *DataTransferTypeAPIService) ApiDataTransferTypesIdGetExecute(r DataTransferTypeAPIApiDataTransferTypesIdGetRequest) (*DataTransferType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataTransferType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferTypeAPIService.ApiDataTransferTypesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DataTransferTypeAPIApiDataTransferTypesIdPatchRequest struct { + ctx context.Context + ApiService *DataTransferTypeAPIService + dataTransferType *DataTransferType + id string +} + +// The updated DataTransferType resource +func (r DataTransferTypeAPIApiDataTransferTypesIdPatchRequest) DataTransferType(dataTransferType DataTransferType) DataTransferTypeAPIApiDataTransferTypesIdPatchRequest { + r.dataTransferType = &dataTransferType + return r +} + +func (r DataTransferTypeAPIApiDataTransferTypesIdPatchRequest) Execute() (*DataTransferType, *http.Response, error) { + return r.ApiService.ApiDataTransferTypesIdPatchExecute(r) +} + +/* +ApiDataTransferTypesIdPatch Updates the DataTransferType resource. + +Updates the DataTransferType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id DataTransferType identifier + @return DataTransferTypeAPIApiDataTransferTypesIdPatchRequest +*/ +func (a *DataTransferTypeAPIService) ApiDataTransferTypesIdPatch(ctx context.Context, id string) DataTransferTypeAPIApiDataTransferTypesIdPatchRequest { + return DataTransferTypeAPIApiDataTransferTypesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return DataTransferType +func (a *DataTransferTypeAPIService) ApiDataTransferTypesIdPatchExecute(r DataTransferTypeAPIApiDataTransferTypesIdPatchRequest) (*DataTransferType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataTransferType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferTypeAPIService.ApiDataTransferTypesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dataTransferType == nil { + return localVarReturnValue, nil, reportError("dataTransferType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dataTransferType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DataTransferTypeAPIApiDataTransferTypesIdPutRequest struct { + ctx context.Context + ApiService *DataTransferTypeAPIService + dataTransferType *DataTransferType + id string +} + +// The updated DataTransferType resource +func (r DataTransferTypeAPIApiDataTransferTypesIdPutRequest) DataTransferType(dataTransferType DataTransferType) DataTransferTypeAPIApiDataTransferTypesIdPutRequest { + r.dataTransferType = &dataTransferType + return r +} + +func (r DataTransferTypeAPIApiDataTransferTypesIdPutRequest) Execute() (*DataTransferType, *http.Response, error) { + return r.ApiService.ApiDataTransferTypesIdPutExecute(r) +} + +/* +ApiDataTransferTypesIdPut Replaces the DataTransferType resource. + +Replaces the DataTransferType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id DataTransferType identifier + @return DataTransferTypeAPIApiDataTransferTypesIdPutRequest +*/ +func (a *DataTransferTypeAPIService) ApiDataTransferTypesIdPut(ctx context.Context, id string) DataTransferTypeAPIApiDataTransferTypesIdPutRequest { + return DataTransferTypeAPIApiDataTransferTypesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return DataTransferType +func (a *DataTransferTypeAPIService) ApiDataTransferTypesIdPutExecute(r DataTransferTypeAPIApiDataTransferTypesIdPutRequest) (*DataTransferType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataTransferType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferTypeAPIService.ApiDataTransferTypesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dataTransferType == nil { + return localVarReturnValue, nil, reportError("dataTransferType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dataTransferType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DataTransferTypeAPIApiDataTransferTypesPostRequest struct { + ctx context.Context + ApiService *DataTransferTypeAPIService + dataTransferType *DataTransferType +} + +// The new DataTransferType resource +func (r DataTransferTypeAPIApiDataTransferTypesPostRequest) DataTransferType(dataTransferType DataTransferType) DataTransferTypeAPIApiDataTransferTypesPostRequest { + r.dataTransferType = &dataTransferType + return r +} + +func (r DataTransferTypeAPIApiDataTransferTypesPostRequest) Execute() (*DataTransferType, *http.Response, error) { + return r.ApiService.ApiDataTransferTypesPostExecute(r) +} + +/* +ApiDataTransferTypesPost Creates a DataTransferType resource. + +Creates a DataTransferType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DataTransferTypeAPIApiDataTransferTypesPostRequest +*/ +func (a *DataTransferTypeAPIService) ApiDataTransferTypesPost(ctx context.Context) DataTransferTypeAPIApiDataTransferTypesPostRequest { + return DataTransferTypeAPIApiDataTransferTypesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DataTransferType +func (a *DataTransferTypeAPIService) ApiDataTransferTypesPostExecute(r DataTransferTypeAPIApiDataTransferTypesPostRequest) (*DataTransferType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataTransferType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataTransferTypeAPIService.ApiDataTransferTypesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/data_transfer_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dataTransferType == nil { + return localVarReturnValue, nil, reportError("dataTransferType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dataTransferType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_env_var_type.go b/pkg/api/rewardcloud/api_env_var_type.go new file mode 100644 index 0000000..aec81d9 --- /dev/null +++ b/pkg/api/rewardcloud/api_env_var_type.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvVarTypeAPIService EnvVarTypeAPI service +type EnvVarTypeAPIService service + +type EnvVarTypeAPIApiEnvVarTypesGetCollectionRequest struct { + ctx context.Context + ApiService *EnvVarTypeAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvVarTypeAPIApiEnvVarTypesGetCollectionRequest) Page(page int32) EnvVarTypeAPIApiEnvVarTypesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvVarTypeAPIApiEnvVarTypesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvVarTypeAPIApiEnvVarTypesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvVarTypeAPIApiEnvVarTypesGetCollectionRequest) Execute() ([]EnvVarType, *http.Response, error) { + return r.ApiService.ApiEnvVarTypesGetCollectionExecute(r) +} + +/* +ApiEnvVarTypesGetCollection Retrieves the collection of EnvVarType resources. + +Retrieves the collection of EnvVarType resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvVarTypeAPIApiEnvVarTypesGetCollectionRequest +*/ +func (a *EnvVarTypeAPIService) ApiEnvVarTypesGetCollection(ctx context.Context) EnvVarTypeAPIApiEnvVarTypesGetCollectionRequest { + return EnvVarTypeAPIApiEnvVarTypesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvVarType +func (a *EnvVarTypeAPIService) ApiEnvVarTypesGetCollectionExecute(r EnvVarTypeAPIApiEnvVarTypesGetCollectionRequest) ([]EnvVarType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvVarType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarTypeAPIService.ApiEnvVarTypesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvVarTypeAPIApiEnvVarTypesIdDeleteRequest struct { + ctx context.Context + ApiService *EnvVarTypeAPIService + id string +} + +func (r EnvVarTypeAPIApiEnvVarTypesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvVarTypesIdDeleteExecute(r) +} + +/* +ApiEnvVarTypesIdDelete Removes the EnvVarType resource. + +Removes the EnvVarType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvVarType identifier + @return EnvVarTypeAPIApiEnvVarTypesIdDeleteRequest +*/ +func (a *EnvVarTypeAPIService) ApiEnvVarTypesIdDelete(ctx context.Context, id string) EnvVarTypeAPIApiEnvVarTypesIdDeleteRequest { + return EnvVarTypeAPIApiEnvVarTypesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvVarTypeAPIService) ApiEnvVarTypesIdDeleteExecute(r EnvVarTypeAPIApiEnvVarTypesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarTypeAPIService.ApiEnvVarTypesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvVarTypeAPIApiEnvVarTypesIdGetRequest struct { + ctx context.Context + ApiService *EnvVarTypeAPIService + id string +} + +func (r EnvVarTypeAPIApiEnvVarTypesIdGetRequest) Execute() (*EnvVarType, *http.Response, error) { + return r.ApiService.ApiEnvVarTypesIdGetExecute(r) +} + +/* +ApiEnvVarTypesIdGet Retrieves a EnvVarType resource. + +Retrieves a EnvVarType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvVarType identifier + @return EnvVarTypeAPIApiEnvVarTypesIdGetRequest +*/ +func (a *EnvVarTypeAPIService) ApiEnvVarTypesIdGet(ctx context.Context, id string) EnvVarTypeAPIApiEnvVarTypesIdGetRequest { + return EnvVarTypeAPIApiEnvVarTypesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvVarType +func (a *EnvVarTypeAPIService) ApiEnvVarTypesIdGetExecute(r EnvVarTypeAPIApiEnvVarTypesIdGetRequest) (*EnvVarType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvVarType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarTypeAPIService.ApiEnvVarTypesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvVarTypeAPIApiEnvVarTypesIdPatchRequest struct { + ctx context.Context + ApiService *EnvVarTypeAPIService + envVarType *EnvVarType + id string +} + +// The updated EnvVarType resource +func (r EnvVarTypeAPIApiEnvVarTypesIdPatchRequest) EnvVarType(envVarType EnvVarType) EnvVarTypeAPIApiEnvVarTypesIdPatchRequest { + r.envVarType = &envVarType + return r +} + +func (r EnvVarTypeAPIApiEnvVarTypesIdPatchRequest) Execute() (*EnvVarType, *http.Response, error) { + return r.ApiService.ApiEnvVarTypesIdPatchExecute(r) +} + +/* +ApiEnvVarTypesIdPatch Updates the EnvVarType resource. + +Updates the EnvVarType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvVarType identifier + @return EnvVarTypeAPIApiEnvVarTypesIdPatchRequest +*/ +func (a *EnvVarTypeAPIService) ApiEnvVarTypesIdPatch(ctx context.Context, id string) EnvVarTypeAPIApiEnvVarTypesIdPatchRequest { + return EnvVarTypeAPIApiEnvVarTypesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvVarType +func (a *EnvVarTypeAPIService) ApiEnvVarTypesIdPatchExecute(r EnvVarTypeAPIApiEnvVarTypesIdPatchRequest) (*EnvVarType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvVarType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarTypeAPIService.ApiEnvVarTypesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.envVarType == nil { + return localVarReturnValue, nil, reportError("envVarType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.envVarType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvVarTypeAPIApiEnvVarTypesIdPutRequest struct { + ctx context.Context + ApiService *EnvVarTypeAPIService + envVarType *EnvVarType + id string +} + +// The updated EnvVarType resource +func (r EnvVarTypeAPIApiEnvVarTypesIdPutRequest) EnvVarType(envVarType EnvVarType) EnvVarTypeAPIApiEnvVarTypesIdPutRequest { + r.envVarType = &envVarType + return r +} + +func (r EnvVarTypeAPIApiEnvVarTypesIdPutRequest) Execute() (*EnvVarType, *http.Response, error) { + return r.ApiService.ApiEnvVarTypesIdPutExecute(r) +} + +/* +ApiEnvVarTypesIdPut Replaces the EnvVarType resource. + +Replaces the EnvVarType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvVarType identifier + @return EnvVarTypeAPIApiEnvVarTypesIdPutRequest +*/ +func (a *EnvVarTypeAPIService) ApiEnvVarTypesIdPut(ctx context.Context, id string) EnvVarTypeAPIApiEnvVarTypesIdPutRequest { + return EnvVarTypeAPIApiEnvVarTypesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvVarType +func (a *EnvVarTypeAPIService) ApiEnvVarTypesIdPutExecute(r EnvVarTypeAPIApiEnvVarTypesIdPutRequest) (*EnvVarType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvVarType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarTypeAPIService.ApiEnvVarTypesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.envVarType == nil { + return localVarReturnValue, nil, reportError("envVarType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.envVarType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvVarTypeAPIApiEnvVarTypesPostRequest struct { + ctx context.Context + ApiService *EnvVarTypeAPIService + envVarType *EnvVarType +} + +// The new EnvVarType resource +func (r EnvVarTypeAPIApiEnvVarTypesPostRequest) EnvVarType(envVarType EnvVarType) EnvVarTypeAPIApiEnvVarTypesPostRequest { + r.envVarType = &envVarType + return r +} + +func (r EnvVarTypeAPIApiEnvVarTypesPostRequest) Execute() (*EnvVarType, *http.Response, error) { + return r.ApiService.ApiEnvVarTypesPostExecute(r) +} + +/* +ApiEnvVarTypesPost Creates a EnvVarType resource. + +Creates a EnvVarType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvVarTypeAPIApiEnvVarTypesPostRequest +*/ +func (a *EnvVarTypeAPIService) ApiEnvVarTypesPost(ctx context.Context) EnvVarTypeAPIApiEnvVarTypesPostRequest { + return EnvVarTypeAPIApiEnvVarTypesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvVarType +func (a *EnvVarTypeAPIService) ApiEnvVarTypesPostExecute(r EnvVarTypeAPIApiEnvVarTypesPostRequest) (*EnvVarType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvVarType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarTypeAPIService.ApiEnvVarTypesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.envVarType == nil { + return localVarReturnValue, nil, reportError("envVarType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.envVarType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_env_var_validation.go b/pkg/api/rewardcloud/api_env_var_validation.go new file mode 100644 index 0000000..1e00b35 --- /dev/null +++ b/pkg/api/rewardcloud/api_env_var_validation.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvVarValidationAPIService EnvVarValidationAPI service +type EnvVarValidationAPIService service + +type EnvVarValidationAPIApiEnvVarValidationsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvVarValidationAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvVarValidationAPIApiEnvVarValidationsGetCollectionRequest) Page(page int32) EnvVarValidationAPIApiEnvVarValidationsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvVarValidationAPIApiEnvVarValidationsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvVarValidationAPIApiEnvVarValidationsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvVarValidationAPIApiEnvVarValidationsGetCollectionRequest) Execute() ([]EnvVarValidation, *http.Response, error) { + return r.ApiService.ApiEnvVarValidationsGetCollectionExecute(r) +} + +/* +ApiEnvVarValidationsGetCollection Retrieves the collection of EnvVarValidation resources. + +Retrieves the collection of EnvVarValidation resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvVarValidationAPIApiEnvVarValidationsGetCollectionRequest +*/ +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsGetCollection(ctx context.Context) EnvVarValidationAPIApiEnvVarValidationsGetCollectionRequest { + return EnvVarValidationAPIApiEnvVarValidationsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvVarValidation +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsGetCollectionExecute(r EnvVarValidationAPIApiEnvVarValidationsGetCollectionRequest) ([]EnvVarValidation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvVarValidation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarValidationAPIService.ApiEnvVarValidationsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_validations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvVarValidationAPIApiEnvVarValidationsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvVarValidationAPIService + id string +} + +func (r EnvVarValidationAPIApiEnvVarValidationsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvVarValidationsIdDeleteExecute(r) +} + +/* +ApiEnvVarValidationsIdDelete Removes the EnvVarValidation resource. + +Removes the EnvVarValidation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvVarValidation identifier + @return EnvVarValidationAPIApiEnvVarValidationsIdDeleteRequest +*/ +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsIdDelete(ctx context.Context, id string) EnvVarValidationAPIApiEnvVarValidationsIdDeleteRequest { + return EnvVarValidationAPIApiEnvVarValidationsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsIdDeleteExecute(r EnvVarValidationAPIApiEnvVarValidationsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarValidationAPIService.ApiEnvVarValidationsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_validations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvVarValidationAPIApiEnvVarValidationsIdGetRequest struct { + ctx context.Context + ApiService *EnvVarValidationAPIService + id string +} + +func (r EnvVarValidationAPIApiEnvVarValidationsIdGetRequest) Execute() (*EnvVarValidation, *http.Response, error) { + return r.ApiService.ApiEnvVarValidationsIdGetExecute(r) +} + +/* +ApiEnvVarValidationsIdGet Retrieves a EnvVarValidation resource. + +Retrieves a EnvVarValidation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvVarValidation identifier + @return EnvVarValidationAPIApiEnvVarValidationsIdGetRequest +*/ +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsIdGet(ctx context.Context, id string) EnvVarValidationAPIApiEnvVarValidationsIdGetRequest { + return EnvVarValidationAPIApiEnvVarValidationsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvVarValidation +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsIdGetExecute(r EnvVarValidationAPIApiEnvVarValidationsIdGetRequest) (*EnvVarValidation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvVarValidation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarValidationAPIService.ApiEnvVarValidationsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_validations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvVarValidationAPIApiEnvVarValidationsIdPatchRequest struct { + ctx context.Context + ApiService *EnvVarValidationAPIService + envVarValidation *EnvVarValidation + id string +} + +// The updated EnvVarValidation resource +func (r EnvVarValidationAPIApiEnvVarValidationsIdPatchRequest) EnvVarValidation(envVarValidation EnvVarValidation) EnvVarValidationAPIApiEnvVarValidationsIdPatchRequest { + r.envVarValidation = &envVarValidation + return r +} + +func (r EnvVarValidationAPIApiEnvVarValidationsIdPatchRequest) Execute() (*EnvVarValidation, *http.Response, error) { + return r.ApiService.ApiEnvVarValidationsIdPatchExecute(r) +} + +/* +ApiEnvVarValidationsIdPatch Updates the EnvVarValidation resource. + +Updates the EnvVarValidation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvVarValidation identifier + @return EnvVarValidationAPIApiEnvVarValidationsIdPatchRequest +*/ +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsIdPatch(ctx context.Context, id string) EnvVarValidationAPIApiEnvVarValidationsIdPatchRequest { + return EnvVarValidationAPIApiEnvVarValidationsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvVarValidation +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsIdPatchExecute(r EnvVarValidationAPIApiEnvVarValidationsIdPatchRequest) (*EnvVarValidation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvVarValidation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarValidationAPIService.ApiEnvVarValidationsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_validations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.envVarValidation == nil { + return localVarReturnValue, nil, reportError("envVarValidation is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.envVarValidation + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvVarValidationAPIApiEnvVarValidationsIdPutRequest struct { + ctx context.Context + ApiService *EnvVarValidationAPIService + envVarValidation *EnvVarValidation + id string +} + +// The updated EnvVarValidation resource +func (r EnvVarValidationAPIApiEnvVarValidationsIdPutRequest) EnvVarValidation(envVarValidation EnvVarValidation) EnvVarValidationAPIApiEnvVarValidationsIdPutRequest { + r.envVarValidation = &envVarValidation + return r +} + +func (r EnvVarValidationAPIApiEnvVarValidationsIdPutRequest) Execute() (*EnvVarValidation, *http.Response, error) { + return r.ApiService.ApiEnvVarValidationsIdPutExecute(r) +} + +/* +ApiEnvVarValidationsIdPut Replaces the EnvVarValidation resource. + +Replaces the EnvVarValidation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvVarValidation identifier + @return EnvVarValidationAPIApiEnvVarValidationsIdPutRequest +*/ +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsIdPut(ctx context.Context, id string) EnvVarValidationAPIApiEnvVarValidationsIdPutRequest { + return EnvVarValidationAPIApiEnvVarValidationsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvVarValidation +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsIdPutExecute(r EnvVarValidationAPIApiEnvVarValidationsIdPutRequest) (*EnvVarValidation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvVarValidation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarValidationAPIService.ApiEnvVarValidationsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_validations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.envVarValidation == nil { + return localVarReturnValue, nil, reportError("envVarValidation is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.envVarValidation + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvVarValidationAPIApiEnvVarValidationsPostRequest struct { + ctx context.Context + ApiService *EnvVarValidationAPIService + envVarValidation *EnvVarValidation +} + +// The new EnvVarValidation resource +func (r EnvVarValidationAPIApiEnvVarValidationsPostRequest) EnvVarValidation(envVarValidation EnvVarValidation) EnvVarValidationAPIApiEnvVarValidationsPostRequest { + r.envVarValidation = &envVarValidation + return r +} + +func (r EnvVarValidationAPIApiEnvVarValidationsPostRequest) Execute() (*EnvVarValidation, *http.Response, error) { + return r.ApiService.ApiEnvVarValidationsPostExecute(r) +} + +/* +ApiEnvVarValidationsPost Creates a EnvVarValidation resource. + +Creates a EnvVarValidation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvVarValidationAPIApiEnvVarValidationsPostRequest +*/ +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsPost(ctx context.Context) EnvVarValidationAPIApiEnvVarValidationsPostRequest { + return EnvVarValidationAPIApiEnvVarValidationsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvVarValidation +func (a *EnvVarValidationAPIService) ApiEnvVarValidationsPostExecute(r EnvVarValidationAPIApiEnvVarValidationsPostRequest) (*EnvVarValidation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvVarValidation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvVarValidationAPIService.ApiEnvVarValidationsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_validations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.envVarValidation == nil { + return localVarReturnValue, nil, reportError("envVarValidation is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.envVarValidation + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment.go b/pkg/api/rewardcloud/api_environment.go new file mode 100644 index 0000000..c2d226b --- /dev/null +++ b/pkg/api/rewardcloud/api_environment.go @@ -0,0 +1,2011 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// EnvironmentAPIService EnvironmentAPI service +type EnvironmentAPIService service + +type EnvironmentAPIApiEnvironmentsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + page *int32 + itemsPerPage *int32 + id *int32 + id2 *[]int32 + project *string + project2 *[]string + projectTeamId *int32 + projectTeamId2 *[]int32 + provider *string + provider2 *[]string + state *string + state2 *[]string + cluster *string + cluster2 *[]string + environmentAccess *string + environmentAccess2 *[]string + stateByInfra *string + stateByInfra2 *[]string + stateNot *string + stateNot2 *string + orderUpdatedAt *string +} + +// The collection page number +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) Page(page int32) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) Id(id int32) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.id = &id + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) Id2(id2 []int32) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.id2 = &id2 + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) Project(project string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.project = &project + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) Project2(project2 []string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.project2 = &project2 + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) ProjectTeamId(projectTeamId int32) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.projectTeamId = &projectTeamId + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) ProjectTeamId2(projectTeamId2 []int32) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.projectTeamId2 = &projectTeamId2 + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) Provider(provider string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.provider = &provider + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) Provider2(provider2 []string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.provider2 = &provider2 + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) State(state string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.state = &state + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) State2(state2 []string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.state2 = &state2 + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) Cluster(cluster string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.cluster = &cluster + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) Cluster2(cluster2 []string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.cluster2 = &cluster2 + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) EnvironmentAccess(environmentAccess string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.environmentAccess = &environmentAccess + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) EnvironmentAccess2(environmentAccess2 []string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.environmentAccess2 = &environmentAccess2 + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) StateByInfra(stateByInfra string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.stateByInfra = &stateByInfra + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) StateByInfra2(stateByInfra2 []string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.stateByInfra2 = &stateByInfra2 + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) StateNot(stateNot string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.stateNot = &stateNot + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) StateNot2(stateNot2 string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.stateNot2 = &stateNot2 + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) OrderUpdatedAt(orderUpdatedAt string) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + r.orderUpdatedAt = &orderUpdatedAt + return r +} + +func (r EnvironmentAPIApiEnvironmentsGetCollectionRequest) Execute() ([]EnvironmentEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiEnvironmentsGetCollectionExecute(r) +} + +/* +ApiEnvironmentsGetCollection Retrieves the collection of Environment resources. + +Retrieves the collection of Environment resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAPIApiEnvironmentsGetCollectionRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsGetCollection(ctx context.Context) EnvironmentAPIApiEnvironmentsGetCollectionRequest { + return EnvironmentAPIApiEnvironmentsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentEnvironmentOutput +func (a *EnvironmentAPIService) ApiEnvironmentsGetCollectionExecute(r EnvironmentAPIApiEnvironmentsGetCollectionRequest) ([]EnvironmentEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + } + if r.id2 != nil { + t := *r.id2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", t, "multi") + } + } + if r.project != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project", r.project, "") + } + if r.project2 != nil { + t := *r.project2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "project[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "project[]", t, "multi") + } + } + if r.projectTeamId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project.team.id", r.projectTeamId, "") + } + if r.projectTeamId2 != nil { + t := *r.projectTeamId2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "project.team.id[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "project.team.id[]", t, "multi") + } + } + if r.provider != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "provider", r.provider, "") + } + if r.provider2 != nil { + t := *r.provider2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "provider[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "provider[]", t, "multi") + } + } + if r.state != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "state", r.state, "") + } + if r.state2 != nil { + t := *r.state2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[]", t, "multi") + } + } + if r.cluster != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cluster", r.cluster, "") + } + if r.cluster2 != nil { + t := *r.cluster2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "cluster[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "cluster[]", t, "multi") + } + } + if r.environmentAccess != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environmentAccess", r.environmentAccess, "") + } + if r.environmentAccess2 != nil { + t := *r.environmentAccess2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "environmentAccess[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "environmentAccess[]", t, "multi") + } + } + if r.stateByInfra != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra", r.stateByInfra, "") + } + if r.stateByInfra2 != nil { + t := *r.stateByInfra2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra[]", t, "multi") + } + } + if r.stateNot != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[not]", r.stateNot, "") + } + if r.stateNot2 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[not][]", r.stateNot2, "") + } + if r.orderUpdatedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[updatedAt]", r.orderUpdatedAt, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdBuildAndDeployPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + id int32 + environmentEnvironmentOutput *EnvironmentEnvironmentOutput +} + +func (r EnvironmentAPIApiEnvironmentsIdBuildAndDeployPatchRequest) EnvironmentEnvironmentOutput(environmentEnvironmentOutput EnvironmentEnvironmentOutput) EnvironmentAPIApiEnvironmentsIdBuildAndDeployPatchRequest { + r.environmentEnvironmentOutput = &environmentEnvironmentOutput + return r +} + +func (r EnvironmentAPIApiEnvironmentsIdBuildAndDeployPatchRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdBuildAndDeployPatchExecute(r) +} + +/* +ApiEnvironmentsIdBuildAndDeployPatch Build commad for Environment + +It sends a Build command through the Amqp to the infrastructure + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return EnvironmentAPIApiEnvironmentsIdBuildAndDeployPatchRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdBuildAndDeployPatch(ctx context.Context, id int32) EnvironmentAPIApiEnvironmentsIdBuildAndDeployPatchRequest { + return EnvironmentAPIApiEnvironmentsIdBuildAndDeployPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *EnvironmentAPIService) ApiEnvironmentsIdBuildAndDeployPatchExecute(r EnvironmentAPIApiEnvironmentsIdBuildAndDeployPatchRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdBuildAndDeployPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}/build-and-deploy" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvironmentOutput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdCostsGetRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + id int32 +} + +func (r EnvironmentAPIApiEnvironmentsIdCostsGetRequest) Execute() (*EnvironmentCosts, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdCostsGetExecute(r) +} + +/* +ApiEnvironmentsIdCostsGet Get all costs data that related to the Environment + +These costs data is came from Kubernetes (Kubecost) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return EnvironmentAPIApiEnvironmentsIdCostsGetRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdCostsGet(ctx context.Context, id int32) EnvironmentAPIApiEnvironmentsIdCostsGetRequest { + return EnvironmentAPIApiEnvironmentsIdCostsGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentCosts +func (a *EnvironmentAPIService) ApiEnvironmentsIdCostsGetExecute(r EnvironmentAPIApiEnvironmentsIdCostsGetRequest) (*EnvironmentCosts, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentCosts + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdCostsGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}/costs" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + id string +} + +func (r EnvironmentAPIApiEnvironmentsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentsIdDeleteExecute(r) +} + +/* +ApiEnvironmentsIdDelete Removes the Environment resource. + +Removes the Environment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Environment identifier + @return EnvironmentAPIApiEnvironmentsIdDeleteRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdDelete(ctx context.Context, id string) EnvironmentAPIApiEnvironmentsIdDeleteRequest { + return EnvironmentAPIApiEnvironmentsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentAPIService) ApiEnvironmentsIdDeleteExecute(r EnvironmentAPIApiEnvironmentsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdExportDatabasePutRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + id int32 + environmentEnvironmentOutput *EnvironmentEnvironmentOutput +} + +func (r EnvironmentAPIApiEnvironmentsIdExportDatabasePutRequest) EnvironmentEnvironmentOutput(environmentEnvironmentOutput EnvironmentEnvironmentOutput) EnvironmentAPIApiEnvironmentsIdExportDatabasePutRequest { + r.environmentEnvironmentOutput = &environmentEnvironmentOutput + return r +} + +func (r EnvironmentAPIApiEnvironmentsIdExportDatabasePutRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdExportDatabasePutExecute(r) +} + +/* +ApiEnvironmentsIdExportDatabasePut Build commad for Environment + +It sends a Build command through the Amqp to the infrastructure + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return EnvironmentAPIApiEnvironmentsIdExportDatabasePutRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdExportDatabasePut(ctx context.Context, id int32) EnvironmentAPIApiEnvironmentsIdExportDatabasePutRequest { + return EnvironmentAPIApiEnvironmentsIdExportDatabasePutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *EnvironmentAPIService) ApiEnvironmentsIdExportDatabasePutExecute(r EnvironmentAPIApiEnvironmentsIdExportDatabasePutRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdExportDatabasePut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}/export-database" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvironmentOutput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdExportMediaPutRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + id int32 + environmentEnvironmentOutput *EnvironmentEnvironmentOutput +} + +func (r EnvironmentAPIApiEnvironmentsIdExportMediaPutRequest) EnvironmentEnvironmentOutput(environmentEnvironmentOutput EnvironmentEnvironmentOutput) EnvironmentAPIApiEnvironmentsIdExportMediaPutRequest { + r.environmentEnvironmentOutput = &environmentEnvironmentOutput + return r +} + +func (r EnvironmentAPIApiEnvironmentsIdExportMediaPutRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdExportMediaPutExecute(r) +} + +/* +ApiEnvironmentsIdExportMediaPut Build commad for Environment + +It sends a Build command through the Amqp to the infrastructure + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return EnvironmentAPIApiEnvironmentsIdExportMediaPutRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdExportMediaPut(ctx context.Context, id int32) EnvironmentAPIApiEnvironmentsIdExportMediaPutRequest { + return EnvironmentAPIApiEnvironmentsIdExportMediaPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *EnvironmentAPIService) ApiEnvironmentsIdExportMediaPutExecute(r EnvironmentAPIApiEnvironmentsIdExportMediaPutRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdExportMediaPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}/export-media" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvironmentOutput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + id string +} + +func (r EnvironmentAPIApiEnvironmentsIdGetRequest) Execute() (*EnvironmentEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdGetExecute(r) +} + +/* +ApiEnvironmentsIdGet Retrieves a Environment resource. + +Retrieves a Environment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Environment identifier + @return EnvironmentAPIApiEnvironmentsIdGetRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdGet(ctx context.Context, id string) EnvironmentAPIApiEnvironmentsIdGetRequest { + return EnvironmentAPIApiEnvironmentsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentEnvironmentOutput +func (a *EnvironmentAPIService) ApiEnvironmentsIdGetExecute(r EnvironmentAPIApiEnvironmentsIdGetRequest) (*EnvironmentEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdImportDatabasePostRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + id int32 + environmentEnvironmentOutput *EnvironmentEnvironmentOutput +} + +func (r EnvironmentAPIApiEnvironmentsIdImportDatabasePostRequest) EnvironmentEnvironmentOutput(environmentEnvironmentOutput EnvironmentEnvironmentOutput) EnvironmentAPIApiEnvironmentsIdImportDatabasePostRequest { + r.environmentEnvironmentOutput = &environmentEnvironmentOutput + return r +} + +func (r EnvironmentAPIApiEnvironmentsIdImportDatabasePostRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdImportDatabasePostExecute(r) +} + +/* +ApiEnvironmentsIdImportDatabasePost Build commad for Environment + +It sends a Build command through the Amqp to the infrastructure + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return EnvironmentAPIApiEnvironmentsIdImportDatabasePostRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdImportDatabasePost(ctx context.Context, id int32) EnvironmentAPIApiEnvironmentsIdImportDatabasePostRequest { + return EnvironmentAPIApiEnvironmentsIdImportDatabasePostRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *EnvironmentAPIService) ApiEnvironmentsIdImportDatabasePostExecute(r EnvironmentAPIApiEnvironmentsIdImportDatabasePostRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdImportDatabasePost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}/import-database" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvironmentOutput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdImportMediaPostRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + id int32 + environmentEnvironmentOutput *EnvironmentEnvironmentOutput +} + +func (r EnvironmentAPIApiEnvironmentsIdImportMediaPostRequest) EnvironmentEnvironmentOutput(environmentEnvironmentOutput EnvironmentEnvironmentOutput) EnvironmentAPIApiEnvironmentsIdImportMediaPostRequest { + r.environmentEnvironmentOutput = &environmentEnvironmentOutput + return r +} + +func (r EnvironmentAPIApiEnvironmentsIdImportMediaPostRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdImportMediaPostExecute(r) +} + +/* +ApiEnvironmentsIdImportMediaPost Build commad for Environment + +It sends a Build command through the Amqp to the infrastructure + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return EnvironmentAPIApiEnvironmentsIdImportMediaPostRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdImportMediaPost(ctx context.Context, id int32) EnvironmentAPIApiEnvironmentsIdImportMediaPostRequest { + return EnvironmentAPIApiEnvironmentsIdImportMediaPostRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *EnvironmentAPIService) ApiEnvironmentsIdImportMediaPostExecute(r EnvironmentAPIApiEnvironmentsIdImportMediaPostRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdImportMediaPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}/import-media" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvironmentOutput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdLogsGetRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + id int32 + xFilters *string + xOffset *int32 +} + +func (r EnvironmentAPIApiEnvironmentsIdLogsGetRequest) XFilters(xFilters string) EnvironmentAPIApiEnvironmentsIdLogsGetRequest { + r.xFilters = &xFilters + return r +} + +func (r EnvironmentAPIApiEnvironmentsIdLogsGetRequest) XOffset(xOffset int32) EnvironmentAPIApiEnvironmentsIdLogsGetRequest { + r.xOffset = &xOffset + return r +} + +func (r EnvironmentAPIApiEnvironmentsIdLogsGetRequest) Execute() (*EnvironmentLogStreamResponse, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdLogsGetExecute(r) +} + +/* +ApiEnvironmentsIdLogsGet Create a request to view logs + +It sends a request to infra to stream logs to a mercure topic. The topic is in the response + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return EnvironmentAPIApiEnvironmentsIdLogsGetRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdLogsGet(ctx context.Context, id int32) EnvironmentAPIApiEnvironmentsIdLogsGetRequest { + return EnvironmentAPIApiEnvironmentsIdLogsGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentLogStreamResponse +func (a *EnvironmentAPIService) ApiEnvironmentsIdLogsGetExecute(r EnvironmentAPIApiEnvironmentsIdLogsGetRequest) (*EnvironmentLogStreamResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentLogStreamResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdLogsGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}/logs" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xFilters != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-filters", r.xFilters, "") + } + if r.xOffset != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-offset", r.xOffset, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + environmentEnvironmentInput *EnvironmentEnvironmentInput + id string +} + +// The updated Environment resource +func (r EnvironmentAPIApiEnvironmentsIdPatchRequest) EnvironmentEnvironmentInput(environmentEnvironmentInput EnvironmentEnvironmentInput) EnvironmentAPIApiEnvironmentsIdPatchRequest { + r.environmentEnvironmentInput = &environmentEnvironmentInput + return r +} + +func (r EnvironmentAPIApiEnvironmentsIdPatchRequest) Execute() (*EnvironmentEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdPatchExecute(r) +} + +/* +ApiEnvironmentsIdPatch Updates the Environment resource. + +Updates the Environment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Environment identifier + @return EnvironmentAPIApiEnvironmentsIdPatchRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdPatch(ctx context.Context, id string) EnvironmentAPIApiEnvironmentsIdPatchRequest { + return EnvironmentAPIApiEnvironmentsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentEnvironmentOutput +func (a *EnvironmentAPIService) ApiEnvironmentsIdPatchExecute(r EnvironmentAPIApiEnvironmentsIdPatchRequest) (*EnvironmentEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentEnvironmentInput == nil { + return localVarReturnValue, nil, reportError("environmentEnvironmentInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvironmentInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + environmentEnvironmentInput *EnvironmentEnvironmentInput + id string +} + +// The updated Environment resource +func (r EnvironmentAPIApiEnvironmentsIdPutRequest) EnvironmentEnvironmentInput(environmentEnvironmentInput EnvironmentEnvironmentInput) EnvironmentAPIApiEnvironmentsIdPutRequest { + r.environmentEnvironmentInput = &environmentEnvironmentInput + return r +} + +func (r EnvironmentAPIApiEnvironmentsIdPutRequest) Execute() (*EnvironmentEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdPutExecute(r) +} + +/* +ApiEnvironmentsIdPut Replaces the Environment resource. + +Replaces the Environment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Environment identifier + @return EnvironmentAPIApiEnvironmentsIdPutRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdPut(ctx context.Context, id string) EnvironmentAPIApiEnvironmentsIdPutRequest { + return EnvironmentAPIApiEnvironmentsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentEnvironmentOutput +func (a *EnvironmentAPIService) ApiEnvironmentsIdPutExecute(r EnvironmentAPIApiEnvironmentsIdPutRequest) (*EnvironmentEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentEnvironmentInput == nil { + return localVarReturnValue, nil, reportError("environmentEnvironmentInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvironmentInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsIdprogressbarGetRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + id string +} + +func (r EnvironmentAPIApiEnvironmentsIdprogressbarGetRequest) Execute() (*EnvironmentEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiEnvironmentsIdprogressbarGetExecute(r) +} + +/* +ApiEnvironmentsIdprogressbarGet Retrieves a Environment resource. + +Retrieves a Environment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Environment identifier + @return EnvironmentAPIApiEnvironmentsIdprogressbarGetRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsIdprogressbarGet(ctx context.Context, id string) EnvironmentAPIApiEnvironmentsIdprogressbarGetRequest { + return EnvironmentAPIApiEnvironmentsIdprogressbarGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentEnvironmentOutput +func (a *EnvironmentAPIService) ApiEnvironmentsIdprogressbarGetExecute(r EnvironmentAPIApiEnvironmentsIdprogressbarGetRequest) (*EnvironmentEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsIdprogressbarGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments/{id}/progressbar" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAPIApiEnvironmentsPostRequest struct { + ctx context.Context + ApiService *EnvironmentAPIService + environmentEnvironmentInput *EnvironmentEnvironmentInput +} + +// The new Environment resource +func (r EnvironmentAPIApiEnvironmentsPostRequest) EnvironmentEnvironmentInput(environmentEnvironmentInput EnvironmentEnvironmentInput) EnvironmentAPIApiEnvironmentsPostRequest { + r.environmentEnvironmentInput = &environmentEnvironmentInput + return r +} + +func (r EnvironmentAPIApiEnvironmentsPostRequest) Execute() (*EnvironmentEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiEnvironmentsPostExecute(r) +} + +/* +ApiEnvironmentsPost Creates a Environment resource. + +Creates a Environment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAPIApiEnvironmentsPostRequest +*/ +func (a *EnvironmentAPIService) ApiEnvironmentsPost(ctx context.Context) EnvironmentAPIApiEnvironmentsPostRequest { + return EnvironmentAPIApiEnvironmentsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentEnvironmentOutput +func (a *EnvironmentAPIService) ApiEnvironmentsPostExecute(r EnvironmentAPIApiEnvironmentsPostRequest) (*EnvironmentEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.ApiEnvironmentsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environments" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentEnvironmentInput == nil { + return localVarReturnValue, nil, reportError("environmentEnvironmentInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvironmentInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_access.go b/pkg/api/rewardcloud/api_environment_access.go new file mode 100644 index 0000000..1b6d882 --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_access.go @@ -0,0 +1,1126 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// EnvironmentAccessAPIService EnvironmentAccessAPI service +type EnvironmentAccessAPIService service + +type EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentAccessAPIService + page *int32 + itemsPerPage *int32 + environment *string + environment2 *[]string + frontend *string + frontend2 *[]string + backend *string + backend2 *[]string + database *string + database2 *[]string + devTools *string + devTools2 *[]string + redis *string + redis2 *[]string + rabbit *string + rabbit2 *[]string + mailbox *string + mailbox2 *[]string + webshell *string + webshell2 *[]string +} + +// The collection page number +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Page(page int32) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Environment(environment string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.environment = &environment + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Environment2(environment2 []string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.environment2 = &environment2 + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Frontend(frontend string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.frontend = &frontend + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Frontend2(frontend2 []string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.frontend2 = &frontend2 + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Backend(backend string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.backend = &backend + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Backend2(backend2 []string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.backend2 = &backend2 + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Database(database string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.database = &database + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Database2(database2 []string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.database2 = &database2 + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) DevTools(devTools string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.devTools = &devTools + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) DevTools2(devTools2 []string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.devTools2 = &devTools2 + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Redis(redis string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.redis = &redis + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Redis2(redis2 []string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.redis2 = &redis2 + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Rabbit(rabbit string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.rabbit = &rabbit + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Rabbit2(rabbit2 []string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.rabbit2 = &rabbit2 + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Mailbox(mailbox string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.mailbox = &mailbox + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Mailbox2(mailbox2 []string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.mailbox2 = &mailbox2 + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Webshell(webshell string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.webshell = &webshell + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Webshell2(webshell2 []string) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + r.webshell2 = &webshell2 + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) Execute() ([]EnvironmentAccess, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessesGetCollectionExecute(r) +} + +/* +ApiEnvironmentAccessesGetCollection Retrieves the collection of EnvironmentAccess resources. + +Retrieves the collection of EnvironmentAccess resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest +*/ +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesGetCollection(ctx context.Context) EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest { + return EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentAccess +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesGetCollectionExecute(r EnvironmentAccessAPIApiEnvironmentAccessesGetCollectionRequest) ([]EnvironmentAccess, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentAccess + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessAPIService.ApiEnvironmentAccessesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_accesses" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } + if r.environment2 != nil { + t := *r.environment2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", t, "multi") + } + } + if r.frontend != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "frontend", r.frontend, "") + } + if r.frontend2 != nil { + t := *r.frontend2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "frontend[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "frontend[]", t, "multi") + } + } + if r.backend != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "backend", r.backend, "") + } + if r.backend2 != nil { + t := *r.backend2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "backend[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "backend[]", t, "multi") + } + } + if r.database != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "database", r.database, "") + } + if r.database2 != nil { + t := *r.database2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "database[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "database[]", t, "multi") + } + } + if r.devTools != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "devTools", r.devTools, "") + } + if r.devTools2 != nil { + t := *r.devTools2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "devTools[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "devTools[]", t, "multi") + } + } + if r.redis != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "redis", r.redis, "") + } + if r.redis2 != nil { + t := *r.redis2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "redis[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "redis[]", t, "multi") + } + } + if r.rabbit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "rabbit", r.rabbit, "") + } + if r.rabbit2 != nil { + t := *r.rabbit2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "rabbit[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "rabbit[]", t, "multi") + } + } + if r.mailbox != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "mailbox", r.mailbox, "") + } + if r.mailbox2 != nil { + t := *r.mailbox2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "mailbox[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "mailbox[]", t, "multi") + } + } + if r.webshell != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "webshell", r.webshell, "") + } + if r.webshell2 != nil { + t := *r.webshell2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "webshell[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "webshell[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessAPIApiEnvironmentAccessesIdAllDataGetRequest struct { + ctx context.Context + ApiService *EnvironmentAccessAPIService + id int32 +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesIdAllDataGetRequest) Execute() (*EnvironmentAccessAllDataResponse, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessesIdAllDataGetExecute(r) +} + +/* +ApiEnvironmentAccessesIdAllDataGet Get all data of an EnvironmentAccess resource + +Gets all data what is related to the EnvironmentAccess resource and its children + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return EnvironmentAccessAPIApiEnvironmentAccessesIdAllDataGetRequest +*/ +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesIdAllDataGet(ctx context.Context, id int32) EnvironmentAccessAPIApiEnvironmentAccessesIdAllDataGetRequest { + return EnvironmentAccessAPIApiEnvironmentAccessesIdAllDataGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessAllDataResponse +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesIdAllDataGetExecute(r EnvironmentAccessAPIApiEnvironmentAccessesIdAllDataGetRequest) (*EnvironmentAccessAllDataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessAllDataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessAPIService.ApiEnvironmentAccessesIdAllDataGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_accesses/{id}/all-data" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessAPIApiEnvironmentAccessesIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentAccessAPIService + id string +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentAccessesIdDeleteExecute(r) +} + +/* +ApiEnvironmentAccessesIdDelete Removes the EnvironmentAccess resource. + +Removes the EnvironmentAccess resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccess identifier + @return EnvironmentAccessAPIApiEnvironmentAccessesIdDeleteRequest +*/ +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesIdDelete(ctx context.Context, id string) EnvironmentAccessAPIApiEnvironmentAccessesIdDeleteRequest { + return EnvironmentAccessAPIApiEnvironmentAccessesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesIdDeleteExecute(r EnvironmentAccessAPIApiEnvironmentAccessesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessAPIService.ApiEnvironmentAccessesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_accesses/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentAccessAPIApiEnvironmentAccessesIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentAccessAPIService + id string +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesIdGetRequest) Execute() (*EnvironmentAccess, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessesIdGetExecute(r) +} + +/* +ApiEnvironmentAccessesIdGet Retrieves a EnvironmentAccess resource. + +Retrieves a EnvironmentAccess resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccess identifier + @return EnvironmentAccessAPIApiEnvironmentAccessesIdGetRequest +*/ +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesIdGet(ctx context.Context, id string) EnvironmentAccessAPIApiEnvironmentAccessesIdGetRequest { + return EnvironmentAccessAPIApiEnvironmentAccessesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccess +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesIdGetExecute(r EnvironmentAccessAPIApiEnvironmentAccessesIdGetRequest) (*EnvironmentAccess, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccess + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessAPIService.ApiEnvironmentAccessesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_accesses/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessAPIApiEnvironmentAccessesIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAccessAPIService + environmentAccess *EnvironmentAccess + id string +} + +// The updated EnvironmentAccess resource +func (r EnvironmentAccessAPIApiEnvironmentAccessesIdPatchRequest) EnvironmentAccess(environmentAccess EnvironmentAccess) EnvironmentAccessAPIApiEnvironmentAccessesIdPatchRequest { + r.environmentAccess = &environmentAccess + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesIdPatchRequest) Execute() (*EnvironmentAccess, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessesIdPatchExecute(r) +} + +/* +ApiEnvironmentAccessesIdPatch Updates the EnvironmentAccess resource. + +Updates the EnvironmentAccess resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccess identifier + @return EnvironmentAccessAPIApiEnvironmentAccessesIdPatchRequest +*/ +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesIdPatch(ctx context.Context, id string) EnvironmentAccessAPIApiEnvironmentAccessesIdPatchRequest { + return EnvironmentAccessAPIApiEnvironmentAccessesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccess +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesIdPatchExecute(r EnvironmentAccessAPIApiEnvironmentAccessesIdPatchRequest) (*EnvironmentAccess, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccess + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessAPIService.ApiEnvironmentAccessesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_accesses/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccess == nil { + return localVarReturnValue, nil, reportError("environmentAccess is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccess + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessAPIApiEnvironmentAccessesIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentAccessAPIService + environmentAccess *EnvironmentAccess + id string +} + +// The updated EnvironmentAccess resource +func (r EnvironmentAccessAPIApiEnvironmentAccessesIdPutRequest) EnvironmentAccess(environmentAccess EnvironmentAccess) EnvironmentAccessAPIApiEnvironmentAccessesIdPutRequest { + r.environmentAccess = &environmentAccess + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesIdPutRequest) Execute() (*EnvironmentAccess, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessesIdPutExecute(r) +} + +/* +ApiEnvironmentAccessesIdPut Replaces the EnvironmentAccess resource. + +Replaces the EnvironmentAccess resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccess identifier + @return EnvironmentAccessAPIApiEnvironmentAccessesIdPutRequest +*/ +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesIdPut(ctx context.Context, id string) EnvironmentAccessAPIApiEnvironmentAccessesIdPutRequest { + return EnvironmentAccessAPIApiEnvironmentAccessesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccess +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesIdPutExecute(r EnvironmentAccessAPIApiEnvironmentAccessesIdPutRequest) (*EnvironmentAccess, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccess + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessAPIService.ApiEnvironmentAccessesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_accesses/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccess == nil { + return localVarReturnValue, nil, reportError("environmentAccess is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccess + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessAPIApiEnvironmentAccessesPostRequest struct { + ctx context.Context + ApiService *EnvironmentAccessAPIService + environmentAccess *EnvironmentAccess +} + +// The new EnvironmentAccess resource +func (r EnvironmentAccessAPIApiEnvironmentAccessesPostRequest) EnvironmentAccess(environmentAccess EnvironmentAccess) EnvironmentAccessAPIApiEnvironmentAccessesPostRequest { + r.environmentAccess = &environmentAccess + return r +} + +func (r EnvironmentAccessAPIApiEnvironmentAccessesPostRequest) Execute() (*EnvironmentAccess, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessesPostExecute(r) +} + +/* +ApiEnvironmentAccessesPost Creates a EnvironmentAccess resource. + +Creates a EnvironmentAccess resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessAPIApiEnvironmentAccessesPostRequest +*/ +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesPost(ctx context.Context) EnvironmentAccessAPIApiEnvironmentAccessesPostRequest { + return EnvironmentAccessAPIApiEnvironmentAccessesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentAccess +func (a *EnvironmentAccessAPIService) ApiEnvironmentAccessesPostExecute(r EnvironmentAccessAPIApiEnvironmentAccessesPostRequest) (*EnvironmentAccess, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccess + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessAPIService.ApiEnvironmentAccessesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_accesses" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccess == nil { + return localVarReturnValue, nil, reportError("environmentAccess is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccess + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_access_backend.go b/pkg/api/rewardcloud/api_environment_access_backend.go new file mode 100644 index 0000000..997f6f0 --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_access_backend.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvironmentAccessBackendAPIService EnvironmentAccessBackendAPI service +type EnvironmentAccessBackendAPIService service + +type EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentAccessBackendAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsGetCollectionRequest) Page(page int32) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsGetCollectionRequest) Execute() ([]EnvironmentAccessBackend, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessBackendsGetCollectionExecute(r) +} + +/* +ApiEnvironmentAccessBackendsGetCollection Retrieves the collection of EnvironmentAccessBackend resources. + +Retrieves the collection of EnvironmentAccessBackend resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsGetCollectionRequest +*/ +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsGetCollection(ctx context.Context) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsGetCollectionRequest { + return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentAccessBackend +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsGetCollectionExecute(r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsGetCollectionRequest) ([]EnvironmentAccessBackend, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentAccessBackend + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessBackendAPIService.ApiEnvironmentAccessBackendsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_backends" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentAccessBackendAPIService + id string +} + +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentAccessBackendsIdDeleteExecute(r) +} + +/* +ApiEnvironmentAccessBackendsIdDelete Removes the EnvironmentAccessBackend resource. + +Removes the EnvironmentAccessBackend resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessBackend identifier + @return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdDeleteRequest +*/ +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsIdDelete(ctx context.Context, id string) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdDeleteRequest { + return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsIdDeleteExecute(r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessBackendAPIService.ApiEnvironmentAccessBackendsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_backends/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentAccessBackendAPIService + id string +} + +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdGetRequest) Execute() (*EnvironmentAccessBackend, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessBackendsIdGetExecute(r) +} + +/* +ApiEnvironmentAccessBackendsIdGet Retrieves a EnvironmentAccessBackend resource. + +Retrieves a EnvironmentAccessBackend resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessBackend identifier + @return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdGetRequest +*/ +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsIdGet(ctx context.Context, id string) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdGetRequest { + return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessBackend +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsIdGetExecute(r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdGetRequest) (*EnvironmentAccessBackend, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessBackend + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessBackendAPIService.ApiEnvironmentAccessBackendsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_backends/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAccessBackendAPIService + environmentAccessBackend *EnvironmentAccessBackend + id string +} + +// The updated EnvironmentAccessBackend resource +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPatchRequest) EnvironmentAccessBackend(environmentAccessBackend EnvironmentAccessBackend) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPatchRequest { + r.environmentAccessBackend = &environmentAccessBackend + return r +} + +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPatchRequest) Execute() (*EnvironmentAccessBackend, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessBackendsIdPatchExecute(r) +} + +/* +ApiEnvironmentAccessBackendsIdPatch Updates the EnvironmentAccessBackend resource. + +Updates the EnvironmentAccessBackend resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessBackend identifier + @return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPatchRequest +*/ +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsIdPatch(ctx context.Context, id string) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPatchRequest { + return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessBackend +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsIdPatchExecute(r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPatchRequest) (*EnvironmentAccessBackend, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessBackend + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessBackendAPIService.ApiEnvironmentAccessBackendsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_backends/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessBackend == nil { + return localVarReturnValue, nil, reportError("environmentAccessBackend is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessBackend + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentAccessBackendAPIService + environmentAccessBackend *EnvironmentAccessBackend + id string +} + +// The updated EnvironmentAccessBackend resource +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPutRequest) EnvironmentAccessBackend(environmentAccessBackend EnvironmentAccessBackend) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPutRequest { + r.environmentAccessBackend = &environmentAccessBackend + return r +} + +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPutRequest) Execute() (*EnvironmentAccessBackend, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessBackendsIdPutExecute(r) +} + +/* +ApiEnvironmentAccessBackendsIdPut Replaces the EnvironmentAccessBackend resource. + +Replaces the EnvironmentAccessBackend resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessBackend identifier + @return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPutRequest +*/ +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsIdPut(ctx context.Context, id string) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPutRequest { + return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessBackend +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsIdPutExecute(r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsIdPutRequest) (*EnvironmentAccessBackend, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessBackend + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessBackendAPIService.ApiEnvironmentAccessBackendsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_backends/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessBackend == nil { + return localVarReturnValue, nil, reportError("environmentAccessBackend is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessBackend + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsPostRequest struct { + ctx context.Context + ApiService *EnvironmentAccessBackendAPIService + environmentAccessBackend *EnvironmentAccessBackend +} + +// The new EnvironmentAccessBackend resource +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsPostRequest) EnvironmentAccessBackend(environmentAccessBackend EnvironmentAccessBackend) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsPostRequest { + r.environmentAccessBackend = &environmentAccessBackend + return r +} + +func (r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsPostRequest) Execute() (*EnvironmentAccessBackend, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessBackendsPostExecute(r) +} + +/* +ApiEnvironmentAccessBackendsPost Creates a EnvironmentAccessBackend resource. + +Creates a EnvironmentAccessBackend resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsPostRequest +*/ +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsPost(ctx context.Context) EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsPostRequest { + return EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessBackend +func (a *EnvironmentAccessBackendAPIService) ApiEnvironmentAccessBackendsPostExecute(r EnvironmentAccessBackendAPIApiEnvironmentAccessBackendsPostRequest) (*EnvironmentAccessBackend, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessBackend + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessBackendAPIService.ApiEnvironmentAccessBackendsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_backends" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessBackend == nil { + return localVarReturnValue, nil, reportError("environmentAccessBackend is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessBackend + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_access_database.go b/pkg/api/rewardcloud/api_environment_access_database.go new file mode 100644 index 0000000..7e613ad --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_access_database.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvironmentAccessDatabaseAPIService EnvironmentAccessDatabaseAPI service +type EnvironmentAccessDatabaseAPIService service + +type EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDatabaseAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesGetCollectionRequest) Page(page int32) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesGetCollectionRequest) Execute() ([]EnvironmentAccessDatabase, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDatabasesGetCollectionExecute(r) +} + +/* +ApiEnvironmentAccessDatabasesGetCollection Retrieves the collection of EnvironmentAccessDatabase resources. + +Retrieves the collection of EnvironmentAccessDatabase resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesGetCollectionRequest +*/ +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesGetCollection(ctx context.Context) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesGetCollectionRequest { + return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentAccessDatabase +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesGetCollectionExecute(r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesGetCollectionRequest) ([]EnvironmentAccessDatabase, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentAccessDatabase + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDatabaseAPIService.ApiEnvironmentAccessDatabasesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_databases" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDatabaseAPIService + id string +} + +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDatabasesIdDeleteExecute(r) +} + +/* +ApiEnvironmentAccessDatabasesIdDelete Removes the EnvironmentAccessDatabase resource. + +Removes the EnvironmentAccessDatabase resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessDatabase identifier + @return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdDeleteRequest +*/ +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesIdDelete(ctx context.Context, id string) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdDeleteRequest { + return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesIdDeleteExecute(r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDatabaseAPIService.ApiEnvironmentAccessDatabasesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_databases/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDatabaseAPIService + id string +} + +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdGetRequest) Execute() (*EnvironmentAccessDatabase, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDatabasesIdGetExecute(r) +} + +/* +ApiEnvironmentAccessDatabasesIdGet Retrieves a EnvironmentAccessDatabase resource. + +Retrieves a EnvironmentAccessDatabase resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessDatabase identifier + @return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdGetRequest +*/ +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesIdGet(ctx context.Context, id string) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdGetRequest { + return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessDatabase +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesIdGetExecute(r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdGetRequest) (*EnvironmentAccessDatabase, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessDatabase + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDatabaseAPIService.ApiEnvironmentAccessDatabasesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_databases/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDatabaseAPIService + environmentAccessDatabase *EnvironmentAccessDatabase + id string +} + +// The updated EnvironmentAccessDatabase resource +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPatchRequest) EnvironmentAccessDatabase(environmentAccessDatabase EnvironmentAccessDatabase) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPatchRequest { + r.environmentAccessDatabase = &environmentAccessDatabase + return r +} + +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPatchRequest) Execute() (*EnvironmentAccessDatabase, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDatabasesIdPatchExecute(r) +} + +/* +ApiEnvironmentAccessDatabasesIdPatch Updates the EnvironmentAccessDatabase resource. + +Updates the EnvironmentAccessDatabase resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessDatabase identifier + @return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPatchRequest +*/ +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesIdPatch(ctx context.Context, id string) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPatchRequest { + return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessDatabase +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesIdPatchExecute(r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPatchRequest) (*EnvironmentAccessDatabase, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessDatabase + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDatabaseAPIService.ApiEnvironmentAccessDatabasesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_databases/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessDatabase == nil { + return localVarReturnValue, nil, reportError("environmentAccessDatabase is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessDatabase + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDatabaseAPIService + environmentAccessDatabase *EnvironmentAccessDatabase + id string +} + +// The updated EnvironmentAccessDatabase resource +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPutRequest) EnvironmentAccessDatabase(environmentAccessDatabase EnvironmentAccessDatabase) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPutRequest { + r.environmentAccessDatabase = &environmentAccessDatabase + return r +} + +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPutRequest) Execute() (*EnvironmentAccessDatabase, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDatabasesIdPutExecute(r) +} + +/* +ApiEnvironmentAccessDatabasesIdPut Replaces the EnvironmentAccessDatabase resource. + +Replaces the EnvironmentAccessDatabase resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessDatabase identifier + @return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPutRequest +*/ +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesIdPut(ctx context.Context, id string) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPutRequest { + return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessDatabase +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesIdPutExecute(r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesIdPutRequest) (*EnvironmentAccessDatabase, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessDatabase + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDatabaseAPIService.ApiEnvironmentAccessDatabasesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_databases/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessDatabase == nil { + return localVarReturnValue, nil, reportError("environmentAccessDatabase is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessDatabase + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesPostRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDatabaseAPIService + environmentAccessDatabase *EnvironmentAccessDatabase +} + +// The new EnvironmentAccessDatabase resource +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesPostRequest) EnvironmentAccessDatabase(environmentAccessDatabase EnvironmentAccessDatabase) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesPostRequest { + r.environmentAccessDatabase = &environmentAccessDatabase + return r +} + +func (r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesPostRequest) Execute() (*EnvironmentAccessDatabase, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDatabasesPostExecute(r) +} + +/* +ApiEnvironmentAccessDatabasesPost Creates a EnvironmentAccessDatabase resource. + +Creates a EnvironmentAccessDatabase resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesPostRequest +*/ +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesPost(ctx context.Context) EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesPostRequest { + return EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessDatabase +func (a *EnvironmentAccessDatabaseAPIService) ApiEnvironmentAccessDatabasesPostExecute(r EnvironmentAccessDatabaseAPIApiEnvironmentAccessDatabasesPostRequest) (*EnvironmentAccessDatabase, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessDatabase + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDatabaseAPIService.ApiEnvironmentAccessDatabasesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_databases" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessDatabase == nil { + return localVarReturnValue, nil, reportError("environmentAccessDatabase is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessDatabase + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_access_dev_tools.go b/pkg/api/rewardcloud/api_environment_access_dev_tools.go new file mode 100644 index 0000000..0e9cba6 --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_access_dev_tools.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvironmentAccessDevToolsAPIService EnvironmentAccessDevToolsAPI service +type EnvironmentAccessDevToolsAPIService service + +type EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDevToolsAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsGetCollectionRequest) Page(page int32) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsGetCollectionRequest) Execute() ([]EnvironmentAccessDevTools, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDevToolsGetCollectionExecute(r) +} + +/* +ApiEnvironmentAccessDevToolsGetCollection Retrieves the collection of EnvironmentAccessDevTools resources. + +Retrieves the collection of EnvironmentAccessDevTools resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsGetCollectionRequest +*/ +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsGetCollection(ctx context.Context) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsGetCollectionRequest { + return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentAccessDevTools +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsGetCollectionExecute(r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsGetCollectionRequest) ([]EnvironmentAccessDevTools, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentAccessDevTools + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDevToolsAPIService.ApiEnvironmentAccessDevToolsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_dev_tools" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDevToolsAPIService + id string +} + +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDevToolsIdDeleteExecute(r) +} + +/* +ApiEnvironmentAccessDevToolsIdDelete Removes the EnvironmentAccessDevTools resource. + +Removes the EnvironmentAccessDevTools resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessDevTools identifier + @return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdDeleteRequest +*/ +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsIdDelete(ctx context.Context, id string) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdDeleteRequest { + return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsIdDeleteExecute(r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDevToolsAPIService.ApiEnvironmentAccessDevToolsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_dev_tools/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDevToolsAPIService + id string +} + +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdGetRequest) Execute() (*EnvironmentAccessDevTools, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDevToolsIdGetExecute(r) +} + +/* +ApiEnvironmentAccessDevToolsIdGet Retrieves a EnvironmentAccessDevTools resource. + +Retrieves a EnvironmentAccessDevTools resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessDevTools identifier + @return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdGetRequest +*/ +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsIdGet(ctx context.Context, id string) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdGetRequest { + return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessDevTools +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsIdGetExecute(r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdGetRequest) (*EnvironmentAccessDevTools, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessDevTools + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDevToolsAPIService.ApiEnvironmentAccessDevToolsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_dev_tools/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDevToolsAPIService + environmentAccessDevTools *EnvironmentAccessDevTools + id string +} + +// The updated EnvironmentAccessDevTools resource +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPatchRequest) EnvironmentAccessDevTools(environmentAccessDevTools EnvironmentAccessDevTools) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPatchRequest { + r.environmentAccessDevTools = &environmentAccessDevTools + return r +} + +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPatchRequest) Execute() (*EnvironmentAccessDevTools, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDevToolsIdPatchExecute(r) +} + +/* +ApiEnvironmentAccessDevToolsIdPatch Updates the EnvironmentAccessDevTools resource. + +Updates the EnvironmentAccessDevTools resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessDevTools identifier + @return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPatchRequest +*/ +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsIdPatch(ctx context.Context, id string) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPatchRequest { + return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessDevTools +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsIdPatchExecute(r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPatchRequest) (*EnvironmentAccessDevTools, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessDevTools + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDevToolsAPIService.ApiEnvironmentAccessDevToolsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_dev_tools/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessDevTools == nil { + return localVarReturnValue, nil, reportError("environmentAccessDevTools is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessDevTools + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDevToolsAPIService + environmentAccessDevTools *EnvironmentAccessDevTools + id string +} + +// The updated EnvironmentAccessDevTools resource +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPutRequest) EnvironmentAccessDevTools(environmentAccessDevTools EnvironmentAccessDevTools) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPutRequest { + r.environmentAccessDevTools = &environmentAccessDevTools + return r +} + +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPutRequest) Execute() (*EnvironmentAccessDevTools, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDevToolsIdPutExecute(r) +} + +/* +ApiEnvironmentAccessDevToolsIdPut Replaces the EnvironmentAccessDevTools resource. + +Replaces the EnvironmentAccessDevTools resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessDevTools identifier + @return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPutRequest +*/ +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsIdPut(ctx context.Context, id string) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPutRequest { + return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessDevTools +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsIdPutExecute(r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsIdPutRequest) (*EnvironmentAccessDevTools, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessDevTools + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDevToolsAPIService.ApiEnvironmentAccessDevToolsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_dev_tools/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessDevTools == nil { + return localVarReturnValue, nil, reportError("environmentAccessDevTools is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessDevTools + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsPostRequest struct { + ctx context.Context + ApiService *EnvironmentAccessDevToolsAPIService + environmentAccessDevTools *EnvironmentAccessDevTools +} + +// The new EnvironmentAccessDevTools resource +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsPostRequest) EnvironmentAccessDevTools(environmentAccessDevTools EnvironmentAccessDevTools) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsPostRequest { + r.environmentAccessDevTools = &environmentAccessDevTools + return r +} + +func (r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsPostRequest) Execute() (*EnvironmentAccessDevTools, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessDevToolsPostExecute(r) +} + +/* +ApiEnvironmentAccessDevToolsPost Creates a EnvironmentAccessDevTools resource. + +Creates a EnvironmentAccessDevTools resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsPostRequest +*/ +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsPost(ctx context.Context) EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsPostRequest { + return EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessDevTools +func (a *EnvironmentAccessDevToolsAPIService) ApiEnvironmentAccessDevToolsPostExecute(r EnvironmentAccessDevToolsAPIApiEnvironmentAccessDevToolsPostRequest) (*EnvironmentAccessDevTools, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessDevTools + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessDevToolsAPIService.ApiEnvironmentAccessDevToolsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_dev_tools" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessDevTools == nil { + return localVarReturnValue, nil, reportError("environmentAccessDevTools is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessDevTools + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_access_frontend.go b/pkg/api/rewardcloud/api_environment_access_frontend.go new file mode 100644 index 0000000..9eb08d0 --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_access_frontend.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvironmentAccessFrontendAPIService EnvironmentAccessFrontendAPI service +type EnvironmentAccessFrontendAPIService service + +type EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentAccessFrontendAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsGetCollectionRequest) Page(page int32) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsGetCollectionRequest) Execute() ([]EnvironmentAccessFrontend, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessFrontendsGetCollectionExecute(r) +} + +/* +ApiEnvironmentAccessFrontendsGetCollection Retrieves the collection of EnvironmentAccessFrontend resources. + +Retrieves the collection of EnvironmentAccessFrontend resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsGetCollectionRequest +*/ +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsGetCollection(ctx context.Context) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsGetCollectionRequest { + return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentAccessFrontend +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsGetCollectionExecute(r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsGetCollectionRequest) ([]EnvironmentAccessFrontend, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentAccessFrontend + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessFrontendAPIService.ApiEnvironmentAccessFrontendsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_frontends" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentAccessFrontendAPIService + id string +} + +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentAccessFrontendsIdDeleteExecute(r) +} + +/* +ApiEnvironmentAccessFrontendsIdDelete Removes the EnvironmentAccessFrontend resource. + +Removes the EnvironmentAccessFrontend resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessFrontend identifier + @return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdDeleteRequest +*/ +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsIdDelete(ctx context.Context, id string) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdDeleteRequest { + return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsIdDeleteExecute(r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessFrontendAPIService.ApiEnvironmentAccessFrontendsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_frontends/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentAccessFrontendAPIService + id string +} + +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdGetRequest) Execute() (*EnvironmentAccessFrontend, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessFrontendsIdGetExecute(r) +} + +/* +ApiEnvironmentAccessFrontendsIdGet Retrieves a EnvironmentAccessFrontend resource. + +Retrieves a EnvironmentAccessFrontend resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessFrontend identifier + @return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdGetRequest +*/ +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsIdGet(ctx context.Context, id string) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdGetRequest { + return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessFrontend +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsIdGetExecute(r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdGetRequest) (*EnvironmentAccessFrontend, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessFrontend + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessFrontendAPIService.ApiEnvironmentAccessFrontendsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_frontends/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAccessFrontendAPIService + environmentAccessFrontend *EnvironmentAccessFrontend + id string +} + +// The updated EnvironmentAccessFrontend resource +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPatchRequest) EnvironmentAccessFrontend(environmentAccessFrontend EnvironmentAccessFrontend) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPatchRequest { + r.environmentAccessFrontend = &environmentAccessFrontend + return r +} + +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPatchRequest) Execute() (*EnvironmentAccessFrontend, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessFrontendsIdPatchExecute(r) +} + +/* +ApiEnvironmentAccessFrontendsIdPatch Updates the EnvironmentAccessFrontend resource. + +Updates the EnvironmentAccessFrontend resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessFrontend identifier + @return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPatchRequest +*/ +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsIdPatch(ctx context.Context, id string) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPatchRequest { + return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessFrontend +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsIdPatchExecute(r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPatchRequest) (*EnvironmentAccessFrontend, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessFrontend + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessFrontendAPIService.ApiEnvironmentAccessFrontendsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_frontends/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessFrontend == nil { + return localVarReturnValue, nil, reportError("environmentAccessFrontend is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessFrontend + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentAccessFrontendAPIService + environmentAccessFrontend *EnvironmentAccessFrontend + id string +} + +// The updated EnvironmentAccessFrontend resource +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPutRequest) EnvironmentAccessFrontend(environmentAccessFrontend EnvironmentAccessFrontend) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPutRequest { + r.environmentAccessFrontend = &environmentAccessFrontend + return r +} + +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPutRequest) Execute() (*EnvironmentAccessFrontend, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessFrontendsIdPutExecute(r) +} + +/* +ApiEnvironmentAccessFrontendsIdPut Replaces the EnvironmentAccessFrontend resource. + +Replaces the EnvironmentAccessFrontend resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessFrontend identifier + @return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPutRequest +*/ +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsIdPut(ctx context.Context, id string) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPutRequest { + return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessFrontend +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsIdPutExecute(r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsIdPutRequest) (*EnvironmentAccessFrontend, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessFrontend + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessFrontendAPIService.ApiEnvironmentAccessFrontendsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_frontends/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessFrontend == nil { + return localVarReturnValue, nil, reportError("environmentAccessFrontend is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessFrontend + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsPostRequest struct { + ctx context.Context + ApiService *EnvironmentAccessFrontendAPIService + environmentAccessFrontend *EnvironmentAccessFrontend +} + +// The new EnvironmentAccessFrontend resource +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsPostRequest) EnvironmentAccessFrontend(environmentAccessFrontend EnvironmentAccessFrontend) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsPostRequest { + r.environmentAccessFrontend = &environmentAccessFrontend + return r +} + +func (r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsPostRequest) Execute() (*EnvironmentAccessFrontend, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessFrontendsPostExecute(r) +} + +/* +ApiEnvironmentAccessFrontendsPost Creates a EnvironmentAccessFrontend resource. + +Creates a EnvironmentAccessFrontend resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsPostRequest +*/ +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsPost(ctx context.Context) EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsPostRequest { + return EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessFrontend +func (a *EnvironmentAccessFrontendAPIService) ApiEnvironmentAccessFrontendsPostExecute(r EnvironmentAccessFrontendAPIApiEnvironmentAccessFrontendsPostRequest) (*EnvironmentAccessFrontend, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessFrontend + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessFrontendAPIService.ApiEnvironmentAccessFrontendsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_frontends" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessFrontend == nil { + return localVarReturnValue, nil, reportError("environmentAccessFrontend is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessFrontend + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_access_mailbox.go b/pkg/api/rewardcloud/api_environment_access_mailbox.go new file mode 100644 index 0000000..b14e04e --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_access_mailbox.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvironmentAccessMailboxAPIService EnvironmentAccessMailboxAPI service +type EnvironmentAccessMailboxAPIService service + +type EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentAccessMailboxAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesGetCollectionRequest) Page(page int32) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesGetCollectionRequest) Execute() ([]EnvironmentAccessMailbox, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessMailboxesGetCollectionExecute(r) +} + +/* +ApiEnvironmentAccessMailboxesGetCollection Retrieves the collection of EnvironmentAccessMailbox resources. + +Retrieves the collection of EnvironmentAccessMailbox resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesGetCollectionRequest +*/ +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesGetCollection(ctx context.Context) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesGetCollectionRequest { + return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentAccessMailbox +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesGetCollectionExecute(r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesGetCollectionRequest) ([]EnvironmentAccessMailbox, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentAccessMailbox + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessMailboxAPIService.ApiEnvironmentAccessMailboxesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_mailboxes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentAccessMailboxAPIService + id string +} + +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentAccessMailboxesIdDeleteExecute(r) +} + +/* +ApiEnvironmentAccessMailboxesIdDelete Removes the EnvironmentAccessMailbox resource. + +Removes the EnvironmentAccessMailbox resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessMailbox identifier + @return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdDeleteRequest +*/ +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesIdDelete(ctx context.Context, id string) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdDeleteRequest { + return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesIdDeleteExecute(r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessMailboxAPIService.ApiEnvironmentAccessMailboxesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_mailboxes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentAccessMailboxAPIService + id string +} + +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdGetRequest) Execute() (*EnvironmentAccessMailbox, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessMailboxesIdGetExecute(r) +} + +/* +ApiEnvironmentAccessMailboxesIdGet Retrieves a EnvironmentAccessMailbox resource. + +Retrieves a EnvironmentAccessMailbox resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessMailbox identifier + @return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdGetRequest +*/ +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesIdGet(ctx context.Context, id string) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdGetRequest { + return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessMailbox +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesIdGetExecute(r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdGetRequest) (*EnvironmentAccessMailbox, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessMailbox + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessMailboxAPIService.ApiEnvironmentAccessMailboxesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_mailboxes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAccessMailboxAPIService + environmentAccessMailbox *EnvironmentAccessMailbox + id string +} + +// The updated EnvironmentAccessMailbox resource +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPatchRequest) EnvironmentAccessMailbox(environmentAccessMailbox EnvironmentAccessMailbox) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPatchRequest { + r.environmentAccessMailbox = &environmentAccessMailbox + return r +} + +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPatchRequest) Execute() (*EnvironmentAccessMailbox, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessMailboxesIdPatchExecute(r) +} + +/* +ApiEnvironmentAccessMailboxesIdPatch Updates the EnvironmentAccessMailbox resource. + +Updates the EnvironmentAccessMailbox resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessMailbox identifier + @return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPatchRequest +*/ +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesIdPatch(ctx context.Context, id string) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPatchRequest { + return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessMailbox +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesIdPatchExecute(r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPatchRequest) (*EnvironmentAccessMailbox, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessMailbox + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessMailboxAPIService.ApiEnvironmentAccessMailboxesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_mailboxes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessMailbox == nil { + return localVarReturnValue, nil, reportError("environmentAccessMailbox is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessMailbox + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentAccessMailboxAPIService + environmentAccessMailbox *EnvironmentAccessMailbox + id string +} + +// The updated EnvironmentAccessMailbox resource +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPutRequest) EnvironmentAccessMailbox(environmentAccessMailbox EnvironmentAccessMailbox) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPutRequest { + r.environmentAccessMailbox = &environmentAccessMailbox + return r +} + +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPutRequest) Execute() (*EnvironmentAccessMailbox, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessMailboxesIdPutExecute(r) +} + +/* +ApiEnvironmentAccessMailboxesIdPut Replaces the EnvironmentAccessMailbox resource. + +Replaces the EnvironmentAccessMailbox resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessMailbox identifier + @return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPutRequest +*/ +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesIdPut(ctx context.Context, id string) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPutRequest { + return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessMailbox +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesIdPutExecute(r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesIdPutRequest) (*EnvironmentAccessMailbox, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessMailbox + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessMailboxAPIService.ApiEnvironmentAccessMailboxesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_mailboxes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessMailbox == nil { + return localVarReturnValue, nil, reportError("environmentAccessMailbox is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessMailbox + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesPostRequest struct { + ctx context.Context + ApiService *EnvironmentAccessMailboxAPIService + environmentAccessMailbox *EnvironmentAccessMailbox +} + +// The new EnvironmentAccessMailbox resource +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesPostRequest) EnvironmentAccessMailbox(environmentAccessMailbox EnvironmentAccessMailbox) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesPostRequest { + r.environmentAccessMailbox = &environmentAccessMailbox + return r +} + +func (r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesPostRequest) Execute() (*EnvironmentAccessMailbox, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessMailboxesPostExecute(r) +} + +/* +ApiEnvironmentAccessMailboxesPost Creates a EnvironmentAccessMailbox resource. + +Creates a EnvironmentAccessMailbox resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesPostRequest +*/ +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesPost(ctx context.Context) EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesPostRequest { + return EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessMailbox +func (a *EnvironmentAccessMailboxAPIService) ApiEnvironmentAccessMailboxesPostExecute(r EnvironmentAccessMailboxAPIApiEnvironmentAccessMailboxesPostRequest) (*EnvironmentAccessMailbox, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessMailbox + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessMailboxAPIService.ApiEnvironmentAccessMailboxesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_mailboxes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessMailbox == nil { + return localVarReturnValue, nil, reportError("environmentAccessMailbox is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessMailbox + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_access_rabbit.go b/pkg/api/rewardcloud/api_environment_access_rabbit.go new file mode 100644 index 0000000..92defc6 --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_access_rabbit.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvironmentAccessRabbitAPIService EnvironmentAccessRabbitAPI service +type EnvironmentAccessRabbitAPIService service + +type EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRabbitAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsGetCollectionRequest) Page(page int32) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsGetCollectionRequest) Execute() ([]EnvironmentAccessRabbit, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRabbitsGetCollectionExecute(r) +} + +/* +ApiEnvironmentAccessRabbitsGetCollection Retrieves the collection of EnvironmentAccessRabbit resources. + +Retrieves the collection of EnvironmentAccessRabbit resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsGetCollectionRequest +*/ +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsGetCollection(ctx context.Context) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsGetCollectionRequest { + return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentAccessRabbit +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsGetCollectionExecute(r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsGetCollectionRequest) ([]EnvironmentAccessRabbit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentAccessRabbit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRabbitAPIService.ApiEnvironmentAccessRabbitsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_rabbits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRabbitAPIService + id string +} + +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRabbitsIdDeleteExecute(r) +} + +/* +ApiEnvironmentAccessRabbitsIdDelete Removes the EnvironmentAccessRabbit resource. + +Removes the EnvironmentAccessRabbit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessRabbit identifier + @return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdDeleteRequest +*/ +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsIdDelete(ctx context.Context, id string) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdDeleteRequest { + return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsIdDeleteExecute(r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRabbitAPIService.ApiEnvironmentAccessRabbitsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_rabbits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRabbitAPIService + id string +} + +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdGetRequest) Execute() (*EnvironmentAccessRabbit, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRabbitsIdGetExecute(r) +} + +/* +ApiEnvironmentAccessRabbitsIdGet Retrieves a EnvironmentAccessRabbit resource. + +Retrieves a EnvironmentAccessRabbit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessRabbit identifier + @return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdGetRequest +*/ +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsIdGet(ctx context.Context, id string) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdGetRequest { + return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessRabbit +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsIdGetExecute(r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdGetRequest) (*EnvironmentAccessRabbit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessRabbit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRabbitAPIService.ApiEnvironmentAccessRabbitsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_rabbits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRabbitAPIService + environmentAccessRabbit *EnvironmentAccessRabbit + id string +} + +// The updated EnvironmentAccessRabbit resource +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPatchRequest) EnvironmentAccessRabbit(environmentAccessRabbit EnvironmentAccessRabbit) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPatchRequest { + r.environmentAccessRabbit = &environmentAccessRabbit + return r +} + +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPatchRequest) Execute() (*EnvironmentAccessRabbit, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRabbitsIdPatchExecute(r) +} + +/* +ApiEnvironmentAccessRabbitsIdPatch Updates the EnvironmentAccessRabbit resource. + +Updates the EnvironmentAccessRabbit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessRabbit identifier + @return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPatchRequest +*/ +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsIdPatch(ctx context.Context, id string) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPatchRequest { + return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessRabbit +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsIdPatchExecute(r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPatchRequest) (*EnvironmentAccessRabbit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessRabbit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRabbitAPIService.ApiEnvironmentAccessRabbitsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_rabbits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessRabbit == nil { + return localVarReturnValue, nil, reportError("environmentAccessRabbit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessRabbit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRabbitAPIService + environmentAccessRabbit *EnvironmentAccessRabbit + id string +} + +// The updated EnvironmentAccessRabbit resource +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPutRequest) EnvironmentAccessRabbit(environmentAccessRabbit EnvironmentAccessRabbit) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPutRequest { + r.environmentAccessRabbit = &environmentAccessRabbit + return r +} + +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPutRequest) Execute() (*EnvironmentAccessRabbit, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRabbitsIdPutExecute(r) +} + +/* +ApiEnvironmentAccessRabbitsIdPut Replaces the EnvironmentAccessRabbit resource. + +Replaces the EnvironmentAccessRabbit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessRabbit identifier + @return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPutRequest +*/ +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsIdPut(ctx context.Context, id string) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPutRequest { + return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessRabbit +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsIdPutExecute(r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsIdPutRequest) (*EnvironmentAccessRabbit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessRabbit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRabbitAPIService.ApiEnvironmentAccessRabbitsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_rabbits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessRabbit == nil { + return localVarReturnValue, nil, reportError("environmentAccessRabbit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessRabbit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsPostRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRabbitAPIService + environmentAccessRabbit *EnvironmentAccessRabbit +} + +// The new EnvironmentAccessRabbit resource +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsPostRequest) EnvironmentAccessRabbit(environmentAccessRabbit EnvironmentAccessRabbit) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsPostRequest { + r.environmentAccessRabbit = &environmentAccessRabbit + return r +} + +func (r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsPostRequest) Execute() (*EnvironmentAccessRabbit, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRabbitsPostExecute(r) +} + +/* +ApiEnvironmentAccessRabbitsPost Creates a EnvironmentAccessRabbit resource. + +Creates a EnvironmentAccessRabbit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsPostRequest +*/ +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsPost(ctx context.Context) EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsPostRequest { + return EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessRabbit +func (a *EnvironmentAccessRabbitAPIService) ApiEnvironmentAccessRabbitsPostExecute(r EnvironmentAccessRabbitAPIApiEnvironmentAccessRabbitsPostRequest) (*EnvironmentAccessRabbit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessRabbit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRabbitAPIService.ApiEnvironmentAccessRabbitsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_rabbits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessRabbit == nil { + return localVarReturnValue, nil, reportError("environmentAccessRabbit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessRabbit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_access_redis.go b/pkg/api/rewardcloud/api_environment_access_redis.go new file mode 100644 index 0000000..d0e80b6 --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_access_redis.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvironmentAccessRedisAPIService EnvironmentAccessRedisAPI service +type EnvironmentAccessRedisAPIService service + +type EnvironmentAccessRedisAPIApiEnvironmentAccessRedisGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRedisAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisGetCollectionRequest) Page(page int32) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisGetCollectionRequest) Execute() ([]EnvironmentAccessRedis, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRedisGetCollectionExecute(r) +} + +/* +ApiEnvironmentAccessRedisGetCollection Retrieves the collection of EnvironmentAccessRedis resources. + +Retrieves the collection of EnvironmentAccessRedis resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisGetCollectionRequest +*/ +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisGetCollection(ctx context.Context) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisGetCollectionRequest { + return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentAccessRedis +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisGetCollectionExecute(r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisGetCollectionRequest) ([]EnvironmentAccessRedis, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentAccessRedis + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRedisAPIService.ApiEnvironmentAccessRedisGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_redis" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRedisAPIService + id string +} + +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRedisIdDeleteExecute(r) +} + +/* +ApiEnvironmentAccessRedisIdDelete Removes the EnvironmentAccessRedis resource. + +Removes the EnvironmentAccessRedis resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessRedis identifier + @return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdDeleteRequest +*/ +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisIdDelete(ctx context.Context, id string) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdDeleteRequest { + return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisIdDeleteExecute(r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRedisAPIService.ApiEnvironmentAccessRedisIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_redis/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRedisAPIService + id string +} + +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdGetRequest) Execute() (*EnvironmentAccessRedis, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRedisIdGetExecute(r) +} + +/* +ApiEnvironmentAccessRedisIdGet Retrieves a EnvironmentAccessRedis resource. + +Retrieves a EnvironmentAccessRedis resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessRedis identifier + @return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdGetRequest +*/ +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisIdGet(ctx context.Context, id string) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdGetRequest { + return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessRedis +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisIdGetExecute(r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdGetRequest) (*EnvironmentAccessRedis, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessRedis + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRedisAPIService.ApiEnvironmentAccessRedisIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_redis/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRedisAPIService + environmentAccessRedis *EnvironmentAccessRedis + id string +} + +// The updated EnvironmentAccessRedis resource +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPatchRequest) EnvironmentAccessRedis(environmentAccessRedis EnvironmentAccessRedis) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPatchRequest { + r.environmentAccessRedis = &environmentAccessRedis + return r +} + +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPatchRequest) Execute() (*EnvironmentAccessRedis, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRedisIdPatchExecute(r) +} + +/* +ApiEnvironmentAccessRedisIdPatch Updates the EnvironmentAccessRedis resource. + +Updates the EnvironmentAccessRedis resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessRedis identifier + @return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPatchRequest +*/ +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisIdPatch(ctx context.Context, id string) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPatchRequest { + return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessRedis +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisIdPatchExecute(r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPatchRequest) (*EnvironmentAccessRedis, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessRedis + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRedisAPIService.ApiEnvironmentAccessRedisIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_redis/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessRedis == nil { + return localVarReturnValue, nil, reportError("environmentAccessRedis is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessRedis + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRedisAPIService + environmentAccessRedis *EnvironmentAccessRedis + id string +} + +// The updated EnvironmentAccessRedis resource +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPutRequest) EnvironmentAccessRedis(environmentAccessRedis EnvironmentAccessRedis) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPutRequest { + r.environmentAccessRedis = &environmentAccessRedis + return r +} + +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPutRequest) Execute() (*EnvironmentAccessRedis, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRedisIdPutExecute(r) +} + +/* +ApiEnvironmentAccessRedisIdPut Replaces the EnvironmentAccessRedis resource. + +Replaces the EnvironmentAccessRedis resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessRedis identifier + @return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPutRequest +*/ +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisIdPut(ctx context.Context, id string) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPutRequest { + return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessRedis +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisIdPutExecute(r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisIdPutRequest) (*EnvironmentAccessRedis, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessRedis + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRedisAPIService.ApiEnvironmentAccessRedisIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_redis/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessRedis == nil { + return localVarReturnValue, nil, reportError("environmentAccessRedis is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessRedis + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessRedisAPIApiEnvironmentAccessRedisPostRequest struct { + ctx context.Context + ApiService *EnvironmentAccessRedisAPIService + environmentAccessRedis *EnvironmentAccessRedis +} + +// The new EnvironmentAccessRedis resource +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisPostRequest) EnvironmentAccessRedis(environmentAccessRedis EnvironmentAccessRedis) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisPostRequest { + r.environmentAccessRedis = &environmentAccessRedis + return r +} + +func (r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisPostRequest) Execute() (*EnvironmentAccessRedis, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessRedisPostExecute(r) +} + +/* +ApiEnvironmentAccessRedisPost Creates a EnvironmentAccessRedis resource. + +Creates a EnvironmentAccessRedis resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisPostRequest +*/ +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisPost(ctx context.Context) EnvironmentAccessRedisAPIApiEnvironmentAccessRedisPostRequest { + return EnvironmentAccessRedisAPIApiEnvironmentAccessRedisPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessRedis +func (a *EnvironmentAccessRedisAPIService) ApiEnvironmentAccessRedisPostExecute(r EnvironmentAccessRedisAPIApiEnvironmentAccessRedisPostRequest) (*EnvironmentAccessRedis, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessRedis + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessRedisAPIService.ApiEnvironmentAccessRedisPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_redis" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessRedis == nil { + return localVarReturnValue, nil, reportError("environmentAccessRedis is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessRedis + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_access_webshell.go b/pkg/api/rewardcloud/api_environment_access_webshell.go new file mode 100644 index 0000000..03c8c97 --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_access_webshell.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvironmentAccessWebshellAPIService EnvironmentAccessWebshellAPI service +type EnvironmentAccessWebshellAPIService service + +type EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentAccessWebshellAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsGetCollectionRequest) Page(page int32) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsGetCollectionRequest) Execute() ([]EnvironmentAccessWebshell, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessWebshellsGetCollectionExecute(r) +} + +/* +ApiEnvironmentAccessWebshellsGetCollection Retrieves the collection of EnvironmentAccessWebshell resources. + +Retrieves the collection of EnvironmentAccessWebshell resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsGetCollectionRequest +*/ +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsGetCollection(ctx context.Context) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsGetCollectionRequest { + return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentAccessWebshell +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsGetCollectionExecute(r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsGetCollectionRequest) ([]EnvironmentAccessWebshell, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentAccessWebshell + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessWebshellAPIService.ApiEnvironmentAccessWebshellsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_webshells" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentAccessWebshellAPIService + id string +} + +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentAccessWebshellsIdDeleteExecute(r) +} + +/* +ApiEnvironmentAccessWebshellsIdDelete Removes the EnvironmentAccessWebshell resource. + +Removes the EnvironmentAccessWebshell resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessWebshell identifier + @return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdDeleteRequest +*/ +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsIdDelete(ctx context.Context, id string) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdDeleteRequest { + return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsIdDeleteExecute(r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessWebshellAPIService.ApiEnvironmentAccessWebshellsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_webshells/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentAccessWebshellAPIService + id string +} + +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdGetRequest) Execute() (*EnvironmentAccessWebshell, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessWebshellsIdGetExecute(r) +} + +/* +ApiEnvironmentAccessWebshellsIdGet Retrieves a EnvironmentAccessWebshell resource. + +Retrieves a EnvironmentAccessWebshell resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessWebshell identifier + @return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdGetRequest +*/ +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsIdGet(ctx context.Context, id string) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdGetRequest { + return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessWebshell +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsIdGetExecute(r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdGetRequest) (*EnvironmentAccessWebshell, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessWebshell + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessWebshellAPIService.ApiEnvironmentAccessWebshellsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_webshells/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentAccessWebshellAPIService + environmentAccessWebshell *EnvironmentAccessWebshell + id string +} + +// The updated EnvironmentAccessWebshell resource +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPatchRequest) EnvironmentAccessWebshell(environmentAccessWebshell EnvironmentAccessWebshell) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPatchRequest { + r.environmentAccessWebshell = &environmentAccessWebshell + return r +} + +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPatchRequest) Execute() (*EnvironmentAccessWebshell, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessWebshellsIdPatchExecute(r) +} + +/* +ApiEnvironmentAccessWebshellsIdPatch Updates the EnvironmentAccessWebshell resource. + +Updates the EnvironmentAccessWebshell resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessWebshell identifier + @return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPatchRequest +*/ +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsIdPatch(ctx context.Context, id string) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPatchRequest { + return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessWebshell +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsIdPatchExecute(r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPatchRequest) (*EnvironmentAccessWebshell, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessWebshell + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessWebshellAPIService.ApiEnvironmentAccessWebshellsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_webshells/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessWebshell == nil { + return localVarReturnValue, nil, reportError("environmentAccessWebshell is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessWebshell + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentAccessWebshellAPIService + environmentAccessWebshell *EnvironmentAccessWebshell + id string +} + +// The updated EnvironmentAccessWebshell resource +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPutRequest) EnvironmentAccessWebshell(environmentAccessWebshell EnvironmentAccessWebshell) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPutRequest { + r.environmentAccessWebshell = &environmentAccessWebshell + return r +} + +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPutRequest) Execute() (*EnvironmentAccessWebshell, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessWebshellsIdPutExecute(r) +} + +/* +ApiEnvironmentAccessWebshellsIdPut Replaces the EnvironmentAccessWebshell resource. + +Replaces the EnvironmentAccessWebshell resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentAccessWebshell identifier + @return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPutRequest +*/ +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsIdPut(ctx context.Context, id string) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPutRequest { + return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessWebshell +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsIdPutExecute(r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsIdPutRequest) (*EnvironmentAccessWebshell, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessWebshell + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessWebshellAPIService.ApiEnvironmentAccessWebshellsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_webshells/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessWebshell == nil { + return localVarReturnValue, nil, reportError("environmentAccessWebshell is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessWebshell + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsPostRequest struct { + ctx context.Context + ApiService *EnvironmentAccessWebshellAPIService + environmentAccessWebshell *EnvironmentAccessWebshell +} + +// The new EnvironmentAccessWebshell resource +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsPostRequest) EnvironmentAccessWebshell(environmentAccessWebshell EnvironmentAccessWebshell) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsPostRequest { + r.environmentAccessWebshell = &environmentAccessWebshell + return r +} + +func (r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsPostRequest) Execute() (*EnvironmentAccessWebshell, *http.Response, error) { + return r.ApiService.ApiEnvironmentAccessWebshellsPostExecute(r) +} + +/* +ApiEnvironmentAccessWebshellsPost Creates a EnvironmentAccessWebshell resource. + +Creates a EnvironmentAccessWebshell resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsPostRequest +*/ +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsPost(ctx context.Context) EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsPostRequest { + return EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentAccessWebshell +func (a *EnvironmentAccessWebshellAPIService) ApiEnvironmentAccessWebshellsPostExecute(r EnvironmentAccessWebshellAPIApiEnvironmentAccessWebshellsPostRequest) (*EnvironmentAccessWebshell, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentAccessWebshell + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAccessWebshellAPIService.ApiEnvironmentAccessWebshellsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_access_webshells" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentAccessWebshell == nil { + return localVarReturnValue, nil, reportError("environmentAccessWebshell is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentAccessWebshell + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_component.go b/pkg/api/rewardcloud/api_environment_component.go new file mode 100644 index 0000000..75be317 --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_component.go @@ -0,0 +1,826 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// EnvironmentComponentAPIService EnvironmentComponentAPI service +type EnvironmentComponentAPIService service + +type EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentComponentAPIService + page *int32 + itemsPerPage *int32 + componentVersion *string + componentVersion2 *[]string + environment *string + environment2 *[]string +} + +// The collection page number +func (r EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest) Page(page int32) EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest) ComponentVersion(componentVersion string) EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest { + r.componentVersion = &componentVersion + return r +} + +func (r EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest) ComponentVersion2(componentVersion2 []string) EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest { + r.componentVersion2 = &componentVersion2 + return r +} + +func (r EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest) Environment(environment string) EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest { + r.environment = &environment + return r +} + +func (r EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest) Environment2(environment2 []string) EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest { + r.environment2 = &environment2 + return r +} + +func (r EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest) Execute() ([]EnvironmentComponent, *http.Response, error) { + return r.ApiService.ApiEnvironmentComponentsGetCollectionExecute(r) +} + +/* +ApiEnvironmentComponentsGetCollection Retrieves the collection of EnvironmentComponent resources. + +Retrieves the collection of EnvironmentComponent resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest +*/ +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsGetCollection(ctx context.Context) EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest { + return EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentComponent +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsGetCollectionExecute(r EnvironmentComponentAPIApiEnvironmentComponentsGetCollectionRequest) ([]EnvironmentComponent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentComponent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentComponentAPIService.ApiEnvironmentComponentsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_components" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.componentVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "componentVersion", r.componentVersion, "") + } + if r.componentVersion2 != nil { + t := *r.componentVersion2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "componentVersion[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "componentVersion[]", t, "multi") + } + } + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } + if r.environment2 != nil { + t := *r.environment2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentComponentAPIApiEnvironmentComponentsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentComponentAPIService + id string +} + +func (r EnvironmentComponentAPIApiEnvironmentComponentsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentComponentsIdDeleteExecute(r) +} + +/* +ApiEnvironmentComponentsIdDelete Removes the EnvironmentComponent resource. + +Removes the EnvironmentComponent resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentComponent identifier + @return EnvironmentComponentAPIApiEnvironmentComponentsIdDeleteRequest +*/ +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsIdDelete(ctx context.Context, id string) EnvironmentComponentAPIApiEnvironmentComponentsIdDeleteRequest { + return EnvironmentComponentAPIApiEnvironmentComponentsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsIdDeleteExecute(r EnvironmentComponentAPIApiEnvironmentComponentsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentComponentAPIService.ApiEnvironmentComponentsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_components/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentComponentAPIApiEnvironmentComponentsIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentComponentAPIService + id string +} + +func (r EnvironmentComponentAPIApiEnvironmentComponentsIdGetRequest) Execute() (*EnvironmentComponent, *http.Response, error) { + return r.ApiService.ApiEnvironmentComponentsIdGetExecute(r) +} + +/* +ApiEnvironmentComponentsIdGet Retrieves a EnvironmentComponent resource. + +Retrieves a EnvironmentComponent resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentComponent identifier + @return EnvironmentComponentAPIApiEnvironmentComponentsIdGetRequest +*/ +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsIdGet(ctx context.Context, id string) EnvironmentComponentAPIApiEnvironmentComponentsIdGetRequest { + return EnvironmentComponentAPIApiEnvironmentComponentsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentComponent +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsIdGetExecute(r EnvironmentComponentAPIApiEnvironmentComponentsIdGetRequest) (*EnvironmentComponent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentComponent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentComponentAPIService.ApiEnvironmentComponentsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_components/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentComponentAPIApiEnvironmentComponentsIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentComponentAPIService + environmentComponent *EnvironmentComponent + id string +} + +// The updated EnvironmentComponent resource +func (r EnvironmentComponentAPIApiEnvironmentComponentsIdPatchRequest) EnvironmentComponent(environmentComponent EnvironmentComponent) EnvironmentComponentAPIApiEnvironmentComponentsIdPatchRequest { + r.environmentComponent = &environmentComponent + return r +} + +func (r EnvironmentComponentAPIApiEnvironmentComponentsIdPatchRequest) Execute() (*EnvironmentComponent, *http.Response, error) { + return r.ApiService.ApiEnvironmentComponentsIdPatchExecute(r) +} + +/* +ApiEnvironmentComponentsIdPatch Updates the EnvironmentComponent resource. + +Updates the EnvironmentComponent resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentComponent identifier + @return EnvironmentComponentAPIApiEnvironmentComponentsIdPatchRequest +*/ +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsIdPatch(ctx context.Context, id string) EnvironmentComponentAPIApiEnvironmentComponentsIdPatchRequest { + return EnvironmentComponentAPIApiEnvironmentComponentsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentComponent +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsIdPatchExecute(r EnvironmentComponentAPIApiEnvironmentComponentsIdPatchRequest) (*EnvironmentComponent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentComponent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentComponentAPIService.ApiEnvironmentComponentsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_components/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentComponent == nil { + return localVarReturnValue, nil, reportError("environmentComponent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentComponent + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentComponentAPIApiEnvironmentComponentsIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentComponentAPIService + environmentComponent *EnvironmentComponent + id string +} + +// The updated EnvironmentComponent resource +func (r EnvironmentComponentAPIApiEnvironmentComponentsIdPutRequest) EnvironmentComponent(environmentComponent EnvironmentComponent) EnvironmentComponentAPIApiEnvironmentComponentsIdPutRequest { + r.environmentComponent = &environmentComponent + return r +} + +func (r EnvironmentComponentAPIApiEnvironmentComponentsIdPutRequest) Execute() (*EnvironmentComponent, *http.Response, error) { + return r.ApiService.ApiEnvironmentComponentsIdPutExecute(r) +} + +/* +ApiEnvironmentComponentsIdPut Replaces the EnvironmentComponent resource. + +Replaces the EnvironmentComponent resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentComponent identifier + @return EnvironmentComponentAPIApiEnvironmentComponentsIdPutRequest +*/ +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsIdPut(ctx context.Context, id string) EnvironmentComponentAPIApiEnvironmentComponentsIdPutRequest { + return EnvironmentComponentAPIApiEnvironmentComponentsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentComponent +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsIdPutExecute(r EnvironmentComponentAPIApiEnvironmentComponentsIdPutRequest) (*EnvironmentComponent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentComponent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentComponentAPIService.ApiEnvironmentComponentsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_components/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentComponent == nil { + return localVarReturnValue, nil, reportError("environmentComponent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentComponent + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentComponentAPIApiEnvironmentComponentsPostRequest struct { + ctx context.Context + ApiService *EnvironmentComponentAPIService + environmentComponent *EnvironmentComponent +} + +// The new EnvironmentComponent resource +func (r EnvironmentComponentAPIApiEnvironmentComponentsPostRequest) EnvironmentComponent(environmentComponent EnvironmentComponent) EnvironmentComponentAPIApiEnvironmentComponentsPostRequest { + r.environmentComponent = &environmentComponent + return r +} + +func (r EnvironmentComponentAPIApiEnvironmentComponentsPostRequest) Execute() (*EnvironmentComponent, *http.Response, error) { + return r.ApiService.ApiEnvironmentComponentsPostExecute(r) +} + +/* +ApiEnvironmentComponentsPost Creates a EnvironmentComponent resource. + +Creates a EnvironmentComponent resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentComponentAPIApiEnvironmentComponentsPostRequest +*/ +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsPost(ctx context.Context) EnvironmentComponentAPIApiEnvironmentComponentsPostRequest { + return EnvironmentComponentAPIApiEnvironmentComponentsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentComponent +func (a *EnvironmentComponentAPIService) ApiEnvironmentComponentsPostExecute(r EnvironmentComponentAPIApiEnvironmentComponentsPostRequest) (*EnvironmentComponent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentComponent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentComponentAPIService.ApiEnvironmentComponentsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_components" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentComponent == nil { + return localVarReturnValue, nil, reportError("environmentComponent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentComponent + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_custom_domain.go b/pkg/api/rewardcloud/api_environment_custom_domain.go new file mode 100644 index 0000000..1ff1316 --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_custom_domain.go @@ -0,0 +1,800 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// EnvironmentCustomDomainAPIService EnvironmentCustomDomainAPI service +type EnvironmentCustomDomainAPIService service + +type EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentCustomDomainAPIService + page *int32 + itemsPerPage *int32 + environment *string + environment2 *[]string +} + +// The collection page number +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest) Page(page int32) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest) Environment(environment string) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest { + r.environment = &environment + return r +} + +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest) Environment2(environment2 []string) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest { + r.environment2 = &environment2 + return r +} + +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest) Execute() ([]EnvironmentCustomDomain, *http.Response, error) { + return r.ApiService.ApiEnvironmentCustomDomainsGetCollectionExecute(r) +} + +/* +ApiEnvironmentCustomDomainsGetCollection Retrieves the collection of EnvironmentCustomDomain resources. + +Retrieves the collection of EnvironmentCustomDomain resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest +*/ +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsGetCollection(ctx context.Context) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest { + return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentCustomDomain +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsGetCollectionExecute(r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsGetCollectionRequest) ([]EnvironmentCustomDomain, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentCustomDomain + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentCustomDomainAPIService.ApiEnvironmentCustomDomainsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_custom_domains" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } + if r.environment2 != nil { + t := *r.environment2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentCustomDomainAPIService + id string +} + +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentCustomDomainsIdDeleteExecute(r) +} + +/* +ApiEnvironmentCustomDomainsIdDelete Removes the EnvironmentCustomDomain resource. + +Removes the EnvironmentCustomDomain resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentCustomDomain identifier + @return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdDeleteRequest +*/ +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsIdDelete(ctx context.Context, id string) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdDeleteRequest { + return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsIdDeleteExecute(r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentCustomDomainAPIService.ApiEnvironmentCustomDomainsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_custom_domains/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentCustomDomainAPIService + id string +} + +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdGetRequest) Execute() (*EnvironmentCustomDomain, *http.Response, error) { + return r.ApiService.ApiEnvironmentCustomDomainsIdGetExecute(r) +} + +/* +ApiEnvironmentCustomDomainsIdGet Retrieves a EnvironmentCustomDomain resource. + +Retrieves a EnvironmentCustomDomain resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentCustomDomain identifier + @return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdGetRequest +*/ +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsIdGet(ctx context.Context, id string) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdGetRequest { + return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentCustomDomain +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsIdGetExecute(r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdGetRequest) (*EnvironmentCustomDomain, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentCustomDomain + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentCustomDomainAPIService.ApiEnvironmentCustomDomainsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_custom_domains/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentCustomDomainAPIService + environmentCustomDomain *EnvironmentCustomDomain + id string +} + +// The updated EnvironmentCustomDomain resource +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPatchRequest) EnvironmentCustomDomain(environmentCustomDomain EnvironmentCustomDomain) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPatchRequest { + r.environmentCustomDomain = &environmentCustomDomain + return r +} + +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPatchRequest) Execute() (*EnvironmentCustomDomain, *http.Response, error) { + return r.ApiService.ApiEnvironmentCustomDomainsIdPatchExecute(r) +} + +/* +ApiEnvironmentCustomDomainsIdPatch Updates the EnvironmentCustomDomain resource. + +Updates the EnvironmentCustomDomain resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentCustomDomain identifier + @return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPatchRequest +*/ +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsIdPatch(ctx context.Context, id string) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPatchRequest { + return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentCustomDomain +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsIdPatchExecute(r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPatchRequest) (*EnvironmentCustomDomain, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentCustomDomain + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentCustomDomainAPIService.ApiEnvironmentCustomDomainsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_custom_domains/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentCustomDomain == nil { + return localVarReturnValue, nil, reportError("environmentCustomDomain is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentCustomDomain + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentCustomDomainAPIService + environmentCustomDomain *EnvironmentCustomDomain + id string +} + +// The updated EnvironmentCustomDomain resource +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPutRequest) EnvironmentCustomDomain(environmentCustomDomain EnvironmentCustomDomain) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPutRequest { + r.environmentCustomDomain = &environmentCustomDomain + return r +} + +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPutRequest) Execute() (*EnvironmentCustomDomain, *http.Response, error) { + return r.ApiService.ApiEnvironmentCustomDomainsIdPutExecute(r) +} + +/* +ApiEnvironmentCustomDomainsIdPut Replaces the EnvironmentCustomDomain resource. + +Replaces the EnvironmentCustomDomain resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentCustomDomain identifier + @return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPutRequest +*/ +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsIdPut(ctx context.Context, id string) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPutRequest { + return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentCustomDomain +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsIdPutExecute(r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsIdPutRequest) (*EnvironmentCustomDomain, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentCustomDomain + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentCustomDomainAPIService.ApiEnvironmentCustomDomainsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_custom_domains/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentCustomDomain == nil { + return localVarReturnValue, nil, reportError("environmentCustomDomain is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentCustomDomain + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsPostRequest struct { + ctx context.Context + ApiService *EnvironmentCustomDomainAPIService + environmentCustomDomain *EnvironmentCustomDomain +} + +// The new EnvironmentCustomDomain resource +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsPostRequest) EnvironmentCustomDomain(environmentCustomDomain EnvironmentCustomDomain) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsPostRequest { + r.environmentCustomDomain = &environmentCustomDomain + return r +} + +func (r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsPostRequest) Execute() (*EnvironmentCustomDomain, *http.Response, error) { + return r.ApiService.ApiEnvironmentCustomDomainsPostExecute(r) +} + +/* +ApiEnvironmentCustomDomainsPost Creates a EnvironmentCustomDomain resource. + +Creates a EnvironmentCustomDomain resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsPostRequest +*/ +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsPost(ctx context.Context) EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsPostRequest { + return EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentCustomDomain +func (a *EnvironmentCustomDomainAPIService) ApiEnvironmentCustomDomainsPostExecute(r EnvironmentCustomDomainAPIApiEnvironmentCustomDomainsPostRequest) (*EnvironmentCustomDomain, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentCustomDomain + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentCustomDomainAPIService.ApiEnvironmentCustomDomainsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_custom_domains" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentCustomDomain == nil { + return localVarReturnValue, nil, reportError("environmentCustomDomain is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentCustomDomain + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_env_var.go b/pkg/api/rewardcloud/api_environment_env_var.go new file mode 100644 index 0000000..9933069 --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_env_var.go @@ -0,0 +1,826 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// EnvironmentEnvVarAPIService EnvironmentEnvVarAPI service +type EnvironmentEnvVarAPIService service + +type EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentEnvVarAPIService + page *int32 + itemsPerPage *int32 + environment *string + environment2 *[]string + envVarType *string + envVarType2 *[]string +} + +// The collection page number +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest) Page(page int32) EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest) Environment(environment string) EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest { + r.environment = &environment + return r +} + +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest) Environment2(environment2 []string) EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest { + r.environment2 = &environment2 + return r +} + +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest) EnvVarType(envVarType string) EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest { + r.envVarType = &envVarType + return r +} + +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest) EnvVarType2(envVarType2 []string) EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest { + r.envVarType2 = &envVarType2 + return r +} + +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest) Execute() ([]EnvironmentEnvVar, *http.Response, error) { + return r.ApiService.ApiEnvironmentEnvVarsGetCollectionExecute(r) +} + +/* +ApiEnvironmentEnvVarsGetCollection Retrieves the collection of EnvironmentEnvVar resources. + +Retrieves the collection of EnvironmentEnvVar resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest +*/ +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsGetCollection(ctx context.Context) EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest { + return EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentEnvVar +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsGetCollectionExecute(r EnvironmentEnvVarAPIApiEnvironmentEnvVarsGetCollectionRequest) ([]EnvironmentEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentEnvVarAPIService.ApiEnvironmentEnvVarsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } + if r.environment2 != nil { + t := *r.environment2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", t, "multi") + } + } + if r.envVarType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType", r.envVarType, "") + } + if r.envVarType2 != nil { + t := *r.envVarType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentEnvVarAPIService + id string +} + +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentEnvVarsIdDeleteExecute(r) +} + +/* +ApiEnvironmentEnvVarsIdDelete Removes the EnvironmentEnvVar resource. + +Removes the EnvironmentEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentEnvVar identifier + @return EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdDeleteRequest +*/ +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsIdDelete(ctx context.Context, id string) EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdDeleteRequest { + return EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsIdDeleteExecute(r EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentEnvVarAPIService.ApiEnvironmentEnvVarsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentEnvVarAPIService + id string +} + +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdGetRequest) Execute() (*EnvironmentEnvVar, *http.Response, error) { + return r.ApiService.ApiEnvironmentEnvVarsIdGetExecute(r) +} + +/* +ApiEnvironmentEnvVarsIdGet Retrieves a EnvironmentEnvVar resource. + +Retrieves a EnvironmentEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentEnvVar identifier + @return EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdGetRequest +*/ +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsIdGet(ctx context.Context, id string) EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdGetRequest { + return EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentEnvVar +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsIdGetExecute(r EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdGetRequest) (*EnvironmentEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentEnvVarAPIService.ApiEnvironmentEnvVarsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentEnvVarAPIService + environmentEnvVar *EnvironmentEnvVar + id string +} + +// The updated EnvironmentEnvVar resource +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPatchRequest) EnvironmentEnvVar(environmentEnvVar EnvironmentEnvVar) EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPatchRequest { + r.environmentEnvVar = &environmentEnvVar + return r +} + +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPatchRequest) Execute() (*EnvironmentEnvVar, *http.Response, error) { + return r.ApiService.ApiEnvironmentEnvVarsIdPatchExecute(r) +} + +/* +ApiEnvironmentEnvVarsIdPatch Updates the EnvironmentEnvVar resource. + +Updates the EnvironmentEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentEnvVar identifier + @return EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPatchRequest +*/ +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsIdPatch(ctx context.Context, id string) EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPatchRequest { + return EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentEnvVar +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsIdPatchExecute(r EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPatchRequest) (*EnvironmentEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentEnvVarAPIService.ApiEnvironmentEnvVarsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentEnvVar == nil { + return localVarReturnValue, nil, reportError("environmentEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentEnvVarAPIService + environmentEnvVar *EnvironmentEnvVar + id string +} + +// The updated EnvironmentEnvVar resource +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPutRequest) EnvironmentEnvVar(environmentEnvVar EnvironmentEnvVar) EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPutRequest { + r.environmentEnvVar = &environmentEnvVar + return r +} + +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPutRequest) Execute() (*EnvironmentEnvVar, *http.Response, error) { + return r.ApiService.ApiEnvironmentEnvVarsIdPutExecute(r) +} + +/* +ApiEnvironmentEnvVarsIdPut Replaces the EnvironmentEnvVar resource. + +Replaces the EnvironmentEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentEnvVar identifier + @return EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPutRequest +*/ +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsIdPut(ctx context.Context, id string) EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPutRequest { + return EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentEnvVar +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsIdPutExecute(r EnvironmentEnvVarAPIApiEnvironmentEnvVarsIdPutRequest) (*EnvironmentEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentEnvVarAPIService.ApiEnvironmentEnvVarsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentEnvVar == nil { + return localVarReturnValue, nil, reportError("environmentEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentEnvVarAPIApiEnvironmentEnvVarsPostRequest struct { + ctx context.Context + ApiService *EnvironmentEnvVarAPIService + environmentEnvVar *EnvironmentEnvVar +} + +// The new EnvironmentEnvVar resource +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsPostRequest) EnvironmentEnvVar(environmentEnvVar EnvironmentEnvVar) EnvironmentEnvVarAPIApiEnvironmentEnvVarsPostRequest { + r.environmentEnvVar = &environmentEnvVar + return r +} + +func (r EnvironmentEnvVarAPIApiEnvironmentEnvVarsPostRequest) Execute() (*EnvironmentEnvVar, *http.Response, error) { + return r.ApiService.ApiEnvironmentEnvVarsPostExecute(r) +} + +/* +ApiEnvironmentEnvVarsPost Creates a EnvironmentEnvVar resource. + +Creates a EnvironmentEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentEnvVarAPIApiEnvironmentEnvVarsPostRequest +*/ +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsPost(ctx context.Context) EnvironmentEnvVarAPIApiEnvironmentEnvVarsPostRequest { + return EnvironmentEnvVarAPIApiEnvironmentEnvVarsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentEnvVar +func (a *EnvironmentEnvVarAPIService) ApiEnvironmentEnvVarsPostExecute(r EnvironmentEnvVarAPIApiEnvironmentEnvVarsPostRequest) (*EnvironmentEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentEnvVarAPIService.ApiEnvironmentEnvVarsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentEnvVar == nil { + return localVarReturnValue, nil, reportError("environmentEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_magento_host_mapping.go b/pkg/api/rewardcloud/api_environment_magento_host_mapping.go new file mode 100644 index 0000000..0fb514a --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_magento_host_mapping.go @@ -0,0 +1,800 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// EnvironmentMagentoHostMappingAPIService EnvironmentMagentoHostMappingAPI service +type EnvironmentMagentoHostMappingAPIService service + +type EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentMagentoHostMappingAPIService + page *int32 + itemsPerPage *int32 + environment *string + environment2 *[]string +} + +// The collection page number +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest) Page(page int32) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest) Environment(environment string) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest { + r.environment = &environment + return r +} + +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest) Environment2(environment2 []string) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest { + r.environment2 = &environment2 + return r +} + +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest) Execute() ([]EnvironmentMagentoHostMapping, *http.Response, error) { + return r.ApiService.ApiEnvironmentMagentoHostMappingsGetCollectionExecute(r) +} + +/* +ApiEnvironmentMagentoHostMappingsGetCollection Retrieves the collection of EnvironmentMagentoHostMapping resources. + +Retrieves the collection of EnvironmentMagentoHostMapping resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest +*/ +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsGetCollection(ctx context.Context) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest { + return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentMagentoHostMapping +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsGetCollectionExecute(r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsGetCollectionRequest) ([]EnvironmentMagentoHostMapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentMagentoHostMapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentMagentoHostMappingAPIService.ApiEnvironmentMagentoHostMappingsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_magento_host_mappings" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } + if r.environment2 != nil { + t := *r.environment2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdDeleteRequest struct { + ctx context.Context + ApiService *EnvironmentMagentoHostMappingAPIService + id string +} + +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiEnvironmentMagentoHostMappingsIdDeleteExecute(r) +} + +/* +ApiEnvironmentMagentoHostMappingsIdDelete Removes the EnvironmentMagentoHostMapping resource. + +Removes the EnvironmentMagentoHostMapping resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentMagentoHostMapping identifier + @return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdDeleteRequest +*/ +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsIdDelete(ctx context.Context, id string) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdDeleteRequest { + return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsIdDeleteExecute(r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentMagentoHostMappingAPIService.ApiEnvironmentMagentoHostMappingsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_magento_host_mappings/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentMagentoHostMappingAPIService + id string +} + +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdGetRequest) Execute() (*EnvironmentMagentoHostMapping, *http.Response, error) { + return r.ApiService.ApiEnvironmentMagentoHostMappingsIdGetExecute(r) +} + +/* +ApiEnvironmentMagentoHostMappingsIdGet Retrieves a EnvironmentMagentoHostMapping resource. + +Retrieves a EnvironmentMagentoHostMapping resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentMagentoHostMapping identifier + @return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdGetRequest +*/ +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsIdGet(ctx context.Context, id string) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdGetRequest { + return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentMagentoHostMapping +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsIdGetExecute(r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdGetRequest) (*EnvironmentMagentoHostMapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentMagentoHostMapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentMagentoHostMappingAPIService.ApiEnvironmentMagentoHostMappingsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_magento_host_mappings/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPatchRequest struct { + ctx context.Context + ApiService *EnvironmentMagentoHostMappingAPIService + environmentMagentoHostMapping *EnvironmentMagentoHostMapping + id string +} + +// The updated EnvironmentMagentoHostMapping resource +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPatchRequest) EnvironmentMagentoHostMapping(environmentMagentoHostMapping EnvironmentMagentoHostMapping) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPatchRequest { + r.environmentMagentoHostMapping = &environmentMagentoHostMapping + return r +} + +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPatchRequest) Execute() (*EnvironmentMagentoHostMapping, *http.Response, error) { + return r.ApiService.ApiEnvironmentMagentoHostMappingsIdPatchExecute(r) +} + +/* +ApiEnvironmentMagentoHostMappingsIdPatch Updates the EnvironmentMagentoHostMapping resource. + +Updates the EnvironmentMagentoHostMapping resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentMagentoHostMapping identifier + @return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPatchRequest +*/ +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsIdPatch(ctx context.Context, id string) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPatchRequest { + return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentMagentoHostMapping +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsIdPatchExecute(r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPatchRequest) (*EnvironmentMagentoHostMapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentMagentoHostMapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentMagentoHostMappingAPIService.ApiEnvironmentMagentoHostMappingsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_magento_host_mappings/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentMagentoHostMapping == nil { + return localVarReturnValue, nil, reportError("environmentMagentoHostMapping is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentMagentoHostMapping + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPutRequest struct { + ctx context.Context + ApiService *EnvironmentMagentoHostMappingAPIService + environmentMagentoHostMapping *EnvironmentMagentoHostMapping + id string +} + +// The updated EnvironmentMagentoHostMapping resource +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPutRequest) EnvironmentMagentoHostMapping(environmentMagentoHostMapping EnvironmentMagentoHostMapping) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPutRequest { + r.environmentMagentoHostMapping = &environmentMagentoHostMapping + return r +} + +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPutRequest) Execute() (*EnvironmentMagentoHostMapping, *http.Response, error) { + return r.ApiService.ApiEnvironmentMagentoHostMappingsIdPutExecute(r) +} + +/* +ApiEnvironmentMagentoHostMappingsIdPut Replaces the EnvironmentMagentoHostMapping resource. + +Replaces the EnvironmentMagentoHostMapping resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentMagentoHostMapping identifier + @return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPutRequest +*/ +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsIdPut(ctx context.Context, id string) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPutRequest { + return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentMagentoHostMapping +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsIdPutExecute(r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsIdPutRequest) (*EnvironmentMagentoHostMapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentMagentoHostMapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentMagentoHostMappingAPIService.ApiEnvironmentMagentoHostMappingsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_magento_host_mappings/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentMagentoHostMapping == nil { + return localVarReturnValue, nil, reportError("environmentMagentoHostMapping is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentMagentoHostMapping + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsPostRequest struct { + ctx context.Context + ApiService *EnvironmentMagentoHostMappingAPIService + environmentMagentoHostMapping *EnvironmentMagentoHostMapping +} + +// The new EnvironmentMagentoHostMapping resource +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsPostRequest) EnvironmentMagentoHostMapping(environmentMagentoHostMapping EnvironmentMagentoHostMapping) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsPostRequest { + r.environmentMagentoHostMapping = &environmentMagentoHostMapping + return r +} + +func (r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsPostRequest) Execute() (*EnvironmentMagentoHostMapping, *http.Response, error) { + return r.ApiService.ApiEnvironmentMagentoHostMappingsPostExecute(r) +} + +/* +ApiEnvironmentMagentoHostMappingsPost Creates a EnvironmentMagentoHostMapping resource. + +Creates a EnvironmentMagentoHostMapping resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsPostRequest +*/ +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsPost(ctx context.Context) EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsPostRequest { + return EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EnvironmentMagentoHostMapping +func (a *EnvironmentMagentoHostMappingAPIService) ApiEnvironmentMagentoHostMappingsPostExecute(r EnvironmentMagentoHostMappingAPIApiEnvironmentMagentoHostMappingsPostRequest) (*EnvironmentMagentoHostMapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentMagentoHostMapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentMagentoHostMappingAPIService.ApiEnvironmentMagentoHostMappingsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_magento_host_mappings" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentMagentoHostMapping == nil { + return localVarReturnValue, nil, reportError("environmentMagentoHostMapping is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentMagentoHostMapping + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_environment_message_history.go b/pkg/api/rewardcloud/api_environment_message_history.go new file mode 100644 index 0000000..a37130c --- /dev/null +++ b/pkg/api/rewardcloud/api_environment_message_history.go @@ -0,0 +1,281 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EnvironmentMessageHistoryAPIService EnvironmentMessageHistoryAPI service +type EnvironmentMessageHistoryAPIService service + +type EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesGetCollectionRequest struct { + ctx context.Context + ApiService *EnvironmentMessageHistoryAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesGetCollectionRequest) Page(page int32) EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesGetCollectionRequest) Execute() ([]EnvironmentMessageHistory, *http.Response, error) { + return r.ApiService.ApiEnvironmentMessageHistoriesGetCollectionExecute(r) +} + +/* +ApiEnvironmentMessageHistoriesGetCollection Retrieves the collection of EnvironmentMessageHistory resources. + +Retrieves the collection of EnvironmentMessageHistory resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesGetCollectionRequest +*/ +func (a *EnvironmentMessageHistoryAPIService) ApiEnvironmentMessageHistoriesGetCollection(ctx context.Context) EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesGetCollectionRequest { + return EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []EnvironmentMessageHistory +func (a *EnvironmentMessageHistoryAPIService) ApiEnvironmentMessageHistoriesGetCollectionExecute(r EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesGetCollectionRequest) ([]EnvironmentMessageHistory, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []EnvironmentMessageHistory + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentMessageHistoryAPIService.ApiEnvironmentMessageHistoriesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_message_histories" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesIdGetRequest struct { + ctx context.Context + ApiService *EnvironmentMessageHistoryAPIService + id string +} + +func (r EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesIdGetRequest) Execute() (*EnvironmentMessageHistory, *http.Response, error) { + return r.ApiService.ApiEnvironmentMessageHistoriesIdGetExecute(r) +} + +/* +ApiEnvironmentMessageHistoriesIdGet Retrieves a EnvironmentMessageHistory resource. + +Retrieves a EnvironmentMessageHistory resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id EnvironmentMessageHistory identifier + @return EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesIdGetRequest +*/ +func (a *EnvironmentMessageHistoryAPIService) ApiEnvironmentMessageHistoriesIdGet(ctx context.Context, id string) EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesIdGetRequest { + return EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return EnvironmentMessageHistory +func (a *EnvironmentMessageHistoryAPIService) ApiEnvironmentMessageHistoriesIdGetExecute(r EnvironmentMessageHistoryAPIApiEnvironmentMessageHistoriesIdGetRequest) (*EnvironmentMessageHistory, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnvironmentMessageHistory + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentMessageHistoryAPIService.ApiEnvironmentMessageHistoriesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/environment_message_histories/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_exported_data.go b/pkg/api/rewardcloud/api_exported_data.go new file mode 100644 index 0000000..4940963 --- /dev/null +++ b/pkg/api/rewardcloud/api_exported_data.go @@ -0,0 +1,870 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ExportedDataAPIService ExportedDataAPI service +type ExportedDataAPIService service + +type ExportedDataAPIApiExportedDatasGetCollectionRequest struct { + ctx context.Context + ApiService *ExportedDataAPIService + page *int32 + itemsPerPage *int32 + dataTransferDataType *string + dataTransferDataType2 *[]string + environment *string + environment2 *[]string + state *string + state2 *[]string + orderCreatedAt *string + orderUpdatedAt *string +} + +// The collection page number +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) Page(page int32) ExportedDataAPIApiExportedDatasGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ExportedDataAPIApiExportedDatasGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) DataTransferDataType(dataTransferDataType string) ExportedDataAPIApiExportedDatasGetCollectionRequest { + r.dataTransferDataType = &dataTransferDataType + return r +} + +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) DataTransferDataType2(dataTransferDataType2 []string) ExportedDataAPIApiExportedDatasGetCollectionRequest { + r.dataTransferDataType2 = &dataTransferDataType2 + return r +} + +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) Environment(environment string) ExportedDataAPIApiExportedDatasGetCollectionRequest { + r.environment = &environment + return r +} + +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) Environment2(environment2 []string) ExportedDataAPIApiExportedDatasGetCollectionRequest { + r.environment2 = &environment2 + return r +} + +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) State(state string) ExportedDataAPIApiExportedDatasGetCollectionRequest { + r.state = &state + return r +} + +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) State2(state2 []string) ExportedDataAPIApiExportedDatasGetCollectionRequest { + r.state2 = &state2 + return r +} + +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) OrderCreatedAt(orderCreatedAt string) ExportedDataAPIApiExportedDatasGetCollectionRequest { + r.orderCreatedAt = &orderCreatedAt + return r +} + +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) OrderUpdatedAt(orderUpdatedAt string) ExportedDataAPIApiExportedDatasGetCollectionRequest { + r.orderUpdatedAt = &orderUpdatedAt + return r +} + +func (r ExportedDataAPIApiExportedDatasGetCollectionRequest) Execute() ([]ExportedData, *http.Response, error) { + return r.ApiService.ApiExportedDatasGetCollectionExecute(r) +} + +/* +ApiExportedDatasGetCollection Retrieves the collection of ExportedData resources. + +Retrieves the collection of ExportedData resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ExportedDataAPIApiExportedDatasGetCollectionRequest +*/ +func (a *ExportedDataAPIService) ApiExportedDatasGetCollection(ctx context.Context) ExportedDataAPIApiExportedDatasGetCollectionRequest { + return ExportedDataAPIApiExportedDatasGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ExportedData +func (a *ExportedDataAPIService) ApiExportedDatasGetCollectionExecute(r ExportedDataAPIApiExportedDatasGetCollectionRequest) ([]ExportedData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ExportedData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportedDataAPIService.ApiExportedDatasGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/exported_datas" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.dataTransferDataType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "dataTransferDataType", r.dataTransferDataType, "") + } + if r.dataTransferDataType2 != nil { + t := *r.dataTransferDataType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "dataTransferDataType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "dataTransferDataType[]", t, "multi") + } + } + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } + if r.environment2 != nil { + t := *r.environment2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", t, "multi") + } + } + if r.state != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "state", r.state, "") + } + if r.state2 != nil { + t := *r.state2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[]", t, "multi") + } + } + if r.orderCreatedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[createdAt]", r.orderCreatedAt, "") + } + if r.orderUpdatedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[updatedAt]", r.orderUpdatedAt, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportedDataAPIApiExportedDatasIdDeleteRequest struct { + ctx context.Context + ApiService *ExportedDataAPIService + id string +} + +func (r ExportedDataAPIApiExportedDatasIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiExportedDatasIdDeleteExecute(r) +} + +/* +ApiExportedDatasIdDelete Removes the ExportedData resource. + +Removes the ExportedData resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ExportedData identifier + @return ExportedDataAPIApiExportedDatasIdDeleteRequest +*/ +func (a *ExportedDataAPIService) ApiExportedDatasIdDelete(ctx context.Context, id string) ExportedDataAPIApiExportedDatasIdDeleteRequest { + return ExportedDataAPIApiExportedDatasIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ExportedDataAPIService) ApiExportedDatasIdDeleteExecute(r ExportedDataAPIApiExportedDatasIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportedDataAPIService.ApiExportedDatasIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/exported_datas/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ExportedDataAPIApiExportedDatasIdGetRequest struct { + ctx context.Context + ApiService *ExportedDataAPIService + id string +} + +func (r ExportedDataAPIApiExportedDatasIdGetRequest) Execute() (*ExportedData, *http.Response, error) { + return r.ApiService.ApiExportedDatasIdGetExecute(r) +} + +/* +ApiExportedDatasIdGet Retrieves a ExportedData resource. + +Retrieves a ExportedData resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ExportedData identifier + @return ExportedDataAPIApiExportedDatasIdGetRequest +*/ +func (a *ExportedDataAPIService) ApiExportedDatasIdGet(ctx context.Context, id string) ExportedDataAPIApiExportedDatasIdGetRequest { + return ExportedDataAPIApiExportedDatasIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ExportedData +func (a *ExportedDataAPIService) ApiExportedDatasIdGetExecute(r ExportedDataAPIApiExportedDatasIdGetRequest) (*ExportedData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExportedData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportedDataAPIService.ApiExportedDatasIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/exported_datas/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportedDataAPIApiExportedDatasIdPatchRequest struct { + ctx context.Context + ApiService *ExportedDataAPIService + exportedData *ExportedData + id string +} + +// The updated ExportedData resource +func (r ExportedDataAPIApiExportedDatasIdPatchRequest) ExportedData(exportedData ExportedData) ExportedDataAPIApiExportedDatasIdPatchRequest { + r.exportedData = &exportedData + return r +} + +func (r ExportedDataAPIApiExportedDatasIdPatchRequest) Execute() (*ExportedData, *http.Response, error) { + return r.ApiService.ApiExportedDatasIdPatchExecute(r) +} + +/* +ApiExportedDatasIdPatch Updates the ExportedData resource. + +Updates the ExportedData resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ExportedData identifier + @return ExportedDataAPIApiExportedDatasIdPatchRequest +*/ +func (a *ExportedDataAPIService) ApiExportedDatasIdPatch(ctx context.Context, id string) ExportedDataAPIApiExportedDatasIdPatchRequest { + return ExportedDataAPIApiExportedDatasIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ExportedData +func (a *ExportedDataAPIService) ApiExportedDatasIdPatchExecute(r ExportedDataAPIApiExportedDatasIdPatchRequest) (*ExportedData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExportedData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportedDataAPIService.ApiExportedDatasIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/exported_datas/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.exportedData == nil { + return localVarReturnValue, nil, reportError("exportedData is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.exportedData + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportedDataAPIApiExportedDatasIdPutRequest struct { + ctx context.Context + ApiService *ExportedDataAPIService + exportedData *ExportedData + id string +} + +// The updated ExportedData resource +func (r ExportedDataAPIApiExportedDatasIdPutRequest) ExportedData(exportedData ExportedData) ExportedDataAPIApiExportedDatasIdPutRequest { + r.exportedData = &exportedData + return r +} + +func (r ExportedDataAPIApiExportedDatasIdPutRequest) Execute() (*ExportedData, *http.Response, error) { + return r.ApiService.ApiExportedDatasIdPutExecute(r) +} + +/* +ApiExportedDatasIdPut Replaces the ExportedData resource. + +Replaces the ExportedData resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ExportedData identifier + @return ExportedDataAPIApiExportedDatasIdPutRequest +*/ +func (a *ExportedDataAPIService) ApiExportedDatasIdPut(ctx context.Context, id string) ExportedDataAPIApiExportedDatasIdPutRequest { + return ExportedDataAPIApiExportedDatasIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ExportedData +func (a *ExportedDataAPIService) ApiExportedDatasIdPutExecute(r ExportedDataAPIApiExportedDatasIdPutRequest) (*ExportedData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExportedData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportedDataAPIService.ApiExportedDatasIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/exported_datas/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.exportedData == nil { + return localVarReturnValue, nil, reportError("exportedData is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.exportedData + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportedDataAPIApiExportedDatasPostRequest struct { + ctx context.Context + ApiService *ExportedDataAPIService + exportedData *ExportedData +} + +// The new ExportedData resource +func (r ExportedDataAPIApiExportedDatasPostRequest) ExportedData(exportedData ExportedData) ExportedDataAPIApiExportedDatasPostRequest { + r.exportedData = &exportedData + return r +} + +func (r ExportedDataAPIApiExportedDatasPostRequest) Execute() (*ExportedData, *http.Response, error) { + return r.ApiService.ApiExportedDatasPostExecute(r) +} + +/* +ApiExportedDatasPost Creates a ExportedData resource. + +Creates a ExportedData resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ExportedDataAPIApiExportedDatasPostRequest +*/ +func (a *ExportedDataAPIService) ApiExportedDatasPost(ctx context.Context) ExportedDataAPIApiExportedDatasPostRequest { + return ExportedDataAPIApiExportedDatasPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ExportedData +func (a *ExportedDataAPIService) ApiExportedDatasPostExecute(r ExportedDataAPIApiExportedDatasPostRequest) (*ExportedData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExportedData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportedDataAPIService.ApiExportedDatasPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/exported_datas" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.exportedData == nil { + return localVarReturnValue, nil, reportError("exportedData is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.exportedData + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_git.go b/pkg/api/rewardcloud/api_git.go new file mode 100644 index 0000000..b9c648a --- /dev/null +++ b/pkg/api/rewardcloud/api_git.go @@ -0,0 +1,996 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// GitAPIService GitAPI service +type GitAPIService service + +type GitAPIApiGitsGetCollectionRequest struct { + ctx context.Context + ApiService *GitAPIService + page *int32 + itemsPerPage *int32 + project *string + project2 *[]string + gitType *string + gitType2 *[]string + credentialType *string + credentialType2 *[]string + cryptoKeyType *string + cryptoKeyType2 *[]string +} + +// The collection page number +func (r GitAPIApiGitsGetCollectionRequest) Page(page int32) GitAPIApiGitsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r GitAPIApiGitsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) GitAPIApiGitsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r GitAPIApiGitsGetCollectionRequest) Project(project string) GitAPIApiGitsGetCollectionRequest { + r.project = &project + return r +} + +func (r GitAPIApiGitsGetCollectionRequest) Project2(project2 []string) GitAPIApiGitsGetCollectionRequest { + r.project2 = &project2 + return r +} + +func (r GitAPIApiGitsGetCollectionRequest) GitType(gitType string) GitAPIApiGitsGetCollectionRequest { + r.gitType = &gitType + return r +} + +func (r GitAPIApiGitsGetCollectionRequest) GitType2(gitType2 []string) GitAPIApiGitsGetCollectionRequest { + r.gitType2 = &gitType2 + return r +} + +func (r GitAPIApiGitsGetCollectionRequest) CredentialType(credentialType string) GitAPIApiGitsGetCollectionRequest { + r.credentialType = &credentialType + return r +} + +func (r GitAPIApiGitsGetCollectionRequest) CredentialType2(credentialType2 []string) GitAPIApiGitsGetCollectionRequest { + r.credentialType2 = &credentialType2 + return r +} + +func (r GitAPIApiGitsGetCollectionRequest) CryptoKeyType(cryptoKeyType string) GitAPIApiGitsGetCollectionRequest { + r.cryptoKeyType = &cryptoKeyType + return r +} + +func (r GitAPIApiGitsGetCollectionRequest) CryptoKeyType2(cryptoKeyType2 []string) GitAPIApiGitsGetCollectionRequest { + r.cryptoKeyType2 = &cryptoKeyType2 + return r +} + +func (r GitAPIApiGitsGetCollectionRequest) Execute() ([]GitGitOutput, *http.Response, error) { + return r.ApiService.ApiGitsGetCollectionExecute(r) +} + +/* +ApiGitsGetCollection Retrieves the collection of Git resources. + +Retrieves the collection of Git resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GitAPIApiGitsGetCollectionRequest +*/ +func (a *GitAPIService) ApiGitsGetCollection(ctx context.Context) GitAPIApiGitsGetCollectionRequest { + return GitAPIApiGitsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []GitGitOutput +func (a *GitAPIService) ApiGitsGetCollectionExecute(r GitAPIApiGitsGetCollectionRequest) ([]GitGitOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GitGitOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitAPIService.ApiGitsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/gits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.project != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project", r.project, "") + } + if r.project2 != nil { + t := *r.project2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "project[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "project[]", t, "multi") + } + } + if r.gitType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "gitType", r.gitType, "") + } + if r.gitType2 != nil { + t := *r.gitType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "gitType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "gitType[]", t, "multi") + } + } + if r.credentialType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "credentialType", r.credentialType, "") + } + if r.credentialType2 != nil { + t := *r.credentialType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "credentialType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "credentialType[]", t, "multi") + } + } + if r.cryptoKeyType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cryptoKeyType", r.cryptoKeyType, "") + } + if r.cryptoKeyType2 != nil { + t := *r.cryptoKeyType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "cryptoKeyType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "cryptoKeyType[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GitAPIApiGitsIdConnectTestGetRequest struct { + ctx context.Context + ApiService *GitAPIService + id int32 +} + +func (r GitAPIApiGitsIdConnectTestGetRequest) Execute() (*ApiGitsIdConnectTestGet200Response, *http.Response, error) { + return r.ApiService.ApiGitsIdConnectTestGetExecute(r) +} + +/* +ApiGitsIdConnectTestGet Get information about the repository connection + +It will tests the repository connection by the added credentials + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return GitAPIApiGitsIdConnectTestGetRequest +*/ +func (a *GitAPIService) ApiGitsIdConnectTestGet(ctx context.Context, id int32) GitAPIApiGitsIdConnectTestGetRequest { + return GitAPIApiGitsIdConnectTestGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ApiGitsIdConnectTestGet200Response +func (a *GitAPIService) ApiGitsIdConnectTestGetExecute(r GitAPIApiGitsIdConnectTestGetRequest) (*ApiGitsIdConnectTestGet200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApiGitsIdConnectTestGet200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitAPIService.ApiGitsIdConnectTestGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/gits/{id}/connect-test" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GitAPIApiGitsIdDeleteRequest struct { + ctx context.Context + ApiService *GitAPIService + id string +} + +func (r GitAPIApiGitsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiGitsIdDeleteExecute(r) +} + +/* +ApiGitsIdDelete Removes the Git resource. + +Removes the Git resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Git identifier + @return GitAPIApiGitsIdDeleteRequest +*/ +func (a *GitAPIService) ApiGitsIdDelete(ctx context.Context, id string) GitAPIApiGitsIdDeleteRequest { + return GitAPIApiGitsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *GitAPIService) ApiGitsIdDeleteExecute(r GitAPIApiGitsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitAPIService.ApiGitsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/gits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type GitAPIApiGitsIdGetRequest struct { + ctx context.Context + ApiService *GitAPIService + id string +} + +func (r GitAPIApiGitsIdGetRequest) Execute() (*GitGitOutput, *http.Response, error) { + return r.ApiService.ApiGitsIdGetExecute(r) +} + +/* +ApiGitsIdGet Retrieves a Git resource. + +Retrieves a Git resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Git identifier + @return GitAPIApiGitsIdGetRequest +*/ +func (a *GitAPIService) ApiGitsIdGet(ctx context.Context, id string) GitAPIApiGitsIdGetRequest { + return GitAPIApiGitsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GitGitOutput +func (a *GitAPIService) ApiGitsIdGetExecute(r GitAPIApiGitsIdGetRequest) (*GitGitOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitGitOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitAPIService.ApiGitsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/gits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GitAPIApiGitsIdPatchRequest struct { + ctx context.Context + ApiService *GitAPIService + gitGitInput *GitGitInput + id string +} + +// The updated Git resource +func (r GitAPIApiGitsIdPatchRequest) GitGitInput(gitGitInput GitGitInput) GitAPIApiGitsIdPatchRequest { + r.gitGitInput = &gitGitInput + return r +} + +func (r GitAPIApiGitsIdPatchRequest) Execute() (*GitGitOutput, *http.Response, error) { + return r.ApiService.ApiGitsIdPatchExecute(r) +} + +/* +ApiGitsIdPatch Updates the Git resource. + +Updates the Git resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Git identifier + @return GitAPIApiGitsIdPatchRequest +*/ +func (a *GitAPIService) ApiGitsIdPatch(ctx context.Context, id string) GitAPIApiGitsIdPatchRequest { + return GitAPIApiGitsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GitGitOutput +func (a *GitAPIService) ApiGitsIdPatchExecute(r GitAPIApiGitsIdPatchRequest) (*GitGitOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitGitOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitAPIService.ApiGitsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/gits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gitGitInput == nil { + return localVarReturnValue, nil, reportError("gitGitInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gitGitInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GitAPIApiGitsIdPutRequest struct { + ctx context.Context + ApiService *GitAPIService + gitGitInput *GitGitInput + id string +} + +// The updated Git resource +func (r GitAPIApiGitsIdPutRequest) GitGitInput(gitGitInput GitGitInput) GitAPIApiGitsIdPutRequest { + r.gitGitInput = &gitGitInput + return r +} + +func (r GitAPIApiGitsIdPutRequest) Execute() (*GitGitOutput, *http.Response, error) { + return r.ApiService.ApiGitsIdPutExecute(r) +} + +/* +ApiGitsIdPut Replaces the Git resource. + +Replaces the Git resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Git identifier + @return GitAPIApiGitsIdPutRequest +*/ +func (a *GitAPIService) ApiGitsIdPut(ctx context.Context, id string) GitAPIApiGitsIdPutRequest { + return GitAPIApiGitsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GitGitOutput +func (a *GitAPIService) ApiGitsIdPutExecute(r GitAPIApiGitsIdPutRequest) (*GitGitOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitGitOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitAPIService.ApiGitsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/gits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gitGitInput == nil { + return localVarReturnValue, nil, reportError("gitGitInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gitGitInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GitAPIApiGitsPostRequest struct { + ctx context.Context + ApiService *GitAPIService + gitGitInput *GitGitInput +} + +// The new Git resource +func (r GitAPIApiGitsPostRequest) GitGitInput(gitGitInput GitGitInput) GitAPIApiGitsPostRequest { + r.gitGitInput = &gitGitInput + return r +} + +func (r GitAPIApiGitsPostRequest) Execute() (*GitGitOutput, *http.Response, error) { + return r.ApiService.ApiGitsPostExecute(r) +} + +/* +ApiGitsPost Creates a Git resource. + +Creates a Git resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GitAPIApiGitsPostRequest +*/ +func (a *GitAPIService) ApiGitsPost(ctx context.Context) GitAPIApiGitsPostRequest { + return GitAPIApiGitsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return GitGitOutput +func (a *GitAPIService) ApiGitsPostExecute(r GitAPIApiGitsPostRequest) (*GitGitOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitGitOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitAPIService.ApiGitsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/gits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gitGitInput == nil { + return localVarReturnValue, nil, reportError("gitGitInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gitGitInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_git_type.go b/pkg/api/rewardcloud/api_git_type.go new file mode 100644 index 0000000..6b18f9b --- /dev/null +++ b/pkg/api/rewardcloud/api_git_type.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// GitTypeAPIService GitTypeAPI service +type GitTypeAPIService service + +type GitTypeAPIApiGitTypesGetCollectionRequest struct { + ctx context.Context + ApiService *GitTypeAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r GitTypeAPIApiGitTypesGetCollectionRequest) Page(page int32) GitTypeAPIApiGitTypesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r GitTypeAPIApiGitTypesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) GitTypeAPIApiGitTypesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r GitTypeAPIApiGitTypesGetCollectionRequest) Execute() ([]GitType, *http.Response, error) { + return r.ApiService.ApiGitTypesGetCollectionExecute(r) +} + +/* +ApiGitTypesGetCollection Retrieves the collection of GitType resources. + +Retrieves the collection of GitType resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GitTypeAPIApiGitTypesGetCollectionRequest +*/ +func (a *GitTypeAPIService) ApiGitTypesGetCollection(ctx context.Context) GitTypeAPIApiGitTypesGetCollectionRequest { + return GitTypeAPIApiGitTypesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []GitType +func (a *GitTypeAPIService) ApiGitTypesGetCollectionExecute(r GitTypeAPIApiGitTypesGetCollectionRequest) ([]GitType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GitType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitTypeAPIService.ApiGitTypesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/git_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GitTypeAPIApiGitTypesIdDeleteRequest struct { + ctx context.Context + ApiService *GitTypeAPIService + id string +} + +func (r GitTypeAPIApiGitTypesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiGitTypesIdDeleteExecute(r) +} + +/* +ApiGitTypesIdDelete Removes the GitType resource. + +Removes the GitType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id GitType identifier + @return GitTypeAPIApiGitTypesIdDeleteRequest +*/ +func (a *GitTypeAPIService) ApiGitTypesIdDelete(ctx context.Context, id string) GitTypeAPIApiGitTypesIdDeleteRequest { + return GitTypeAPIApiGitTypesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *GitTypeAPIService) ApiGitTypesIdDeleteExecute(r GitTypeAPIApiGitTypesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitTypeAPIService.ApiGitTypesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/git_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type GitTypeAPIApiGitTypesIdGetRequest struct { + ctx context.Context + ApiService *GitTypeAPIService + id string +} + +func (r GitTypeAPIApiGitTypesIdGetRequest) Execute() (*GitType, *http.Response, error) { + return r.ApiService.ApiGitTypesIdGetExecute(r) +} + +/* +ApiGitTypesIdGet Retrieves a GitType resource. + +Retrieves a GitType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id GitType identifier + @return GitTypeAPIApiGitTypesIdGetRequest +*/ +func (a *GitTypeAPIService) ApiGitTypesIdGet(ctx context.Context, id string) GitTypeAPIApiGitTypesIdGetRequest { + return GitTypeAPIApiGitTypesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GitType +func (a *GitTypeAPIService) ApiGitTypesIdGetExecute(r GitTypeAPIApiGitTypesIdGetRequest) (*GitType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitTypeAPIService.ApiGitTypesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/git_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GitTypeAPIApiGitTypesIdPatchRequest struct { + ctx context.Context + ApiService *GitTypeAPIService + gitType *GitType + id string +} + +// The updated GitType resource +func (r GitTypeAPIApiGitTypesIdPatchRequest) GitType(gitType GitType) GitTypeAPIApiGitTypesIdPatchRequest { + r.gitType = &gitType + return r +} + +func (r GitTypeAPIApiGitTypesIdPatchRequest) Execute() (*GitType, *http.Response, error) { + return r.ApiService.ApiGitTypesIdPatchExecute(r) +} + +/* +ApiGitTypesIdPatch Updates the GitType resource. + +Updates the GitType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id GitType identifier + @return GitTypeAPIApiGitTypesIdPatchRequest +*/ +func (a *GitTypeAPIService) ApiGitTypesIdPatch(ctx context.Context, id string) GitTypeAPIApiGitTypesIdPatchRequest { + return GitTypeAPIApiGitTypesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GitType +func (a *GitTypeAPIService) ApiGitTypesIdPatchExecute(r GitTypeAPIApiGitTypesIdPatchRequest) (*GitType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitTypeAPIService.ApiGitTypesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/git_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gitType == nil { + return localVarReturnValue, nil, reportError("gitType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gitType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GitTypeAPIApiGitTypesIdPutRequest struct { + ctx context.Context + ApiService *GitTypeAPIService + gitType *GitType + id string +} + +// The updated GitType resource +func (r GitTypeAPIApiGitTypesIdPutRequest) GitType(gitType GitType) GitTypeAPIApiGitTypesIdPutRequest { + r.gitType = &gitType + return r +} + +func (r GitTypeAPIApiGitTypesIdPutRequest) Execute() (*GitType, *http.Response, error) { + return r.ApiService.ApiGitTypesIdPutExecute(r) +} + +/* +ApiGitTypesIdPut Replaces the GitType resource. + +Replaces the GitType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id GitType identifier + @return GitTypeAPIApiGitTypesIdPutRequest +*/ +func (a *GitTypeAPIService) ApiGitTypesIdPut(ctx context.Context, id string) GitTypeAPIApiGitTypesIdPutRequest { + return GitTypeAPIApiGitTypesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GitType +func (a *GitTypeAPIService) ApiGitTypesIdPutExecute(r GitTypeAPIApiGitTypesIdPutRequest) (*GitType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitTypeAPIService.ApiGitTypesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/git_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gitType == nil { + return localVarReturnValue, nil, reportError("gitType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gitType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GitTypeAPIApiGitTypesPostRequest struct { + ctx context.Context + ApiService *GitTypeAPIService + gitType *GitType +} + +// The new GitType resource +func (r GitTypeAPIApiGitTypesPostRequest) GitType(gitType GitType) GitTypeAPIApiGitTypesPostRequest { + r.gitType = &gitType + return r +} + +func (r GitTypeAPIApiGitTypesPostRequest) Execute() (*GitType, *http.Response, error) { + return r.ApiService.ApiGitTypesPostExecute(r) +} + +/* +ApiGitTypesPost Creates a GitType resource. + +Creates a GitType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GitTypeAPIApiGitTypesPostRequest +*/ +func (a *GitTypeAPIService) ApiGitTypesPost(ctx context.Context) GitTypeAPIApiGitTypesPostRequest { + return GitTypeAPIApiGitTypesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return GitType +func (a *GitTypeAPIService) ApiGitTypesPostExecute(r GitTypeAPIApiGitTypesPostRequest) (*GitType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GitTypeAPIService.ApiGitTypesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/git_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gitType == nil { + return localVarReturnValue, nil, reportError("gitType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gitType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_imported_data.go b/pkg/api/rewardcloud/api_imported_data.go new file mode 100644 index 0000000..01809e6 --- /dev/null +++ b/pkg/api/rewardcloud/api_imported_data.go @@ -0,0 +1,870 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ImportedDataAPIService ImportedDataAPI service +type ImportedDataAPIService service + +type ImportedDataAPIApiImportedDatasGetCollectionRequest struct { + ctx context.Context + ApiService *ImportedDataAPIService + page *int32 + itemsPerPage *int32 + environment *string + environment2 *[]string + dataTransferDataType *string + dataTransferDataType2 *[]string + state *string + state2 *[]string + orderCreatedAt *string + orderUpdatedAt *string +} + +// The collection page number +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) Page(page int32) ImportedDataAPIApiImportedDatasGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ImportedDataAPIApiImportedDatasGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) Environment(environment string) ImportedDataAPIApiImportedDatasGetCollectionRequest { + r.environment = &environment + return r +} + +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) Environment2(environment2 []string) ImportedDataAPIApiImportedDatasGetCollectionRequest { + r.environment2 = &environment2 + return r +} + +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) DataTransferDataType(dataTransferDataType string) ImportedDataAPIApiImportedDatasGetCollectionRequest { + r.dataTransferDataType = &dataTransferDataType + return r +} + +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) DataTransferDataType2(dataTransferDataType2 []string) ImportedDataAPIApiImportedDatasGetCollectionRequest { + r.dataTransferDataType2 = &dataTransferDataType2 + return r +} + +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) State(state string) ImportedDataAPIApiImportedDatasGetCollectionRequest { + r.state = &state + return r +} + +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) State2(state2 []string) ImportedDataAPIApiImportedDatasGetCollectionRequest { + r.state2 = &state2 + return r +} + +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) OrderCreatedAt(orderCreatedAt string) ImportedDataAPIApiImportedDatasGetCollectionRequest { + r.orderCreatedAt = &orderCreatedAt + return r +} + +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) OrderUpdatedAt(orderUpdatedAt string) ImportedDataAPIApiImportedDatasGetCollectionRequest { + r.orderUpdatedAt = &orderUpdatedAt + return r +} + +func (r ImportedDataAPIApiImportedDatasGetCollectionRequest) Execute() ([]ImportedData, *http.Response, error) { + return r.ApiService.ApiImportedDatasGetCollectionExecute(r) +} + +/* +ApiImportedDatasGetCollection Retrieves the collection of ImportedData resources. + +Retrieves the collection of ImportedData resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ImportedDataAPIApiImportedDatasGetCollectionRequest +*/ +func (a *ImportedDataAPIService) ApiImportedDatasGetCollection(ctx context.Context) ImportedDataAPIApiImportedDatasGetCollectionRequest { + return ImportedDataAPIApiImportedDatasGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ImportedData +func (a *ImportedDataAPIService) ApiImportedDatasGetCollectionExecute(r ImportedDataAPIApiImportedDatasGetCollectionRequest) ([]ImportedData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ImportedData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportedDataAPIService.ApiImportedDatasGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/imported_datas" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } + if r.environment2 != nil { + t := *r.environment2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment[]", t, "multi") + } + } + if r.dataTransferDataType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "dataTransferDataType", r.dataTransferDataType, "") + } + if r.dataTransferDataType2 != nil { + t := *r.dataTransferDataType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "dataTransferDataType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "dataTransferDataType[]", t, "multi") + } + } + if r.state != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "state", r.state, "") + } + if r.state2 != nil { + t := *r.state2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[]", t, "multi") + } + } + if r.orderCreatedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[createdAt]", r.orderCreatedAt, "") + } + if r.orderUpdatedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[updatedAt]", r.orderUpdatedAt, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ImportedDataAPIApiImportedDatasIdDeleteRequest struct { + ctx context.Context + ApiService *ImportedDataAPIService + id string +} + +func (r ImportedDataAPIApiImportedDatasIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiImportedDatasIdDeleteExecute(r) +} + +/* +ApiImportedDatasIdDelete Removes the ImportedData resource. + +Removes the ImportedData resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ImportedData identifier + @return ImportedDataAPIApiImportedDatasIdDeleteRequest +*/ +func (a *ImportedDataAPIService) ApiImportedDatasIdDelete(ctx context.Context, id string) ImportedDataAPIApiImportedDatasIdDeleteRequest { + return ImportedDataAPIApiImportedDatasIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ImportedDataAPIService) ApiImportedDatasIdDeleteExecute(r ImportedDataAPIApiImportedDatasIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportedDataAPIService.ApiImportedDatasIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/imported_datas/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ImportedDataAPIApiImportedDatasIdGetRequest struct { + ctx context.Context + ApiService *ImportedDataAPIService + id string +} + +func (r ImportedDataAPIApiImportedDatasIdGetRequest) Execute() (*ImportedData, *http.Response, error) { + return r.ApiService.ApiImportedDatasIdGetExecute(r) +} + +/* +ApiImportedDatasIdGet Retrieves a ImportedData resource. + +Retrieves a ImportedData resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ImportedData identifier + @return ImportedDataAPIApiImportedDatasIdGetRequest +*/ +func (a *ImportedDataAPIService) ApiImportedDatasIdGet(ctx context.Context, id string) ImportedDataAPIApiImportedDatasIdGetRequest { + return ImportedDataAPIApiImportedDatasIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ImportedData +func (a *ImportedDataAPIService) ApiImportedDatasIdGetExecute(r ImportedDataAPIApiImportedDatasIdGetRequest) (*ImportedData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ImportedData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportedDataAPIService.ApiImportedDatasIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/imported_datas/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ImportedDataAPIApiImportedDatasIdPatchRequest struct { + ctx context.Context + ApiService *ImportedDataAPIService + importedData *ImportedData + id string +} + +// The updated ImportedData resource +func (r ImportedDataAPIApiImportedDatasIdPatchRequest) ImportedData(importedData ImportedData) ImportedDataAPIApiImportedDatasIdPatchRequest { + r.importedData = &importedData + return r +} + +func (r ImportedDataAPIApiImportedDatasIdPatchRequest) Execute() (*ImportedData, *http.Response, error) { + return r.ApiService.ApiImportedDatasIdPatchExecute(r) +} + +/* +ApiImportedDatasIdPatch Updates the ImportedData resource. + +Updates the ImportedData resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ImportedData identifier + @return ImportedDataAPIApiImportedDatasIdPatchRequest +*/ +func (a *ImportedDataAPIService) ApiImportedDatasIdPatch(ctx context.Context, id string) ImportedDataAPIApiImportedDatasIdPatchRequest { + return ImportedDataAPIApiImportedDatasIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ImportedData +func (a *ImportedDataAPIService) ApiImportedDatasIdPatchExecute(r ImportedDataAPIApiImportedDatasIdPatchRequest) (*ImportedData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ImportedData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportedDataAPIService.ApiImportedDatasIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/imported_datas/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.importedData == nil { + return localVarReturnValue, nil, reportError("importedData is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.importedData + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ImportedDataAPIApiImportedDatasIdPutRequest struct { + ctx context.Context + ApiService *ImportedDataAPIService + importedData *ImportedData + id string +} + +// The updated ImportedData resource +func (r ImportedDataAPIApiImportedDatasIdPutRequest) ImportedData(importedData ImportedData) ImportedDataAPIApiImportedDatasIdPutRequest { + r.importedData = &importedData + return r +} + +func (r ImportedDataAPIApiImportedDatasIdPutRequest) Execute() (*ImportedData, *http.Response, error) { + return r.ApiService.ApiImportedDatasIdPutExecute(r) +} + +/* +ApiImportedDatasIdPut Replaces the ImportedData resource. + +Replaces the ImportedData resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ImportedData identifier + @return ImportedDataAPIApiImportedDatasIdPutRequest +*/ +func (a *ImportedDataAPIService) ApiImportedDatasIdPut(ctx context.Context, id string) ImportedDataAPIApiImportedDatasIdPutRequest { + return ImportedDataAPIApiImportedDatasIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ImportedData +func (a *ImportedDataAPIService) ApiImportedDatasIdPutExecute(r ImportedDataAPIApiImportedDatasIdPutRequest) (*ImportedData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ImportedData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportedDataAPIService.ApiImportedDatasIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/imported_datas/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.importedData == nil { + return localVarReturnValue, nil, reportError("importedData is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.importedData + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ImportedDataAPIApiImportedDatasPostRequest struct { + ctx context.Context + ApiService *ImportedDataAPIService + importedData *ImportedData +} + +// The new ImportedData resource +func (r ImportedDataAPIApiImportedDatasPostRequest) ImportedData(importedData ImportedData) ImportedDataAPIApiImportedDatasPostRequest { + r.importedData = &importedData + return r +} + +func (r ImportedDataAPIApiImportedDatasPostRequest) Execute() (*ImportedData, *http.Response, error) { + return r.ApiService.ApiImportedDatasPostExecute(r) +} + +/* +ApiImportedDatasPost Creates a ImportedData resource. + +Creates a ImportedData resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ImportedDataAPIApiImportedDatasPostRequest +*/ +func (a *ImportedDataAPIService) ApiImportedDatasPost(ctx context.Context) ImportedDataAPIApiImportedDatasPostRequest { + return ImportedDataAPIApiImportedDatasPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ImportedData +func (a *ImportedDataAPIService) ApiImportedDatasPostExecute(r ImportedDataAPIApiImportedDatasPostRequest) (*ImportedData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ImportedData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportedDataAPIService.ApiImportedDatasPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/imported_datas" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.importedData == nil { + return localVarReturnValue, nil, reportError("importedData is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.importedData + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_invitation.go b/pkg/api/rewardcloud/api_invitation.go new file mode 100644 index 0000000..3464dd3 --- /dev/null +++ b/pkg/api/rewardcloud/api_invitation.go @@ -0,0 +1,887 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// InvitationAPIService InvitationAPI service +type InvitationAPIService service + +type InvitationAPIApiInvitationsGetCollectionRequest struct { + ctx context.Context + ApiService *InvitationAPIService + page *int32 + itemsPerPage *int32 + id *int32 + id2 *[]int32 + user *string + user2 *[]string + team *string + team2 *[]string + state *bool + state2 *[]bool + orderUpdatedAt *string +} + +// The collection page number +func (r InvitationAPIApiInvitationsGetCollectionRequest) Page(page int32) InvitationAPIApiInvitationsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r InvitationAPIApiInvitationsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) InvitationAPIApiInvitationsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r InvitationAPIApiInvitationsGetCollectionRequest) Id(id int32) InvitationAPIApiInvitationsGetCollectionRequest { + r.id = &id + return r +} + +func (r InvitationAPIApiInvitationsGetCollectionRequest) Id2(id2 []int32) InvitationAPIApiInvitationsGetCollectionRequest { + r.id2 = &id2 + return r +} + +func (r InvitationAPIApiInvitationsGetCollectionRequest) User(user string) InvitationAPIApiInvitationsGetCollectionRequest { + r.user = &user + return r +} + +func (r InvitationAPIApiInvitationsGetCollectionRequest) User2(user2 []string) InvitationAPIApiInvitationsGetCollectionRequest { + r.user2 = &user2 + return r +} + +func (r InvitationAPIApiInvitationsGetCollectionRequest) Team(team string) InvitationAPIApiInvitationsGetCollectionRequest { + r.team = &team + return r +} + +func (r InvitationAPIApiInvitationsGetCollectionRequest) Team2(team2 []string) InvitationAPIApiInvitationsGetCollectionRequest { + r.team2 = &team2 + return r +} + +func (r InvitationAPIApiInvitationsGetCollectionRequest) State(state bool) InvitationAPIApiInvitationsGetCollectionRequest { + r.state = &state + return r +} + +func (r InvitationAPIApiInvitationsGetCollectionRequest) State2(state2 []bool) InvitationAPIApiInvitationsGetCollectionRequest { + r.state2 = &state2 + return r +} + +func (r InvitationAPIApiInvitationsGetCollectionRequest) OrderUpdatedAt(orderUpdatedAt string) InvitationAPIApiInvitationsGetCollectionRequest { + r.orderUpdatedAt = &orderUpdatedAt + return r +} + +func (r InvitationAPIApiInvitationsGetCollectionRequest) Execute() ([]InvitationInvitationOutput, *http.Response, error) { + return r.ApiService.ApiInvitationsGetCollectionExecute(r) +} + +/* +ApiInvitationsGetCollection Retrieves the collection of Invitation resources. + +Retrieves the collection of Invitation resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return InvitationAPIApiInvitationsGetCollectionRequest +*/ +func (a *InvitationAPIService) ApiInvitationsGetCollection(ctx context.Context) InvitationAPIApiInvitationsGetCollectionRequest { + return InvitationAPIApiInvitationsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []InvitationInvitationOutput +func (a *InvitationAPIService) ApiInvitationsGetCollectionExecute(r InvitationAPIApiInvitationsGetCollectionRequest) ([]InvitationInvitationOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []InvitationInvitationOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InvitationAPIService.ApiInvitationsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/invitations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + } + if r.id2 != nil { + t := *r.id2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", t, "multi") + } + } + if r.user != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "") + } + if r.user2 != nil { + t := *r.user2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "user[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "user[]", t, "multi") + } + } + if r.team != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "team", r.team, "") + } + if r.team2 != nil { + t := *r.team2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "team[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "team[]", t, "multi") + } + } + if r.state != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "state", r.state, "") + } + if r.state2 != nil { + t := *r.state2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[]", t, "multi") + } + } + if r.orderUpdatedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[updatedAt]", r.orderUpdatedAt, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type InvitationAPIApiInvitationsIdDeleteRequest struct { + ctx context.Context + ApiService *InvitationAPIService + id string +} + +func (r InvitationAPIApiInvitationsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiInvitationsIdDeleteExecute(r) +} + +/* +ApiInvitationsIdDelete Removes the Invitation resource. + +Removes the Invitation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Invitation identifier + @return InvitationAPIApiInvitationsIdDeleteRequest +*/ +func (a *InvitationAPIService) ApiInvitationsIdDelete(ctx context.Context, id string) InvitationAPIApiInvitationsIdDeleteRequest { + return InvitationAPIApiInvitationsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *InvitationAPIService) ApiInvitationsIdDeleteExecute(r InvitationAPIApiInvitationsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InvitationAPIService.ApiInvitationsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/invitations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type InvitationAPIApiInvitationsIdGetRequest struct { + ctx context.Context + ApiService *InvitationAPIService + id string +} + +func (r InvitationAPIApiInvitationsIdGetRequest) Execute() (*InvitationInvitationOutput, *http.Response, error) { + return r.ApiService.ApiInvitationsIdGetExecute(r) +} + +/* +ApiInvitationsIdGet Retrieves a Invitation resource. + +Retrieves a Invitation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Invitation identifier + @return InvitationAPIApiInvitationsIdGetRequest +*/ +func (a *InvitationAPIService) ApiInvitationsIdGet(ctx context.Context, id string) InvitationAPIApiInvitationsIdGetRequest { + return InvitationAPIApiInvitationsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return InvitationInvitationOutput +func (a *InvitationAPIService) ApiInvitationsIdGetExecute(r InvitationAPIApiInvitationsIdGetRequest) (*InvitationInvitationOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InvitationInvitationOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InvitationAPIService.ApiInvitationsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/invitations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type InvitationAPIApiInvitationsIdPatchRequest struct { + ctx context.Context + ApiService *InvitationAPIService + invitationInvitationInput *InvitationInvitationInput + id string +} + +// The updated Invitation resource +func (r InvitationAPIApiInvitationsIdPatchRequest) InvitationInvitationInput(invitationInvitationInput InvitationInvitationInput) InvitationAPIApiInvitationsIdPatchRequest { + r.invitationInvitationInput = &invitationInvitationInput + return r +} + +func (r InvitationAPIApiInvitationsIdPatchRequest) Execute() (*InvitationInvitationOutput, *http.Response, error) { + return r.ApiService.ApiInvitationsIdPatchExecute(r) +} + +/* +ApiInvitationsIdPatch Updates the Invitation resource. + +Updates the Invitation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Invitation identifier + @return InvitationAPIApiInvitationsIdPatchRequest +*/ +func (a *InvitationAPIService) ApiInvitationsIdPatch(ctx context.Context, id string) InvitationAPIApiInvitationsIdPatchRequest { + return InvitationAPIApiInvitationsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return InvitationInvitationOutput +func (a *InvitationAPIService) ApiInvitationsIdPatchExecute(r InvitationAPIApiInvitationsIdPatchRequest) (*InvitationInvitationOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InvitationInvitationOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InvitationAPIService.ApiInvitationsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/invitations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.invitationInvitationInput == nil { + return localVarReturnValue, nil, reportError("invitationInvitationInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.invitationInvitationInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type InvitationAPIApiInvitationsIdPutRequest struct { + ctx context.Context + ApiService *InvitationAPIService + invitationInvitationInput *InvitationInvitationInput + id string +} + +// The updated Invitation resource +func (r InvitationAPIApiInvitationsIdPutRequest) InvitationInvitationInput(invitationInvitationInput InvitationInvitationInput) InvitationAPIApiInvitationsIdPutRequest { + r.invitationInvitationInput = &invitationInvitationInput + return r +} + +func (r InvitationAPIApiInvitationsIdPutRequest) Execute() (*InvitationInvitationOutput, *http.Response, error) { + return r.ApiService.ApiInvitationsIdPutExecute(r) +} + +/* +ApiInvitationsIdPut Replaces the Invitation resource. + +Replaces the Invitation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Invitation identifier + @return InvitationAPIApiInvitationsIdPutRequest +*/ +func (a *InvitationAPIService) ApiInvitationsIdPut(ctx context.Context, id string) InvitationAPIApiInvitationsIdPutRequest { + return InvitationAPIApiInvitationsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return InvitationInvitationOutput +func (a *InvitationAPIService) ApiInvitationsIdPutExecute(r InvitationAPIApiInvitationsIdPutRequest) (*InvitationInvitationOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InvitationInvitationOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InvitationAPIService.ApiInvitationsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/invitations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.invitationInvitationInput == nil { + return localVarReturnValue, nil, reportError("invitationInvitationInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.invitationInvitationInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type InvitationAPIApiInvitationsPostRequest struct { + ctx context.Context + ApiService *InvitationAPIService + invitationInvitationInput *InvitationInvitationInput +} + +// The new Invitation resource +func (r InvitationAPIApiInvitationsPostRequest) InvitationInvitationInput(invitationInvitationInput InvitationInvitationInput) InvitationAPIApiInvitationsPostRequest { + r.invitationInvitationInput = &invitationInvitationInput + return r +} + +func (r InvitationAPIApiInvitationsPostRequest) Execute() (*InvitationInvitationOutput, *http.Response, error) { + return r.ApiService.ApiInvitationsPostExecute(r) +} + +/* +ApiInvitationsPost Creates a Invitation resource. + +Creates a Invitation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return InvitationAPIApiInvitationsPostRequest +*/ +func (a *InvitationAPIService) ApiInvitationsPost(ctx context.Context) InvitationAPIApiInvitationsPostRequest { + return InvitationAPIApiInvitationsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return InvitationInvitationOutput +func (a *InvitationAPIService) ApiInvitationsPostExecute(r InvitationAPIApiInvitationsPostRequest) (*InvitationInvitationOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InvitationInvitationOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InvitationAPIService.ApiInvitationsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/invitations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.invitationInvitationInput == nil { + return localVarReturnValue, nil, reportError("invitationInvitationInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.invitationInvitationInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_miscellaneous.go b/pkg/api/rewardcloud/api_miscellaneous.go new file mode 100644 index 0000000..d6ebfd6 --- /dev/null +++ b/pkg/api/rewardcloud/api_miscellaneous.go @@ -0,0 +1,240 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + +// MiscellaneousAPIService MiscellaneousAPI service +type MiscellaneousAPIService service + +type MiscellaneousAPIPostCredentialsItemRequest struct { + ctx context.Context + ApiService *MiscellaneousAPIService + authenticationCredentials *AuthenticationCredentials +} + +// Generate new JWT Token +func (r MiscellaneousAPIPostCredentialsItemRequest) AuthenticationCredentials(authenticationCredentials AuthenticationCredentials) MiscellaneousAPIPostCredentialsItemRequest { + r.authenticationCredentials = &authenticationCredentials + return r +} + +func (r MiscellaneousAPIPostCredentialsItemRequest) Execute() (*AuthenticationToken, *http.Response, error) { + return r.ApiService.PostCredentialsItemExecute(r) +} + +/* +PostCredentialsItem Get JWT token to login. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return MiscellaneousAPIPostCredentialsItemRequest +*/ +func (a *MiscellaneousAPIService) PostCredentialsItem(ctx context.Context) MiscellaneousAPIPostCredentialsItemRequest { + return MiscellaneousAPIPostCredentialsItemRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return AuthenticationToken +func (a *MiscellaneousAPIService) PostCredentialsItemExecute(r MiscellaneousAPIPostCredentialsItemRequest) (*AuthenticationToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AuthenticationToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MiscellaneousAPIService.PostCredentialsItem") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/authentication_token" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.authenticationCredentials + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type MiscellaneousAPIPostValidateEnvVarRequest struct { + ctx context.Context + ApiService *MiscellaneousAPIService + validateEnvVarRequest *ValidateEnvVarRequest +} + +// Let the system to check a word to validate by definition(s). Both are REQUIRED! +func (r MiscellaneousAPIPostValidateEnvVarRequest) ValidateEnvVarRequest(validateEnvVarRequest ValidateEnvVarRequest) MiscellaneousAPIPostValidateEnvVarRequest { + r.validateEnvVarRequest = &validateEnvVarRequest + return r +} + +func (r MiscellaneousAPIPostValidateEnvVarRequest) Execute() (*ValidateEnvVarResponse, *http.Response, error) { + return r.ApiService.PostValidateEnvVarExecute(r) +} + +/* +PostValidateEnvVar It checks the validation of an environment variable definition + +It will check a any EnvVar's definition validation by this entity. The entity can contain + + more than one validation. Then it will test all of them and reply w/ their messages. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return MiscellaneousAPIPostValidateEnvVarRequest +*/ +func (a *MiscellaneousAPIService) PostValidateEnvVar(ctx context.Context) MiscellaneousAPIPostValidateEnvVarRequest { + return MiscellaneousAPIPostValidateEnvVarRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ValidateEnvVarResponse +func (a *MiscellaneousAPIService) PostValidateEnvVarExecute(r MiscellaneousAPIPostValidateEnvVarRequest) (*ValidateEnvVarResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ValidateEnvVarResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MiscellaneousAPIService.PostValidateEnvVar") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/env_var_validation" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.validateEnvVarRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_organisation.go b/pkg/api/rewardcloud/api_organisation.go new file mode 100644 index 0000000..32997eb --- /dev/null +++ b/pkg/api/rewardcloud/api_organisation.go @@ -0,0 +1,852 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// OrganisationAPIService OrganisationAPI service +type OrganisationAPIService service + +type OrganisationAPIApiOrganisationsGetCollectionRequest struct { + ctx context.Context + ApiService *OrganisationAPIService + page *int32 + itemsPerPage *int32 + name *string + name2 *[]string + stateByInfra *string + stateByInfra2 *[]string + team *string + team2 *[]string +} + +// The collection page number +func (r OrganisationAPIApiOrganisationsGetCollectionRequest) Page(page int32) OrganisationAPIApiOrganisationsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r OrganisationAPIApiOrganisationsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) OrganisationAPIApiOrganisationsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r OrganisationAPIApiOrganisationsGetCollectionRequest) Name(name string) OrganisationAPIApiOrganisationsGetCollectionRequest { + r.name = &name + return r +} + +func (r OrganisationAPIApiOrganisationsGetCollectionRequest) Name2(name2 []string) OrganisationAPIApiOrganisationsGetCollectionRequest { + r.name2 = &name2 + return r +} + +func (r OrganisationAPIApiOrganisationsGetCollectionRequest) StateByInfra(stateByInfra string) OrganisationAPIApiOrganisationsGetCollectionRequest { + r.stateByInfra = &stateByInfra + return r +} + +func (r OrganisationAPIApiOrganisationsGetCollectionRequest) StateByInfra2(stateByInfra2 []string) OrganisationAPIApiOrganisationsGetCollectionRequest { + r.stateByInfra2 = &stateByInfra2 + return r +} + +func (r OrganisationAPIApiOrganisationsGetCollectionRequest) Team(team string) OrganisationAPIApiOrganisationsGetCollectionRequest { + r.team = &team + return r +} + +func (r OrganisationAPIApiOrganisationsGetCollectionRequest) Team2(team2 []string) OrganisationAPIApiOrganisationsGetCollectionRequest { + r.team2 = &team2 + return r +} + +func (r OrganisationAPIApiOrganisationsGetCollectionRequest) Execute() ([]OrganisationOrganisationOutput, *http.Response, error) { + return r.ApiService.ApiOrganisationsGetCollectionExecute(r) +} + +/* +ApiOrganisationsGetCollection Retrieves the collection of Organisation resources. + +Retrieves the collection of Organisation resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OrganisationAPIApiOrganisationsGetCollectionRequest +*/ +func (a *OrganisationAPIService) ApiOrganisationsGetCollection(ctx context.Context) OrganisationAPIApiOrganisationsGetCollectionRequest { + return OrganisationAPIApiOrganisationsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []OrganisationOrganisationOutput +func (a *OrganisationAPIService) ApiOrganisationsGetCollectionExecute(r OrganisationAPIApiOrganisationsGetCollectionRequest) ([]OrganisationOrganisationOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []OrganisationOrganisationOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationAPIService.ApiOrganisationsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.name2 != nil { + t := *r.name2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "name[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "name[]", t, "multi") + } + } + if r.stateByInfra != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra", r.stateByInfra, "") + } + if r.stateByInfra2 != nil { + t := *r.stateByInfra2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra[]", t, "multi") + } + } + if r.team != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "team", r.team, "") + } + if r.team2 != nil { + t := *r.team2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "team[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "team[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OrganisationAPIApiOrganisationsIdDeleteRequest struct { + ctx context.Context + ApiService *OrganisationAPIService + id string +} + +func (r OrganisationAPIApiOrganisationsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiOrganisationsIdDeleteExecute(r) +} + +/* +ApiOrganisationsIdDelete Removes the Organisation resource. + +Removes the Organisation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Organisation identifier + @return OrganisationAPIApiOrganisationsIdDeleteRequest +*/ +func (a *OrganisationAPIService) ApiOrganisationsIdDelete(ctx context.Context, id string) OrganisationAPIApiOrganisationsIdDeleteRequest { + return OrganisationAPIApiOrganisationsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *OrganisationAPIService) ApiOrganisationsIdDeleteExecute(r OrganisationAPIApiOrganisationsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationAPIService.ApiOrganisationsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OrganisationAPIApiOrganisationsIdGetRequest struct { + ctx context.Context + ApiService *OrganisationAPIService + id string +} + +func (r OrganisationAPIApiOrganisationsIdGetRequest) Execute() (*OrganisationOrganisationOutput, *http.Response, error) { + return r.ApiService.ApiOrganisationsIdGetExecute(r) +} + +/* +ApiOrganisationsIdGet Retrieves a Organisation resource. + +Retrieves a Organisation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Organisation identifier + @return OrganisationAPIApiOrganisationsIdGetRequest +*/ +func (a *OrganisationAPIService) ApiOrganisationsIdGet(ctx context.Context, id string) OrganisationAPIApiOrganisationsIdGetRequest { + return OrganisationAPIApiOrganisationsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return OrganisationOrganisationOutput +func (a *OrganisationAPIService) ApiOrganisationsIdGetExecute(r OrganisationAPIApiOrganisationsIdGetRequest) (*OrganisationOrganisationOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganisationOrganisationOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationAPIService.ApiOrganisationsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OrganisationAPIApiOrganisationsIdPatchRequest struct { + ctx context.Context + ApiService *OrganisationAPIService + organisationOrganisationInput *OrganisationOrganisationInput + id string +} + +// The updated Organisation resource +func (r OrganisationAPIApiOrganisationsIdPatchRequest) OrganisationOrganisationInput(organisationOrganisationInput OrganisationOrganisationInput) OrganisationAPIApiOrganisationsIdPatchRequest { + r.organisationOrganisationInput = &organisationOrganisationInput + return r +} + +func (r OrganisationAPIApiOrganisationsIdPatchRequest) Execute() (*OrganisationOrganisationOutput, *http.Response, error) { + return r.ApiService.ApiOrganisationsIdPatchExecute(r) +} + +/* +ApiOrganisationsIdPatch Updates the Organisation resource. + +Updates the Organisation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Organisation identifier + @return OrganisationAPIApiOrganisationsIdPatchRequest +*/ +func (a *OrganisationAPIService) ApiOrganisationsIdPatch(ctx context.Context, id string) OrganisationAPIApiOrganisationsIdPatchRequest { + return OrganisationAPIApiOrganisationsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return OrganisationOrganisationOutput +func (a *OrganisationAPIService) ApiOrganisationsIdPatchExecute(r OrganisationAPIApiOrganisationsIdPatchRequest) (*OrganisationOrganisationOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganisationOrganisationOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationAPIService.ApiOrganisationsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.organisationOrganisationInput == nil { + return localVarReturnValue, nil, reportError("organisationOrganisationInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.organisationOrganisationInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OrganisationAPIApiOrganisationsIdPutRequest struct { + ctx context.Context + ApiService *OrganisationAPIService + organisationOrganisationInput *OrganisationOrganisationInput + id string +} + +// The updated Organisation resource +func (r OrganisationAPIApiOrganisationsIdPutRequest) OrganisationOrganisationInput(organisationOrganisationInput OrganisationOrganisationInput) OrganisationAPIApiOrganisationsIdPutRequest { + r.organisationOrganisationInput = &organisationOrganisationInput + return r +} + +func (r OrganisationAPIApiOrganisationsIdPutRequest) Execute() (*OrganisationOrganisationOutput, *http.Response, error) { + return r.ApiService.ApiOrganisationsIdPutExecute(r) +} + +/* +ApiOrganisationsIdPut Replaces the Organisation resource. + +Replaces the Organisation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Organisation identifier + @return OrganisationAPIApiOrganisationsIdPutRequest +*/ +func (a *OrganisationAPIService) ApiOrganisationsIdPut(ctx context.Context, id string) OrganisationAPIApiOrganisationsIdPutRequest { + return OrganisationAPIApiOrganisationsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return OrganisationOrganisationOutput +func (a *OrganisationAPIService) ApiOrganisationsIdPutExecute(r OrganisationAPIApiOrganisationsIdPutRequest) (*OrganisationOrganisationOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganisationOrganisationOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationAPIService.ApiOrganisationsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.organisationOrganisationInput == nil { + return localVarReturnValue, nil, reportError("organisationOrganisationInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.organisationOrganisationInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OrganisationAPIApiOrganisationsPostRequest struct { + ctx context.Context + ApiService *OrganisationAPIService + organisationOrganisationInput *OrganisationOrganisationInput +} + +// The new Organisation resource +func (r OrganisationAPIApiOrganisationsPostRequest) OrganisationOrganisationInput(organisationOrganisationInput OrganisationOrganisationInput) OrganisationAPIApiOrganisationsPostRequest { + r.organisationOrganisationInput = &organisationOrganisationInput + return r +} + +func (r OrganisationAPIApiOrganisationsPostRequest) Execute() (*OrganisationOrganisationOutput, *http.Response, error) { + return r.ApiService.ApiOrganisationsPostExecute(r) +} + +/* +ApiOrganisationsPost Creates a Organisation resource. + +Creates a Organisation resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OrganisationAPIApiOrganisationsPostRequest +*/ +func (a *OrganisationAPIService) ApiOrganisationsPost(ctx context.Context) OrganisationAPIApiOrganisationsPostRequest { + return OrganisationAPIApiOrganisationsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return OrganisationOrganisationOutput +func (a *OrganisationAPIService) ApiOrganisationsPostExecute(r OrganisationAPIApiOrganisationsPostRequest) (*OrganisationOrganisationOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganisationOrganisationOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationAPIService.ApiOrganisationsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.organisationOrganisationInput == nil { + return localVarReturnValue, nil, reportError("organisationOrganisationInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.organisationOrganisationInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_organisation_env_var.go b/pkg/api/rewardcloud/api_organisation_env_var.go new file mode 100644 index 0000000..83d2838 --- /dev/null +++ b/pkg/api/rewardcloud/api_organisation_env_var.go @@ -0,0 +1,826 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// OrganisationEnvVarAPIService OrganisationEnvVarAPI service +type OrganisationEnvVarAPIService service + +type OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest struct { + ctx context.Context + ApiService *OrganisationEnvVarAPIService + page *int32 + itemsPerPage *int32 + organisation *string + organisation2 *[]string + envVarType *string + envVarType2 *[]string +} + +// The collection page number +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest) Page(page int32) OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest) Organisation(organisation string) OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest { + r.organisation = &organisation + return r +} + +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest) Organisation2(organisation2 []string) OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest { + r.organisation2 = &organisation2 + return r +} + +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest) EnvVarType(envVarType string) OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest { + r.envVarType = &envVarType + return r +} + +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest) EnvVarType2(envVarType2 []string) OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest { + r.envVarType2 = &envVarType2 + return r +} + +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest) Execute() ([]OrganisationEnvVar, *http.Response, error) { + return r.ApiService.ApiOrganisationEnvVarsGetCollectionExecute(r) +} + +/* +ApiOrganisationEnvVarsGetCollection Retrieves the collection of OrganisationEnvVar resources. + +Retrieves the collection of OrganisationEnvVar resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest +*/ +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsGetCollection(ctx context.Context) OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest { + return OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []OrganisationEnvVar +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsGetCollectionExecute(r OrganisationEnvVarAPIApiOrganisationEnvVarsGetCollectionRequest) ([]OrganisationEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []OrganisationEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationEnvVarAPIService.ApiOrganisationEnvVarsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisation_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.organisation != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "organisation", r.organisation, "") + } + if r.organisation2 != nil { + t := *r.organisation2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "organisation[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "organisation[]", t, "multi") + } + } + if r.envVarType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType", r.envVarType, "") + } + if r.envVarType2 != nil { + t := *r.envVarType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OrganisationEnvVarAPIApiOrganisationEnvVarsIdDeleteRequest struct { + ctx context.Context + ApiService *OrganisationEnvVarAPIService + id string +} + +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiOrganisationEnvVarsIdDeleteExecute(r) +} + +/* +ApiOrganisationEnvVarsIdDelete Removes the OrganisationEnvVar resource. + +Removes the OrganisationEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id OrganisationEnvVar identifier + @return OrganisationEnvVarAPIApiOrganisationEnvVarsIdDeleteRequest +*/ +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsIdDelete(ctx context.Context, id string) OrganisationEnvVarAPIApiOrganisationEnvVarsIdDeleteRequest { + return OrganisationEnvVarAPIApiOrganisationEnvVarsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsIdDeleteExecute(r OrganisationEnvVarAPIApiOrganisationEnvVarsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationEnvVarAPIService.ApiOrganisationEnvVarsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisation_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OrganisationEnvVarAPIApiOrganisationEnvVarsIdGetRequest struct { + ctx context.Context + ApiService *OrganisationEnvVarAPIService + id string +} + +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsIdGetRequest) Execute() (*OrganisationEnvVar, *http.Response, error) { + return r.ApiService.ApiOrganisationEnvVarsIdGetExecute(r) +} + +/* +ApiOrganisationEnvVarsIdGet Retrieves a OrganisationEnvVar resource. + +Retrieves a OrganisationEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id OrganisationEnvVar identifier + @return OrganisationEnvVarAPIApiOrganisationEnvVarsIdGetRequest +*/ +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsIdGet(ctx context.Context, id string) OrganisationEnvVarAPIApiOrganisationEnvVarsIdGetRequest { + return OrganisationEnvVarAPIApiOrganisationEnvVarsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return OrganisationEnvVar +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsIdGetExecute(r OrganisationEnvVarAPIApiOrganisationEnvVarsIdGetRequest) (*OrganisationEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganisationEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationEnvVarAPIService.ApiOrganisationEnvVarsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisation_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OrganisationEnvVarAPIApiOrganisationEnvVarsIdPatchRequest struct { + ctx context.Context + ApiService *OrganisationEnvVarAPIService + organisationEnvVar *OrganisationEnvVar + id string +} + +// The updated OrganisationEnvVar resource +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsIdPatchRequest) OrganisationEnvVar(organisationEnvVar OrganisationEnvVar) OrganisationEnvVarAPIApiOrganisationEnvVarsIdPatchRequest { + r.organisationEnvVar = &organisationEnvVar + return r +} + +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsIdPatchRequest) Execute() (*OrganisationEnvVar, *http.Response, error) { + return r.ApiService.ApiOrganisationEnvVarsIdPatchExecute(r) +} + +/* +ApiOrganisationEnvVarsIdPatch Updates the OrganisationEnvVar resource. + +Updates the OrganisationEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id OrganisationEnvVar identifier + @return OrganisationEnvVarAPIApiOrganisationEnvVarsIdPatchRequest +*/ +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsIdPatch(ctx context.Context, id string) OrganisationEnvVarAPIApiOrganisationEnvVarsIdPatchRequest { + return OrganisationEnvVarAPIApiOrganisationEnvVarsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return OrganisationEnvVar +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsIdPatchExecute(r OrganisationEnvVarAPIApiOrganisationEnvVarsIdPatchRequest) (*OrganisationEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganisationEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationEnvVarAPIService.ApiOrganisationEnvVarsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisation_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.organisationEnvVar == nil { + return localVarReturnValue, nil, reportError("organisationEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.organisationEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OrganisationEnvVarAPIApiOrganisationEnvVarsIdPutRequest struct { + ctx context.Context + ApiService *OrganisationEnvVarAPIService + organisationEnvVar *OrganisationEnvVar + id string +} + +// The updated OrganisationEnvVar resource +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsIdPutRequest) OrganisationEnvVar(organisationEnvVar OrganisationEnvVar) OrganisationEnvVarAPIApiOrganisationEnvVarsIdPutRequest { + r.organisationEnvVar = &organisationEnvVar + return r +} + +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsIdPutRequest) Execute() (*OrganisationEnvVar, *http.Response, error) { + return r.ApiService.ApiOrganisationEnvVarsIdPutExecute(r) +} + +/* +ApiOrganisationEnvVarsIdPut Replaces the OrganisationEnvVar resource. + +Replaces the OrganisationEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id OrganisationEnvVar identifier + @return OrganisationEnvVarAPIApiOrganisationEnvVarsIdPutRequest +*/ +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsIdPut(ctx context.Context, id string) OrganisationEnvVarAPIApiOrganisationEnvVarsIdPutRequest { + return OrganisationEnvVarAPIApiOrganisationEnvVarsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return OrganisationEnvVar +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsIdPutExecute(r OrganisationEnvVarAPIApiOrganisationEnvVarsIdPutRequest) (*OrganisationEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganisationEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationEnvVarAPIService.ApiOrganisationEnvVarsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisation_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.organisationEnvVar == nil { + return localVarReturnValue, nil, reportError("organisationEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.organisationEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OrganisationEnvVarAPIApiOrganisationEnvVarsPostRequest struct { + ctx context.Context + ApiService *OrganisationEnvVarAPIService + organisationEnvVar *OrganisationEnvVar +} + +// The new OrganisationEnvVar resource +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsPostRequest) OrganisationEnvVar(organisationEnvVar OrganisationEnvVar) OrganisationEnvVarAPIApiOrganisationEnvVarsPostRequest { + r.organisationEnvVar = &organisationEnvVar + return r +} + +func (r OrganisationEnvVarAPIApiOrganisationEnvVarsPostRequest) Execute() (*OrganisationEnvVar, *http.Response, error) { + return r.ApiService.ApiOrganisationEnvVarsPostExecute(r) +} + +/* +ApiOrganisationEnvVarsPost Creates a OrganisationEnvVar resource. + +Creates a OrganisationEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OrganisationEnvVarAPIApiOrganisationEnvVarsPostRequest +*/ +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsPost(ctx context.Context) OrganisationEnvVarAPIApiOrganisationEnvVarsPostRequest { + return OrganisationEnvVarAPIApiOrganisationEnvVarsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return OrganisationEnvVar +func (a *OrganisationEnvVarAPIService) ApiOrganisationEnvVarsPostExecute(r OrganisationEnvVarAPIApiOrganisationEnvVarsPostRequest) (*OrganisationEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganisationEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganisationEnvVarAPIService.ApiOrganisationEnvVarsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/organisation_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.organisationEnvVar == nil { + return localVarReturnValue, nil, reportError("organisationEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.organisationEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_price.go b/pkg/api/rewardcloud/api_price.go new file mode 100644 index 0000000..bf12c1a --- /dev/null +++ b/pkg/api/rewardcloud/api_price.go @@ -0,0 +1,800 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// PriceAPIService PriceAPI service +type PriceAPIService service + +type PriceAPIApiPricesGetCollectionRequest struct { + ctx context.Context + ApiService *PriceAPIService + page *int32 + itemsPerPage *int32 + product *string + product2 *[]string +} + +// The collection page number +func (r PriceAPIApiPricesGetCollectionRequest) Page(page int32) PriceAPIApiPricesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r PriceAPIApiPricesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) PriceAPIApiPricesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r PriceAPIApiPricesGetCollectionRequest) Product(product string) PriceAPIApiPricesGetCollectionRequest { + r.product = &product + return r +} + +func (r PriceAPIApiPricesGetCollectionRequest) Product2(product2 []string) PriceAPIApiPricesGetCollectionRequest { + r.product2 = &product2 + return r +} + +func (r PriceAPIApiPricesGetCollectionRequest) Execute() ([]Price, *http.Response, error) { + return r.ApiService.ApiPricesGetCollectionExecute(r) +} + +/* +ApiPricesGetCollection Retrieves the collection of Price resources. + +Retrieves the collection of Price resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PriceAPIApiPricesGetCollectionRequest +*/ +func (a *PriceAPIService) ApiPricesGetCollection(ctx context.Context) PriceAPIApiPricesGetCollectionRequest { + return PriceAPIApiPricesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []Price +func (a *PriceAPIService) ApiPricesGetCollectionExecute(r PriceAPIApiPricesGetCollectionRequest) ([]Price, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Price + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PriceAPIService.ApiPricesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/prices" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.product != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "product", r.product, "") + } + if r.product2 != nil { + t := *r.product2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "product[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "product[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PriceAPIApiPricesIdDeleteRequest struct { + ctx context.Context + ApiService *PriceAPIService + id string +} + +func (r PriceAPIApiPricesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiPricesIdDeleteExecute(r) +} + +/* +ApiPricesIdDelete Removes the Price resource. + +Removes the Price resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Price identifier + @return PriceAPIApiPricesIdDeleteRequest +*/ +func (a *PriceAPIService) ApiPricesIdDelete(ctx context.Context, id string) PriceAPIApiPricesIdDeleteRequest { + return PriceAPIApiPricesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *PriceAPIService) ApiPricesIdDeleteExecute(r PriceAPIApiPricesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PriceAPIService.ApiPricesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/prices/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PriceAPIApiPricesIdGetRequest struct { + ctx context.Context + ApiService *PriceAPIService + id string +} + +func (r PriceAPIApiPricesIdGetRequest) Execute() (*Price, *http.Response, error) { + return r.ApiService.ApiPricesIdGetExecute(r) +} + +/* +ApiPricesIdGet Retrieves a Price resource. + +Retrieves a Price resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Price identifier + @return PriceAPIApiPricesIdGetRequest +*/ +func (a *PriceAPIService) ApiPricesIdGet(ctx context.Context, id string) PriceAPIApiPricesIdGetRequest { + return PriceAPIApiPricesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Price +func (a *PriceAPIService) ApiPricesIdGetExecute(r PriceAPIApiPricesIdGetRequest) (*Price, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Price + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PriceAPIService.ApiPricesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/prices/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PriceAPIApiPricesIdPatchRequest struct { + ctx context.Context + ApiService *PriceAPIService + price *Price + id string +} + +// The updated Price resource +func (r PriceAPIApiPricesIdPatchRequest) Price(price Price) PriceAPIApiPricesIdPatchRequest { + r.price = &price + return r +} + +func (r PriceAPIApiPricesIdPatchRequest) Execute() (*Price, *http.Response, error) { + return r.ApiService.ApiPricesIdPatchExecute(r) +} + +/* +ApiPricesIdPatch Updates the Price resource. + +Updates the Price resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Price identifier + @return PriceAPIApiPricesIdPatchRequest +*/ +func (a *PriceAPIService) ApiPricesIdPatch(ctx context.Context, id string) PriceAPIApiPricesIdPatchRequest { + return PriceAPIApiPricesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Price +func (a *PriceAPIService) ApiPricesIdPatchExecute(r PriceAPIApiPricesIdPatchRequest) (*Price, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Price + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PriceAPIService.ApiPricesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/prices/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.price == nil { + return localVarReturnValue, nil, reportError("price is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.price + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PriceAPIApiPricesIdPutRequest struct { + ctx context.Context + ApiService *PriceAPIService + price *Price + id string +} + +// The updated Price resource +func (r PriceAPIApiPricesIdPutRequest) Price(price Price) PriceAPIApiPricesIdPutRequest { + r.price = &price + return r +} + +func (r PriceAPIApiPricesIdPutRequest) Execute() (*Price, *http.Response, error) { + return r.ApiService.ApiPricesIdPutExecute(r) +} + +/* +ApiPricesIdPut Replaces the Price resource. + +Replaces the Price resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Price identifier + @return PriceAPIApiPricesIdPutRequest +*/ +func (a *PriceAPIService) ApiPricesIdPut(ctx context.Context, id string) PriceAPIApiPricesIdPutRequest { + return PriceAPIApiPricesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Price +func (a *PriceAPIService) ApiPricesIdPutExecute(r PriceAPIApiPricesIdPutRequest) (*Price, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Price + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PriceAPIService.ApiPricesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/prices/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.price == nil { + return localVarReturnValue, nil, reportError("price is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.price + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PriceAPIApiPricesPostRequest struct { + ctx context.Context + ApiService *PriceAPIService + price *Price +} + +// The new Price resource +func (r PriceAPIApiPricesPostRequest) Price(price Price) PriceAPIApiPricesPostRequest { + r.price = &price + return r +} + +func (r PriceAPIApiPricesPostRequest) Execute() (*Price, *http.Response, error) { + return r.ApiService.ApiPricesPostExecute(r) +} + +/* +ApiPricesPost Creates a Price resource. + +Creates a Price resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PriceAPIApiPricesPostRequest +*/ +func (a *PriceAPIService) ApiPricesPost(ctx context.Context) PriceAPIApiPricesPostRequest { + return PriceAPIApiPricesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return Price +func (a *PriceAPIService) ApiPricesPostExecute(r PriceAPIApiPricesPostRequest) (*Price, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Price + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PriceAPIService.ApiPricesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/prices" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.price == nil { + return localVarReturnValue, nil, reportError("price is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.price + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_product.go b/pkg/api/rewardcloud/api_product.go new file mode 100644 index 0000000..efd9d39 --- /dev/null +++ b/pkg/api/rewardcloud/api_product.go @@ -0,0 +1,826 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ProductAPIService ProductAPI service +type ProductAPIService service + +type ProductAPIApiProductsGetCollectionRequest struct { + ctx context.Context + ApiService *ProductAPIService + page *int32 + itemsPerPage *int32 + defaultPrice *string + defaultPrice2 *[]string + cluster *string + cluster2 *[]string +} + +// The collection page number +func (r ProductAPIApiProductsGetCollectionRequest) Page(page int32) ProductAPIApiProductsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProductAPIApiProductsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProductAPIApiProductsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProductAPIApiProductsGetCollectionRequest) DefaultPrice(defaultPrice string) ProductAPIApiProductsGetCollectionRequest { + r.defaultPrice = &defaultPrice + return r +} + +func (r ProductAPIApiProductsGetCollectionRequest) DefaultPrice2(defaultPrice2 []string) ProductAPIApiProductsGetCollectionRequest { + r.defaultPrice2 = &defaultPrice2 + return r +} + +func (r ProductAPIApiProductsGetCollectionRequest) Cluster(cluster string) ProductAPIApiProductsGetCollectionRequest { + r.cluster = &cluster + return r +} + +func (r ProductAPIApiProductsGetCollectionRequest) Cluster2(cluster2 []string) ProductAPIApiProductsGetCollectionRequest { + r.cluster2 = &cluster2 + return r +} + +func (r ProductAPIApiProductsGetCollectionRequest) Execute() ([]ProductProductOutput, *http.Response, error) { + return r.ApiService.ApiProductsGetCollectionExecute(r) +} + +/* +ApiProductsGetCollection Retrieves the collection of Product resources. + +Retrieves the collection of Product resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProductAPIApiProductsGetCollectionRequest +*/ +func (a *ProductAPIService) ApiProductsGetCollection(ctx context.Context) ProductAPIApiProductsGetCollectionRequest { + return ProductAPIApiProductsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProductProductOutput +func (a *ProductAPIService) ApiProductsGetCollectionExecute(r ProductAPIApiProductsGetCollectionRequest) ([]ProductProductOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProductProductOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductAPIService.ApiProductsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/products" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.defaultPrice != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "defaultPrice", r.defaultPrice, "") + } + if r.defaultPrice2 != nil { + t := *r.defaultPrice2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "defaultPrice[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "defaultPrice[]", t, "multi") + } + } + if r.cluster != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cluster", r.cluster, "") + } + if r.cluster2 != nil { + t := *r.cluster2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "cluster[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "cluster[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProductAPIApiProductsIdDeleteRequest struct { + ctx context.Context + ApiService *ProductAPIService + id string +} + +func (r ProductAPIApiProductsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProductsIdDeleteExecute(r) +} + +/* +ApiProductsIdDelete Removes the Product resource. + +Removes the Product resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Product identifier + @return ProductAPIApiProductsIdDeleteRequest +*/ +func (a *ProductAPIService) ApiProductsIdDelete(ctx context.Context, id string) ProductAPIApiProductsIdDeleteRequest { + return ProductAPIApiProductsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProductAPIService) ApiProductsIdDeleteExecute(r ProductAPIApiProductsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductAPIService.ApiProductsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/products/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProductAPIApiProductsIdGetRequest struct { + ctx context.Context + ApiService *ProductAPIService + id string +} + +func (r ProductAPIApiProductsIdGetRequest) Execute() (*ProductProductOutput, *http.Response, error) { + return r.ApiService.ApiProductsIdGetExecute(r) +} + +/* +ApiProductsIdGet Retrieves a Product resource. + +Retrieves a Product resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Product identifier + @return ProductAPIApiProductsIdGetRequest +*/ +func (a *ProductAPIService) ApiProductsIdGet(ctx context.Context, id string) ProductAPIApiProductsIdGetRequest { + return ProductAPIApiProductsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProductProductOutput +func (a *ProductAPIService) ApiProductsIdGetExecute(r ProductAPIApiProductsIdGetRequest) (*ProductProductOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProductProductOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductAPIService.ApiProductsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/products/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProductAPIApiProductsIdPatchRequest struct { + ctx context.Context + ApiService *ProductAPIService + productProductInput *ProductProductInput + id string +} + +// The updated Product resource +func (r ProductAPIApiProductsIdPatchRequest) ProductProductInput(productProductInput ProductProductInput) ProductAPIApiProductsIdPatchRequest { + r.productProductInput = &productProductInput + return r +} + +func (r ProductAPIApiProductsIdPatchRequest) Execute() (*ProductProductOutput, *http.Response, error) { + return r.ApiService.ApiProductsIdPatchExecute(r) +} + +/* +ApiProductsIdPatch Updates the Product resource. + +Updates the Product resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Product identifier + @return ProductAPIApiProductsIdPatchRequest +*/ +func (a *ProductAPIService) ApiProductsIdPatch(ctx context.Context, id string) ProductAPIApiProductsIdPatchRequest { + return ProductAPIApiProductsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProductProductOutput +func (a *ProductAPIService) ApiProductsIdPatchExecute(r ProductAPIApiProductsIdPatchRequest) (*ProductProductOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProductProductOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductAPIService.ApiProductsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/products/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.productProductInput == nil { + return localVarReturnValue, nil, reportError("productProductInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.productProductInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProductAPIApiProductsIdPutRequest struct { + ctx context.Context + ApiService *ProductAPIService + productProductInput *ProductProductInput + id string +} + +// The updated Product resource +func (r ProductAPIApiProductsIdPutRequest) ProductProductInput(productProductInput ProductProductInput) ProductAPIApiProductsIdPutRequest { + r.productProductInput = &productProductInput + return r +} + +func (r ProductAPIApiProductsIdPutRequest) Execute() (*ProductProductOutput, *http.Response, error) { + return r.ApiService.ApiProductsIdPutExecute(r) +} + +/* +ApiProductsIdPut Replaces the Product resource. + +Replaces the Product resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Product identifier + @return ProductAPIApiProductsIdPutRequest +*/ +func (a *ProductAPIService) ApiProductsIdPut(ctx context.Context, id string) ProductAPIApiProductsIdPutRequest { + return ProductAPIApiProductsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProductProductOutput +func (a *ProductAPIService) ApiProductsIdPutExecute(r ProductAPIApiProductsIdPutRequest) (*ProductProductOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProductProductOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductAPIService.ApiProductsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/products/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.productProductInput == nil { + return localVarReturnValue, nil, reportError("productProductInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.productProductInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProductAPIApiProductsPostRequest struct { + ctx context.Context + ApiService *ProductAPIService + productProductInput *ProductProductInput +} + +// The new Product resource +func (r ProductAPIApiProductsPostRequest) ProductProductInput(productProductInput ProductProductInput) ProductAPIApiProductsPostRequest { + r.productProductInput = &productProductInput + return r +} + +func (r ProductAPIApiProductsPostRequest) Execute() (*ProductProductOutput, *http.Response, error) { + return r.ApiService.ApiProductsPostExecute(r) +} + +/* +ApiProductsPost Creates a Product resource. + +Creates a Product resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProductAPIApiProductsPostRequest +*/ +func (a *ProductAPIService) ApiProductsPost(ctx context.Context) ProductAPIApiProductsPostRequest { + return ProductAPIApiProductsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProductProductOutput +func (a *ProductAPIService) ApiProductsPostExecute(r ProductAPIApiProductsPostRequest) (*ProductProductOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProductProductOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductAPIService.ApiProductsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/products" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.productProductInput == nil { + return localVarReturnValue, nil, reportError("productProductInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.productProductInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_project.go b/pkg/api/rewardcloud/api_project.go new file mode 100644 index 0000000..3a9bf4c --- /dev/null +++ b/pkg/api/rewardcloud/api_project.go @@ -0,0 +1,1093 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ProjectAPIService ProjectAPI service +type ProjectAPIService service + +type ProjectAPIApiProjectsGetCollectionRequest struct { + ctx context.Context + ApiService *ProjectAPIService + page *int32 + itemsPerPage *int32 + teamOrganisationId *int32 + teamOrganisationId2 *[]int32 + state *string + state2 *[]string + git *string + git2 *[]string + team *string + team2 *[]string + stateByInfra *string + stateByInfra2 *[]string + createdAtBefore *string + createdAtStrictlyBefore *string + createdAtAfter *string + createdAtStrictlyAfter *string + projectTypeVersion *string + projectTypeVersion2 *[]string + orderUpdatedAt *string +} + +// The collection page number +func (r ProjectAPIApiProjectsGetCollectionRequest) Page(page int32) ProjectAPIApiProjectsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProjectAPIApiProjectsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProjectAPIApiProjectsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) TeamOrganisationId(teamOrganisationId int32) ProjectAPIApiProjectsGetCollectionRequest { + r.teamOrganisationId = &teamOrganisationId + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) TeamOrganisationId2(teamOrganisationId2 []int32) ProjectAPIApiProjectsGetCollectionRequest { + r.teamOrganisationId2 = &teamOrganisationId2 + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) State(state string) ProjectAPIApiProjectsGetCollectionRequest { + r.state = &state + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) State2(state2 []string) ProjectAPIApiProjectsGetCollectionRequest { + r.state2 = &state2 + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) Git(git string) ProjectAPIApiProjectsGetCollectionRequest { + r.git = &git + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) Git2(git2 []string) ProjectAPIApiProjectsGetCollectionRequest { + r.git2 = &git2 + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) Team(team string) ProjectAPIApiProjectsGetCollectionRequest { + r.team = &team + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) Team2(team2 []string) ProjectAPIApiProjectsGetCollectionRequest { + r.team2 = &team2 + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) StateByInfra(stateByInfra string) ProjectAPIApiProjectsGetCollectionRequest { + r.stateByInfra = &stateByInfra + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) StateByInfra2(stateByInfra2 []string) ProjectAPIApiProjectsGetCollectionRequest { + r.stateByInfra2 = &stateByInfra2 + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) CreatedAtBefore(createdAtBefore string) ProjectAPIApiProjectsGetCollectionRequest { + r.createdAtBefore = &createdAtBefore + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) CreatedAtStrictlyBefore(createdAtStrictlyBefore string) ProjectAPIApiProjectsGetCollectionRequest { + r.createdAtStrictlyBefore = &createdAtStrictlyBefore + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) CreatedAtAfter(createdAtAfter string) ProjectAPIApiProjectsGetCollectionRequest { + r.createdAtAfter = &createdAtAfter + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) CreatedAtStrictlyAfter(createdAtStrictlyAfter string) ProjectAPIApiProjectsGetCollectionRequest { + r.createdAtStrictlyAfter = &createdAtStrictlyAfter + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) ProjectTypeVersion(projectTypeVersion string) ProjectAPIApiProjectsGetCollectionRequest { + r.projectTypeVersion = &projectTypeVersion + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) ProjectTypeVersion2(projectTypeVersion2 []string) ProjectAPIApiProjectsGetCollectionRequest { + r.projectTypeVersion2 = &projectTypeVersion2 + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) OrderUpdatedAt(orderUpdatedAt string) ProjectAPIApiProjectsGetCollectionRequest { + r.orderUpdatedAt = &orderUpdatedAt + return r +} + +func (r ProjectAPIApiProjectsGetCollectionRequest) Execute() ([]ProjectProjectOutput, *http.Response, error) { + return r.ApiService.ApiProjectsGetCollectionExecute(r) +} + +/* +ApiProjectsGetCollection Retrieves the collection of Project resources. + +Retrieves the collection of Project resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectAPIApiProjectsGetCollectionRequest +*/ +func (a *ProjectAPIService) ApiProjectsGetCollection(ctx context.Context) ProjectAPIApiProjectsGetCollectionRequest { + return ProjectAPIApiProjectsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProjectProjectOutput +func (a *ProjectAPIService) ApiProjectsGetCollectionExecute(r ProjectAPIApiProjectsGetCollectionRequest) ([]ProjectProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProjectProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAPIService.ApiProjectsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/projects" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.teamOrganisationId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "team.organisation.id", r.teamOrganisationId, "") + } + if r.teamOrganisationId2 != nil { + t := *r.teamOrganisationId2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "team.organisation.id[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "team.organisation.id[]", t, "multi") + } + } + if r.state != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "state", r.state, "") + } + if r.state2 != nil { + t := *r.state2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "state[]", t, "multi") + } + } + if r.git != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "git", r.git, "") + } + if r.git2 != nil { + t := *r.git2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "git[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "git[]", t, "multi") + } + } + if r.team != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "team", r.team, "") + } + if r.team2 != nil { + t := *r.team2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "team[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "team[]", t, "multi") + } + } + if r.stateByInfra != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra", r.stateByInfra, "") + } + if r.stateByInfra2 != nil { + t := *r.stateByInfra2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra[]", t, "multi") + } + } + if r.createdAtBefore != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "createdAt[before]", r.createdAtBefore, "") + } + if r.createdAtStrictlyBefore != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "createdAt[strictly_before]", r.createdAtStrictlyBefore, "") + } + if r.createdAtAfter != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "createdAt[after]", r.createdAtAfter, "") + } + if r.createdAtStrictlyAfter != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "createdAt[strictly_after]", r.createdAtStrictlyAfter, "") + } + if r.projectTypeVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion", r.projectTypeVersion, "") + } + if r.projectTypeVersion2 != nil { + t := *r.projectTypeVersion2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion[]", t, "multi") + } + } + if r.orderUpdatedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[updatedAt]", r.orderUpdatedAt, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAPIApiProjectsIdDeleteRequest struct { + ctx context.Context + ApiService *ProjectAPIService + id string +} + +func (r ProjectAPIApiProjectsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProjectsIdDeleteExecute(r) +} + +/* +ApiProjectsIdDelete Removes the Project resource. + +Removes the Project resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Project identifier + @return ProjectAPIApiProjectsIdDeleteRequest +*/ +func (a *ProjectAPIService) ApiProjectsIdDelete(ctx context.Context, id string) ProjectAPIApiProjectsIdDeleteRequest { + return ProjectAPIApiProjectsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProjectAPIService) ApiProjectsIdDeleteExecute(r ProjectAPIApiProjectsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAPIService.ApiProjectsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/projects/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProjectAPIApiProjectsIdGetRequest struct { + ctx context.Context + ApiService *ProjectAPIService + id string +} + +func (r ProjectAPIApiProjectsIdGetRequest) Execute() (*ProjectProjectOutput, *http.Response, error) { + return r.ApiService.ApiProjectsIdGetExecute(r) +} + +/* +ApiProjectsIdGet Retrieves a Project resource. + +Retrieves a Project resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Project identifier + @return ProjectAPIApiProjectsIdGetRequest +*/ +func (a *ProjectAPIService) ApiProjectsIdGet(ctx context.Context, id string) ProjectAPIApiProjectsIdGetRequest { + return ProjectAPIApiProjectsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectProjectOutput +func (a *ProjectAPIService) ApiProjectsIdGetExecute(r ProjectAPIApiProjectsIdGetRequest) (*ProjectProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAPIService.ApiProjectsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/projects/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAPIApiProjectsIdPatchRequest struct { + ctx context.Context + ApiService *ProjectAPIService + projectProjectInput *ProjectProjectInput + id string +} + +// The updated Project resource +func (r ProjectAPIApiProjectsIdPatchRequest) ProjectProjectInput(projectProjectInput ProjectProjectInput) ProjectAPIApiProjectsIdPatchRequest { + r.projectProjectInput = &projectProjectInput + return r +} + +func (r ProjectAPIApiProjectsIdPatchRequest) Execute() (*ProjectProjectOutput, *http.Response, error) { + return r.ApiService.ApiProjectsIdPatchExecute(r) +} + +/* +ApiProjectsIdPatch Updates the Project resource. + +Updates the Project resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Project identifier + @return ProjectAPIApiProjectsIdPatchRequest +*/ +func (a *ProjectAPIService) ApiProjectsIdPatch(ctx context.Context, id string) ProjectAPIApiProjectsIdPatchRequest { + return ProjectAPIApiProjectsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectProjectOutput +func (a *ProjectAPIService) ApiProjectsIdPatchExecute(r ProjectAPIApiProjectsIdPatchRequest) (*ProjectProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAPIService.ApiProjectsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/projects/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectProjectInput == nil { + return localVarReturnValue, nil, reportError("projectProjectInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectProjectInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAPIApiProjectsIdPutRequest struct { + ctx context.Context + ApiService *ProjectAPIService + projectProjectInput *ProjectProjectInput + id string +} + +// The updated Project resource +func (r ProjectAPIApiProjectsIdPutRequest) ProjectProjectInput(projectProjectInput ProjectProjectInput) ProjectAPIApiProjectsIdPutRequest { + r.projectProjectInput = &projectProjectInput + return r +} + +func (r ProjectAPIApiProjectsIdPutRequest) Execute() (*ProjectProjectOutput, *http.Response, error) { + return r.ApiService.ApiProjectsIdPutExecute(r) +} + +/* +ApiProjectsIdPut Replaces the Project resource. + +Replaces the Project resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Project identifier + @return ProjectAPIApiProjectsIdPutRequest +*/ +func (a *ProjectAPIService) ApiProjectsIdPut(ctx context.Context, id string) ProjectAPIApiProjectsIdPutRequest { + return ProjectAPIApiProjectsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectProjectOutput +func (a *ProjectAPIService) ApiProjectsIdPutExecute(r ProjectAPIApiProjectsIdPutRequest) (*ProjectProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAPIService.ApiProjectsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/projects/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectProjectInput == nil { + return localVarReturnValue, nil, reportError("projectProjectInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectProjectInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAPIApiProjectsIdcostsGetRequest struct { + ctx context.Context + ApiService *ProjectAPIService + id string +} + +func (r ProjectAPIApiProjectsIdcostsGetRequest) Execute() (*ProjectProjectOutput, *http.Response, error) { + return r.ApiService.ApiProjectsIdcostsGetExecute(r) +} + +/* +ApiProjectsIdcostsGet Retrieves a Project resource. + +Retrieves a Project resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Project identifier + @return ProjectAPIApiProjectsIdcostsGetRequest +*/ +func (a *ProjectAPIService) ApiProjectsIdcostsGet(ctx context.Context, id string) ProjectAPIApiProjectsIdcostsGetRequest { + return ProjectAPIApiProjectsIdcostsGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectProjectOutput +func (a *ProjectAPIService) ApiProjectsIdcostsGetExecute(r ProjectAPIApiProjectsIdcostsGetRequest) (*ProjectProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAPIService.ApiProjectsIdcostsGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/projects/{id}/costs" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAPIApiProjectsPostRequest struct { + ctx context.Context + ApiService *ProjectAPIService + projectProjectInput *ProjectProjectInput +} + +// The new Project resource +func (r ProjectAPIApiProjectsPostRequest) ProjectProjectInput(projectProjectInput ProjectProjectInput) ProjectAPIApiProjectsPostRequest { + r.projectProjectInput = &projectProjectInput + return r +} + +func (r ProjectAPIApiProjectsPostRequest) Execute() (*ProjectProjectOutput, *http.Response, error) { + return r.ApiService.ApiProjectsPostExecute(r) +} + +/* +ApiProjectsPost Creates a Project resource. + +Creates a Project resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectAPIApiProjectsPostRequest +*/ +func (a *ProjectAPIService) ApiProjectsPost(ctx context.Context) ProjectAPIApiProjectsPostRequest { + return ProjectAPIApiProjectsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProjectProjectOutput +func (a *ProjectAPIService) ApiProjectsPostExecute(r ProjectAPIApiProjectsPostRequest) (*ProjectProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAPIService.ApiProjectsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/projects" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectProjectInput == nil { + return localVarReturnValue, nil, reportError("projectProjectInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectProjectInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_project_access.go b/pkg/api/rewardcloud/api_project_access.go new file mode 100644 index 0000000..90fcd26 --- /dev/null +++ b/pkg/api/rewardcloud/api_project_access.go @@ -0,0 +1,852 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ProjectAccessAPIService ProjectAccessAPI service +type ProjectAccessAPIService service + +type ProjectAccessAPIApiProjectAccessesGetCollectionRequest struct { + ctx context.Context + ApiService *ProjectAccessAPIService + page *int32 + itemsPerPage *int32 + projectAccessGit *string + projectAccessGit2 *[]string + projectAccessRegistry *string + projectAccessRegistry2 *[]string + projectAccessServiceAccount *string + projectAccessServiceAccount2 *[]string +} + +// The collection page number +func (r ProjectAccessAPIApiProjectAccessesGetCollectionRequest) Page(page int32) ProjectAccessAPIApiProjectAccessesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProjectAccessAPIApiProjectAccessesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProjectAccessAPIApiProjectAccessesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProjectAccessAPIApiProjectAccessesGetCollectionRequest) ProjectAccessGit(projectAccessGit string) ProjectAccessAPIApiProjectAccessesGetCollectionRequest { + r.projectAccessGit = &projectAccessGit + return r +} + +func (r ProjectAccessAPIApiProjectAccessesGetCollectionRequest) ProjectAccessGit2(projectAccessGit2 []string) ProjectAccessAPIApiProjectAccessesGetCollectionRequest { + r.projectAccessGit2 = &projectAccessGit2 + return r +} + +func (r ProjectAccessAPIApiProjectAccessesGetCollectionRequest) ProjectAccessRegistry(projectAccessRegistry string) ProjectAccessAPIApiProjectAccessesGetCollectionRequest { + r.projectAccessRegistry = &projectAccessRegistry + return r +} + +func (r ProjectAccessAPIApiProjectAccessesGetCollectionRequest) ProjectAccessRegistry2(projectAccessRegistry2 []string) ProjectAccessAPIApiProjectAccessesGetCollectionRequest { + r.projectAccessRegistry2 = &projectAccessRegistry2 + return r +} + +func (r ProjectAccessAPIApiProjectAccessesGetCollectionRequest) ProjectAccessServiceAccount(projectAccessServiceAccount string) ProjectAccessAPIApiProjectAccessesGetCollectionRequest { + r.projectAccessServiceAccount = &projectAccessServiceAccount + return r +} + +func (r ProjectAccessAPIApiProjectAccessesGetCollectionRequest) ProjectAccessServiceAccount2(projectAccessServiceAccount2 []string) ProjectAccessAPIApiProjectAccessesGetCollectionRequest { + r.projectAccessServiceAccount2 = &projectAccessServiceAccount2 + return r +} + +func (r ProjectAccessAPIApiProjectAccessesGetCollectionRequest) Execute() ([]ProjectAccess, *http.Response, error) { + return r.ApiService.ApiProjectAccessesGetCollectionExecute(r) +} + +/* +ApiProjectAccessesGetCollection Retrieves the collection of ProjectAccess resources. + +Retrieves the collection of ProjectAccess resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectAccessAPIApiProjectAccessesGetCollectionRequest +*/ +func (a *ProjectAccessAPIService) ApiProjectAccessesGetCollection(ctx context.Context) ProjectAccessAPIApiProjectAccessesGetCollectionRequest { + return ProjectAccessAPIApiProjectAccessesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProjectAccess +func (a *ProjectAccessAPIService) ApiProjectAccessesGetCollectionExecute(r ProjectAccessAPIApiProjectAccessesGetCollectionRequest) ([]ProjectAccess, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProjectAccess + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessAPIService.ApiProjectAccessesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_accesses" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.projectAccessGit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccessGit", r.projectAccessGit, "") + } + if r.projectAccessGit2 != nil { + t := *r.projectAccessGit2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccessGit[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccessGit[]", t, "multi") + } + } + if r.projectAccessRegistry != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccessRegistry", r.projectAccessRegistry, "") + } + if r.projectAccessRegistry2 != nil { + t := *r.projectAccessRegistry2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccessRegistry[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccessRegistry[]", t, "multi") + } + } + if r.projectAccessServiceAccount != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccessServiceAccount", r.projectAccessServiceAccount, "") + } + if r.projectAccessServiceAccount2 != nil { + t := *r.projectAccessServiceAccount2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccessServiceAccount[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccessServiceAccount[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessAPIApiProjectAccessesIdDeleteRequest struct { + ctx context.Context + ApiService *ProjectAccessAPIService + id string +} + +func (r ProjectAccessAPIApiProjectAccessesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProjectAccessesIdDeleteExecute(r) +} + +/* +ApiProjectAccessesIdDelete Removes the ProjectAccess resource. + +Removes the ProjectAccess resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccess identifier + @return ProjectAccessAPIApiProjectAccessesIdDeleteRequest +*/ +func (a *ProjectAccessAPIService) ApiProjectAccessesIdDelete(ctx context.Context, id string) ProjectAccessAPIApiProjectAccessesIdDeleteRequest { + return ProjectAccessAPIApiProjectAccessesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProjectAccessAPIService) ApiProjectAccessesIdDeleteExecute(r ProjectAccessAPIApiProjectAccessesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessAPIService.ApiProjectAccessesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_accesses/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProjectAccessAPIApiProjectAccessesIdGetRequest struct { + ctx context.Context + ApiService *ProjectAccessAPIService + id string +} + +func (r ProjectAccessAPIApiProjectAccessesIdGetRequest) Execute() (*ProjectAccess, *http.Response, error) { + return r.ApiService.ApiProjectAccessesIdGetExecute(r) +} + +/* +ApiProjectAccessesIdGet Retrieves a ProjectAccess resource. + +Retrieves a ProjectAccess resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccess identifier + @return ProjectAccessAPIApiProjectAccessesIdGetRequest +*/ +func (a *ProjectAccessAPIService) ApiProjectAccessesIdGet(ctx context.Context, id string) ProjectAccessAPIApiProjectAccessesIdGetRequest { + return ProjectAccessAPIApiProjectAccessesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccess +func (a *ProjectAccessAPIService) ApiProjectAccessesIdGetExecute(r ProjectAccessAPIApiProjectAccessesIdGetRequest) (*ProjectAccess, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccess + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessAPIService.ApiProjectAccessesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_accesses/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessAPIApiProjectAccessesIdPatchRequest struct { + ctx context.Context + ApiService *ProjectAccessAPIService + projectAccess *ProjectAccess + id string +} + +// The updated ProjectAccess resource +func (r ProjectAccessAPIApiProjectAccessesIdPatchRequest) ProjectAccess(projectAccess ProjectAccess) ProjectAccessAPIApiProjectAccessesIdPatchRequest { + r.projectAccess = &projectAccess + return r +} + +func (r ProjectAccessAPIApiProjectAccessesIdPatchRequest) Execute() (*ProjectAccess, *http.Response, error) { + return r.ApiService.ApiProjectAccessesIdPatchExecute(r) +} + +/* +ApiProjectAccessesIdPatch Updates the ProjectAccess resource. + +Updates the ProjectAccess resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccess identifier + @return ProjectAccessAPIApiProjectAccessesIdPatchRequest +*/ +func (a *ProjectAccessAPIService) ApiProjectAccessesIdPatch(ctx context.Context, id string) ProjectAccessAPIApiProjectAccessesIdPatchRequest { + return ProjectAccessAPIApiProjectAccessesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccess +func (a *ProjectAccessAPIService) ApiProjectAccessesIdPatchExecute(r ProjectAccessAPIApiProjectAccessesIdPatchRequest) (*ProjectAccess, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccess + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessAPIService.ApiProjectAccessesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_accesses/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccess == nil { + return localVarReturnValue, nil, reportError("projectAccess is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccess + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessAPIApiProjectAccessesIdPutRequest struct { + ctx context.Context + ApiService *ProjectAccessAPIService + projectAccess *ProjectAccess + id string +} + +// The updated ProjectAccess resource +func (r ProjectAccessAPIApiProjectAccessesIdPutRequest) ProjectAccess(projectAccess ProjectAccess) ProjectAccessAPIApiProjectAccessesIdPutRequest { + r.projectAccess = &projectAccess + return r +} + +func (r ProjectAccessAPIApiProjectAccessesIdPutRequest) Execute() (*ProjectAccess, *http.Response, error) { + return r.ApiService.ApiProjectAccessesIdPutExecute(r) +} + +/* +ApiProjectAccessesIdPut Replaces the ProjectAccess resource. + +Replaces the ProjectAccess resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccess identifier + @return ProjectAccessAPIApiProjectAccessesIdPutRequest +*/ +func (a *ProjectAccessAPIService) ApiProjectAccessesIdPut(ctx context.Context, id string) ProjectAccessAPIApiProjectAccessesIdPutRequest { + return ProjectAccessAPIApiProjectAccessesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccess +func (a *ProjectAccessAPIService) ApiProjectAccessesIdPutExecute(r ProjectAccessAPIApiProjectAccessesIdPutRequest) (*ProjectAccess, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccess + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessAPIService.ApiProjectAccessesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_accesses/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccess == nil { + return localVarReturnValue, nil, reportError("projectAccess is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccess + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessAPIApiProjectAccessesPostRequest struct { + ctx context.Context + ApiService *ProjectAccessAPIService + projectAccess *ProjectAccess +} + +// The new ProjectAccess resource +func (r ProjectAccessAPIApiProjectAccessesPostRequest) ProjectAccess(projectAccess ProjectAccess) ProjectAccessAPIApiProjectAccessesPostRequest { + r.projectAccess = &projectAccess + return r +} + +func (r ProjectAccessAPIApiProjectAccessesPostRequest) Execute() (*ProjectAccess, *http.Response, error) { + return r.ApiService.ApiProjectAccessesPostExecute(r) +} + +/* +ApiProjectAccessesPost Creates a ProjectAccess resource. + +Creates a ProjectAccess resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectAccessAPIApiProjectAccessesPostRequest +*/ +func (a *ProjectAccessAPIService) ApiProjectAccessesPost(ctx context.Context) ProjectAccessAPIApiProjectAccessesPostRequest { + return ProjectAccessAPIApiProjectAccessesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProjectAccess +func (a *ProjectAccessAPIService) ApiProjectAccessesPostExecute(r ProjectAccessAPIApiProjectAccessesPostRequest) (*ProjectAccess, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccess + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessAPIService.ApiProjectAccessesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_accesses" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccess == nil { + return localVarReturnValue, nil, reportError("projectAccess is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccess + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_project_access_git.go b/pkg/api/rewardcloud/api_project_access_git.go new file mode 100644 index 0000000..ff00371 --- /dev/null +++ b/pkg/api/rewardcloud/api_project_access_git.go @@ -0,0 +1,800 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ProjectAccessGitAPIService ProjectAccessGitAPI service +type ProjectAccessGitAPIService service + +type ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest struct { + ctx context.Context + ApiService *ProjectAccessGitAPIService + page *int32 + itemsPerPage *int32 + projectAccess *string + projectAccess2 *[]string +} + +// The collection page number +func (r ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest) Page(page int32) ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest) ProjectAccess(projectAccess string) ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest { + r.projectAccess = &projectAccess + return r +} + +func (r ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest) ProjectAccess2(projectAccess2 []string) ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest { + r.projectAccess2 = &projectAccess2 + return r +} + +func (r ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest) Execute() ([]ProjectAccessGit, *http.Response, error) { + return r.ApiService.ApiProjectAccessGitsGetCollectionExecute(r) +} + +/* +ApiProjectAccessGitsGetCollection Retrieves the collection of ProjectAccessGit resources. + +Retrieves the collection of ProjectAccessGit resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest +*/ +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsGetCollection(ctx context.Context) ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest { + return ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProjectAccessGit +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsGetCollectionExecute(r ProjectAccessGitAPIApiProjectAccessGitsGetCollectionRequest) ([]ProjectAccessGit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProjectAccessGit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessGitAPIService.ApiProjectAccessGitsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_gits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.projectAccess != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccess", r.projectAccess, "") + } + if r.projectAccess2 != nil { + t := *r.projectAccess2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccess[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccess[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessGitAPIApiProjectAccessGitsIdDeleteRequest struct { + ctx context.Context + ApiService *ProjectAccessGitAPIService + id string +} + +func (r ProjectAccessGitAPIApiProjectAccessGitsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProjectAccessGitsIdDeleteExecute(r) +} + +/* +ApiProjectAccessGitsIdDelete Removes the ProjectAccessGit resource. + +Removes the ProjectAccessGit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessGit identifier + @return ProjectAccessGitAPIApiProjectAccessGitsIdDeleteRequest +*/ +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsIdDelete(ctx context.Context, id string) ProjectAccessGitAPIApiProjectAccessGitsIdDeleteRequest { + return ProjectAccessGitAPIApiProjectAccessGitsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsIdDeleteExecute(r ProjectAccessGitAPIApiProjectAccessGitsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessGitAPIService.ApiProjectAccessGitsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_gits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProjectAccessGitAPIApiProjectAccessGitsIdGetRequest struct { + ctx context.Context + ApiService *ProjectAccessGitAPIService + id string +} + +func (r ProjectAccessGitAPIApiProjectAccessGitsIdGetRequest) Execute() (*ProjectAccessGit, *http.Response, error) { + return r.ApiService.ApiProjectAccessGitsIdGetExecute(r) +} + +/* +ApiProjectAccessGitsIdGet Retrieves a ProjectAccessGit resource. + +Retrieves a ProjectAccessGit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessGit identifier + @return ProjectAccessGitAPIApiProjectAccessGitsIdGetRequest +*/ +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsIdGet(ctx context.Context, id string) ProjectAccessGitAPIApiProjectAccessGitsIdGetRequest { + return ProjectAccessGitAPIApiProjectAccessGitsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccessGit +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsIdGetExecute(r ProjectAccessGitAPIApiProjectAccessGitsIdGetRequest) (*ProjectAccessGit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessGit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessGitAPIService.ApiProjectAccessGitsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_gits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessGitAPIApiProjectAccessGitsIdPatchRequest struct { + ctx context.Context + ApiService *ProjectAccessGitAPIService + projectAccessGit *ProjectAccessGit + id string +} + +// The updated ProjectAccessGit resource +func (r ProjectAccessGitAPIApiProjectAccessGitsIdPatchRequest) ProjectAccessGit(projectAccessGit ProjectAccessGit) ProjectAccessGitAPIApiProjectAccessGitsIdPatchRequest { + r.projectAccessGit = &projectAccessGit + return r +} + +func (r ProjectAccessGitAPIApiProjectAccessGitsIdPatchRequest) Execute() (*ProjectAccessGit, *http.Response, error) { + return r.ApiService.ApiProjectAccessGitsIdPatchExecute(r) +} + +/* +ApiProjectAccessGitsIdPatch Updates the ProjectAccessGit resource. + +Updates the ProjectAccessGit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessGit identifier + @return ProjectAccessGitAPIApiProjectAccessGitsIdPatchRequest +*/ +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsIdPatch(ctx context.Context, id string) ProjectAccessGitAPIApiProjectAccessGitsIdPatchRequest { + return ProjectAccessGitAPIApiProjectAccessGitsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccessGit +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsIdPatchExecute(r ProjectAccessGitAPIApiProjectAccessGitsIdPatchRequest) (*ProjectAccessGit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessGit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessGitAPIService.ApiProjectAccessGitsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_gits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccessGit == nil { + return localVarReturnValue, nil, reportError("projectAccessGit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccessGit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessGitAPIApiProjectAccessGitsIdPutRequest struct { + ctx context.Context + ApiService *ProjectAccessGitAPIService + projectAccessGit *ProjectAccessGit + id string +} + +// The updated ProjectAccessGit resource +func (r ProjectAccessGitAPIApiProjectAccessGitsIdPutRequest) ProjectAccessGit(projectAccessGit ProjectAccessGit) ProjectAccessGitAPIApiProjectAccessGitsIdPutRequest { + r.projectAccessGit = &projectAccessGit + return r +} + +func (r ProjectAccessGitAPIApiProjectAccessGitsIdPutRequest) Execute() (*ProjectAccessGit, *http.Response, error) { + return r.ApiService.ApiProjectAccessGitsIdPutExecute(r) +} + +/* +ApiProjectAccessGitsIdPut Replaces the ProjectAccessGit resource. + +Replaces the ProjectAccessGit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessGit identifier + @return ProjectAccessGitAPIApiProjectAccessGitsIdPutRequest +*/ +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsIdPut(ctx context.Context, id string) ProjectAccessGitAPIApiProjectAccessGitsIdPutRequest { + return ProjectAccessGitAPIApiProjectAccessGitsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccessGit +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsIdPutExecute(r ProjectAccessGitAPIApiProjectAccessGitsIdPutRequest) (*ProjectAccessGit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessGit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessGitAPIService.ApiProjectAccessGitsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_gits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccessGit == nil { + return localVarReturnValue, nil, reportError("projectAccessGit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccessGit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessGitAPIApiProjectAccessGitsPostRequest struct { + ctx context.Context + ApiService *ProjectAccessGitAPIService + projectAccessGit *ProjectAccessGit +} + +// The new ProjectAccessGit resource +func (r ProjectAccessGitAPIApiProjectAccessGitsPostRequest) ProjectAccessGit(projectAccessGit ProjectAccessGit) ProjectAccessGitAPIApiProjectAccessGitsPostRequest { + r.projectAccessGit = &projectAccessGit + return r +} + +func (r ProjectAccessGitAPIApiProjectAccessGitsPostRequest) Execute() (*ProjectAccessGit, *http.Response, error) { + return r.ApiService.ApiProjectAccessGitsPostExecute(r) +} + +/* +ApiProjectAccessGitsPost Creates a ProjectAccessGit resource. + +Creates a ProjectAccessGit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectAccessGitAPIApiProjectAccessGitsPostRequest +*/ +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsPost(ctx context.Context) ProjectAccessGitAPIApiProjectAccessGitsPostRequest { + return ProjectAccessGitAPIApiProjectAccessGitsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProjectAccessGit +func (a *ProjectAccessGitAPIService) ApiProjectAccessGitsPostExecute(r ProjectAccessGitAPIApiProjectAccessGitsPostRequest) (*ProjectAccessGit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessGit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessGitAPIService.ApiProjectAccessGitsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_gits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccessGit == nil { + return localVarReturnValue, nil, reportError("projectAccessGit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccessGit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_project_access_registry.go b/pkg/api/rewardcloud/api_project_access_registry.go new file mode 100644 index 0000000..d7e5643 --- /dev/null +++ b/pkg/api/rewardcloud/api_project_access_registry.go @@ -0,0 +1,800 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ProjectAccessRegistryAPIService ProjectAccessRegistryAPI service +type ProjectAccessRegistryAPIService service + +type ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest struct { + ctx context.Context + ApiService *ProjectAccessRegistryAPIService + page *int32 + itemsPerPage *int32 + projectAccess *string + projectAccess2 *[]string +} + +// The collection page number +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest) Page(page int32) ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest) ProjectAccess(projectAccess string) ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest { + r.projectAccess = &projectAccess + return r +} + +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest) ProjectAccess2(projectAccess2 []string) ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest { + r.projectAccess2 = &projectAccess2 + return r +} + +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest) Execute() ([]ProjectAccessRegistry, *http.Response, error) { + return r.ApiService.ApiProjectAccessRegistriesGetCollectionExecute(r) +} + +/* +ApiProjectAccessRegistriesGetCollection Retrieves the collection of ProjectAccessRegistry resources. + +Retrieves the collection of ProjectAccessRegistry resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest +*/ +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesGetCollection(ctx context.Context) ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest { + return ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProjectAccessRegistry +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesGetCollectionExecute(r ProjectAccessRegistryAPIApiProjectAccessRegistriesGetCollectionRequest) ([]ProjectAccessRegistry, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProjectAccessRegistry + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessRegistryAPIService.ApiProjectAccessRegistriesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_registries" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.projectAccess != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccess", r.projectAccess, "") + } + if r.projectAccess2 != nil { + t := *r.projectAccess2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccess[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccess[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessRegistryAPIApiProjectAccessRegistriesIdDeleteRequest struct { + ctx context.Context + ApiService *ProjectAccessRegistryAPIService + id string +} + +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProjectAccessRegistriesIdDeleteExecute(r) +} + +/* +ApiProjectAccessRegistriesIdDelete Removes the ProjectAccessRegistry resource. + +Removes the ProjectAccessRegistry resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessRegistry identifier + @return ProjectAccessRegistryAPIApiProjectAccessRegistriesIdDeleteRequest +*/ +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesIdDelete(ctx context.Context, id string) ProjectAccessRegistryAPIApiProjectAccessRegistriesIdDeleteRequest { + return ProjectAccessRegistryAPIApiProjectAccessRegistriesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesIdDeleteExecute(r ProjectAccessRegistryAPIApiProjectAccessRegistriesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessRegistryAPIService.ApiProjectAccessRegistriesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_registries/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProjectAccessRegistryAPIApiProjectAccessRegistriesIdGetRequest struct { + ctx context.Context + ApiService *ProjectAccessRegistryAPIService + id string +} + +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesIdGetRequest) Execute() (*ProjectAccessRegistry, *http.Response, error) { + return r.ApiService.ApiProjectAccessRegistriesIdGetExecute(r) +} + +/* +ApiProjectAccessRegistriesIdGet Retrieves a ProjectAccessRegistry resource. + +Retrieves a ProjectAccessRegistry resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessRegistry identifier + @return ProjectAccessRegistryAPIApiProjectAccessRegistriesIdGetRequest +*/ +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesIdGet(ctx context.Context, id string) ProjectAccessRegistryAPIApiProjectAccessRegistriesIdGetRequest { + return ProjectAccessRegistryAPIApiProjectAccessRegistriesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccessRegistry +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesIdGetExecute(r ProjectAccessRegistryAPIApiProjectAccessRegistriesIdGetRequest) (*ProjectAccessRegistry, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessRegistry + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessRegistryAPIService.ApiProjectAccessRegistriesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_registries/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPatchRequest struct { + ctx context.Context + ApiService *ProjectAccessRegistryAPIService + projectAccessRegistry *ProjectAccessRegistry + id string +} + +// The updated ProjectAccessRegistry resource +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPatchRequest) ProjectAccessRegistry(projectAccessRegistry ProjectAccessRegistry) ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPatchRequest { + r.projectAccessRegistry = &projectAccessRegistry + return r +} + +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPatchRequest) Execute() (*ProjectAccessRegistry, *http.Response, error) { + return r.ApiService.ApiProjectAccessRegistriesIdPatchExecute(r) +} + +/* +ApiProjectAccessRegistriesIdPatch Updates the ProjectAccessRegistry resource. + +Updates the ProjectAccessRegistry resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessRegistry identifier + @return ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPatchRequest +*/ +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesIdPatch(ctx context.Context, id string) ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPatchRequest { + return ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccessRegistry +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesIdPatchExecute(r ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPatchRequest) (*ProjectAccessRegistry, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessRegistry + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessRegistryAPIService.ApiProjectAccessRegistriesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_registries/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccessRegistry == nil { + return localVarReturnValue, nil, reportError("projectAccessRegistry is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccessRegistry + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPutRequest struct { + ctx context.Context + ApiService *ProjectAccessRegistryAPIService + projectAccessRegistry *ProjectAccessRegistry + id string +} + +// The updated ProjectAccessRegistry resource +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPutRequest) ProjectAccessRegistry(projectAccessRegistry ProjectAccessRegistry) ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPutRequest { + r.projectAccessRegistry = &projectAccessRegistry + return r +} + +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPutRequest) Execute() (*ProjectAccessRegistry, *http.Response, error) { + return r.ApiService.ApiProjectAccessRegistriesIdPutExecute(r) +} + +/* +ApiProjectAccessRegistriesIdPut Replaces the ProjectAccessRegistry resource. + +Replaces the ProjectAccessRegistry resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessRegistry identifier + @return ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPutRequest +*/ +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesIdPut(ctx context.Context, id string) ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPutRequest { + return ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccessRegistry +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesIdPutExecute(r ProjectAccessRegistryAPIApiProjectAccessRegistriesIdPutRequest) (*ProjectAccessRegistry, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessRegistry + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessRegistryAPIService.ApiProjectAccessRegistriesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_registries/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccessRegistry == nil { + return localVarReturnValue, nil, reportError("projectAccessRegistry is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccessRegistry + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessRegistryAPIApiProjectAccessRegistriesPostRequest struct { + ctx context.Context + ApiService *ProjectAccessRegistryAPIService + projectAccessRegistry *ProjectAccessRegistry +} + +// The new ProjectAccessRegistry resource +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesPostRequest) ProjectAccessRegistry(projectAccessRegistry ProjectAccessRegistry) ProjectAccessRegistryAPIApiProjectAccessRegistriesPostRequest { + r.projectAccessRegistry = &projectAccessRegistry + return r +} + +func (r ProjectAccessRegistryAPIApiProjectAccessRegistriesPostRequest) Execute() (*ProjectAccessRegistry, *http.Response, error) { + return r.ApiService.ApiProjectAccessRegistriesPostExecute(r) +} + +/* +ApiProjectAccessRegistriesPost Creates a ProjectAccessRegistry resource. + +Creates a ProjectAccessRegistry resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectAccessRegistryAPIApiProjectAccessRegistriesPostRequest +*/ +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesPost(ctx context.Context) ProjectAccessRegistryAPIApiProjectAccessRegistriesPostRequest { + return ProjectAccessRegistryAPIApiProjectAccessRegistriesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProjectAccessRegistry +func (a *ProjectAccessRegistryAPIService) ApiProjectAccessRegistriesPostExecute(r ProjectAccessRegistryAPIApiProjectAccessRegistriesPostRequest) (*ProjectAccessRegistry, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessRegistry + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessRegistryAPIService.ApiProjectAccessRegistriesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_registries" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccessRegistry == nil { + return localVarReturnValue, nil, reportError("projectAccessRegistry is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccessRegistry + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_project_access_service_account.go b/pkg/api/rewardcloud/api_project_access_service_account.go new file mode 100644 index 0000000..4cc38e0 --- /dev/null +++ b/pkg/api/rewardcloud/api_project_access_service_account.go @@ -0,0 +1,800 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ProjectAccessServiceAccountAPIService ProjectAccessServiceAccountAPI service +type ProjectAccessServiceAccountAPIService service + +type ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest struct { + ctx context.Context + ApiService *ProjectAccessServiceAccountAPIService + page *int32 + itemsPerPage *int32 + projectAccess *string + projectAccess2 *[]string +} + +// The collection page number +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest) Page(page int32) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest) ProjectAccess(projectAccess string) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest { + r.projectAccess = &projectAccess + return r +} + +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest) ProjectAccess2(projectAccess2 []string) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest { + r.projectAccess2 = &projectAccess2 + return r +} + +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest) Execute() ([]ProjectAccessServiceAccount, *http.Response, error) { + return r.ApiService.ApiProjectAccessServiceAccountsGetCollectionExecute(r) +} + +/* +ApiProjectAccessServiceAccountsGetCollection Retrieves the collection of ProjectAccessServiceAccount resources. + +Retrieves the collection of ProjectAccessServiceAccount resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest +*/ +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsGetCollection(ctx context.Context) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest { + return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProjectAccessServiceAccount +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsGetCollectionExecute(r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsGetCollectionRequest) ([]ProjectAccessServiceAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProjectAccessServiceAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessServiceAccountAPIService.ApiProjectAccessServiceAccountsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_service_accounts" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.projectAccess != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccess", r.projectAccess, "") + } + if r.projectAccess2 != nil { + t := *r.projectAccess2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccess[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectAccess[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdDeleteRequest struct { + ctx context.Context + ApiService *ProjectAccessServiceAccountAPIService + id string +} + +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProjectAccessServiceAccountsIdDeleteExecute(r) +} + +/* +ApiProjectAccessServiceAccountsIdDelete Removes the ProjectAccessServiceAccount resource. + +Removes the ProjectAccessServiceAccount resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessServiceAccount identifier + @return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdDeleteRequest +*/ +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsIdDelete(ctx context.Context, id string) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdDeleteRequest { + return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsIdDeleteExecute(r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessServiceAccountAPIService.ApiProjectAccessServiceAccountsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_service_accounts/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdGetRequest struct { + ctx context.Context + ApiService *ProjectAccessServiceAccountAPIService + id string +} + +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdGetRequest) Execute() (*ProjectAccessServiceAccount, *http.Response, error) { + return r.ApiService.ApiProjectAccessServiceAccountsIdGetExecute(r) +} + +/* +ApiProjectAccessServiceAccountsIdGet Retrieves a ProjectAccessServiceAccount resource. + +Retrieves a ProjectAccessServiceAccount resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessServiceAccount identifier + @return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdGetRequest +*/ +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsIdGet(ctx context.Context, id string) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdGetRequest { + return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccessServiceAccount +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsIdGetExecute(r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdGetRequest) (*ProjectAccessServiceAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessServiceAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessServiceAccountAPIService.ApiProjectAccessServiceAccountsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_service_accounts/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPatchRequest struct { + ctx context.Context + ApiService *ProjectAccessServiceAccountAPIService + projectAccessServiceAccount *ProjectAccessServiceAccount + id string +} + +// The updated ProjectAccessServiceAccount resource +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPatchRequest) ProjectAccessServiceAccount(projectAccessServiceAccount ProjectAccessServiceAccount) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPatchRequest { + r.projectAccessServiceAccount = &projectAccessServiceAccount + return r +} + +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPatchRequest) Execute() (*ProjectAccessServiceAccount, *http.Response, error) { + return r.ApiService.ApiProjectAccessServiceAccountsIdPatchExecute(r) +} + +/* +ApiProjectAccessServiceAccountsIdPatch Updates the ProjectAccessServiceAccount resource. + +Updates the ProjectAccessServiceAccount resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessServiceAccount identifier + @return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPatchRequest +*/ +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsIdPatch(ctx context.Context, id string) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPatchRequest { + return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccessServiceAccount +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsIdPatchExecute(r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPatchRequest) (*ProjectAccessServiceAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessServiceAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessServiceAccountAPIService.ApiProjectAccessServiceAccountsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_service_accounts/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccessServiceAccount == nil { + return localVarReturnValue, nil, reportError("projectAccessServiceAccount is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccessServiceAccount + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPutRequest struct { + ctx context.Context + ApiService *ProjectAccessServiceAccountAPIService + projectAccessServiceAccount *ProjectAccessServiceAccount + id string +} + +// The updated ProjectAccessServiceAccount resource +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPutRequest) ProjectAccessServiceAccount(projectAccessServiceAccount ProjectAccessServiceAccount) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPutRequest { + r.projectAccessServiceAccount = &projectAccessServiceAccount + return r +} + +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPutRequest) Execute() (*ProjectAccessServiceAccount, *http.Response, error) { + return r.ApiService.ApiProjectAccessServiceAccountsIdPutExecute(r) +} + +/* +ApiProjectAccessServiceAccountsIdPut Replaces the ProjectAccessServiceAccount resource. + +Replaces the ProjectAccessServiceAccount resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectAccessServiceAccount identifier + @return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPutRequest +*/ +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsIdPut(ctx context.Context, id string) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPutRequest { + return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectAccessServiceAccount +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsIdPutExecute(r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsIdPutRequest) (*ProjectAccessServiceAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessServiceAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessServiceAccountAPIService.ApiProjectAccessServiceAccountsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_service_accounts/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccessServiceAccount == nil { + return localVarReturnValue, nil, reportError("projectAccessServiceAccount is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccessServiceAccount + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsPostRequest struct { + ctx context.Context + ApiService *ProjectAccessServiceAccountAPIService + projectAccessServiceAccount *ProjectAccessServiceAccount +} + +// The new ProjectAccessServiceAccount resource +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsPostRequest) ProjectAccessServiceAccount(projectAccessServiceAccount ProjectAccessServiceAccount) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsPostRequest { + r.projectAccessServiceAccount = &projectAccessServiceAccount + return r +} + +func (r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsPostRequest) Execute() (*ProjectAccessServiceAccount, *http.Response, error) { + return r.ApiService.ApiProjectAccessServiceAccountsPostExecute(r) +} + +/* +ApiProjectAccessServiceAccountsPost Creates a ProjectAccessServiceAccount resource. + +Creates a ProjectAccessServiceAccount resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsPostRequest +*/ +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsPost(ctx context.Context) ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsPostRequest { + return ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProjectAccessServiceAccount +func (a *ProjectAccessServiceAccountAPIService) ApiProjectAccessServiceAccountsPostExecute(r ProjectAccessServiceAccountAPIApiProjectAccessServiceAccountsPostRequest) (*ProjectAccessServiceAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectAccessServiceAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectAccessServiceAccountAPIService.ApiProjectAccessServiceAccountsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_access_service_accounts" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectAccessServiceAccount == nil { + return localVarReturnValue, nil, reportError("projectAccessServiceAccount is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectAccessServiceAccount + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_project_env_var.go b/pkg/api/rewardcloud/api_project_env_var.go new file mode 100644 index 0000000..01f8ab1 --- /dev/null +++ b/pkg/api/rewardcloud/api_project_env_var.go @@ -0,0 +1,826 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ProjectEnvVarAPIService ProjectEnvVarAPI service +type ProjectEnvVarAPIService service + +type ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest struct { + ctx context.Context + ApiService *ProjectEnvVarAPIService + page *int32 + itemsPerPage *int32 + project *string + project2 *[]string + envVarType *string + envVarType2 *[]string +} + +// The collection page number +func (r ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest) Page(page int32) ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest) Project(project string) ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest { + r.project = &project + return r +} + +func (r ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest) Project2(project2 []string) ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest { + r.project2 = &project2 + return r +} + +func (r ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest) EnvVarType(envVarType string) ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest { + r.envVarType = &envVarType + return r +} + +func (r ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest) EnvVarType2(envVarType2 []string) ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest { + r.envVarType2 = &envVarType2 + return r +} + +func (r ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest) Execute() ([]ProjectEnvVar, *http.Response, error) { + return r.ApiService.ApiProjectEnvVarsGetCollectionExecute(r) +} + +/* +ApiProjectEnvVarsGetCollection Retrieves the collection of ProjectEnvVar resources. + +Retrieves the collection of ProjectEnvVar resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest +*/ +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsGetCollection(ctx context.Context) ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest { + return ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProjectEnvVar +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsGetCollectionExecute(r ProjectEnvVarAPIApiProjectEnvVarsGetCollectionRequest) ([]ProjectEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProjectEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectEnvVarAPIService.ApiProjectEnvVarsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.project != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project", r.project, "") + } + if r.project2 != nil { + t := *r.project2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "project[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "project[]", t, "multi") + } + } + if r.envVarType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType", r.envVarType, "") + } + if r.envVarType2 != nil { + t := *r.envVarType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectEnvVarAPIApiProjectEnvVarsIdDeleteRequest struct { + ctx context.Context + ApiService *ProjectEnvVarAPIService + id string +} + +func (r ProjectEnvVarAPIApiProjectEnvVarsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProjectEnvVarsIdDeleteExecute(r) +} + +/* +ApiProjectEnvVarsIdDelete Removes the ProjectEnvVar resource. + +Removes the ProjectEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectEnvVar identifier + @return ProjectEnvVarAPIApiProjectEnvVarsIdDeleteRequest +*/ +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsIdDelete(ctx context.Context, id string) ProjectEnvVarAPIApiProjectEnvVarsIdDeleteRequest { + return ProjectEnvVarAPIApiProjectEnvVarsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsIdDeleteExecute(r ProjectEnvVarAPIApiProjectEnvVarsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectEnvVarAPIService.ApiProjectEnvVarsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProjectEnvVarAPIApiProjectEnvVarsIdGetRequest struct { + ctx context.Context + ApiService *ProjectEnvVarAPIService + id string +} + +func (r ProjectEnvVarAPIApiProjectEnvVarsIdGetRequest) Execute() (*ProjectEnvVar, *http.Response, error) { + return r.ApiService.ApiProjectEnvVarsIdGetExecute(r) +} + +/* +ApiProjectEnvVarsIdGet Retrieves a ProjectEnvVar resource. + +Retrieves a ProjectEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectEnvVar identifier + @return ProjectEnvVarAPIApiProjectEnvVarsIdGetRequest +*/ +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsIdGet(ctx context.Context, id string) ProjectEnvVarAPIApiProjectEnvVarsIdGetRequest { + return ProjectEnvVarAPIApiProjectEnvVarsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectEnvVar +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsIdGetExecute(r ProjectEnvVarAPIApiProjectEnvVarsIdGetRequest) (*ProjectEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectEnvVarAPIService.ApiProjectEnvVarsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectEnvVarAPIApiProjectEnvVarsIdPatchRequest struct { + ctx context.Context + ApiService *ProjectEnvVarAPIService + projectEnvVar *ProjectEnvVar + id string +} + +// The updated ProjectEnvVar resource +func (r ProjectEnvVarAPIApiProjectEnvVarsIdPatchRequest) ProjectEnvVar(projectEnvVar ProjectEnvVar) ProjectEnvVarAPIApiProjectEnvVarsIdPatchRequest { + r.projectEnvVar = &projectEnvVar + return r +} + +func (r ProjectEnvVarAPIApiProjectEnvVarsIdPatchRequest) Execute() (*ProjectEnvVar, *http.Response, error) { + return r.ApiService.ApiProjectEnvVarsIdPatchExecute(r) +} + +/* +ApiProjectEnvVarsIdPatch Updates the ProjectEnvVar resource. + +Updates the ProjectEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectEnvVar identifier + @return ProjectEnvVarAPIApiProjectEnvVarsIdPatchRequest +*/ +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsIdPatch(ctx context.Context, id string) ProjectEnvVarAPIApiProjectEnvVarsIdPatchRequest { + return ProjectEnvVarAPIApiProjectEnvVarsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectEnvVar +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsIdPatchExecute(r ProjectEnvVarAPIApiProjectEnvVarsIdPatchRequest) (*ProjectEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectEnvVarAPIService.ApiProjectEnvVarsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectEnvVar == nil { + return localVarReturnValue, nil, reportError("projectEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectEnvVarAPIApiProjectEnvVarsIdPutRequest struct { + ctx context.Context + ApiService *ProjectEnvVarAPIService + projectEnvVar *ProjectEnvVar + id string +} + +// The updated ProjectEnvVar resource +func (r ProjectEnvVarAPIApiProjectEnvVarsIdPutRequest) ProjectEnvVar(projectEnvVar ProjectEnvVar) ProjectEnvVarAPIApiProjectEnvVarsIdPutRequest { + r.projectEnvVar = &projectEnvVar + return r +} + +func (r ProjectEnvVarAPIApiProjectEnvVarsIdPutRequest) Execute() (*ProjectEnvVar, *http.Response, error) { + return r.ApiService.ApiProjectEnvVarsIdPutExecute(r) +} + +/* +ApiProjectEnvVarsIdPut Replaces the ProjectEnvVar resource. + +Replaces the ProjectEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectEnvVar identifier + @return ProjectEnvVarAPIApiProjectEnvVarsIdPutRequest +*/ +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsIdPut(ctx context.Context, id string) ProjectEnvVarAPIApiProjectEnvVarsIdPutRequest { + return ProjectEnvVarAPIApiProjectEnvVarsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectEnvVar +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsIdPutExecute(r ProjectEnvVarAPIApiProjectEnvVarsIdPutRequest) (*ProjectEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectEnvVarAPIService.ApiProjectEnvVarsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectEnvVar == nil { + return localVarReturnValue, nil, reportError("projectEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectEnvVarAPIApiProjectEnvVarsPostRequest struct { + ctx context.Context + ApiService *ProjectEnvVarAPIService + projectEnvVar *ProjectEnvVar +} + +// The new ProjectEnvVar resource +func (r ProjectEnvVarAPIApiProjectEnvVarsPostRequest) ProjectEnvVar(projectEnvVar ProjectEnvVar) ProjectEnvVarAPIApiProjectEnvVarsPostRequest { + r.projectEnvVar = &projectEnvVar + return r +} + +func (r ProjectEnvVarAPIApiProjectEnvVarsPostRequest) Execute() (*ProjectEnvVar, *http.Response, error) { + return r.ApiService.ApiProjectEnvVarsPostExecute(r) +} + +/* +ApiProjectEnvVarsPost Creates a ProjectEnvVar resource. + +Creates a ProjectEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectEnvVarAPIApiProjectEnvVarsPostRequest +*/ +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsPost(ctx context.Context) ProjectEnvVarAPIApiProjectEnvVarsPostRequest { + return ProjectEnvVarAPIApiProjectEnvVarsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProjectEnvVar +func (a *ProjectEnvVarAPIService) ApiProjectEnvVarsPostExecute(r ProjectEnvVarAPIApiProjectEnvVarsPostRequest) (*ProjectEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectEnvVarAPIService.ApiProjectEnvVarsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectEnvVar == nil { + return localVarReturnValue, nil, reportError("projectEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_project_type.go b/pkg/api/rewardcloud/api_project_type.go new file mode 100644 index 0000000..5e07360 --- /dev/null +++ b/pkg/api/rewardcloud/api_project_type.go @@ -0,0 +1,782 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// ProjectTypeAPIService ProjectTypeAPI service +type ProjectTypeAPIService service + +type ProjectTypeAPIApiProjectTypesGetCollectionRequest struct { + ctx context.Context + ApiService *ProjectTypeAPIService + page *int32 + itemsPerPage *int32 + orderName *string +} + +// The collection page number +func (r ProjectTypeAPIApiProjectTypesGetCollectionRequest) Page(page int32) ProjectTypeAPIApiProjectTypesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProjectTypeAPIApiProjectTypesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProjectTypeAPIApiProjectTypesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProjectTypeAPIApiProjectTypesGetCollectionRequest) OrderName(orderName string) ProjectTypeAPIApiProjectTypesGetCollectionRequest { + r.orderName = &orderName + return r +} + +func (r ProjectTypeAPIApiProjectTypesGetCollectionRequest) Execute() ([]ProjectType, *http.Response, error) { + return r.ApiService.ApiProjectTypesGetCollectionExecute(r) +} + +/* +ApiProjectTypesGetCollection Retrieves the collection of ProjectType resources. + +Retrieves the collection of ProjectType resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectTypeAPIApiProjectTypesGetCollectionRequest +*/ +func (a *ProjectTypeAPIService) ApiProjectTypesGetCollection(ctx context.Context) ProjectTypeAPIApiProjectTypesGetCollectionRequest { + return ProjectTypeAPIApiProjectTypesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProjectType +func (a *ProjectTypeAPIService) ApiProjectTypesGetCollectionExecute(r ProjectTypeAPIApiProjectTypesGetCollectionRequest) ([]ProjectType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProjectType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeAPIService.ApiProjectTypesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.orderName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[name]", r.orderName, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeAPIApiProjectTypesIdDeleteRequest struct { + ctx context.Context + ApiService *ProjectTypeAPIService + id string +} + +func (r ProjectTypeAPIApiProjectTypesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProjectTypesIdDeleteExecute(r) +} + +/* +ApiProjectTypesIdDelete Removes the ProjectType resource. + +Removes the ProjectType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectType identifier + @return ProjectTypeAPIApiProjectTypesIdDeleteRequest +*/ +func (a *ProjectTypeAPIService) ApiProjectTypesIdDelete(ctx context.Context, id string) ProjectTypeAPIApiProjectTypesIdDeleteRequest { + return ProjectTypeAPIApiProjectTypesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProjectTypeAPIService) ApiProjectTypesIdDeleteExecute(r ProjectTypeAPIApiProjectTypesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeAPIService.ApiProjectTypesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProjectTypeAPIApiProjectTypesIdGetRequest struct { + ctx context.Context + ApiService *ProjectTypeAPIService + id string +} + +func (r ProjectTypeAPIApiProjectTypesIdGetRequest) Execute() (*ProjectType, *http.Response, error) { + return r.ApiService.ApiProjectTypesIdGetExecute(r) +} + +/* +ApiProjectTypesIdGet Retrieves a ProjectType resource. + +Retrieves a ProjectType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectType identifier + @return ProjectTypeAPIApiProjectTypesIdGetRequest +*/ +func (a *ProjectTypeAPIService) ApiProjectTypesIdGet(ctx context.Context, id string) ProjectTypeAPIApiProjectTypesIdGetRequest { + return ProjectTypeAPIApiProjectTypesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectType +func (a *ProjectTypeAPIService) ApiProjectTypesIdGetExecute(r ProjectTypeAPIApiProjectTypesIdGetRequest) (*ProjectType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeAPIService.ApiProjectTypesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeAPIApiProjectTypesIdPatchRequest struct { + ctx context.Context + ApiService *ProjectTypeAPIService + projectType *ProjectType + id string +} + +// The updated ProjectType resource +func (r ProjectTypeAPIApiProjectTypesIdPatchRequest) ProjectType(projectType ProjectType) ProjectTypeAPIApiProjectTypesIdPatchRequest { + r.projectType = &projectType + return r +} + +func (r ProjectTypeAPIApiProjectTypesIdPatchRequest) Execute() (*ProjectType, *http.Response, error) { + return r.ApiService.ApiProjectTypesIdPatchExecute(r) +} + +/* +ApiProjectTypesIdPatch Updates the ProjectType resource. + +Updates the ProjectType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectType identifier + @return ProjectTypeAPIApiProjectTypesIdPatchRequest +*/ +func (a *ProjectTypeAPIService) ApiProjectTypesIdPatch(ctx context.Context, id string) ProjectTypeAPIApiProjectTypesIdPatchRequest { + return ProjectTypeAPIApiProjectTypesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectType +func (a *ProjectTypeAPIService) ApiProjectTypesIdPatchExecute(r ProjectTypeAPIApiProjectTypesIdPatchRequest) (*ProjectType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeAPIService.ApiProjectTypesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectType == nil { + return localVarReturnValue, nil, reportError("projectType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeAPIApiProjectTypesIdPutRequest struct { + ctx context.Context + ApiService *ProjectTypeAPIService + projectType *ProjectType + id string +} + +// The updated ProjectType resource +func (r ProjectTypeAPIApiProjectTypesIdPutRequest) ProjectType(projectType ProjectType) ProjectTypeAPIApiProjectTypesIdPutRequest { + r.projectType = &projectType + return r +} + +func (r ProjectTypeAPIApiProjectTypesIdPutRequest) Execute() (*ProjectType, *http.Response, error) { + return r.ApiService.ApiProjectTypesIdPutExecute(r) +} + +/* +ApiProjectTypesIdPut Replaces the ProjectType resource. + +Replaces the ProjectType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectType identifier + @return ProjectTypeAPIApiProjectTypesIdPutRequest +*/ +func (a *ProjectTypeAPIService) ApiProjectTypesIdPut(ctx context.Context, id string) ProjectTypeAPIApiProjectTypesIdPutRequest { + return ProjectTypeAPIApiProjectTypesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectType +func (a *ProjectTypeAPIService) ApiProjectTypesIdPutExecute(r ProjectTypeAPIApiProjectTypesIdPutRequest) (*ProjectType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeAPIService.ApiProjectTypesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectType == nil { + return localVarReturnValue, nil, reportError("projectType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeAPIApiProjectTypesPostRequest struct { + ctx context.Context + ApiService *ProjectTypeAPIService + projectType *ProjectType +} + +// The new ProjectType resource +func (r ProjectTypeAPIApiProjectTypesPostRequest) ProjectType(projectType ProjectType) ProjectTypeAPIApiProjectTypesPostRequest { + r.projectType = &projectType + return r +} + +func (r ProjectTypeAPIApiProjectTypesPostRequest) Execute() (*ProjectType, *http.Response, error) { + return r.ApiService.ApiProjectTypesPostExecute(r) +} + +/* +ApiProjectTypesPost Creates a ProjectType resource. + +Creates a ProjectType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectTypeAPIApiProjectTypesPostRequest +*/ +func (a *ProjectTypeAPIService) ApiProjectTypesPost(ctx context.Context) ProjectTypeAPIApiProjectTypesPostRequest { + return ProjectTypeAPIApiProjectTypesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProjectType +func (a *ProjectTypeAPIService) ApiProjectTypesPostExecute(r ProjectTypeAPIApiProjectTypesPostRequest) (*ProjectType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeAPIService.ApiProjectTypesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectType == nil { + return localVarReturnValue, nil, reportError("projectType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectType + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_project_type_version.go b/pkg/api/rewardcloud/api_project_type_version.go new file mode 100644 index 0000000..277b23c --- /dev/null +++ b/pkg/api/rewardcloud/api_project_type_version.go @@ -0,0 +1,800 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ProjectTypeVersionAPIService ProjectTypeVersionAPI service +type ProjectTypeVersionAPIService service + +type ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionAPIService + page *int32 + itemsPerPage *int32 + projectType *string + projectType2 *[]string +} + +// The collection page number +func (r ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest) Page(page int32) ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest) ProjectType(projectType string) ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest { + r.projectType = &projectType + return r +} + +func (r ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest) ProjectType2(projectType2 []string) ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest { + r.projectType2 = &projectType2 + return r +} + +func (r ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest) Execute() ([]ProjectTypeVersion, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionsGetCollectionExecute(r) +} + +/* +ApiProjectTypeVersionsGetCollection Retrieves the collection of ProjectTypeVersion resources. + +Retrieves the collection of ProjectTypeVersion resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest +*/ +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsGetCollection(ctx context.Context) ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest { + return ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProjectTypeVersion +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsGetCollectionExecute(r ProjectTypeVersionAPIApiProjectTypeVersionsGetCollectionRequest) ([]ProjectTypeVersion, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProjectTypeVersion + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionAPIService.ApiProjectTypeVersionsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_versions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.projectType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectType", r.projectType, "") + } + if r.projectType2 != nil { + t := *r.projectType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectType[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionAPIApiProjectTypeVersionsIdDeleteRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionAPIService + id string +} + +func (r ProjectTypeVersionAPIApiProjectTypeVersionsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProjectTypeVersionsIdDeleteExecute(r) +} + +/* +ApiProjectTypeVersionsIdDelete Removes the ProjectTypeVersion resource. + +Removes the ProjectTypeVersion resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersion identifier + @return ProjectTypeVersionAPIApiProjectTypeVersionsIdDeleteRequest +*/ +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsIdDelete(ctx context.Context, id string) ProjectTypeVersionAPIApiProjectTypeVersionsIdDeleteRequest { + return ProjectTypeVersionAPIApiProjectTypeVersionsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsIdDeleteExecute(r ProjectTypeVersionAPIApiProjectTypeVersionsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionAPIService.ApiProjectTypeVersionsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_versions/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProjectTypeVersionAPIApiProjectTypeVersionsIdGetRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionAPIService + id string +} + +func (r ProjectTypeVersionAPIApiProjectTypeVersionsIdGetRequest) Execute() (*ProjectTypeVersion, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionsIdGetExecute(r) +} + +/* +ApiProjectTypeVersionsIdGet Retrieves a ProjectTypeVersion resource. + +Retrieves a ProjectTypeVersion resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersion identifier + @return ProjectTypeVersionAPIApiProjectTypeVersionsIdGetRequest +*/ +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsIdGet(ctx context.Context, id string) ProjectTypeVersionAPIApiProjectTypeVersionsIdGetRequest { + return ProjectTypeVersionAPIApiProjectTypeVersionsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersion +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsIdGetExecute(r ProjectTypeVersionAPIApiProjectTypeVersionsIdGetRequest) (*ProjectTypeVersion, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersion + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionAPIService.ApiProjectTypeVersionsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_versions/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionAPIApiProjectTypeVersionsIdPatchRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionAPIService + projectTypeVersion *ProjectTypeVersion + id string +} + +// The updated ProjectTypeVersion resource +func (r ProjectTypeVersionAPIApiProjectTypeVersionsIdPatchRequest) ProjectTypeVersion(projectTypeVersion ProjectTypeVersion) ProjectTypeVersionAPIApiProjectTypeVersionsIdPatchRequest { + r.projectTypeVersion = &projectTypeVersion + return r +} + +func (r ProjectTypeVersionAPIApiProjectTypeVersionsIdPatchRequest) Execute() (*ProjectTypeVersion, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionsIdPatchExecute(r) +} + +/* +ApiProjectTypeVersionsIdPatch Updates the ProjectTypeVersion resource. + +Updates the ProjectTypeVersion resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersion identifier + @return ProjectTypeVersionAPIApiProjectTypeVersionsIdPatchRequest +*/ +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsIdPatch(ctx context.Context, id string) ProjectTypeVersionAPIApiProjectTypeVersionsIdPatchRequest { + return ProjectTypeVersionAPIApiProjectTypeVersionsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersion +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsIdPatchExecute(r ProjectTypeVersionAPIApiProjectTypeVersionsIdPatchRequest) (*ProjectTypeVersion, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersion + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionAPIService.ApiProjectTypeVersionsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_versions/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectTypeVersion == nil { + return localVarReturnValue, nil, reportError("projectTypeVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectTypeVersion + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionAPIApiProjectTypeVersionsIdPutRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionAPIService + projectTypeVersion *ProjectTypeVersion + id string +} + +// The updated ProjectTypeVersion resource +func (r ProjectTypeVersionAPIApiProjectTypeVersionsIdPutRequest) ProjectTypeVersion(projectTypeVersion ProjectTypeVersion) ProjectTypeVersionAPIApiProjectTypeVersionsIdPutRequest { + r.projectTypeVersion = &projectTypeVersion + return r +} + +func (r ProjectTypeVersionAPIApiProjectTypeVersionsIdPutRequest) Execute() (*ProjectTypeVersion, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionsIdPutExecute(r) +} + +/* +ApiProjectTypeVersionsIdPut Replaces the ProjectTypeVersion resource. + +Replaces the ProjectTypeVersion resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersion identifier + @return ProjectTypeVersionAPIApiProjectTypeVersionsIdPutRequest +*/ +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsIdPut(ctx context.Context, id string) ProjectTypeVersionAPIApiProjectTypeVersionsIdPutRequest { + return ProjectTypeVersionAPIApiProjectTypeVersionsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersion +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsIdPutExecute(r ProjectTypeVersionAPIApiProjectTypeVersionsIdPutRequest) (*ProjectTypeVersion, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersion + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionAPIService.ApiProjectTypeVersionsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_versions/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectTypeVersion == nil { + return localVarReturnValue, nil, reportError("projectTypeVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectTypeVersion + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionAPIApiProjectTypeVersionsPostRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionAPIService + projectTypeVersion *ProjectTypeVersion +} + +// The new ProjectTypeVersion resource +func (r ProjectTypeVersionAPIApiProjectTypeVersionsPostRequest) ProjectTypeVersion(projectTypeVersion ProjectTypeVersion) ProjectTypeVersionAPIApiProjectTypeVersionsPostRequest { + r.projectTypeVersion = &projectTypeVersion + return r +} + +func (r ProjectTypeVersionAPIApiProjectTypeVersionsPostRequest) Execute() (*ProjectTypeVersion, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionsPostExecute(r) +} + +/* +ApiProjectTypeVersionsPost Creates a ProjectTypeVersion resource. + +Creates a ProjectTypeVersion resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectTypeVersionAPIApiProjectTypeVersionsPostRequest +*/ +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsPost(ctx context.Context) ProjectTypeVersionAPIApiProjectTypeVersionsPostRequest { + return ProjectTypeVersionAPIApiProjectTypeVersionsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersion +func (a *ProjectTypeVersionAPIService) ApiProjectTypeVersionsPostExecute(r ProjectTypeVersionAPIApiProjectTypeVersionsPostRequest) (*ProjectTypeVersion, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersion + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionAPIService.ApiProjectTypeVersionsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_versions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectTypeVersion == nil { + return localVarReturnValue, nil, reportError("projectTypeVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectTypeVersion + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_project_type_version_env_var.go b/pkg/api/rewardcloud/api_project_type_version_env_var.go new file mode 100644 index 0000000..671ae20 --- /dev/null +++ b/pkg/api/rewardcloud/api_project_type_version_env_var.go @@ -0,0 +1,826 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ProjectTypeVersionEnvVarAPIService ProjectTypeVersionEnvVarAPI service +type ProjectTypeVersionEnvVarAPIService service + +type ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarAPIService + page *int32 + itemsPerPage *int32 + projectTypeVersion *string + projectTypeVersion2 *[]string + envVarValidations *string + envVarValidations2 *[]string +} + +// The collection page number +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest) Page(page int32) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest) ProjectTypeVersion(projectTypeVersion string) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest { + r.projectTypeVersion = &projectTypeVersion + return r +} + +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest) ProjectTypeVersion2(projectTypeVersion2 []string) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest { + r.projectTypeVersion2 = &projectTypeVersion2 + return r +} + +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest) EnvVarValidations(envVarValidations string) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest { + r.envVarValidations = &envVarValidations + return r +} + +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest) EnvVarValidations2(envVarValidations2 []string) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest { + r.envVarValidations2 = &envVarValidations2 + return r +} + +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest) Execute() ([]ProjectTypeVersionEnvVar, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarsGetCollectionExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarsGetCollection Retrieves the collection of ProjectTypeVersionEnvVar resources. + +Retrieves the collection of ProjectTypeVersionEnvVar resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest +*/ +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsGetCollection(ctx context.Context) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest { + return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProjectTypeVersionEnvVar +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsGetCollectionExecute(r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsGetCollectionRequest) ([]ProjectTypeVersionEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProjectTypeVersionEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarAPIService.ApiProjectTypeVersionEnvVarsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.projectTypeVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion", r.projectTypeVersion, "") + } + if r.projectTypeVersion2 != nil { + t := *r.projectTypeVersion2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion[]", t, "multi") + } + } + if r.envVarValidations != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarValidations", r.envVarValidations, "") + } + if r.envVarValidations2 != nil { + t := *r.envVarValidations2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarValidations[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarValidations[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdDeleteRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarAPIService + id string +} + +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarsIdDeleteExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarsIdDelete Removes the ProjectTypeVersionEnvVar resource. + +Removes the ProjectTypeVersionEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersionEnvVar identifier + @return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdDeleteRequest +*/ +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsIdDelete(ctx context.Context, id string) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdDeleteRequest { + return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsIdDeleteExecute(r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarAPIService.ApiProjectTypeVersionEnvVarsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdGetRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarAPIService + id string +} + +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdGetRequest) Execute() (*ProjectTypeVersionEnvVar, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarsIdGetExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarsIdGet Retrieves a ProjectTypeVersionEnvVar resource. + +Retrieves a ProjectTypeVersionEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersionEnvVar identifier + @return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdGetRequest +*/ +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsIdGet(ctx context.Context, id string) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdGetRequest { + return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersionEnvVar +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsIdGetExecute(r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdGetRequest) (*ProjectTypeVersionEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersionEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarAPIService.ApiProjectTypeVersionEnvVarsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPatchRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarAPIService + projectTypeVersionEnvVar *ProjectTypeVersionEnvVar + id string +} + +// The updated ProjectTypeVersionEnvVar resource +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPatchRequest) ProjectTypeVersionEnvVar(projectTypeVersionEnvVar ProjectTypeVersionEnvVar) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPatchRequest { + r.projectTypeVersionEnvVar = &projectTypeVersionEnvVar + return r +} + +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPatchRequest) Execute() (*ProjectTypeVersionEnvVar, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarsIdPatchExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarsIdPatch Updates the ProjectTypeVersionEnvVar resource. + +Updates the ProjectTypeVersionEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersionEnvVar identifier + @return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPatchRequest +*/ +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsIdPatch(ctx context.Context, id string) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPatchRequest { + return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersionEnvVar +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsIdPatchExecute(r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPatchRequest) (*ProjectTypeVersionEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersionEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarAPIService.ApiProjectTypeVersionEnvVarsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectTypeVersionEnvVar == nil { + return localVarReturnValue, nil, reportError("projectTypeVersionEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectTypeVersionEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPutRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarAPIService + projectTypeVersionEnvVar *ProjectTypeVersionEnvVar + id string +} + +// The updated ProjectTypeVersionEnvVar resource +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPutRequest) ProjectTypeVersionEnvVar(projectTypeVersionEnvVar ProjectTypeVersionEnvVar) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPutRequest { + r.projectTypeVersionEnvVar = &projectTypeVersionEnvVar + return r +} + +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPutRequest) Execute() (*ProjectTypeVersionEnvVar, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarsIdPutExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarsIdPut Replaces the ProjectTypeVersionEnvVar resource. + +Replaces the ProjectTypeVersionEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersionEnvVar identifier + @return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPutRequest +*/ +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsIdPut(ctx context.Context, id string) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPutRequest { + return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersionEnvVar +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsIdPutExecute(r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsIdPutRequest) (*ProjectTypeVersionEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersionEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarAPIService.ApiProjectTypeVersionEnvVarsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectTypeVersionEnvVar == nil { + return localVarReturnValue, nil, reportError("projectTypeVersionEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectTypeVersionEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsPostRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarAPIService + projectTypeVersionEnvVar *ProjectTypeVersionEnvVar +} + +// The new ProjectTypeVersionEnvVar resource +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsPostRequest) ProjectTypeVersionEnvVar(projectTypeVersionEnvVar ProjectTypeVersionEnvVar) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsPostRequest { + r.projectTypeVersionEnvVar = &projectTypeVersionEnvVar + return r +} + +func (r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsPostRequest) Execute() (*ProjectTypeVersionEnvVar, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarsPostExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarsPost Creates a ProjectTypeVersionEnvVar resource. + +Creates a ProjectTypeVersionEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsPostRequest +*/ +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsPost(ctx context.Context) ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsPostRequest { + return ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersionEnvVar +func (a *ProjectTypeVersionEnvVarAPIService) ApiProjectTypeVersionEnvVarsPostExecute(r ProjectTypeVersionEnvVarAPIApiProjectTypeVersionEnvVarsPostRequest) (*ProjectTypeVersionEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersionEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarAPIService.ApiProjectTypeVersionEnvVarsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectTypeVersionEnvVar == nil { + return localVarReturnValue, nil, reportError("projectTypeVersionEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectTypeVersionEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_project_type_version_env_var_example.go b/pkg/api/rewardcloud/api_project_type_version_env_var_example.go new file mode 100644 index 0000000..88bd26c --- /dev/null +++ b/pkg/api/rewardcloud/api_project_type_version_env_var_example.go @@ -0,0 +1,800 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ProjectTypeVersionEnvVarExampleAPIService ProjectTypeVersionEnvVarExampleAPI service +type ProjectTypeVersionEnvVarExampleAPIService service + +type ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarExampleAPIService + page *int32 + itemsPerPage *int32 + projectTypeVersionEnvVar *string + projectTypeVersionEnvVar2 *[]string +} + +// The collection page number +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest) Page(page int32) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest) ProjectTypeVersionEnvVar(projectTypeVersionEnvVar string) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest { + r.projectTypeVersionEnvVar = &projectTypeVersionEnvVar + return r +} + +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest) ProjectTypeVersionEnvVar2(projectTypeVersionEnvVar2 []string) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest { + r.projectTypeVersionEnvVar2 = &projectTypeVersionEnvVar2 + return r +} + +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest) Execute() ([]ProjectTypeVersionEnvVarExample, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarExamplesGetCollectionExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarExamplesGetCollection Retrieves the collection of ProjectTypeVersionEnvVarExample resources. + +Retrieves the collection of ProjectTypeVersionEnvVarExample resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest +*/ +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesGetCollection(ctx context.Context) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest { + return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ProjectTypeVersionEnvVarExample +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesGetCollectionExecute(r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesGetCollectionRequest) ([]ProjectTypeVersionEnvVarExample, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ProjectTypeVersionEnvVarExample + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarExampleAPIService.ApiProjectTypeVersionEnvVarExamplesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_var_examples" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.projectTypeVersionEnvVar != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersionEnvVar", r.projectTypeVersionEnvVar, "") + } + if r.projectTypeVersionEnvVar2 != nil { + t := *r.projectTypeVersionEnvVar2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersionEnvVar[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersionEnvVar[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdDeleteRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarExampleAPIService + id string +} + +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarExamplesIdDeleteExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarExamplesIdDelete Removes the ProjectTypeVersionEnvVarExample resource. + +Removes the ProjectTypeVersionEnvVarExample resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersionEnvVarExample identifier + @return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdDeleteRequest +*/ +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesIdDelete(ctx context.Context, id string) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdDeleteRequest { + return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesIdDeleteExecute(r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarExampleAPIService.ApiProjectTypeVersionEnvVarExamplesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_var_examples/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdGetRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarExampleAPIService + id string +} + +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdGetRequest) Execute() (*ProjectTypeVersionEnvVarExample, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarExamplesIdGetExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarExamplesIdGet Retrieves a ProjectTypeVersionEnvVarExample resource. + +Retrieves a ProjectTypeVersionEnvVarExample resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersionEnvVarExample identifier + @return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdGetRequest +*/ +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesIdGet(ctx context.Context, id string) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdGetRequest { + return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersionEnvVarExample +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesIdGetExecute(r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdGetRequest) (*ProjectTypeVersionEnvVarExample, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersionEnvVarExample + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarExampleAPIService.ApiProjectTypeVersionEnvVarExamplesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_var_examples/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPatchRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarExampleAPIService + projectTypeVersionEnvVarExample *ProjectTypeVersionEnvVarExample + id string +} + +// The updated ProjectTypeVersionEnvVarExample resource +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPatchRequest) ProjectTypeVersionEnvVarExample(projectTypeVersionEnvVarExample ProjectTypeVersionEnvVarExample) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPatchRequest { + r.projectTypeVersionEnvVarExample = &projectTypeVersionEnvVarExample + return r +} + +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPatchRequest) Execute() (*ProjectTypeVersionEnvVarExample, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarExamplesIdPatchExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarExamplesIdPatch Updates the ProjectTypeVersionEnvVarExample resource. + +Updates the ProjectTypeVersionEnvVarExample resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersionEnvVarExample identifier + @return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPatchRequest +*/ +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesIdPatch(ctx context.Context, id string) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPatchRequest { + return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersionEnvVarExample +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesIdPatchExecute(r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPatchRequest) (*ProjectTypeVersionEnvVarExample, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersionEnvVarExample + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarExampleAPIService.ApiProjectTypeVersionEnvVarExamplesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_var_examples/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectTypeVersionEnvVarExample == nil { + return localVarReturnValue, nil, reportError("projectTypeVersionEnvVarExample is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectTypeVersionEnvVarExample + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPutRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarExampleAPIService + projectTypeVersionEnvVarExample *ProjectTypeVersionEnvVarExample + id string +} + +// The updated ProjectTypeVersionEnvVarExample resource +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPutRequest) ProjectTypeVersionEnvVarExample(projectTypeVersionEnvVarExample ProjectTypeVersionEnvVarExample) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPutRequest { + r.projectTypeVersionEnvVarExample = &projectTypeVersionEnvVarExample + return r +} + +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPutRequest) Execute() (*ProjectTypeVersionEnvVarExample, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarExamplesIdPutExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarExamplesIdPut Replaces the ProjectTypeVersionEnvVarExample resource. + +Replaces the ProjectTypeVersionEnvVarExample resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ProjectTypeVersionEnvVarExample identifier + @return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPutRequest +*/ +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesIdPut(ctx context.Context, id string) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPutRequest { + return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersionEnvVarExample +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesIdPutExecute(r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesIdPutRequest) (*ProjectTypeVersionEnvVarExample, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersionEnvVarExample + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarExampleAPIService.ApiProjectTypeVersionEnvVarExamplesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_var_examples/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectTypeVersionEnvVarExample == nil { + return localVarReturnValue, nil, reportError("projectTypeVersionEnvVarExample is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectTypeVersionEnvVarExample + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesPostRequest struct { + ctx context.Context + ApiService *ProjectTypeVersionEnvVarExampleAPIService + projectTypeVersionEnvVarExample *ProjectTypeVersionEnvVarExample +} + +// The new ProjectTypeVersionEnvVarExample resource +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesPostRequest) ProjectTypeVersionEnvVarExample(projectTypeVersionEnvVarExample ProjectTypeVersionEnvVarExample) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesPostRequest { + r.projectTypeVersionEnvVarExample = &projectTypeVersionEnvVarExample + return r +} + +func (r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesPostRequest) Execute() (*ProjectTypeVersionEnvVarExample, *http.Response, error) { + return r.ApiService.ApiProjectTypeVersionEnvVarExamplesPostExecute(r) +} + +/* +ApiProjectTypeVersionEnvVarExamplesPost Creates a ProjectTypeVersionEnvVarExample resource. + +Creates a ProjectTypeVersionEnvVarExample resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesPostRequest +*/ +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesPost(ctx context.Context) ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesPostRequest { + return ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProjectTypeVersionEnvVarExample +func (a *ProjectTypeVersionEnvVarExampleAPIService) ApiProjectTypeVersionEnvVarExamplesPostExecute(r ProjectTypeVersionEnvVarExampleAPIApiProjectTypeVersionEnvVarExamplesPostRequest) (*ProjectTypeVersionEnvVarExample, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProjectTypeVersionEnvVarExample + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectTypeVersionEnvVarExampleAPIService.ApiProjectTypeVersionEnvVarExamplesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/project_type_version_env_var_examples" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectTypeVersionEnvVarExample == nil { + return localVarReturnValue, nil, reportError("projectTypeVersionEnvVarExample is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectTypeVersionEnvVarExample + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_provider.go b/pkg/api/rewardcloud/api_provider.go new file mode 100644 index 0000000..34ac6b8 --- /dev/null +++ b/pkg/api/rewardcloud/api_provider.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// ProviderAPIService ProviderAPI service +type ProviderAPIService service + +type ProviderAPIApiProvidersGetCollectionRequest struct { + ctx context.Context + ApiService *ProviderAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r ProviderAPIApiProvidersGetCollectionRequest) Page(page int32) ProviderAPIApiProvidersGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ProviderAPIApiProvidersGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ProviderAPIApiProvidersGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ProviderAPIApiProvidersGetCollectionRequest) Execute() ([]Provider, *http.Response, error) { + return r.ApiService.ApiProvidersGetCollectionExecute(r) +} + +/* +ApiProvidersGetCollection Retrieves the collection of Provider resources. + +Retrieves the collection of Provider resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProviderAPIApiProvidersGetCollectionRequest +*/ +func (a *ProviderAPIService) ApiProvidersGetCollection(ctx context.Context) ProviderAPIApiProvidersGetCollectionRequest { + return ProviderAPIApiProvidersGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []Provider +func (a *ProviderAPIService) ApiProvidersGetCollectionExecute(r ProviderAPIApiProvidersGetCollectionRequest) ([]Provider, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Provider + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProviderAPIService.ApiProvidersGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/providers" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProviderAPIApiProvidersIdDeleteRequest struct { + ctx context.Context + ApiService *ProviderAPIService + id string +} + +func (r ProviderAPIApiProvidersIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiProvidersIdDeleteExecute(r) +} + +/* +ApiProvidersIdDelete Removes the Provider resource. + +Removes the Provider resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Provider identifier + @return ProviderAPIApiProvidersIdDeleteRequest +*/ +func (a *ProviderAPIService) ApiProvidersIdDelete(ctx context.Context, id string) ProviderAPIApiProvidersIdDeleteRequest { + return ProviderAPIApiProvidersIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ProviderAPIService) ApiProvidersIdDeleteExecute(r ProviderAPIApiProvidersIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProviderAPIService.ApiProvidersIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/providers/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ProviderAPIApiProvidersIdGetRequest struct { + ctx context.Context + ApiService *ProviderAPIService + id string +} + +func (r ProviderAPIApiProvidersIdGetRequest) Execute() (*Provider, *http.Response, error) { + return r.ApiService.ApiProvidersIdGetExecute(r) +} + +/* +ApiProvidersIdGet Retrieves a Provider resource. + +Retrieves a Provider resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Provider identifier + @return ProviderAPIApiProvidersIdGetRequest +*/ +func (a *ProviderAPIService) ApiProvidersIdGet(ctx context.Context, id string) ProviderAPIApiProvidersIdGetRequest { + return ProviderAPIApiProvidersIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Provider +func (a *ProviderAPIService) ApiProvidersIdGetExecute(r ProviderAPIApiProvidersIdGetRequest) (*Provider, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Provider + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProviderAPIService.ApiProvidersIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/providers/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProviderAPIApiProvidersIdPatchRequest struct { + ctx context.Context + ApiService *ProviderAPIService + provider *Provider + id string +} + +// The updated Provider resource +func (r ProviderAPIApiProvidersIdPatchRequest) Provider(provider Provider) ProviderAPIApiProvidersIdPatchRequest { + r.provider = &provider + return r +} + +func (r ProviderAPIApiProvidersIdPatchRequest) Execute() (*Provider, *http.Response, error) { + return r.ApiService.ApiProvidersIdPatchExecute(r) +} + +/* +ApiProvidersIdPatch Updates the Provider resource. + +Updates the Provider resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Provider identifier + @return ProviderAPIApiProvidersIdPatchRequest +*/ +func (a *ProviderAPIService) ApiProvidersIdPatch(ctx context.Context, id string) ProviderAPIApiProvidersIdPatchRequest { + return ProviderAPIApiProvidersIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Provider +func (a *ProviderAPIService) ApiProvidersIdPatchExecute(r ProviderAPIApiProvidersIdPatchRequest) (*Provider, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Provider + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProviderAPIService.ApiProvidersIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/providers/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.provider == nil { + return localVarReturnValue, nil, reportError("provider is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.provider + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProviderAPIApiProvidersIdPutRequest struct { + ctx context.Context + ApiService *ProviderAPIService + provider *Provider + id string +} + +// The updated Provider resource +func (r ProviderAPIApiProvidersIdPutRequest) Provider(provider Provider) ProviderAPIApiProvidersIdPutRequest { + r.provider = &provider + return r +} + +func (r ProviderAPIApiProvidersIdPutRequest) Execute() (*Provider, *http.Response, error) { + return r.ApiService.ApiProvidersIdPutExecute(r) +} + +/* +ApiProvidersIdPut Replaces the Provider resource. + +Replaces the Provider resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Provider identifier + @return ProviderAPIApiProvidersIdPutRequest +*/ +func (a *ProviderAPIService) ApiProvidersIdPut(ctx context.Context, id string) ProviderAPIApiProvidersIdPutRequest { + return ProviderAPIApiProvidersIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Provider +func (a *ProviderAPIService) ApiProvidersIdPutExecute(r ProviderAPIApiProvidersIdPutRequest) (*Provider, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Provider + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProviderAPIService.ApiProvidersIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/providers/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.provider == nil { + return localVarReturnValue, nil, reportError("provider is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.provider + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ProviderAPIApiProvidersPostRequest struct { + ctx context.Context + ApiService *ProviderAPIService + provider *Provider +} + +// The new Provider resource +func (r ProviderAPIApiProvidersPostRequest) Provider(provider Provider) ProviderAPIApiProvidersPostRequest { + r.provider = &provider + return r +} + +func (r ProviderAPIApiProvidersPostRequest) Execute() (*Provider, *http.Response, error) { + return r.ApiService.ApiProvidersPostExecute(r) +} + +/* +ApiProvidersPost Creates a Provider resource. + +Creates a Provider resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ProviderAPIApiProvidersPostRequest +*/ +func (a *ProviderAPIService) ApiProvidersPost(ctx context.Context) ProviderAPIApiProvidersPostRequest { + return ProviderAPIApiProvidersPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return Provider +func (a *ProviderAPIService) ApiProvidersPostExecute(r ProviderAPIApiProvidersPostRequest) (*Provider, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Provider + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProviderAPIService.ApiProvidersPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/providers" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.provider == nil { + return localVarReturnValue, nil, reportError("provider is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.provider + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_resource_type.go b/pkg/api/rewardcloud/api_resource_type.go new file mode 100644 index 0000000..2b05671 --- /dev/null +++ b/pkg/api/rewardcloud/api_resource_type.go @@ -0,0 +1,800 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// ResourceTypeAPIService ResourceTypeAPI service +type ResourceTypeAPIService service + +type ResourceTypeAPIApiResourceTypesGetCollectionRequest struct { + ctx context.Context + ApiService *ResourceTypeAPIService + page *int32 + itemsPerPage *int32 + resourceTypeLimit *string + resourceTypeLimit2 *[]string +} + +// The collection page number +func (r ResourceTypeAPIApiResourceTypesGetCollectionRequest) Page(page int32) ResourceTypeAPIApiResourceTypesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ResourceTypeAPIApiResourceTypesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ResourceTypeAPIApiResourceTypesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ResourceTypeAPIApiResourceTypesGetCollectionRequest) ResourceTypeLimit(resourceTypeLimit string) ResourceTypeAPIApiResourceTypesGetCollectionRequest { + r.resourceTypeLimit = &resourceTypeLimit + return r +} + +func (r ResourceTypeAPIApiResourceTypesGetCollectionRequest) ResourceTypeLimit2(resourceTypeLimit2 []string) ResourceTypeAPIApiResourceTypesGetCollectionRequest { + r.resourceTypeLimit2 = &resourceTypeLimit2 + return r +} + +func (r ResourceTypeAPIApiResourceTypesGetCollectionRequest) Execute() ([]ResourceTypeResourceTypeOutput, *http.Response, error) { + return r.ApiService.ApiResourceTypesGetCollectionExecute(r) +} + +/* +ApiResourceTypesGetCollection Retrieves the collection of ResourceType resources. + +Retrieves the collection of ResourceType resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ResourceTypeAPIApiResourceTypesGetCollectionRequest +*/ +func (a *ResourceTypeAPIService) ApiResourceTypesGetCollection(ctx context.Context) ResourceTypeAPIApiResourceTypesGetCollectionRequest { + return ResourceTypeAPIApiResourceTypesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ResourceTypeResourceTypeOutput +func (a *ResourceTypeAPIService) ApiResourceTypesGetCollectionExecute(r ResourceTypeAPIApiResourceTypesGetCollectionRequest) ([]ResourceTypeResourceTypeOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ResourceTypeResourceTypeOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeAPIService.ApiResourceTypesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.resourceTypeLimit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "resourceTypeLimit", r.resourceTypeLimit, "") + } + if r.resourceTypeLimit2 != nil { + t := *r.resourceTypeLimit2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "resourceTypeLimit[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "resourceTypeLimit[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ResourceTypeAPIApiResourceTypesIdDeleteRequest struct { + ctx context.Context + ApiService *ResourceTypeAPIService + id string +} + +func (r ResourceTypeAPIApiResourceTypesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiResourceTypesIdDeleteExecute(r) +} + +/* +ApiResourceTypesIdDelete Removes the ResourceType resource. + +Removes the ResourceType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ResourceType identifier + @return ResourceTypeAPIApiResourceTypesIdDeleteRequest +*/ +func (a *ResourceTypeAPIService) ApiResourceTypesIdDelete(ctx context.Context, id string) ResourceTypeAPIApiResourceTypesIdDeleteRequest { + return ResourceTypeAPIApiResourceTypesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ResourceTypeAPIService) ApiResourceTypesIdDeleteExecute(r ResourceTypeAPIApiResourceTypesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeAPIService.ApiResourceTypesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ResourceTypeAPIApiResourceTypesIdGetRequest struct { + ctx context.Context + ApiService *ResourceTypeAPIService + id string +} + +func (r ResourceTypeAPIApiResourceTypesIdGetRequest) Execute() (*ResourceTypeResourceTypeOutput, *http.Response, error) { + return r.ApiService.ApiResourceTypesIdGetExecute(r) +} + +/* +ApiResourceTypesIdGet Retrieves a ResourceType resource. + +Retrieves a ResourceType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ResourceType identifier + @return ResourceTypeAPIApiResourceTypesIdGetRequest +*/ +func (a *ResourceTypeAPIService) ApiResourceTypesIdGet(ctx context.Context, id string) ResourceTypeAPIApiResourceTypesIdGetRequest { + return ResourceTypeAPIApiResourceTypesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ResourceTypeResourceTypeOutput +func (a *ResourceTypeAPIService) ApiResourceTypesIdGetExecute(r ResourceTypeAPIApiResourceTypesIdGetRequest) (*ResourceTypeResourceTypeOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceTypeResourceTypeOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeAPIService.ApiResourceTypesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ResourceTypeAPIApiResourceTypesIdPatchRequest struct { + ctx context.Context + ApiService *ResourceTypeAPIService + resourceTypeResourceTypeInput *ResourceTypeResourceTypeInput + id string +} + +// The updated ResourceType resource +func (r ResourceTypeAPIApiResourceTypesIdPatchRequest) ResourceTypeResourceTypeInput(resourceTypeResourceTypeInput ResourceTypeResourceTypeInput) ResourceTypeAPIApiResourceTypesIdPatchRequest { + r.resourceTypeResourceTypeInput = &resourceTypeResourceTypeInput + return r +} + +func (r ResourceTypeAPIApiResourceTypesIdPatchRequest) Execute() (*ResourceTypeResourceTypeOutput, *http.Response, error) { + return r.ApiService.ApiResourceTypesIdPatchExecute(r) +} + +/* +ApiResourceTypesIdPatch Updates the ResourceType resource. + +Updates the ResourceType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ResourceType identifier + @return ResourceTypeAPIApiResourceTypesIdPatchRequest +*/ +func (a *ResourceTypeAPIService) ApiResourceTypesIdPatch(ctx context.Context, id string) ResourceTypeAPIApiResourceTypesIdPatchRequest { + return ResourceTypeAPIApiResourceTypesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ResourceTypeResourceTypeOutput +func (a *ResourceTypeAPIService) ApiResourceTypesIdPatchExecute(r ResourceTypeAPIApiResourceTypesIdPatchRequest) (*ResourceTypeResourceTypeOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceTypeResourceTypeOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeAPIService.ApiResourceTypesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.resourceTypeResourceTypeInput == nil { + return localVarReturnValue, nil, reportError("resourceTypeResourceTypeInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.resourceTypeResourceTypeInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ResourceTypeAPIApiResourceTypesIdPutRequest struct { + ctx context.Context + ApiService *ResourceTypeAPIService + resourceTypeResourceTypeInput *ResourceTypeResourceTypeInput + id string +} + +// The updated ResourceType resource +func (r ResourceTypeAPIApiResourceTypesIdPutRequest) ResourceTypeResourceTypeInput(resourceTypeResourceTypeInput ResourceTypeResourceTypeInput) ResourceTypeAPIApiResourceTypesIdPutRequest { + r.resourceTypeResourceTypeInput = &resourceTypeResourceTypeInput + return r +} + +func (r ResourceTypeAPIApiResourceTypesIdPutRequest) Execute() (*ResourceTypeResourceTypeOutput, *http.Response, error) { + return r.ApiService.ApiResourceTypesIdPutExecute(r) +} + +/* +ApiResourceTypesIdPut Replaces the ResourceType resource. + +Replaces the ResourceType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ResourceType identifier + @return ResourceTypeAPIApiResourceTypesIdPutRequest +*/ +func (a *ResourceTypeAPIService) ApiResourceTypesIdPut(ctx context.Context, id string) ResourceTypeAPIApiResourceTypesIdPutRequest { + return ResourceTypeAPIApiResourceTypesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ResourceTypeResourceTypeOutput +func (a *ResourceTypeAPIService) ApiResourceTypesIdPutExecute(r ResourceTypeAPIApiResourceTypesIdPutRequest) (*ResourceTypeResourceTypeOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceTypeResourceTypeOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeAPIService.ApiResourceTypesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_types/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.resourceTypeResourceTypeInput == nil { + return localVarReturnValue, nil, reportError("resourceTypeResourceTypeInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.resourceTypeResourceTypeInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ResourceTypeAPIApiResourceTypesPostRequest struct { + ctx context.Context + ApiService *ResourceTypeAPIService + resourceTypeResourceTypeInput *ResourceTypeResourceTypeInput +} + +// The new ResourceType resource +func (r ResourceTypeAPIApiResourceTypesPostRequest) ResourceTypeResourceTypeInput(resourceTypeResourceTypeInput ResourceTypeResourceTypeInput) ResourceTypeAPIApiResourceTypesPostRequest { + r.resourceTypeResourceTypeInput = &resourceTypeResourceTypeInput + return r +} + +func (r ResourceTypeAPIApiResourceTypesPostRequest) Execute() (*ResourceTypeResourceTypeOutput, *http.Response, error) { + return r.ApiService.ApiResourceTypesPostExecute(r) +} + +/* +ApiResourceTypesPost Creates a ResourceType resource. + +Creates a ResourceType resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ResourceTypeAPIApiResourceTypesPostRequest +*/ +func (a *ResourceTypeAPIService) ApiResourceTypesPost(ctx context.Context) ResourceTypeAPIApiResourceTypesPostRequest { + return ResourceTypeAPIApiResourceTypesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ResourceTypeResourceTypeOutput +func (a *ResourceTypeAPIService) ApiResourceTypesPostExecute(r ResourceTypeAPIApiResourceTypesPostRequest) (*ResourceTypeResourceTypeOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceTypeResourceTypeOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeAPIService.ApiResourceTypesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.resourceTypeResourceTypeInput == nil { + return localVarReturnValue, nil, reportError("resourceTypeResourceTypeInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.resourceTypeResourceTypeInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_resource_type_limit.go b/pkg/api/rewardcloud/api_resource_type_limit.go new file mode 100644 index 0000000..01000c4 --- /dev/null +++ b/pkg/api/rewardcloud/api_resource_type_limit.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// ResourceTypeLimitAPIService ResourceTypeLimitAPI service +type ResourceTypeLimitAPIService service + +type ResourceTypeLimitAPIApiResourceTypeLimitsGetCollectionRequest struct { + ctx context.Context + ApiService *ResourceTypeLimitAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r ResourceTypeLimitAPIApiResourceTypeLimitsGetCollectionRequest) Page(page int32) ResourceTypeLimitAPIApiResourceTypeLimitsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r ResourceTypeLimitAPIApiResourceTypeLimitsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) ResourceTypeLimitAPIApiResourceTypeLimitsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r ResourceTypeLimitAPIApiResourceTypeLimitsGetCollectionRequest) Execute() ([]ResourceTypeLimit, *http.Response, error) { + return r.ApiService.ApiResourceTypeLimitsGetCollectionExecute(r) +} + +/* +ApiResourceTypeLimitsGetCollection Retrieves the collection of ResourceTypeLimit resources. + +Retrieves the collection of ResourceTypeLimit resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ResourceTypeLimitAPIApiResourceTypeLimitsGetCollectionRequest +*/ +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsGetCollection(ctx context.Context) ResourceTypeLimitAPIApiResourceTypeLimitsGetCollectionRequest { + return ResourceTypeLimitAPIApiResourceTypeLimitsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []ResourceTypeLimit +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsGetCollectionExecute(r ResourceTypeLimitAPIApiResourceTypeLimitsGetCollectionRequest) ([]ResourceTypeLimit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ResourceTypeLimit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeLimitAPIService.ApiResourceTypeLimitsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_type_limits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ResourceTypeLimitAPIApiResourceTypeLimitsIdDeleteRequest struct { + ctx context.Context + ApiService *ResourceTypeLimitAPIService + id string +} + +func (r ResourceTypeLimitAPIApiResourceTypeLimitsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiResourceTypeLimitsIdDeleteExecute(r) +} + +/* +ApiResourceTypeLimitsIdDelete Removes the ResourceTypeLimit resource. + +Removes the ResourceTypeLimit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ResourceTypeLimit identifier + @return ResourceTypeLimitAPIApiResourceTypeLimitsIdDeleteRequest +*/ +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsIdDelete(ctx context.Context, id string) ResourceTypeLimitAPIApiResourceTypeLimitsIdDeleteRequest { + return ResourceTypeLimitAPIApiResourceTypeLimitsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsIdDeleteExecute(r ResourceTypeLimitAPIApiResourceTypeLimitsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeLimitAPIService.ApiResourceTypeLimitsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_type_limits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ResourceTypeLimitAPIApiResourceTypeLimitsIdGetRequest struct { + ctx context.Context + ApiService *ResourceTypeLimitAPIService + id string +} + +func (r ResourceTypeLimitAPIApiResourceTypeLimitsIdGetRequest) Execute() (*ResourceTypeLimit, *http.Response, error) { + return r.ApiService.ApiResourceTypeLimitsIdGetExecute(r) +} + +/* +ApiResourceTypeLimitsIdGet Retrieves a ResourceTypeLimit resource. + +Retrieves a ResourceTypeLimit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ResourceTypeLimit identifier + @return ResourceTypeLimitAPIApiResourceTypeLimitsIdGetRequest +*/ +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsIdGet(ctx context.Context, id string) ResourceTypeLimitAPIApiResourceTypeLimitsIdGetRequest { + return ResourceTypeLimitAPIApiResourceTypeLimitsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ResourceTypeLimit +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsIdGetExecute(r ResourceTypeLimitAPIApiResourceTypeLimitsIdGetRequest) (*ResourceTypeLimit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceTypeLimit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeLimitAPIService.ApiResourceTypeLimitsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_type_limits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ResourceTypeLimitAPIApiResourceTypeLimitsIdPatchRequest struct { + ctx context.Context + ApiService *ResourceTypeLimitAPIService + resourceTypeLimit *ResourceTypeLimit + id string +} + +// The updated ResourceTypeLimit resource +func (r ResourceTypeLimitAPIApiResourceTypeLimitsIdPatchRequest) ResourceTypeLimit(resourceTypeLimit ResourceTypeLimit) ResourceTypeLimitAPIApiResourceTypeLimitsIdPatchRequest { + r.resourceTypeLimit = &resourceTypeLimit + return r +} + +func (r ResourceTypeLimitAPIApiResourceTypeLimitsIdPatchRequest) Execute() (*ResourceTypeLimit, *http.Response, error) { + return r.ApiService.ApiResourceTypeLimitsIdPatchExecute(r) +} + +/* +ApiResourceTypeLimitsIdPatch Updates the ResourceTypeLimit resource. + +Updates the ResourceTypeLimit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ResourceTypeLimit identifier + @return ResourceTypeLimitAPIApiResourceTypeLimitsIdPatchRequest +*/ +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsIdPatch(ctx context.Context, id string) ResourceTypeLimitAPIApiResourceTypeLimitsIdPatchRequest { + return ResourceTypeLimitAPIApiResourceTypeLimitsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ResourceTypeLimit +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsIdPatchExecute(r ResourceTypeLimitAPIApiResourceTypeLimitsIdPatchRequest) (*ResourceTypeLimit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceTypeLimit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeLimitAPIService.ApiResourceTypeLimitsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_type_limits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.resourceTypeLimit == nil { + return localVarReturnValue, nil, reportError("resourceTypeLimit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.resourceTypeLimit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ResourceTypeLimitAPIApiResourceTypeLimitsIdPutRequest struct { + ctx context.Context + ApiService *ResourceTypeLimitAPIService + resourceTypeLimit *ResourceTypeLimit + id string +} + +// The updated ResourceTypeLimit resource +func (r ResourceTypeLimitAPIApiResourceTypeLimitsIdPutRequest) ResourceTypeLimit(resourceTypeLimit ResourceTypeLimit) ResourceTypeLimitAPIApiResourceTypeLimitsIdPutRequest { + r.resourceTypeLimit = &resourceTypeLimit + return r +} + +func (r ResourceTypeLimitAPIApiResourceTypeLimitsIdPutRequest) Execute() (*ResourceTypeLimit, *http.Response, error) { + return r.ApiService.ApiResourceTypeLimitsIdPutExecute(r) +} + +/* +ApiResourceTypeLimitsIdPut Replaces the ResourceTypeLimit resource. + +Replaces the ResourceTypeLimit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id ResourceTypeLimit identifier + @return ResourceTypeLimitAPIApiResourceTypeLimitsIdPutRequest +*/ +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsIdPut(ctx context.Context, id string) ResourceTypeLimitAPIApiResourceTypeLimitsIdPutRequest { + return ResourceTypeLimitAPIApiResourceTypeLimitsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ResourceTypeLimit +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsIdPutExecute(r ResourceTypeLimitAPIApiResourceTypeLimitsIdPutRequest) (*ResourceTypeLimit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceTypeLimit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeLimitAPIService.ApiResourceTypeLimitsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_type_limits/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.resourceTypeLimit == nil { + return localVarReturnValue, nil, reportError("resourceTypeLimit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.resourceTypeLimit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ResourceTypeLimitAPIApiResourceTypeLimitsPostRequest struct { + ctx context.Context + ApiService *ResourceTypeLimitAPIService + resourceTypeLimit *ResourceTypeLimit +} + +// The new ResourceTypeLimit resource +func (r ResourceTypeLimitAPIApiResourceTypeLimitsPostRequest) ResourceTypeLimit(resourceTypeLimit ResourceTypeLimit) ResourceTypeLimitAPIApiResourceTypeLimitsPostRequest { + r.resourceTypeLimit = &resourceTypeLimit + return r +} + +func (r ResourceTypeLimitAPIApiResourceTypeLimitsPostRequest) Execute() (*ResourceTypeLimit, *http.Response, error) { + return r.ApiService.ApiResourceTypeLimitsPostExecute(r) +} + +/* +ApiResourceTypeLimitsPost Creates a ResourceTypeLimit resource. + +Creates a ResourceTypeLimit resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ResourceTypeLimitAPIApiResourceTypeLimitsPostRequest +*/ +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsPost(ctx context.Context) ResourceTypeLimitAPIApiResourceTypeLimitsPostRequest { + return ResourceTypeLimitAPIApiResourceTypeLimitsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ResourceTypeLimit +func (a *ResourceTypeLimitAPIService) ApiResourceTypeLimitsPostExecute(r ResourceTypeLimitAPIApiResourceTypeLimitsPostRequest) (*ResourceTypeLimit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceTypeLimit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourceTypeLimitAPIService.ApiResourceTypeLimitsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/resource_type_limits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.resourceTypeLimit == nil { + return localVarReturnValue, nil, reportError("resourceTypeLimit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.resourceTypeLimit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_role_group.go b/pkg/api/rewardcloud/api_role_group.go new file mode 100644 index 0000000..e4d9002 --- /dev/null +++ b/pkg/api/rewardcloud/api_role_group.go @@ -0,0 +1,782 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// RoleGroupAPIService RoleGroupAPI service +type RoleGroupAPIService service + +type RoleGroupAPIApiRoleGroupsGetCollectionRequest struct { + ctx context.Context + ApiService *RoleGroupAPIService + page *int32 + itemsPerPage *int32 + name *string +} + +// The collection page number +func (r RoleGroupAPIApiRoleGroupsGetCollectionRequest) Page(page int32) RoleGroupAPIApiRoleGroupsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r RoleGroupAPIApiRoleGroupsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) RoleGroupAPIApiRoleGroupsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r RoleGroupAPIApiRoleGroupsGetCollectionRequest) Name(name string) RoleGroupAPIApiRoleGroupsGetCollectionRequest { + r.name = &name + return r +} + +func (r RoleGroupAPIApiRoleGroupsGetCollectionRequest) Execute() ([]RoleGroup, *http.Response, error) { + return r.ApiService.ApiRoleGroupsGetCollectionExecute(r) +} + +/* +ApiRoleGroupsGetCollection Retrieves the collection of RoleGroup resources. + +Retrieves the collection of RoleGroup resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RoleGroupAPIApiRoleGroupsGetCollectionRequest +*/ +func (a *RoleGroupAPIService) ApiRoleGroupsGetCollection(ctx context.Context) RoleGroupAPIApiRoleGroupsGetCollectionRequest { + return RoleGroupAPIApiRoleGroupsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []RoleGroup +func (a *RoleGroupAPIService) ApiRoleGroupsGetCollectionExecute(r RoleGroupAPIApiRoleGroupsGetCollectionRequest) ([]RoleGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []RoleGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RoleGroupAPIService.ApiRoleGroupsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/role_groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RoleGroupAPIApiRoleGroupsIdDeleteRequest struct { + ctx context.Context + ApiService *RoleGroupAPIService + id string +} + +func (r RoleGroupAPIApiRoleGroupsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiRoleGroupsIdDeleteExecute(r) +} + +/* +ApiRoleGroupsIdDelete Removes the RoleGroup resource. + +Removes the RoleGroup resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id RoleGroup identifier + @return RoleGroupAPIApiRoleGroupsIdDeleteRequest +*/ +func (a *RoleGroupAPIService) ApiRoleGroupsIdDelete(ctx context.Context, id string) RoleGroupAPIApiRoleGroupsIdDeleteRequest { + return RoleGroupAPIApiRoleGroupsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *RoleGroupAPIService) ApiRoleGroupsIdDeleteExecute(r RoleGroupAPIApiRoleGroupsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RoleGroupAPIService.ApiRoleGroupsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/role_groups/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type RoleGroupAPIApiRoleGroupsIdGetRequest struct { + ctx context.Context + ApiService *RoleGroupAPIService + id string +} + +func (r RoleGroupAPIApiRoleGroupsIdGetRequest) Execute() (*RoleGroup, *http.Response, error) { + return r.ApiService.ApiRoleGroupsIdGetExecute(r) +} + +/* +ApiRoleGroupsIdGet Retrieves a RoleGroup resource. + +Retrieves a RoleGroup resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id RoleGroup identifier + @return RoleGroupAPIApiRoleGroupsIdGetRequest +*/ +func (a *RoleGroupAPIService) ApiRoleGroupsIdGet(ctx context.Context, id string) RoleGroupAPIApiRoleGroupsIdGetRequest { + return RoleGroupAPIApiRoleGroupsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return RoleGroup +func (a *RoleGroupAPIService) ApiRoleGroupsIdGetExecute(r RoleGroupAPIApiRoleGroupsIdGetRequest) (*RoleGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RoleGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RoleGroupAPIService.ApiRoleGroupsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/role_groups/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RoleGroupAPIApiRoleGroupsIdPatchRequest struct { + ctx context.Context + ApiService *RoleGroupAPIService + roleGroup *RoleGroup + id string +} + +// The updated RoleGroup resource +func (r RoleGroupAPIApiRoleGroupsIdPatchRequest) RoleGroup(roleGroup RoleGroup) RoleGroupAPIApiRoleGroupsIdPatchRequest { + r.roleGroup = &roleGroup + return r +} + +func (r RoleGroupAPIApiRoleGroupsIdPatchRequest) Execute() (*RoleGroup, *http.Response, error) { + return r.ApiService.ApiRoleGroupsIdPatchExecute(r) +} + +/* +ApiRoleGroupsIdPatch Updates the RoleGroup resource. + +Updates the RoleGroup resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id RoleGroup identifier + @return RoleGroupAPIApiRoleGroupsIdPatchRequest +*/ +func (a *RoleGroupAPIService) ApiRoleGroupsIdPatch(ctx context.Context, id string) RoleGroupAPIApiRoleGroupsIdPatchRequest { + return RoleGroupAPIApiRoleGroupsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return RoleGroup +func (a *RoleGroupAPIService) ApiRoleGroupsIdPatchExecute(r RoleGroupAPIApiRoleGroupsIdPatchRequest) (*RoleGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RoleGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RoleGroupAPIService.ApiRoleGroupsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/role_groups/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.roleGroup == nil { + return localVarReturnValue, nil, reportError("roleGroup is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.roleGroup + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RoleGroupAPIApiRoleGroupsIdPutRequest struct { + ctx context.Context + ApiService *RoleGroupAPIService + roleGroup *RoleGroup + id string +} + +// The updated RoleGroup resource +func (r RoleGroupAPIApiRoleGroupsIdPutRequest) RoleGroup(roleGroup RoleGroup) RoleGroupAPIApiRoleGroupsIdPutRequest { + r.roleGroup = &roleGroup + return r +} + +func (r RoleGroupAPIApiRoleGroupsIdPutRequest) Execute() (*RoleGroup, *http.Response, error) { + return r.ApiService.ApiRoleGroupsIdPutExecute(r) +} + +/* +ApiRoleGroupsIdPut Replaces the RoleGroup resource. + +Replaces the RoleGroup resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id RoleGroup identifier + @return RoleGroupAPIApiRoleGroupsIdPutRequest +*/ +func (a *RoleGroupAPIService) ApiRoleGroupsIdPut(ctx context.Context, id string) RoleGroupAPIApiRoleGroupsIdPutRequest { + return RoleGroupAPIApiRoleGroupsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return RoleGroup +func (a *RoleGroupAPIService) ApiRoleGroupsIdPutExecute(r RoleGroupAPIApiRoleGroupsIdPutRequest) (*RoleGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RoleGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RoleGroupAPIService.ApiRoleGroupsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/role_groups/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.roleGroup == nil { + return localVarReturnValue, nil, reportError("roleGroup is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.roleGroup + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RoleGroupAPIApiRoleGroupsPostRequest struct { + ctx context.Context + ApiService *RoleGroupAPIService + roleGroup *RoleGroup +} + +// The new RoleGroup resource +func (r RoleGroupAPIApiRoleGroupsPostRequest) RoleGroup(roleGroup RoleGroup) RoleGroupAPIApiRoleGroupsPostRequest { + r.roleGroup = &roleGroup + return r +} + +func (r RoleGroupAPIApiRoleGroupsPostRequest) Execute() (*RoleGroup, *http.Response, error) { + return r.ApiService.ApiRoleGroupsPostExecute(r) +} + +/* +ApiRoleGroupsPost Creates a RoleGroup resource. + +Creates a RoleGroup resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RoleGroupAPIApiRoleGroupsPostRequest +*/ +func (a *RoleGroupAPIService) ApiRoleGroupsPost(ctx context.Context) RoleGroupAPIApiRoleGroupsPostRequest { + return RoleGroupAPIApiRoleGroupsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return RoleGroup +func (a *RoleGroupAPIService) ApiRoleGroupsPostExecute(r RoleGroupAPIApiRoleGroupsPostRequest) (*RoleGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RoleGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RoleGroupAPIService.ApiRoleGroupsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/role_groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.roleGroup == nil { + return localVarReturnValue, nil, reportError("roleGroup is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.roleGroup + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_state.go b/pkg/api/rewardcloud/api_state.go new file mode 100644 index 0000000..3ef8962 --- /dev/null +++ b/pkg/api/rewardcloud/api_state.go @@ -0,0 +1,835 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// StateAPIService StateAPI service +type StateAPIService service + +type StateAPIApiStatesGetCollectionRequest struct { + ctx context.Context + ApiService *StateAPIService + page *int32 + itemsPerPage *int32 + id *int32 + id2 *[]int32 + seqNumber *int32 + seqNumber2 *[]int32 + orderName *string +} + +// The collection page number +func (r StateAPIApiStatesGetCollectionRequest) Page(page int32) StateAPIApiStatesGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r StateAPIApiStatesGetCollectionRequest) ItemsPerPage(itemsPerPage int32) StateAPIApiStatesGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r StateAPIApiStatesGetCollectionRequest) Id(id int32) StateAPIApiStatesGetCollectionRequest { + r.id = &id + return r +} + +func (r StateAPIApiStatesGetCollectionRequest) Id2(id2 []int32) StateAPIApiStatesGetCollectionRequest { + r.id2 = &id2 + return r +} + +func (r StateAPIApiStatesGetCollectionRequest) SeqNumber(seqNumber int32) StateAPIApiStatesGetCollectionRequest { + r.seqNumber = &seqNumber + return r +} + +func (r StateAPIApiStatesGetCollectionRequest) SeqNumber2(seqNumber2 []int32) StateAPIApiStatesGetCollectionRequest { + r.seqNumber2 = &seqNumber2 + return r +} + +func (r StateAPIApiStatesGetCollectionRequest) OrderName(orderName string) StateAPIApiStatesGetCollectionRequest { + r.orderName = &orderName + return r +} + +func (r StateAPIApiStatesGetCollectionRequest) Execute() ([]State, *http.Response, error) { + return r.ApiService.ApiStatesGetCollectionExecute(r) +} + +/* +ApiStatesGetCollection Retrieves the collection of State resources. + +Retrieves the collection of State resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return StateAPIApiStatesGetCollectionRequest +*/ +func (a *StateAPIService) ApiStatesGetCollection(ctx context.Context) StateAPIApiStatesGetCollectionRequest { + return StateAPIApiStatesGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []State +func (a *StateAPIService) ApiStatesGetCollectionExecute(r StateAPIApiStatesGetCollectionRequest) ([]State, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []State + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateAPIService.ApiStatesGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/states" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + } + if r.id2 != nil { + t := *r.id2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", t, "multi") + } + } + if r.seqNumber != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "seqNumber", r.seqNumber, "") + } + if r.seqNumber2 != nil { + t := *r.seqNumber2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "seqNumber[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "seqNumber[]", t, "multi") + } + } + if r.orderName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[name]", r.orderName, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type StateAPIApiStatesIdDeleteRequest struct { + ctx context.Context + ApiService *StateAPIService + id string +} + +func (r StateAPIApiStatesIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiStatesIdDeleteExecute(r) +} + +/* +ApiStatesIdDelete Removes the State resource. + +Removes the State resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id State identifier + @return StateAPIApiStatesIdDeleteRequest +*/ +func (a *StateAPIService) ApiStatesIdDelete(ctx context.Context, id string) StateAPIApiStatesIdDeleteRequest { + return StateAPIApiStatesIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *StateAPIService) ApiStatesIdDeleteExecute(r StateAPIApiStatesIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateAPIService.ApiStatesIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/states/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type StateAPIApiStatesIdGetRequest struct { + ctx context.Context + ApiService *StateAPIService + id string +} + +func (r StateAPIApiStatesIdGetRequest) Execute() (*State, *http.Response, error) { + return r.ApiService.ApiStatesIdGetExecute(r) +} + +/* +ApiStatesIdGet Retrieves a State resource. + +Retrieves a State resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id State identifier + @return StateAPIApiStatesIdGetRequest +*/ +func (a *StateAPIService) ApiStatesIdGet(ctx context.Context, id string) StateAPIApiStatesIdGetRequest { + return StateAPIApiStatesIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return State +func (a *StateAPIService) ApiStatesIdGetExecute(r StateAPIApiStatesIdGetRequest) (*State, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *State + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateAPIService.ApiStatesIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/states/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type StateAPIApiStatesIdPatchRequest struct { + ctx context.Context + ApiService *StateAPIService + state *State + id string +} + +// The updated State resource +func (r StateAPIApiStatesIdPatchRequest) State(state State) StateAPIApiStatesIdPatchRequest { + r.state = &state + return r +} + +func (r StateAPIApiStatesIdPatchRequest) Execute() (*State, *http.Response, error) { + return r.ApiService.ApiStatesIdPatchExecute(r) +} + +/* +ApiStatesIdPatch Updates the State resource. + +Updates the State resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id State identifier + @return StateAPIApiStatesIdPatchRequest +*/ +func (a *StateAPIService) ApiStatesIdPatch(ctx context.Context, id string) StateAPIApiStatesIdPatchRequest { + return StateAPIApiStatesIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return State +func (a *StateAPIService) ApiStatesIdPatchExecute(r StateAPIApiStatesIdPatchRequest) (*State, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *State + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateAPIService.ApiStatesIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/states/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.state == nil { + return localVarReturnValue, nil, reportError("state is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.state + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type StateAPIApiStatesIdPutRequest struct { + ctx context.Context + ApiService *StateAPIService + state *State + id string +} + +// The updated State resource +func (r StateAPIApiStatesIdPutRequest) State(state State) StateAPIApiStatesIdPutRequest { + r.state = &state + return r +} + +func (r StateAPIApiStatesIdPutRequest) Execute() (*State, *http.Response, error) { + return r.ApiService.ApiStatesIdPutExecute(r) +} + +/* +ApiStatesIdPut Replaces the State resource. + +Replaces the State resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id State identifier + @return StateAPIApiStatesIdPutRequest +*/ +func (a *StateAPIService) ApiStatesIdPut(ctx context.Context, id string) StateAPIApiStatesIdPutRequest { + return StateAPIApiStatesIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return State +func (a *StateAPIService) ApiStatesIdPutExecute(r StateAPIApiStatesIdPutRequest) (*State, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *State + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateAPIService.ApiStatesIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/states/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.state == nil { + return localVarReturnValue, nil, reportError("state is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.state + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type StateAPIApiStatesPostRequest struct { + ctx context.Context + ApiService *StateAPIService + state *State +} + +// The new State resource +func (r StateAPIApiStatesPostRequest) State(state State) StateAPIApiStatesPostRequest { + r.state = &state + return r +} + +func (r StateAPIApiStatesPostRequest) Execute() (*State, *http.Response, error) { + return r.ApiService.ApiStatesPostExecute(r) +} + +/* +ApiStatesPost Creates a State resource. + +Creates a State resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return StateAPIApiStatesPostRequest +*/ +func (a *StateAPIService) ApiStatesPost(ctx context.Context) StateAPIApiStatesPostRequest { + return StateAPIApiStatesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return State +func (a *StateAPIService) ApiStatesPostExecute(r StateAPIApiStatesPostRequest) (*State, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *State + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateAPIService.ApiStatesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/states" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.state == nil { + return localVarReturnValue, nil, reportError("state is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.state + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_state_by_infra.go b/pkg/api/rewardcloud/api_state_by_infra.go new file mode 100644 index 0000000..93bf1d5 --- /dev/null +++ b/pkg/api/rewardcloud/api_state_by_infra.go @@ -0,0 +1,773 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// StateByInfraAPIService StateByInfraAPI service +type StateByInfraAPIService service + +type StateByInfraAPIApiStateByInfrasGetCollectionRequest struct { + ctx context.Context + ApiService *StateByInfraAPIService + page *int32 + itemsPerPage *int32 +} + +// The collection page number +func (r StateByInfraAPIApiStateByInfrasGetCollectionRequest) Page(page int32) StateByInfraAPIApiStateByInfrasGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r StateByInfraAPIApiStateByInfrasGetCollectionRequest) ItemsPerPage(itemsPerPage int32) StateByInfraAPIApiStateByInfrasGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r StateByInfraAPIApiStateByInfrasGetCollectionRequest) Execute() ([]StateByInfra, *http.Response, error) { + return r.ApiService.ApiStateByInfrasGetCollectionExecute(r) +} + +/* +ApiStateByInfrasGetCollection Retrieves the collection of StateByInfra resources. + +Retrieves the collection of StateByInfra resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return StateByInfraAPIApiStateByInfrasGetCollectionRequest +*/ +func (a *StateByInfraAPIService) ApiStateByInfrasGetCollection(ctx context.Context) StateByInfraAPIApiStateByInfrasGetCollectionRequest { + return StateByInfraAPIApiStateByInfrasGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []StateByInfra +func (a *StateByInfraAPIService) ApiStateByInfrasGetCollectionExecute(r StateByInfraAPIApiStateByInfrasGetCollectionRequest) ([]StateByInfra, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []StateByInfra + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateByInfraAPIService.ApiStateByInfrasGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/state_by_infras" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type StateByInfraAPIApiStateByInfrasIdDeleteRequest struct { + ctx context.Context + ApiService *StateByInfraAPIService + id string +} + +func (r StateByInfraAPIApiStateByInfrasIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiStateByInfrasIdDeleteExecute(r) +} + +/* +ApiStateByInfrasIdDelete Removes the StateByInfra resource. + +Removes the StateByInfra resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id StateByInfra identifier + @return StateByInfraAPIApiStateByInfrasIdDeleteRequest +*/ +func (a *StateByInfraAPIService) ApiStateByInfrasIdDelete(ctx context.Context, id string) StateByInfraAPIApiStateByInfrasIdDeleteRequest { + return StateByInfraAPIApiStateByInfrasIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *StateByInfraAPIService) ApiStateByInfrasIdDeleteExecute(r StateByInfraAPIApiStateByInfrasIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateByInfraAPIService.ApiStateByInfrasIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/state_by_infras/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type StateByInfraAPIApiStateByInfrasIdGetRequest struct { + ctx context.Context + ApiService *StateByInfraAPIService + id string +} + +func (r StateByInfraAPIApiStateByInfrasIdGetRequest) Execute() (*StateByInfra, *http.Response, error) { + return r.ApiService.ApiStateByInfrasIdGetExecute(r) +} + +/* +ApiStateByInfrasIdGet Retrieves a StateByInfra resource. + +Retrieves a StateByInfra resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id StateByInfra identifier + @return StateByInfraAPIApiStateByInfrasIdGetRequest +*/ +func (a *StateByInfraAPIService) ApiStateByInfrasIdGet(ctx context.Context, id string) StateByInfraAPIApiStateByInfrasIdGetRequest { + return StateByInfraAPIApiStateByInfrasIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return StateByInfra +func (a *StateByInfraAPIService) ApiStateByInfrasIdGetExecute(r StateByInfraAPIApiStateByInfrasIdGetRequest) (*StateByInfra, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StateByInfra + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateByInfraAPIService.ApiStateByInfrasIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/state_by_infras/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type StateByInfraAPIApiStateByInfrasIdPatchRequest struct { + ctx context.Context + ApiService *StateByInfraAPIService + stateByInfra *StateByInfra + id string +} + +// The updated StateByInfra resource +func (r StateByInfraAPIApiStateByInfrasIdPatchRequest) StateByInfra(stateByInfra StateByInfra) StateByInfraAPIApiStateByInfrasIdPatchRequest { + r.stateByInfra = &stateByInfra + return r +} + +func (r StateByInfraAPIApiStateByInfrasIdPatchRequest) Execute() (*StateByInfra, *http.Response, error) { + return r.ApiService.ApiStateByInfrasIdPatchExecute(r) +} + +/* +ApiStateByInfrasIdPatch Updates the StateByInfra resource. + +Updates the StateByInfra resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id StateByInfra identifier + @return StateByInfraAPIApiStateByInfrasIdPatchRequest +*/ +func (a *StateByInfraAPIService) ApiStateByInfrasIdPatch(ctx context.Context, id string) StateByInfraAPIApiStateByInfrasIdPatchRequest { + return StateByInfraAPIApiStateByInfrasIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return StateByInfra +func (a *StateByInfraAPIService) ApiStateByInfrasIdPatchExecute(r StateByInfraAPIApiStateByInfrasIdPatchRequest) (*StateByInfra, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StateByInfra + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateByInfraAPIService.ApiStateByInfrasIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/state_by_infras/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.stateByInfra == nil { + return localVarReturnValue, nil, reportError("stateByInfra is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.stateByInfra + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type StateByInfraAPIApiStateByInfrasIdPutRequest struct { + ctx context.Context + ApiService *StateByInfraAPIService + stateByInfra *StateByInfra + id string +} + +// The updated StateByInfra resource +func (r StateByInfraAPIApiStateByInfrasIdPutRequest) StateByInfra(stateByInfra StateByInfra) StateByInfraAPIApiStateByInfrasIdPutRequest { + r.stateByInfra = &stateByInfra + return r +} + +func (r StateByInfraAPIApiStateByInfrasIdPutRequest) Execute() (*StateByInfra, *http.Response, error) { + return r.ApiService.ApiStateByInfrasIdPutExecute(r) +} + +/* +ApiStateByInfrasIdPut Replaces the StateByInfra resource. + +Replaces the StateByInfra resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id StateByInfra identifier + @return StateByInfraAPIApiStateByInfrasIdPutRequest +*/ +func (a *StateByInfraAPIService) ApiStateByInfrasIdPut(ctx context.Context, id string) StateByInfraAPIApiStateByInfrasIdPutRequest { + return StateByInfraAPIApiStateByInfrasIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return StateByInfra +func (a *StateByInfraAPIService) ApiStateByInfrasIdPutExecute(r StateByInfraAPIApiStateByInfrasIdPutRequest) (*StateByInfra, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StateByInfra + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateByInfraAPIService.ApiStateByInfrasIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/state_by_infras/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.stateByInfra == nil { + return localVarReturnValue, nil, reportError("stateByInfra is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.stateByInfra + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type StateByInfraAPIApiStateByInfrasPostRequest struct { + ctx context.Context + ApiService *StateByInfraAPIService + stateByInfra *StateByInfra +} + +// The new StateByInfra resource +func (r StateByInfraAPIApiStateByInfrasPostRequest) StateByInfra(stateByInfra StateByInfra) StateByInfraAPIApiStateByInfrasPostRequest { + r.stateByInfra = &stateByInfra + return r +} + +func (r StateByInfraAPIApiStateByInfrasPostRequest) Execute() (*StateByInfra, *http.Response, error) { + return r.ApiService.ApiStateByInfrasPostExecute(r) +} + +/* +ApiStateByInfrasPost Creates a StateByInfra resource. + +Creates a StateByInfra resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return StateByInfraAPIApiStateByInfrasPostRequest +*/ +func (a *StateByInfraAPIService) ApiStateByInfrasPost(ctx context.Context) StateByInfraAPIApiStateByInfrasPostRequest { + return StateByInfraAPIApiStateByInfrasPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return StateByInfra +func (a *StateByInfraAPIService) ApiStateByInfrasPostExecute(r StateByInfraAPIApiStateByInfrasPostRequest) (*StateByInfra, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StateByInfra + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StateByInfraAPIService.ApiStateByInfrasPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/state_by_infras" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.stateByInfra == nil { + return localVarReturnValue, nil, reportError("stateByInfra is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.stateByInfra + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_team.go b/pkg/api/rewardcloud/api_team.go new file mode 100644 index 0000000..5c07317 --- /dev/null +++ b/pkg/api/rewardcloud/api_team.go @@ -0,0 +1,1000 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// TeamAPIService TeamAPI service +type TeamAPIService service + +type TeamAPIApiTeamsGetCollectionRequest struct { + ctx context.Context + ApiService *TeamAPIService + page *int32 + itemsPerPage *int32 + existsOrganisation *bool + name *string + user *string + user2 *[]string + organisation *string + organisation2 *[]string + stateByInfra *string + stateByInfra2 *[]string +} + +// The collection page number +func (r TeamAPIApiTeamsGetCollectionRequest) Page(page int32) TeamAPIApiTeamsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r TeamAPIApiTeamsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) TeamAPIApiTeamsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r TeamAPIApiTeamsGetCollectionRequest) ExistsOrganisation(existsOrganisation bool) TeamAPIApiTeamsGetCollectionRequest { + r.existsOrganisation = &existsOrganisation + return r +} + +func (r TeamAPIApiTeamsGetCollectionRequest) Name(name string) TeamAPIApiTeamsGetCollectionRequest { + r.name = &name + return r +} + +func (r TeamAPIApiTeamsGetCollectionRequest) User(user string) TeamAPIApiTeamsGetCollectionRequest { + r.user = &user + return r +} + +func (r TeamAPIApiTeamsGetCollectionRequest) User2(user2 []string) TeamAPIApiTeamsGetCollectionRequest { + r.user2 = &user2 + return r +} + +func (r TeamAPIApiTeamsGetCollectionRequest) Organisation(organisation string) TeamAPIApiTeamsGetCollectionRequest { + r.organisation = &organisation + return r +} + +func (r TeamAPIApiTeamsGetCollectionRequest) Organisation2(organisation2 []string) TeamAPIApiTeamsGetCollectionRequest { + r.organisation2 = &organisation2 + return r +} + +func (r TeamAPIApiTeamsGetCollectionRequest) StateByInfra(stateByInfra string) TeamAPIApiTeamsGetCollectionRequest { + r.stateByInfra = &stateByInfra + return r +} + +func (r TeamAPIApiTeamsGetCollectionRequest) StateByInfra2(stateByInfra2 []string) TeamAPIApiTeamsGetCollectionRequest { + r.stateByInfra2 = &stateByInfra2 + return r +} + +func (r TeamAPIApiTeamsGetCollectionRequest) Execute() ([]TeamTeamOutput, *http.Response, error) { + return r.ApiService.ApiTeamsGetCollectionExecute(r) +} + +/* +ApiTeamsGetCollection Retrieves the collection of Team resources. + +Retrieves the collection of Team resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TeamAPIApiTeamsGetCollectionRequest +*/ +func (a *TeamAPIService) ApiTeamsGetCollection(ctx context.Context) TeamAPIApiTeamsGetCollectionRequest { + return TeamAPIApiTeamsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []TeamTeamOutput +func (a *TeamAPIService) ApiTeamsGetCollectionExecute(r TeamAPIApiTeamsGetCollectionRequest) ([]TeamTeamOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []TeamTeamOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.ApiTeamsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/teams" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.existsOrganisation != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "exists[organisation]", r.existsOrganisation, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.user != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "") + } + if r.user2 != nil { + t := *r.user2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "user[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "user[]", t, "multi") + } + } + if r.organisation != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "organisation", r.organisation, "") + } + if r.organisation2 != nil { + t := *r.organisation2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "organisation[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "organisation[]", t, "multi") + } + } + if r.stateByInfra != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra", r.stateByInfra, "") + } + if r.stateByInfra2 != nil { + t := *r.stateByInfra2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "stateByInfra[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TeamAPIApiTeamsIdDeleteRequest struct { + ctx context.Context + ApiService *TeamAPIService + id string +} + +func (r TeamAPIApiTeamsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiTeamsIdDeleteExecute(r) +} + +/* +ApiTeamsIdDelete Removes the Team resource. + +Removes the Team resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Team identifier + @return TeamAPIApiTeamsIdDeleteRequest +*/ +func (a *TeamAPIService) ApiTeamsIdDelete(ctx context.Context, id string) TeamAPIApiTeamsIdDeleteRequest { + return TeamAPIApiTeamsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *TeamAPIService) ApiTeamsIdDeleteExecute(r TeamAPIApiTeamsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.ApiTeamsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/teams/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type TeamAPIApiTeamsIdGetRequest struct { + ctx context.Context + ApiService *TeamAPIService + id string +} + +func (r TeamAPIApiTeamsIdGetRequest) Execute() (*TeamTeamOutput, *http.Response, error) { + return r.ApiService.ApiTeamsIdGetExecute(r) +} + +/* +ApiTeamsIdGet Retrieves a Team resource. + +Retrieves a Team resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Team identifier + @return TeamAPIApiTeamsIdGetRequest +*/ +func (a *TeamAPIService) ApiTeamsIdGet(ctx context.Context, id string) TeamAPIApiTeamsIdGetRequest { + return TeamAPIApiTeamsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TeamTeamOutput +func (a *TeamAPIService) ApiTeamsIdGetExecute(r TeamAPIApiTeamsIdGetRequest) (*TeamTeamOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TeamTeamOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.ApiTeamsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/teams/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TeamAPIApiTeamsIdPatchRequest struct { + ctx context.Context + ApiService *TeamAPIService + teamTeamInput *TeamTeamInput + id string +} + +// The updated Team resource +func (r TeamAPIApiTeamsIdPatchRequest) TeamTeamInput(teamTeamInput TeamTeamInput) TeamAPIApiTeamsIdPatchRequest { + r.teamTeamInput = &teamTeamInput + return r +} + +func (r TeamAPIApiTeamsIdPatchRequest) Execute() (*TeamTeamOutput, *http.Response, error) { + return r.ApiService.ApiTeamsIdPatchExecute(r) +} + +/* +ApiTeamsIdPatch Updates the Team resource. + +Updates the Team resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Team identifier + @return TeamAPIApiTeamsIdPatchRequest +*/ +func (a *TeamAPIService) ApiTeamsIdPatch(ctx context.Context, id string) TeamAPIApiTeamsIdPatchRequest { + return TeamAPIApiTeamsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TeamTeamOutput +func (a *TeamAPIService) ApiTeamsIdPatchExecute(r TeamAPIApiTeamsIdPatchRequest) (*TeamTeamOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TeamTeamOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.ApiTeamsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/teams/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.teamTeamInput == nil { + return localVarReturnValue, nil, reportError("teamTeamInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.teamTeamInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TeamAPIApiTeamsIdPutRequest struct { + ctx context.Context + ApiService *TeamAPIService + teamTeamInput *TeamTeamInput + id string +} + +// The updated Team resource +func (r TeamAPIApiTeamsIdPutRequest) TeamTeamInput(teamTeamInput TeamTeamInput) TeamAPIApiTeamsIdPutRequest { + r.teamTeamInput = &teamTeamInput + return r +} + +func (r TeamAPIApiTeamsIdPutRequest) Execute() (*TeamTeamOutput, *http.Response, error) { + return r.ApiService.ApiTeamsIdPutExecute(r) +} + +/* +ApiTeamsIdPut Replaces the Team resource. + +Replaces the Team resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Team identifier + @return TeamAPIApiTeamsIdPutRequest +*/ +func (a *TeamAPIService) ApiTeamsIdPut(ctx context.Context, id string) TeamAPIApiTeamsIdPutRequest { + return TeamAPIApiTeamsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TeamTeamOutput +func (a *TeamAPIService) ApiTeamsIdPutExecute(r TeamAPIApiTeamsIdPutRequest) (*TeamTeamOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TeamTeamOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.ApiTeamsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/teams/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.teamTeamInput == nil { + return localVarReturnValue, nil, reportError("teamTeamInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.teamTeamInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TeamAPIApiTeamsIduserRolePutRequest struct { + ctx context.Context + ApiService *TeamAPIService + teamTeamInput *TeamTeamInput + id string +} + +// The updated Team resource +func (r TeamAPIApiTeamsIduserRolePutRequest) TeamTeamInput(teamTeamInput TeamTeamInput) TeamAPIApiTeamsIduserRolePutRequest { + r.teamTeamInput = &teamTeamInput + return r +} + +func (r TeamAPIApiTeamsIduserRolePutRequest) Execute() (*TeamTeamOutput, *http.Response, error) { + return r.ApiService.ApiTeamsIduserRolePutExecute(r) +} + +/* +ApiTeamsIduserRolePut Replaces the Team resource. + +Replaces the Team resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Team identifier + @return TeamAPIApiTeamsIduserRolePutRequest +*/ +func (a *TeamAPIService) ApiTeamsIduserRolePut(ctx context.Context, id string) TeamAPIApiTeamsIduserRolePutRequest { + return TeamAPIApiTeamsIduserRolePutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TeamTeamOutput +func (a *TeamAPIService) ApiTeamsIduserRolePutExecute(r TeamAPIApiTeamsIduserRolePutRequest) (*TeamTeamOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TeamTeamOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.ApiTeamsIduserRolePut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/teams/{id}/user-role" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.teamTeamInput == nil { + return localVarReturnValue, nil, reportError("teamTeamInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.teamTeamInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TeamAPIApiTeamsPostRequest struct { + ctx context.Context + ApiService *TeamAPIService + teamTeamInput *TeamTeamInput +} + +// The new Team resource +func (r TeamAPIApiTeamsPostRequest) TeamTeamInput(teamTeamInput TeamTeamInput) TeamAPIApiTeamsPostRequest { + r.teamTeamInput = &teamTeamInput + return r +} + +func (r TeamAPIApiTeamsPostRequest) Execute() (*TeamTeamOutput, *http.Response, error) { + return r.ApiService.ApiTeamsPostExecute(r) +} + +/* +ApiTeamsPost Creates a Team resource. + +Creates a Team resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TeamAPIApiTeamsPostRequest +*/ +func (a *TeamAPIService) ApiTeamsPost(ctx context.Context) TeamAPIApiTeamsPostRequest { + return TeamAPIApiTeamsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TeamTeamOutput +func (a *TeamAPIService) ApiTeamsPostExecute(r TeamAPIApiTeamsPostRequest) (*TeamTeamOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TeamTeamOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.ApiTeamsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/teams" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.teamTeamInput == nil { + return localVarReturnValue, nil, reportError("teamTeamInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.teamTeamInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_team_env_var.go b/pkg/api/rewardcloud/api_team_env_var.go new file mode 100644 index 0000000..d28bfd3 --- /dev/null +++ b/pkg/api/rewardcloud/api_team_env_var.go @@ -0,0 +1,826 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// TeamEnvVarAPIService TeamEnvVarAPI service +type TeamEnvVarAPIService service + +type TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest struct { + ctx context.Context + ApiService *TeamEnvVarAPIService + page *int32 + itemsPerPage *int32 + team *string + team2 *[]string + envVarType *string + envVarType2 *[]string +} + +// The collection page number +func (r TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest) Page(page int32) TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest) Team(team string) TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest { + r.team = &team + return r +} + +func (r TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest) Team2(team2 []string) TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest { + r.team2 = &team2 + return r +} + +func (r TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest) EnvVarType(envVarType string) TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest { + r.envVarType = &envVarType + return r +} + +func (r TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest) EnvVarType2(envVarType2 []string) TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest { + r.envVarType2 = &envVarType2 + return r +} + +func (r TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest) Execute() ([]TeamEnvVar, *http.Response, error) { + return r.ApiService.ApiTeamEnvVarsGetCollectionExecute(r) +} + +/* +ApiTeamEnvVarsGetCollection Retrieves the collection of TeamEnvVar resources. + +Retrieves the collection of TeamEnvVar resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest +*/ +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsGetCollection(ctx context.Context) TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest { + return TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []TeamEnvVar +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsGetCollectionExecute(r TeamEnvVarAPIApiTeamEnvVarsGetCollectionRequest) ([]TeamEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []TeamEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamEnvVarAPIService.ApiTeamEnvVarsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/team_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.team != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "team", r.team, "") + } + if r.team2 != nil { + t := *r.team2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "team[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "team[]", t, "multi") + } + } + if r.envVarType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType", r.envVarType, "") + } + if r.envVarType2 != nil { + t := *r.envVarType2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "envVarType[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TeamEnvVarAPIApiTeamEnvVarsIdDeleteRequest struct { + ctx context.Context + ApiService *TeamEnvVarAPIService + id string +} + +func (r TeamEnvVarAPIApiTeamEnvVarsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiTeamEnvVarsIdDeleteExecute(r) +} + +/* +ApiTeamEnvVarsIdDelete Removes the TeamEnvVar resource. + +Removes the TeamEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TeamEnvVar identifier + @return TeamEnvVarAPIApiTeamEnvVarsIdDeleteRequest +*/ +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsIdDelete(ctx context.Context, id string) TeamEnvVarAPIApiTeamEnvVarsIdDeleteRequest { + return TeamEnvVarAPIApiTeamEnvVarsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsIdDeleteExecute(r TeamEnvVarAPIApiTeamEnvVarsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamEnvVarAPIService.ApiTeamEnvVarsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/team_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type TeamEnvVarAPIApiTeamEnvVarsIdGetRequest struct { + ctx context.Context + ApiService *TeamEnvVarAPIService + id string +} + +func (r TeamEnvVarAPIApiTeamEnvVarsIdGetRequest) Execute() (*TeamEnvVar, *http.Response, error) { + return r.ApiService.ApiTeamEnvVarsIdGetExecute(r) +} + +/* +ApiTeamEnvVarsIdGet Retrieves a TeamEnvVar resource. + +Retrieves a TeamEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TeamEnvVar identifier + @return TeamEnvVarAPIApiTeamEnvVarsIdGetRequest +*/ +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsIdGet(ctx context.Context, id string) TeamEnvVarAPIApiTeamEnvVarsIdGetRequest { + return TeamEnvVarAPIApiTeamEnvVarsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TeamEnvVar +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsIdGetExecute(r TeamEnvVarAPIApiTeamEnvVarsIdGetRequest) (*TeamEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TeamEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamEnvVarAPIService.ApiTeamEnvVarsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/team_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TeamEnvVarAPIApiTeamEnvVarsIdPatchRequest struct { + ctx context.Context + ApiService *TeamEnvVarAPIService + teamEnvVar *TeamEnvVar + id string +} + +// The updated TeamEnvVar resource +func (r TeamEnvVarAPIApiTeamEnvVarsIdPatchRequest) TeamEnvVar(teamEnvVar TeamEnvVar) TeamEnvVarAPIApiTeamEnvVarsIdPatchRequest { + r.teamEnvVar = &teamEnvVar + return r +} + +func (r TeamEnvVarAPIApiTeamEnvVarsIdPatchRequest) Execute() (*TeamEnvVar, *http.Response, error) { + return r.ApiService.ApiTeamEnvVarsIdPatchExecute(r) +} + +/* +ApiTeamEnvVarsIdPatch Updates the TeamEnvVar resource. + +Updates the TeamEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TeamEnvVar identifier + @return TeamEnvVarAPIApiTeamEnvVarsIdPatchRequest +*/ +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsIdPatch(ctx context.Context, id string) TeamEnvVarAPIApiTeamEnvVarsIdPatchRequest { + return TeamEnvVarAPIApiTeamEnvVarsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TeamEnvVar +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsIdPatchExecute(r TeamEnvVarAPIApiTeamEnvVarsIdPatchRequest) (*TeamEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TeamEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamEnvVarAPIService.ApiTeamEnvVarsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/team_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.teamEnvVar == nil { + return localVarReturnValue, nil, reportError("teamEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.teamEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TeamEnvVarAPIApiTeamEnvVarsIdPutRequest struct { + ctx context.Context + ApiService *TeamEnvVarAPIService + teamEnvVar *TeamEnvVar + id string +} + +// The updated TeamEnvVar resource +func (r TeamEnvVarAPIApiTeamEnvVarsIdPutRequest) TeamEnvVar(teamEnvVar TeamEnvVar) TeamEnvVarAPIApiTeamEnvVarsIdPutRequest { + r.teamEnvVar = &teamEnvVar + return r +} + +func (r TeamEnvVarAPIApiTeamEnvVarsIdPutRequest) Execute() (*TeamEnvVar, *http.Response, error) { + return r.ApiService.ApiTeamEnvVarsIdPutExecute(r) +} + +/* +ApiTeamEnvVarsIdPut Replaces the TeamEnvVar resource. + +Replaces the TeamEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TeamEnvVar identifier + @return TeamEnvVarAPIApiTeamEnvVarsIdPutRequest +*/ +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsIdPut(ctx context.Context, id string) TeamEnvVarAPIApiTeamEnvVarsIdPutRequest { + return TeamEnvVarAPIApiTeamEnvVarsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TeamEnvVar +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsIdPutExecute(r TeamEnvVarAPIApiTeamEnvVarsIdPutRequest) (*TeamEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TeamEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamEnvVarAPIService.ApiTeamEnvVarsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/team_env_vars/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.teamEnvVar == nil { + return localVarReturnValue, nil, reportError("teamEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.teamEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TeamEnvVarAPIApiTeamEnvVarsPostRequest struct { + ctx context.Context + ApiService *TeamEnvVarAPIService + teamEnvVar *TeamEnvVar +} + +// The new TeamEnvVar resource +func (r TeamEnvVarAPIApiTeamEnvVarsPostRequest) TeamEnvVar(teamEnvVar TeamEnvVar) TeamEnvVarAPIApiTeamEnvVarsPostRequest { + r.teamEnvVar = &teamEnvVar + return r +} + +func (r TeamEnvVarAPIApiTeamEnvVarsPostRequest) Execute() (*TeamEnvVar, *http.Response, error) { + return r.ApiService.ApiTeamEnvVarsPostExecute(r) +} + +/* +ApiTeamEnvVarsPost Creates a TeamEnvVar resource. + +Creates a TeamEnvVar resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TeamEnvVarAPIApiTeamEnvVarsPostRequest +*/ +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsPost(ctx context.Context) TeamEnvVarAPIApiTeamEnvVarsPostRequest { + return TeamEnvVarAPIApiTeamEnvVarsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TeamEnvVar +func (a *TeamEnvVarAPIService) ApiTeamEnvVarsPostExecute(r TeamEnvVarAPIApiTeamEnvVarsPostRequest) (*TeamEnvVar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TeamEnvVar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamEnvVarAPIService.ApiTeamEnvVarsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/team_env_vars" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.teamEnvVar == nil { + return localVarReturnValue, nil, reportError("teamEnvVar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.teamEnvVar + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_template_environment.go b/pkg/api/rewardcloud/api_template_environment.go new file mode 100644 index 0000000..5d52310 --- /dev/null +++ b/pkg/api/rewardcloud/api_template_environment.go @@ -0,0 +1,835 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// TemplateEnvironmentAPIService TemplateEnvironmentAPI service +type TemplateEnvironmentAPIService service + +type TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest struct { + ctx context.Context + ApiService *TemplateEnvironmentAPIService + page *int32 + itemsPerPage *int32 + id *int32 + id2 *[]int32 + templateProject *string + templateProject2 *[]string + orderUpdatedAt *string +} + +// The collection page number +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest) Page(page int32) TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest) Id(id int32) TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest { + r.id = &id + return r +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest) Id2(id2 []int32) TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest { + r.id2 = &id2 + return r +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest) TemplateProject(templateProject string) TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest { + r.templateProject = &templateProject + return r +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest) TemplateProject2(templateProject2 []string) TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest { + r.templateProject2 = &templateProject2 + return r +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest) OrderUpdatedAt(orderUpdatedAt string) TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest { + r.orderUpdatedAt = &orderUpdatedAt + return r +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest) Execute() ([]TemplateEnvironmentTemplateEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiTemplateEnvironmentsGetCollectionExecute(r) +} + +/* +ApiTemplateEnvironmentsGetCollection Retrieves the collection of TemplateEnvironment resources. + +Retrieves the collection of TemplateEnvironment resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest +*/ +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsGetCollection(ctx context.Context) TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest { + return TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []TemplateEnvironmentTemplateEnvironmentOutput +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsGetCollectionExecute(r TemplateEnvironmentAPIApiTemplateEnvironmentsGetCollectionRequest) ([]TemplateEnvironmentTemplateEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []TemplateEnvironmentTemplateEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateEnvironmentAPIService.ApiTemplateEnvironmentsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_environments" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + } + if r.id2 != nil { + t := *r.id2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", t, "multi") + } + } + if r.templateProject != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "templateProject", r.templateProject, "") + } + if r.templateProject2 != nil { + t := *r.templateProject2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "templateProject[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "templateProject[]", t, "multi") + } + } + if r.orderUpdatedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[updatedAt]", r.orderUpdatedAt, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TemplateEnvironmentAPIApiTemplateEnvironmentsIdDeleteRequest struct { + ctx context.Context + ApiService *TemplateEnvironmentAPIService + id string +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiTemplateEnvironmentsIdDeleteExecute(r) +} + +/* +ApiTemplateEnvironmentsIdDelete Removes the TemplateEnvironment resource. + +Removes the TemplateEnvironment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TemplateEnvironment identifier + @return TemplateEnvironmentAPIApiTemplateEnvironmentsIdDeleteRequest +*/ +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsIdDelete(ctx context.Context, id string) TemplateEnvironmentAPIApiTemplateEnvironmentsIdDeleteRequest { + return TemplateEnvironmentAPIApiTemplateEnvironmentsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsIdDeleteExecute(r TemplateEnvironmentAPIApiTemplateEnvironmentsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateEnvironmentAPIService.ApiTemplateEnvironmentsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_environments/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type TemplateEnvironmentAPIApiTemplateEnvironmentsIdGetRequest struct { + ctx context.Context + ApiService *TemplateEnvironmentAPIService + id string +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsIdGetRequest) Execute() (*TemplateEnvironmentTemplateEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiTemplateEnvironmentsIdGetExecute(r) +} + +/* +ApiTemplateEnvironmentsIdGet Retrieves a TemplateEnvironment resource. + +Retrieves a TemplateEnvironment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TemplateEnvironment identifier + @return TemplateEnvironmentAPIApiTemplateEnvironmentsIdGetRequest +*/ +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsIdGet(ctx context.Context, id string) TemplateEnvironmentAPIApiTemplateEnvironmentsIdGetRequest { + return TemplateEnvironmentAPIApiTemplateEnvironmentsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TemplateEnvironmentTemplateEnvironmentOutput +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsIdGetExecute(r TemplateEnvironmentAPIApiTemplateEnvironmentsIdGetRequest) (*TemplateEnvironmentTemplateEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateEnvironmentTemplateEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateEnvironmentAPIService.ApiTemplateEnvironmentsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_environments/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TemplateEnvironmentAPIApiTemplateEnvironmentsIdPatchRequest struct { + ctx context.Context + ApiService *TemplateEnvironmentAPIService + templateEnvironmentTemplateEnvironmentInput *TemplateEnvironmentTemplateEnvironmentInput + id string +} + +// The updated TemplateEnvironment resource +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsIdPatchRequest) TemplateEnvironmentTemplateEnvironmentInput(templateEnvironmentTemplateEnvironmentInput TemplateEnvironmentTemplateEnvironmentInput) TemplateEnvironmentAPIApiTemplateEnvironmentsIdPatchRequest { + r.templateEnvironmentTemplateEnvironmentInput = &templateEnvironmentTemplateEnvironmentInput + return r +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsIdPatchRequest) Execute() (*TemplateEnvironmentTemplateEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiTemplateEnvironmentsIdPatchExecute(r) +} + +/* +ApiTemplateEnvironmentsIdPatch Updates the TemplateEnvironment resource. + +Updates the TemplateEnvironment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TemplateEnvironment identifier + @return TemplateEnvironmentAPIApiTemplateEnvironmentsIdPatchRequest +*/ +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsIdPatch(ctx context.Context, id string) TemplateEnvironmentAPIApiTemplateEnvironmentsIdPatchRequest { + return TemplateEnvironmentAPIApiTemplateEnvironmentsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TemplateEnvironmentTemplateEnvironmentOutput +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsIdPatchExecute(r TemplateEnvironmentAPIApiTemplateEnvironmentsIdPatchRequest) (*TemplateEnvironmentTemplateEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateEnvironmentTemplateEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateEnvironmentAPIService.ApiTemplateEnvironmentsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_environments/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.templateEnvironmentTemplateEnvironmentInput == nil { + return localVarReturnValue, nil, reportError("templateEnvironmentTemplateEnvironmentInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.templateEnvironmentTemplateEnvironmentInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TemplateEnvironmentAPIApiTemplateEnvironmentsIdPutRequest struct { + ctx context.Context + ApiService *TemplateEnvironmentAPIService + templateEnvironmentTemplateEnvironmentInput *TemplateEnvironmentTemplateEnvironmentInput + id string +} + +// The updated TemplateEnvironment resource +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsIdPutRequest) TemplateEnvironmentTemplateEnvironmentInput(templateEnvironmentTemplateEnvironmentInput TemplateEnvironmentTemplateEnvironmentInput) TemplateEnvironmentAPIApiTemplateEnvironmentsIdPutRequest { + r.templateEnvironmentTemplateEnvironmentInput = &templateEnvironmentTemplateEnvironmentInput + return r +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsIdPutRequest) Execute() (*TemplateEnvironmentTemplateEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiTemplateEnvironmentsIdPutExecute(r) +} + +/* +ApiTemplateEnvironmentsIdPut Replaces the TemplateEnvironment resource. + +Replaces the TemplateEnvironment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TemplateEnvironment identifier + @return TemplateEnvironmentAPIApiTemplateEnvironmentsIdPutRequest +*/ +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsIdPut(ctx context.Context, id string) TemplateEnvironmentAPIApiTemplateEnvironmentsIdPutRequest { + return TemplateEnvironmentAPIApiTemplateEnvironmentsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TemplateEnvironmentTemplateEnvironmentOutput +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsIdPutExecute(r TemplateEnvironmentAPIApiTemplateEnvironmentsIdPutRequest) (*TemplateEnvironmentTemplateEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateEnvironmentTemplateEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateEnvironmentAPIService.ApiTemplateEnvironmentsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_environments/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.templateEnvironmentTemplateEnvironmentInput == nil { + return localVarReturnValue, nil, reportError("templateEnvironmentTemplateEnvironmentInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.templateEnvironmentTemplateEnvironmentInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TemplateEnvironmentAPIApiTemplateEnvironmentsPostRequest struct { + ctx context.Context + ApiService *TemplateEnvironmentAPIService + templateEnvironmentTemplateEnvironmentInput *TemplateEnvironmentTemplateEnvironmentInput +} + +// The new TemplateEnvironment resource +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsPostRequest) TemplateEnvironmentTemplateEnvironmentInput(templateEnvironmentTemplateEnvironmentInput TemplateEnvironmentTemplateEnvironmentInput) TemplateEnvironmentAPIApiTemplateEnvironmentsPostRequest { + r.templateEnvironmentTemplateEnvironmentInput = &templateEnvironmentTemplateEnvironmentInput + return r +} + +func (r TemplateEnvironmentAPIApiTemplateEnvironmentsPostRequest) Execute() (*TemplateEnvironmentTemplateEnvironmentOutput, *http.Response, error) { + return r.ApiService.ApiTemplateEnvironmentsPostExecute(r) +} + +/* +ApiTemplateEnvironmentsPost Creates a TemplateEnvironment resource. + +Creates a TemplateEnvironment resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TemplateEnvironmentAPIApiTemplateEnvironmentsPostRequest +*/ +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsPost(ctx context.Context) TemplateEnvironmentAPIApiTemplateEnvironmentsPostRequest { + return TemplateEnvironmentAPIApiTemplateEnvironmentsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TemplateEnvironmentTemplateEnvironmentOutput +func (a *TemplateEnvironmentAPIService) ApiTemplateEnvironmentsPostExecute(r TemplateEnvironmentAPIApiTemplateEnvironmentsPostRequest) (*TemplateEnvironmentTemplateEnvironmentOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateEnvironmentTemplateEnvironmentOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateEnvironmentAPIService.ApiTemplateEnvironmentsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_environments" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.templateEnvironmentTemplateEnvironmentInput == nil { + return localVarReturnValue, nil, reportError("templateEnvironmentTemplateEnvironmentInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.templateEnvironmentTemplateEnvironmentInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_template_project.go b/pkg/api/rewardcloud/api_template_project.go new file mode 100644 index 0000000..8c95442 --- /dev/null +++ b/pkg/api/rewardcloud/api_template_project.go @@ -0,0 +1,809 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// TemplateProjectAPIService TemplateProjectAPI service +type TemplateProjectAPIService service + +type TemplateProjectAPIApiTemplateProjectsGetCollectionRequest struct { + ctx context.Context + ApiService *TemplateProjectAPIService + page *int32 + itemsPerPage *int32 + projectTypeVersion *string + projectTypeVersion2 *[]string + orderUpdatedAt *string +} + +// The collection page number +func (r TemplateProjectAPIApiTemplateProjectsGetCollectionRequest) Page(page int32) TemplateProjectAPIApiTemplateProjectsGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r TemplateProjectAPIApiTemplateProjectsGetCollectionRequest) ItemsPerPage(itemsPerPage int32) TemplateProjectAPIApiTemplateProjectsGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r TemplateProjectAPIApiTemplateProjectsGetCollectionRequest) ProjectTypeVersion(projectTypeVersion string) TemplateProjectAPIApiTemplateProjectsGetCollectionRequest { + r.projectTypeVersion = &projectTypeVersion + return r +} + +func (r TemplateProjectAPIApiTemplateProjectsGetCollectionRequest) ProjectTypeVersion2(projectTypeVersion2 []string) TemplateProjectAPIApiTemplateProjectsGetCollectionRequest { + r.projectTypeVersion2 = &projectTypeVersion2 + return r +} + +func (r TemplateProjectAPIApiTemplateProjectsGetCollectionRequest) OrderUpdatedAt(orderUpdatedAt string) TemplateProjectAPIApiTemplateProjectsGetCollectionRequest { + r.orderUpdatedAt = &orderUpdatedAt + return r +} + +func (r TemplateProjectAPIApiTemplateProjectsGetCollectionRequest) Execute() ([]TemplateProjectTemplateProjectOutput, *http.Response, error) { + return r.ApiService.ApiTemplateProjectsGetCollectionExecute(r) +} + +/* +ApiTemplateProjectsGetCollection Retrieves the collection of TemplateProject resources. + +Retrieves the collection of TemplateProject resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TemplateProjectAPIApiTemplateProjectsGetCollectionRequest +*/ +func (a *TemplateProjectAPIService) ApiTemplateProjectsGetCollection(ctx context.Context) TemplateProjectAPIApiTemplateProjectsGetCollectionRequest { + return TemplateProjectAPIApiTemplateProjectsGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []TemplateProjectTemplateProjectOutput +func (a *TemplateProjectAPIService) ApiTemplateProjectsGetCollectionExecute(r TemplateProjectAPIApiTemplateProjectsGetCollectionRequest) ([]TemplateProjectTemplateProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []TemplateProjectTemplateProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateProjectAPIService.ApiTemplateProjectsGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_projects" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.projectTypeVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion", r.projectTypeVersion, "") + } + if r.projectTypeVersion2 != nil { + t := *r.projectTypeVersion2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectTypeVersion[]", t, "multi") + } + } + if r.orderUpdatedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order[updatedAt]", r.orderUpdatedAt, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TemplateProjectAPIApiTemplateProjectsIdDeleteRequest struct { + ctx context.Context + ApiService *TemplateProjectAPIService + id string +} + +func (r TemplateProjectAPIApiTemplateProjectsIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiTemplateProjectsIdDeleteExecute(r) +} + +/* +ApiTemplateProjectsIdDelete Removes the TemplateProject resource. + +Removes the TemplateProject resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TemplateProject identifier + @return TemplateProjectAPIApiTemplateProjectsIdDeleteRequest +*/ +func (a *TemplateProjectAPIService) ApiTemplateProjectsIdDelete(ctx context.Context, id string) TemplateProjectAPIApiTemplateProjectsIdDeleteRequest { + return TemplateProjectAPIApiTemplateProjectsIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *TemplateProjectAPIService) ApiTemplateProjectsIdDeleteExecute(r TemplateProjectAPIApiTemplateProjectsIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateProjectAPIService.ApiTemplateProjectsIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_projects/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type TemplateProjectAPIApiTemplateProjectsIdGetRequest struct { + ctx context.Context + ApiService *TemplateProjectAPIService + id string +} + +func (r TemplateProjectAPIApiTemplateProjectsIdGetRequest) Execute() (*TemplateProjectTemplateProjectOutput, *http.Response, error) { + return r.ApiService.ApiTemplateProjectsIdGetExecute(r) +} + +/* +ApiTemplateProjectsIdGet Retrieves a TemplateProject resource. + +Retrieves a TemplateProject resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TemplateProject identifier + @return TemplateProjectAPIApiTemplateProjectsIdGetRequest +*/ +func (a *TemplateProjectAPIService) ApiTemplateProjectsIdGet(ctx context.Context, id string) TemplateProjectAPIApiTemplateProjectsIdGetRequest { + return TemplateProjectAPIApiTemplateProjectsIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TemplateProjectTemplateProjectOutput +func (a *TemplateProjectAPIService) ApiTemplateProjectsIdGetExecute(r TemplateProjectAPIApiTemplateProjectsIdGetRequest) (*TemplateProjectTemplateProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateProjectTemplateProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateProjectAPIService.ApiTemplateProjectsIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_projects/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TemplateProjectAPIApiTemplateProjectsIdPatchRequest struct { + ctx context.Context + ApiService *TemplateProjectAPIService + templateProjectTemplateProjectInput *TemplateProjectTemplateProjectInput + id string +} + +// The updated TemplateProject resource +func (r TemplateProjectAPIApiTemplateProjectsIdPatchRequest) TemplateProjectTemplateProjectInput(templateProjectTemplateProjectInput TemplateProjectTemplateProjectInput) TemplateProjectAPIApiTemplateProjectsIdPatchRequest { + r.templateProjectTemplateProjectInput = &templateProjectTemplateProjectInput + return r +} + +func (r TemplateProjectAPIApiTemplateProjectsIdPatchRequest) Execute() (*TemplateProjectTemplateProjectOutput, *http.Response, error) { + return r.ApiService.ApiTemplateProjectsIdPatchExecute(r) +} + +/* +ApiTemplateProjectsIdPatch Updates the TemplateProject resource. + +Updates the TemplateProject resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TemplateProject identifier + @return TemplateProjectAPIApiTemplateProjectsIdPatchRequest +*/ +func (a *TemplateProjectAPIService) ApiTemplateProjectsIdPatch(ctx context.Context, id string) TemplateProjectAPIApiTemplateProjectsIdPatchRequest { + return TemplateProjectAPIApiTemplateProjectsIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TemplateProjectTemplateProjectOutput +func (a *TemplateProjectAPIService) ApiTemplateProjectsIdPatchExecute(r TemplateProjectAPIApiTemplateProjectsIdPatchRequest) (*TemplateProjectTemplateProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateProjectTemplateProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateProjectAPIService.ApiTemplateProjectsIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_projects/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.templateProjectTemplateProjectInput == nil { + return localVarReturnValue, nil, reportError("templateProjectTemplateProjectInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.templateProjectTemplateProjectInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TemplateProjectAPIApiTemplateProjectsIdPutRequest struct { + ctx context.Context + ApiService *TemplateProjectAPIService + templateProjectTemplateProjectInput *TemplateProjectTemplateProjectInput + id string +} + +// The updated TemplateProject resource +func (r TemplateProjectAPIApiTemplateProjectsIdPutRequest) TemplateProjectTemplateProjectInput(templateProjectTemplateProjectInput TemplateProjectTemplateProjectInput) TemplateProjectAPIApiTemplateProjectsIdPutRequest { + r.templateProjectTemplateProjectInput = &templateProjectTemplateProjectInput + return r +} + +func (r TemplateProjectAPIApiTemplateProjectsIdPutRequest) Execute() (*TemplateProjectTemplateProjectOutput, *http.Response, error) { + return r.ApiService.ApiTemplateProjectsIdPutExecute(r) +} + +/* +ApiTemplateProjectsIdPut Replaces the TemplateProject resource. + +Replaces the TemplateProject resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id TemplateProject identifier + @return TemplateProjectAPIApiTemplateProjectsIdPutRequest +*/ +func (a *TemplateProjectAPIService) ApiTemplateProjectsIdPut(ctx context.Context, id string) TemplateProjectAPIApiTemplateProjectsIdPutRequest { + return TemplateProjectAPIApiTemplateProjectsIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TemplateProjectTemplateProjectOutput +func (a *TemplateProjectAPIService) ApiTemplateProjectsIdPutExecute(r TemplateProjectAPIApiTemplateProjectsIdPutRequest) (*TemplateProjectTemplateProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateProjectTemplateProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateProjectAPIService.ApiTemplateProjectsIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_projects/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.templateProjectTemplateProjectInput == nil { + return localVarReturnValue, nil, reportError("templateProjectTemplateProjectInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.templateProjectTemplateProjectInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TemplateProjectAPIApiTemplateProjectsPostRequest struct { + ctx context.Context + ApiService *TemplateProjectAPIService + templateProjectTemplateProjectInput *TemplateProjectTemplateProjectInput +} + +// The new TemplateProject resource +func (r TemplateProjectAPIApiTemplateProjectsPostRequest) TemplateProjectTemplateProjectInput(templateProjectTemplateProjectInput TemplateProjectTemplateProjectInput) TemplateProjectAPIApiTemplateProjectsPostRequest { + r.templateProjectTemplateProjectInput = &templateProjectTemplateProjectInput + return r +} + +func (r TemplateProjectAPIApiTemplateProjectsPostRequest) Execute() (*TemplateProjectTemplateProjectOutput, *http.Response, error) { + return r.ApiService.ApiTemplateProjectsPostExecute(r) +} + +/* +ApiTemplateProjectsPost Creates a TemplateProject resource. + +Creates a TemplateProject resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TemplateProjectAPIApiTemplateProjectsPostRequest +*/ +func (a *TemplateProjectAPIService) ApiTemplateProjectsPost(ctx context.Context) TemplateProjectAPIApiTemplateProjectsPostRequest { + return TemplateProjectAPIApiTemplateProjectsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TemplateProjectTemplateProjectOutput +func (a *TemplateProjectAPIService) ApiTemplateProjectsPostExecute(r TemplateProjectAPIApiTemplateProjectsPostRequest) (*TemplateProjectTemplateProjectOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateProjectTemplateProjectOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplateProjectAPIService.ApiTemplateProjectsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/template_projects" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.templateProjectTemplateProjectInput == nil { + return localVarReturnValue, nil, reportError("templateProjectTemplateProjectInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.templateProjectTemplateProjectInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/api_user.go b/pkg/api/rewardcloud/api_user.go new file mode 100644 index 0000000..5053102 --- /dev/null +++ b/pkg/api/rewardcloud/api_user.go @@ -0,0 +1,2535 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" + "strings" +) + +// UserAPIService UserAPI service +type UserAPIService service + +type UserAPIApiUsersActivatePutRequest struct { + ctx context.Context + ApiService *UserAPIService + hash string +} + +func (r UserAPIApiUsersActivatePutRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ApiUsersActivatePutExecute(r) +} + +/* +ApiUsersActivatePut User activation entry point + +If you have the correct hash string, you can activate your freshly registered user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param hash + @return UserAPIApiUsersActivatePutRequest +*/ +func (a *UserAPIService) ApiUsersActivatePut(ctx context.Context, hash string) UserAPIApiUsersActivatePutRequest { + return UserAPIApiUsersActivatePutRequest{ + ApiService: a, + ctx: ctx, + hash: hash, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *UserAPIService) ApiUsersActivatePutExecute(r UserAPIApiUsersActivatePutRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersActivatePut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/activate" + localVarPath = strings.Replace(localVarPath, "{"+"hash"+"}", url.PathEscape(parameterValueToString(r.hash, "hash")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersCheckEmailGetRequest struct { + ctx context.Context + ApiService *UserAPIService + email *string +} + +func (r UserAPIApiUsersCheckEmailGetRequest) Email(email string) UserAPIApiUsersCheckEmailGetRequest { + r.email = &email + return r +} + +func (r UserAPIApiUsersCheckEmailGetRequest) Execute() (*ApiUsersCheckEmailGet200Response, *http.Response, error) { + return r.ApiService.ApiUsersCheckEmailGetExecute(r) +} + +/* +ApiUsersCheckEmailGet Check the email existence + +This entry point checks an email address' existence in database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UserAPIApiUsersCheckEmailGetRequest +*/ +func (a *UserAPIService) ApiUsersCheckEmailGet(ctx context.Context) UserAPIApiUsersCheckEmailGetRequest { + return UserAPIApiUsersCheckEmailGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ApiUsersCheckEmailGet200Response +func (a *UserAPIService) ApiUsersCheckEmailGetExecute(r UserAPIApiUsersCheckEmailGetRequest) (*ApiUsersCheckEmailGet200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApiUsersCheckEmailGet200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersCheckEmailGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/check-email" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.email == nil { + return localVarReturnValue, nil, reportError("email is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "email", r.email, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersCheckUsernameGetRequest struct { + ctx context.Context + ApiService *UserAPIService + username *string +} + +func (r UserAPIApiUsersCheckUsernameGetRequest) Username(username string) UserAPIApiUsersCheckUsernameGetRequest { + r.username = &username + return r +} + +func (r UserAPIApiUsersCheckUsernameGetRequest) Execute() (*ApiUsersCheckEmailGet200Response, *http.Response, error) { + return r.ApiService.ApiUsersCheckUsernameGetExecute(r) +} + +/* +ApiUsersCheckUsernameGet Check the username existence + +This entry point checks an username's existence in database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UserAPIApiUsersCheckUsernameGetRequest +*/ +func (a *UserAPIService) ApiUsersCheckUsernameGet(ctx context.Context) UserAPIApiUsersCheckUsernameGetRequest { + return UserAPIApiUsersCheckUsernameGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ApiUsersCheckEmailGet200Response +func (a *UserAPIService) ApiUsersCheckUsernameGetExecute(r UserAPIApiUsersCheckUsernameGetRequest) (*ApiUsersCheckEmailGet200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApiUsersCheckEmailGet200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersCheckUsernameGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/check-username" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.username == nil { + return localVarReturnValue, nil, reportError("username is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "username", r.username, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersDiscoverMercureGetRequest struct { + ctx context.Context + ApiService *UserAPIService +} + +func (r UserAPIApiUsersDiscoverMercureGetRequest) Execute() (*MercureDiscoverResponse, *http.Response, error) { + return r.ApiService.ApiUsersDiscoverMercureGetExecute(r) +} + +/* +ApiUsersDiscoverMercureGet Retrieve cookie for Mercure authentication + + It will discovers for mercure JWT token for you - w/ take consideration your permissions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UserAPIApiUsersDiscoverMercureGetRequest +*/ +func (a *UserAPIService) ApiUsersDiscoverMercureGet(ctx context.Context) UserAPIApiUsersDiscoverMercureGetRequest { + return UserAPIApiUsersDiscoverMercureGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return MercureDiscoverResponse +func (a *UserAPIService) ApiUsersDiscoverMercureGetExecute(r UserAPIApiUsersDiscoverMercureGetRequest) (*MercureDiscoverResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MercureDiscoverResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersDiscoverMercureGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/discover_mercure" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersForgotPasswordPutRequest struct { + ctx context.Context + ApiService *UserAPIService + apiUsersForgotPasswordPutRequest *ApiUsersForgotPasswordPutRequest +} + +func (r UserAPIApiUsersForgotPasswordPutRequest) ApiUsersForgotPasswordPutRequest(apiUsersForgotPasswordPutRequest ApiUsersForgotPasswordPutRequest) UserAPIApiUsersForgotPasswordPutRequest { + r.apiUsersForgotPasswordPutRequest = &apiUsersForgotPasswordPutRequest + return r +} + +func (r UserAPIApiUsersForgotPasswordPutRequest) Execute() (*ApiUsersForgotPasswordPut200Response, *http.Response, error) { + return r.ApiService.ApiUsersForgotPasswordPutExecute(r) +} + +/* +ApiUsersForgotPasswordPut Restore password through email + +If the user exists, we will send an email to restore password + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UserAPIApiUsersForgotPasswordPutRequest +*/ +func (a *UserAPIService) ApiUsersForgotPasswordPut(ctx context.Context) UserAPIApiUsersForgotPasswordPutRequest { + return UserAPIApiUsersForgotPasswordPutRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ApiUsersForgotPasswordPut200Response +func (a *UserAPIService) ApiUsersForgotPasswordPutExecute(r UserAPIApiUsersForgotPasswordPutRequest) (*ApiUsersForgotPasswordPut200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApiUsersForgotPasswordPut200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersForgotPasswordPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/forgot-password" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.apiUsersForgotPasswordPutRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersGetCollectionRequest struct { + ctx context.Context + ApiService *UserAPIService + page *int32 + itemsPerPage *int32 + id *int32 + id2 *[]int32 + roleGroup *string + roleGroup2 *[]string + team *string + team2 *[]string +} + +// The collection page number +func (r UserAPIApiUsersGetCollectionRequest) Page(page int32) UserAPIApiUsersGetCollectionRequest { + r.page = &page + return r +} + +// The number of items per page +func (r UserAPIApiUsersGetCollectionRequest) ItemsPerPage(itemsPerPage int32) UserAPIApiUsersGetCollectionRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +func (r UserAPIApiUsersGetCollectionRequest) Id(id int32) UserAPIApiUsersGetCollectionRequest { + r.id = &id + return r +} + +func (r UserAPIApiUsersGetCollectionRequest) Id2(id2 []int32) UserAPIApiUsersGetCollectionRequest { + r.id2 = &id2 + return r +} + +func (r UserAPIApiUsersGetCollectionRequest) RoleGroup(roleGroup string) UserAPIApiUsersGetCollectionRequest { + r.roleGroup = &roleGroup + return r +} + +func (r UserAPIApiUsersGetCollectionRequest) RoleGroup2(roleGroup2 []string) UserAPIApiUsersGetCollectionRequest { + r.roleGroup2 = &roleGroup2 + return r +} + +func (r UserAPIApiUsersGetCollectionRequest) Team(team string) UserAPIApiUsersGetCollectionRequest { + r.team = &team + return r +} + +func (r UserAPIApiUsersGetCollectionRequest) Team2(team2 []string) UserAPIApiUsersGetCollectionRequest { + r.team2 = &team2 + return r +} + +func (r UserAPIApiUsersGetCollectionRequest) Execute() ([]User, *http.Response, error) { + return r.ApiService.ApiUsersGetCollectionExecute(r) +} + +/* +ApiUsersGetCollection Retrieves the collection of User resources. + +Retrieves the collection of User resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UserAPIApiUsersGetCollectionRequest +*/ +func (a *UserAPIService) ApiUsersGetCollection(ctx context.Context) UserAPIApiUsersGetCollectionRequest { + return UserAPIApiUsersGetCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []User +func (a *UserAPIService) ApiUsersGetCollectionExecute(r UserAPIApiUsersGetCollectionRequest) ([]User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersGetCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int32 = 30 + r.itemsPerPage = &defaultValue + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + } + if r.id2 != nil { + t := *r.id2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "id[]", t, "multi") + } + } + if r.roleGroup != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "roleGroup", r.roleGroup, "") + } + if r.roleGroup2 != nil { + t := *r.roleGroup2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "roleGroup[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "roleGroup[]", t, "multi") + } + } + if r.team != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "team", r.team, "") + } + if r.team2 != nil { + t := *r.team2 + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "team[]", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "team[]", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdAdministrateGetRequest struct { + ctx context.Context + ApiService *UserAPIService + id int32 +} + +func (r UserAPIApiUsersIdAdministrateGetRequest) Execute() (*FinanceApiTokenResponse, *http.Response, error) { + return r.ApiService.ApiUsersIdAdministrateGetExecute(r) +} + +/* +ApiUsersIdAdministrateGet Get authentication data from another user + +An administrator user can control another non-admin user i.e. through the UI + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return UserAPIApiUsersIdAdministrateGetRequest +*/ +func (a *UserAPIService) ApiUsersIdAdministrateGet(ctx context.Context, id int32) UserAPIApiUsersIdAdministrateGetRequest { + return UserAPIApiUsersIdAdministrateGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return FinanceApiTokenResponse +func (a *UserAPIService) ApiUsersIdAdministrateGetExecute(r UserAPIApiUsersIdAdministrateGetRequest) (*FinanceApiTokenResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FinanceApiTokenResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdAdministrateGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}/administrate" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdDeleteRequest struct { + ctx context.Context + ApiService *UserAPIService + id string +} + +func (r UserAPIApiUsersIdDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiUsersIdDeleteExecute(r) +} + +/* +ApiUsersIdDelete Removes the User resource. + +Removes the User resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id User identifier + @return UserAPIApiUsersIdDeleteRequest +*/ +func (a *UserAPIService) ApiUsersIdDelete(ctx context.Context, id string) UserAPIApiUsersIdDeleteRequest { + return UserAPIApiUsersIdDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *UserAPIService) ApiUsersIdDeleteExecute(r UserAPIApiUsersIdDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdFinanceCostsGetRequest struct { + ctx context.Context + ApiService *UserAPIService + id int32 +} + +func (r UserAPIApiUsersIdFinanceCostsGetRequest) Execute() (*FinanceCostsResponse, *http.Response, error) { + return r.ApiService.ApiUsersIdFinanceCostsGetExecute(r) +} + +/* +ApiUsersIdFinanceCostsGet Get resource costs information + +You can query the summary of costs of CPU, memory and storage + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return UserAPIApiUsersIdFinanceCostsGetRequest +*/ +func (a *UserAPIService) ApiUsersIdFinanceCostsGet(ctx context.Context, id int32) UserAPIApiUsersIdFinanceCostsGetRequest { + return UserAPIApiUsersIdFinanceCostsGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return FinanceCostsResponse +func (a *UserAPIService) ApiUsersIdFinanceCostsGetExecute(r UserAPIApiUsersIdFinanceCostsGetRequest) (*FinanceCostsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FinanceCostsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdFinanceCostsGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}/finance/costs" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdFinanceDetachCardPatchRequest struct { + ctx context.Context + ApiService *UserAPIService + id int32 + paymentMethodId *string +} + +func (r UserAPIApiUsersIdFinanceDetachCardPatchRequest) PaymentMethodId(paymentMethodId string) UserAPIApiUsersIdFinanceDetachCardPatchRequest { + r.paymentMethodId = &paymentMethodId + return r +} + +func (r UserAPIApiUsersIdFinanceDetachCardPatchRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ApiUsersIdFinanceDetachCardPatchExecute(r) +} + +/* +ApiUsersIdFinanceDetachCardPatch Detach a payment method from the user + +WARNING! It is a permanent, irreversible process + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return UserAPIApiUsersIdFinanceDetachCardPatchRequest +*/ +func (a *UserAPIService) ApiUsersIdFinanceDetachCardPatch(ctx context.Context, id int32) UserAPIApiUsersIdFinanceDetachCardPatchRequest { + return UserAPIApiUsersIdFinanceDetachCardPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *UserAPIService) ApiUsersIdFinanceDetachCardPatchExecute(r UserAPIApiUsersIdFinanceDetachCardPatchRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdFinanceDetachCardPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}/finance/detach-card" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.paymentMethodId == nil { + return localVarReturnValue, nil, reportError("paymentMethodId is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "paymentMethodId", r.paymentMethodId, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdFinanceInvoicesGetRequest struct { + ctx context.Context + ApiService *UserAPIService + id int32 +} + +func (r UserAPIApiUsersIdFinanceInvoicesGetRequest) Execute() (*FinanceInvoicesResponse, *http.Response, error) { + return r.ApiService.ApiUsersIdFinanceInvoicesGetExecute(r) +} + +/* +ApiUsersIdFinanceInvoicesGet Get invoices and some necessary data from payment module + + You You can retrieve all user related customer, + payment methods and invoices data from Stripe + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return UserAPIApiUsersIdFinanceInvoicesGetRequest +*/ +func (a *UserAPIService) ApiUsersIdFinanceInvoicesGet(ctx context.Context, id int32) UserAPIApiUsersIdFinanceInvoicesGetRequest { + return UserAPIApiUsersIdFinanceInvoicesGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return FinanceInvoicesResponse +func (a *UserAPIService) ApiUsersIdFinanceInvoicesGetExecute(r UserAPIApiUsersIdFinanceInvoicesGetRequest) (*FinanceInvoicesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FinanceInvoicesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdFinanceInvoicesGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}/finance/invoices" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdFinancePayPatchRequest struct { + ctx context.Context + ApiService *UserAPIService + id int32 + invoiceId *string + paymentMethodId *string +} + +func (r UserAPIApiUsersIdFinancePayPatchRequest) InvoiceId(invoiceId string) UserAPIApiUsersIdFinancePayPatchRequest { + r.invoiceId = &invoiceId + return r +} + +func (r UserAPIApiUsersIdFinancePayPatchRequest) PaymentMethodId(paymentMethodId string) UserAPIApiUsersIdFinancePayPatchRequest { + r.paymentMethodId = &paymentMethodId + return r +} + +func (r UserAPIApiUsersIdFinancePayPatchRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiUsersIdFinancePayPatchExecute(r) +} + +/* +ApiUsersIdFinancePayPatch Initiate a payment for the user + +It sends a payment initiative to the payment API through our API + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return UserAPIApiUsersIdFinancePayPatchRequest +*/ +func (a *UserAPIService) ApiUsersIdFinancePayPatch(ctx context.Context, id int32) UserAPIApiUsersIdFinancePayPatchRequest { + return UserAPIApiUsersIdFinancePayPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *UserAPIService) ApiUsersIdFinancePayPatchExecute(r UserAPIApiUsersIdFinancePayPatchRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdFinancePayPatch") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}/finance/pay" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.invoiceId == nil { + return nil, reportError("invoiceId is required and must be specified") + } + if r.paymentMethodId == nil { + return nil, reportError("paymentMethodId is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "invoiceId", r.invoiceId, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "paymentMethodId", r.paymentMethodId, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdFinanceSubscribeInfoGetRequest struct { + ctx context.Context + ApiService *UserAPIService + id int32 +} + +func (r UserAPIApiUsersIdFinanceSubscribeInfoGetRequest) Execute() (*ApiUsersIdFinanceSubscribeInfoGet200Response, *http.Response, error) { + return r.ApiService.ApiUsersIdFinanceSubscribeInfoGetExecute(r) +} + +/* +ApiUsersIdFinanceSubscribeInfoGet Get payment module's access token + +Stripe access token information can be retrieved through this entry point + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return UserAPIApiUsersIdFinanceSubscribeInfoGetRequest +*/ +func (a *UserAPIService) ApiUsersIdFinanceSubscribeInfoGet(ctx context.Context, id int32) UserAPIApiUsersIdFinanceSubscribeInfoGetRequest { + return UserAPIApiUsersIdFinanceSubscribeInfoGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ApiUsersIdFinanceSubscribeInfoGet200Response +func (a *UserAPIService) ApiUsersIdFinanceSubscribeInfoGetExecute(r UserAPIApiUsersIdFinanceSubscribeInfoGetRequest) (*ApiUsersIdFinanceSubscribeInfoGet200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApiUsersIdFinanceSubscribeInfoGet200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdFinanceSubscribeInfoGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}/finance/subscribe-info" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdGetRequest struct { + ctx context.Context + ApiService *UserAPIService + id string +} + +func (r UserAPIApiUsersIdGetRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.ApiUsersIdGetExecute(r) +} + +/* +ApiUsersIdGet Retrieves a User resource. + +Retrieves a User resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id User identifier + @return UserAPIApiUsersIdGetRequest +*/ +func (a *UserAPIService) ApiUsersIdGet(ctx context.Context, id string) UserAPIApiUsersIdGetRequest { + return UserAPIApiUsersIdGetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return User +func (a *UserAPIService) ApiUsersIdGetExecute(r UserAPIApiUsersIdGetRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdPatchRequest struct { + ctx context.Context + ApiService *UserAPIService + user *User + id string +} + +// The updated User resource +func (r UserAPIApiUsersIdPatchRequest) User(user User) UserAPIApiUsersIdPatchRequest { + r.user = &user + return r +} + +func (r UserAPIApiUsersIdPatchRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.ApiUsersIdPatchExecute(r) +} + +/* +ApiUsersIdPatch Updates the User resource. + +Updates the User resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id User identifier + @return UserAPIApiUsersIdPatchRequest +*/ +func (a *UserAPIService) ApiUsersIdPatch(ctx context.Context, id string) UserAPIApiUsersIdPatchRequest { + return UserAPIApiUsersIdPatchRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return User +func (a *UserAPIService) ApiUsersIdPatchExecute(r UserAPIApiUsersIdPatchRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.user == nil { + return localVarReturnValue, nil, reportError("user is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/merge-patch+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.user + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdPutRequest struct { + ctx context.Context + ApiService *UserAPIService + user *User + id string +} + +// The updated User resource +func (r UserAPIApiUsersIdPutRequest) User(user User) UserAPIApiUsersIdPutRequest { + r.user = &user + return r +} + +func (r UserAPIApiUsersIdPutRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.ApiUsersIdPutExecute(r) +} + +/* +ApiUsersIdPut Replaces the User resource. + +Replaces the User resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id User identifier + @return UserAPIApiUsersIdPutRequest +*/ +func (a *UserAPIService) ApiUsersIdPut(ctx context.Context, id string) UserAPIApiUsersIdPutRequest { + return UserAPIApiUsersIdPutRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return User +func (a *UserAPIService) ApiUsersIdPutExecute(r UserAPIApiUsersIdPutRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.user == nil { + return localVarReturnValue, nil, reportError("user is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.user + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersIdRemoveAccountDeleteRequest struct { + ctx context.Context + ApiService *UserAPIService + id int32 +} + +func (r UserAPIApiUsersIdRemoveAccountDeleteRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ApiUsersIdRemoveAccountDeleteExecute(r) +} + +/* +ApiUsersIdRemoveAccountDelete User can delete itself + +User can delete its whole account w/ its all data + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return UserAPIApiUsersIdRemoveAccountDeleteRequest +*/ +func (a *UserAPIService) ApiUsersIdRemoveAccountDelete(ctx context.Context, id int32) UserAPIApiUsersIdRemoveAccountDeleteRequest { + return UserAPIApiUsersIdRemoveAccountDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *UserAPIService) ApiUsersIdRemoveAccountDeleteExecute(r UserAPIApiUsersIdRemoveAccountDeleteRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersIdRemoveAccountDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/{id}/remove-account" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersPostRequest struct { + ctx context.Context + ApiService *UserAPIService + user *User +} + +// The new User resource +func (r UserAPIApiUsersPostRequest) User(user User) UserAPIApiUsersPostRequest { + r.user = &user + return r +} + +func (r UserAPIApiUsersPostRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.ApiUsersPostExecute(r) +} + +/* +ApiUsersPost Creates a User resource. + +Creates a User resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UserAPIApiUsersPostRequest +*/ +func (a *UserAPIService) ApiUsersPost(ctx context.Context) UserAPIApiUsersPostRequest { + return UserAPIApiUsersPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return User +func (a *UserAPIService) ApiUsersPostExecute(r UserAPIApiUsersPostRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.user == nil { + return localVarReturnValue, nil, reportError("user is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "text/html"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.user + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersRegisterPostRequest struct { + ctx context.Context + ApiService *UserAPIService +} + +func (r UserAPIApiUsersRegisterPostRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ApiUsersRegisterPostExecute(r) +} + +/* +ApiUsersRegisterPost User creation entry point + +An unauthenticated user can create its own account in database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UserAPIApiUsersRegisterPostRequest +*/ +func (a *UserAPIService) ApiUsersRegisterPost(ctx context.Context) UserAPIApiUsersRegisterPostRequest { + return UserAPIApiUsersRegisterPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *UserAPIService) ApiUsersRegisterPostExecute(r UserAPIApiUsersRegisterPostRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersRegisterPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/register" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UserAPIApiUsersResetPasswordPutRequest struct { + ctx context.Context + ApiService *UserAPIService + user *User +} + +func (r UserAPIApiUsersResetPasswordPutRequest) User(user User) UserAPIApiUsersResetPasswordPutRequest { + r.user = &user + return r +} + +func (r UserAPIApiUsersResetPasswordPutRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ApiUsersResetPasswordPutExecute(r) +} + +/* +ApiUsersResetPasswordPut Change the current password + +The user can change his password if he has the current password + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UserAPIApiUsersResetPasswordPutRequest +*/ +func (a *UserAPIService) ApiUsersResetPasswordPut(ctx context.Context) UserAPIApiUsersResetPasswordPutRequest { + return UserAPIApiUsersResetPasswordPutRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *UserAPIService) ApiUsersResetPasswordPutExecute(r UserAPIApiUsersResetPasswordPutRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ApiUsersResetPasswordPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/users/reset-password" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.user + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/rewardcloud/client.go b/pkg/api/rewardcloud/client.go new file mode 100644 index 0000000..52a508f --- /dev/null +++ b/pkg/api/rewardcloud/client.go @@ -0,0 +1,840 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the Reward Cloud API vv0.7.0-alpha +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AccessCodeAPI *AccessCodeAPIService + + ClusterAPI *ClusterAPIService + + ComponentAPI *ComponentAPIService + + ComponentResourceLimitAPI *ComponentResourceLimitAPIService + + ComponentVersionAPI *ComponentVersionAPIService + + ComponentVersionEnvVarAPI *ComponentVersionEnvVarAPIService + + ComponentVersionEnvVarExampleAPI *ComponentVersionEnvVarExampleAPIService + + CredentialTypeAPI *CredentialTypeAPIService + + CryptoKeyTypeAPI *CryptoKeyTypeAPIService + + DataTransferDataTypeAPI *DataTransferDataTypeAPIService + + DataTransferTypeAPI *DataTransferTypeAPIService + + EnvVarTypeAPI *EnvVarTypeAPIService + + EnvVarValidationAPI *EnvVarValidationAPIService + + EnvironmentAPI *EnvironmentAPIService + + EnvironmentAccessAPI *EnvironmentAccessAPIService + + EnvironmentAccessBackendAPI *EnvironmentAccessBackendAPIService + + EnvironmentAccessDatabaseAPI *EnvironmentAccessDatabaseAPIService + + EnvironmentAccessDevToolsAPI *EnvironmentAccessDevToolsAPIService + + EnvironmentAccessFrontendAPI *EnvironmentAccessFrontendAPIService + + EnvironmentAccessMailboxAPI *EnvironmentAccessMailboxAPIService + + EnvironmentAccessRabbitAPI *EnvironmentAccessRabbitAPIService + + EnvironmentAccessRedisAPI *EnvironmentAccessRedisAPIService + + EnvironmentAccessWebshellAPI *EnvironmentAccessWebshellAPIService + + EnvironmentComponentAPI *EnvironmentComponentAPIService + + EnvironmentCustomDomainAPI *EnvironmentCustomDomainAPIService + + EnvironmentEnvVarAPI *EnvironmentEnvVarAPIService + + EnvironmentMagentoHostMappingAPI *EnvironmentMagentoHostMappingAPIService + + EnvironmentMessageHistoryAPI *EnvironmentMessageHistoryAPIService + + ExportedDataAPI *ExportedDataAPIService + + GitAPI *GitAPIService + + GitTypeAPI *GitTypeAPIService + + ImportedDataAPI *ImportedDataAPIService + + InvitationAPI *InvitationAPIService + + MiscellaneousAPI *MiscellaneousAPIService + + OrganisationAPI *OrganisationAPIService + + OrganisationEnvVarAPI *OrganisationEnvVarAPIService + + PriceAPI *PriceAPIService + + ProductAPI *ProductAPIService + + ProjectAPI *ProjectAPIService + + ProjectAccessAPI *ProjectAccessAPIService + + ProjectAccessGitAPI *ProjectAccessGitAPIService + + ProjectAccessRegistryAPI *ProjectAccessRegistryAPIService + + ProjectAccessServiceAccountAPI *ProjectAccessServiceAccountAPIService + + ProjectEnvVarAPI *ProjectEnvVarAPIService + + ProjectTypeAPI *ProjectTypeAPIService + + ProjectTypeVersionAPI *ProjectTypeVersionAPIService + + ProjectTypeVersionEnvVarAPI *ProjectTypeVersionEnvVarAPIService + + ProjectTypeVersionEnvVarExampleAPI *ProjectTypeVersionEnvVarExampleAPIService + + ProviderAPI *ProviderAPIService + + ResourceTypeAPI *ResourceTypeAPIService + + ResourceTypeLimitAPI *ResourceTypeLimitAPIService + + RoleGroupAPI *RoleGroupAPIService + + StateAPI *StateAPIService + + StateByInfraAPI *StateByInfraAPIService + + TeamAPI *TeamAPIService + + TeamEnvVarAPI *TeamEnvVarAPIService + + TemplateEnvironmentAPI *TemplateEnvironmentAPIService + + TemplateProjectAPI *TemplateProjectAPIService + + UserAPI *UserAPIService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AccessCodeAPI = (*AccessCodeAPIService)(&c.common) + c.ClusterAPI = (*ClusterAPIService)(&c.common) + c.ComponentAPI = (*ComponentAPIService)(&c.common) + c.ComponentResourceLimitAPI = (*ComponentResourceLimitAPIService)(&c.common) + c.ComponentVersionAPI = (*ComponentVersionAPIService)(&c.common) + c.ComponentVersionEnvVarAPI = (*ComponentVersionEnvVarAPIService)(&c.common) + c.ComponentVersionEnvVarExampleAPI = (*ComponentVersionEnvVarExampleAPIService)(&c.common) + c.CredentialTypeAPI = (*CredentialTypeAPIService)(&c.common) + c.CryptoKeyTypeAPI = (*CryptoKeyTypeAPIService)(&c.common) + c.DataTransferDataTypeAPI = (*DataTransferDataTypeAPIService)(&c.common) + c.DataTransferTypeAPI = (*DataTransferTypeAPIService)(&c.common) + c.EnvVarTypeAPI = (*EnvVarTypeAPIService)(&c.common) + c.EnvVarValidationAPI = (*EnvVarValidationAPIService)(&c.common) + c.EnvironmentAPI = (*EnvironmentAPIService)(&c.common) + c.EnvironmentAccessAPI = (*EnvironmentAccessAPIService)(&c.common) + c.EnvironmentAccessBackendAPI = (*EnvironmentAccessBackendAPIService)(&c.common) + c.EnvironmentAccessDatabaseAPI = (*EnvironmentAccessDatabaseAPIService)(&c.common) + c.EnvironmentAccessDevToolsAPI = (*EnvironmentAccessDevToolsAPIService)(&c.common) + c.EnvironmentAccessFrontendAPI = (*EnvironmentAccessFrontendAPIService)(&c.common) + c.EnvironmentAccessMailboxAPI = (*EnvironmentAccessMailboxAPIService)(&c.common) + c.EnvironmentAccessRabbitAPI = (*EnvironmentAccessRabbitAPIService)(&c.common) + c.EnvironmentAccessRedisAPI = (*EnvironmentAccessRedisAPIService)(&c.common) + c.EnvironmentAccessWebshellAPI = (*EnvironmentAccessWebshellAPIService)(&c.common) + c.EnvironmentComponentAPI = (*EnvironmentComponentAPIService)(&c.common) + c.EnvironmentCustomDomainAPI = (*EnvironmentCustomDomainAPIService)(&c.common) + c.EnvironmentEnvVarAPI = (*EnvironmentEnvVarAPIService)(&c.common) + c.EnvironmentMagentoHostMappingAPI = (*EnvironmentMagentoHostMappingAPIService)(&c.common) + c.EnvironmentMessageHistoryAPI = (*EnvironmentMessageHistoryAPIService)(&c.common) + c.ExportedDataAPI = (*ExportedDataAPIService)(&c.common) + c.GitAPI = (*GitAPIService)(&c.common) + c.GitTypeAPI = (*GitTypeAPIService)(&c.common) + c.ImportedDataAPI = (*ImportedDataAPIService)(&c.common) + c.InvitationAPI = (*InvitationAPIService)(&c.common) + c.MiscellaneousAPI = (*MiscellaneousAPIService)(&c.common) + c.OrganisationAPI = (*OrganisationAPIService)(&c.common) + c.OrganisationEnvVarAPI = (*OrganisationEnvVarAPIService)(&c.common) + c.PriceAPI = (*PriceAPIService)(&c.common) + c.ProductAPI = (*ProductAPIService)(&c.common) + c.ProjectAPI = (*ProjectAPIService)(&c.common) + c.ProjectAccessAPI = (*ProjectAccessAPIService)(&c.common) + c.ProjectAccessGitAPI = (*ProjectAccessGitAPIService)(&c.common) + c.ProjectAccessRegistryAPI = (*ProjectAccessRegistryAPIService)(&c.common) + c.ProjectAccessServiceAccountAPI = (*ProjectAccessServiceAccountAPIService)(&c.common) + c.ProjectEnvVarAPI = (*ProjectEnvVarAPIService)(&c.common) + c.ProjectTypeAPI = (*ProjectTypeAPIService)(&c.common) + c.ProjectTypeVersionAPI = (*ProjectTypeVersionAPIService)(&c.common) + c.ProjectTypeVersionEnvVarAPI = (*ProjectTypeVersionEnvVarAPIService)(&c.common) + c.ProjectTypeVersionEnvVarExampleAPI = (*ProjectTypeVersionEnvVarExampleAPIService)(&c.common) + c.ProviderAPI = (*ProviderAPIService)(&c.common) + c.ResourceTypeAPI = (*ResourceTypeAPIService)(&c.common) + c.ResourceTypeLimitAPI = (*ResourceTypeLimitAPIService)(&c.common) + c.RoleGroupAPI = (*RoleGroupAPIService)(&c.common) + c.StateAPI = (*StateAPIService)(&c.common) + c.StateByInfraAPI = (*StateByInfraAPIService)(&c.common) + c.TeamAPI = (*TeamAPIService)(&c.common) + c.TeamEnvVarAPI = (*TeamEnvVarAPIService)(&c.common) + c.TemplateEnvironmentAPI = (*TemplateEnvironmentAPIService)(&c.common) + c.TemplateProjectAPI = (*TemplateProjectAPIService)(&c.common) + c.UserAPI = (*UserAPIService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + err = os.Remove(f.Name()) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + err = os.Remove((*f).Name()) + return + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/pkg/api/rewardcloud/configuration.go b/pkg/api/rewardcloud/configuration.go new file mode 100644 index 0000000..1a574ec --- /dev/null +++ b/pkg/api/rewardcloud/configuration.go @@ -0,0 +1,220 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "", + Description: "", + }, + }, + OperationServers: map[string]ServerConfigurations{}, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/pkg/api/rewardcloud/git_push.sh b/pkg/api/rewardcloud/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/pkg/api/rewardcloud/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/pkg/api/rewardcloud/model__api_gits__id__connect_test_get_200_response.go b/pkg/api/rewardcloud/model__api_gits__id__connect_test_get_200_response.go new file mode 100644 index 0000000..b1bf2f1 --- /dev/null +++ b/pkg/api/rewardcloud/model__api_gits__id__connect_test_get_200_response.go @@ -0,0 +1,124 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ApiGitsIdConnectTestGet200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiGitsIdConnectTestGet200Response{} + +// ApiGitsIdConnectTestGet200Response struct for ApiGitsIdConnectTestGet200Response +type ApiGitsIdConnectTestGet200Response struct { + IsSuccessful *bool `json:"isSuccessful,omitempty"` +} + +// NewApiGitsIdConnectTestGet200Response instantiates a new ApiGitsIdConnectTestGet200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiGitsIdConnectTestGet200Response() *ApiGitsIdConnectTestGet200Response { + this := ApiGitsIdConnectTestGet200Response{} + return &this +} + +// NewApiGitsIdConnectTestGet200ResponseWithDefaults instantiates a new ApiGitsIdConnectTestGet200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiGitsIdConnectTestGet200ResponseWithDefaults() *ApiGitsIdConnectTestGet200Response { + this := ApiGitsIdConnectTestGet200Response{} + return &this +} + +// GetIsSuccessful returns the IsSuccessful field value if set, zero value otherwise. +func (o *ApiGitsIdConnectTestGet200Response) GetIsSuccessful() bool { + if o == nil || IsNil(o.IsSuccessful) { + var ret bool + return ret + } + return *o.IsSuccessful +} + +// GetIsSuccessfulOk returns a tuple with the IsSuccessful field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiGitsIdConnectTestGet200Response) GetIsSuccessfulOk() (*bool, bool) { + if o == nil || IsNil(o.IsSuccessful) { + return nil, false + } + return o.IsSuccessful, true +} + +// HasIsSuccessful returns a boolean if a field has been set. +func (o *ApiGitsIdConnectTestGet200Response) HasIsSuccessful() bool { + if o != nil && !IsNil(o.IsSuccessful) { + return true + } + + return false +} + +// SetIsSuccessful gets a reference to the given bool and assigns it to the IsSuccessful field. +func (o *ApiGitsIdConnectTestGet200Response) SetIsSuccessful(v bool) { + o.IsSuccessful = &v +} + +func (o ApiGitsIdConnectTestGet200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiGitsIdConnectTestGet200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IsSuccessful) { + toSerialize["isSuccessful"] = o.IsSuccessful + } + return toSerialize, nil +} + +type NullableApiGitsIdConnectTestGet200Response struct { + value *ApiGitsIdConnectTestGet200Response + isSet bool +} + +func (v NullableApiGitsIdConnectTestGet200Response) Get() *ApiGitsIdConnectTestGet200Response { + return v.value +} + +func (v *NullableApiGitsIdConnectTestGet200Response) Set(val *ApiGitsIdConnectTestGet200Response) { + v.value = val + v.isSet = true +} + +func (v NullableApiGitsIdConnectTestGet200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableApiGitsIdConnectTestGet200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiGitsIdConnectTestGet200Response(val *ApiGitsIdConnectTestGet200Response) *NullableApiGitsIdConnectTestGet200Response { + return &NullableApiGitsIdConnectTestGet200Response{value: val, isSet: true} +} + +func (v NullableApiGitsIdConnectTestGet200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiGitsIdConnectTestGet200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model__api_users__id__finance_subscribe_info_get_200_response.go b/pkg/api/rewardcloud/model__api_users__id__finance_subscribe_info_get_200_response.go new file mode 100644 index 0000000..b07807c --- /dev/null +++ b/pkg/api/rewardcloud/model__api_users__id__finance_subscribe_info_get_200_response.go @@ -0,0 +1,124 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ApiUsersIdFinanceSubscribeInfoGet200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiUsersIdFinanceSubscribeInfoGet200Response{} + +// ApiUsersIdFinanceSubscribeInfoGet200Response struct for ApiUsersIdFinanceSubscribeInfoGet200Response +type ApiUsersIdFinanceSubscribeInfoGet200Response struct { + ClientSecret *string `json:"clientSecret,omitempty"` +} + +// NewApiUsersIdFinanceSubscribeInfoGet200Response instantiates a new ApiUsersIdFinanceSubscribeInfoGet200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiUsersIdFinanceSubscribeInfoGet200Response() *ApiUsersIdFinanceSubscribeInfoGet200Response { + this := ApiUsersIdFinanceSubscribeInfoGet200Response{} + return &this +} + +// NewApiUsersIdFinanceSubscribeInfoGet200ResponseWithDefaults instantiates a new ApiUsersIdFinanceSubscribeInfoGet200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiUsersIdFinanceSubscribeInfoGet200ResponseWithDefaults() *ApiUsersIdFinanceSubscribeInfoGet200Response { + this := ApiUsersIdFinanceSubscribeInfoGet200Response{} + return &this +} + +// GetClientSecret returns the ClientSecret field value if set, zero value otherwise. +func (o *ApiUsersIdFinanceSubscribeInfoGet200Response) GetClientSecret() string { + if o == nil || IsNil(o.ClientSecret) { + var ret string + return ret + } + return *o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiUsersIdFinanceSubscribeInfoGet200Response) GetClientSecretOk() (*string, bool) { + if o == nil || IsNil(o.ClientSecret) { + return nil, false + } + return o.ClientSecret, true +} + +// HasClientSecret returns a boolean if a field has been set. +func (o *ApiUsersIdFinanceSubscribeInfoGet200Response) HasClientSecret() bool { + if o != nil && !IsNil(o.ClientSecret) { + return true + } + + return false +} + +// SetClientSecret gets a reference to the given string and assigns it to the ClientSecret field. +func (o *ApiUsersIdFinanceSubscribeInfoGet200Response) SetClientSecret(v string) { + o.ClientSecret = &v +} + +func (o ApiUsersIdFinanceSubscribeInfoGet200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiUsersIdFinanceSubscribeInfoGet200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ClientSecret) { + toSerialize["clientSecret"] = o.ClientSecret + } + return toSerialize, nil +} + +type NullableApiUsersIdFinanceSubscribeInfoGet200Response struct { + value *ApiUsersIdFinanceSubscribeInfoGet200Response + isSet bool +} + +func (v NullableApiUsersIdFinanceSubscribeInfoGet200Response) Get() *ApiUsersIdFinanceSubscribeInfoGet200Response { + return v.value +} + +func (v *NullableApiUsersIdFinanceSubscribeInfoGet200Response) Set(val *ApiUsersIdFinanceSubscribeInfoGet200Response) { + v.value = val + v.isSet = true +} + +func (v NullableApiUsersIdFinanceSubscribeInfoGet200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableApiUsersIdFinanceSubscribeInfoGet200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiUsersIdFinanceSubscribeInfoGet200Response(val *ApiUsersIdFinanceSubscribeInfoGet200Response) *NullableApiUsersIdFinanceSubscribeInfoGet200Response { + return &NullableApiUsersIdFinanceSubscribeInfoGet200Response{value: val, isSet: true} +} + +func (v NullableApiUsersIdFinanceSubscribeInfoGet200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiUsersIdFinanceSubscribeInfoGet200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model__api_users_check_email_get_200_response.go b/pkg/api/rewardcloud/model__api_users_check_email_get_200_response.go new file mode 100644 index 0000000..f89b311 --- /dev/null +++ b/pkg/api/rewardcloud/model__api_users_check_email_get_200_response.go @@ -0,0 +1,124 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ApiUsersCheckEmailGet200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiUsersCheckEmailGet200Response{} + +// ApiUsersCheckEmailGet200Response struct for ApiUsersCheckEmailGet200Response +type ApiUsersCheckEmailGet200Response struct { + IsNotExists *bool `json:"isNotExists,omitempty"` +} + +// NewApiUsersCheckEmailGet200Response instantiates a new ApiUsersCheckEmailGet200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiUsersCheckEmailGet200Response() *ApiUsersCheckEmailGet200Response { + this := ApiUsersCheckEmailGet200Response{} + return &this +} + +// NewApiUsersCheckEmailGet200ResponseWithDefaults instantiates a new ApiUsersCheckEmailGet200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiUsersCheckEmailGet200ResponseWithDefaults() *ApiUsersCheckEmailGet200Response { + this := ApiUsersCheckEmailGet200Response{} + return &this +} + +// GetIsNotExists returns the IsNotExists field value if set, zero value otherwise. +func (o *ApiUsersCheckEmailGet200Response) GetIsNotExists() bool { + if o == nil || IsNil(o.IsNotExists) { + var ret bool + return ret + } + return *o.IsNotExists +} + +// GetIsNotExistsOk returns a tuple with the IsNotExists field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiUsersCheckEmailGet200Response) GetIsNotExistsOk() (*bool, bool) { + if o == nil || IsNil(o.IsNotExists) { + return nil, false + } + return o.IsNotExists, true +} + +// HasIsNotExists returns a boolean if a field has been set. +func (o *ApiUsersCheckEmailGet200Response) HasIsNotExists() bool { + if o != nil && !IsNil(o.IsNotExists) { + return true + } + + return false +} + +// SetIsNotExists gets a reference to the given bool and assigns it to the IsNotExists field. +func (o *ApiUsersCheckEmailGet200Response) SetIsNotExists(v bool) { + o.IsNotExists = &v +} + +func (o ApiUsersCheckEmailGet200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiUsersCheckEmailGet200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IsNotExists) { + toSerialize["isNotExists"] = o.IsNotExists + } + return toSerialize, nil +} + +type NullableApiUsersCheckEmailGet200Response struct { + value *ApiUsersCheckEmailGet200Response + isSet bool +} + +func (v NullableApiUsersCheckEmailGet200Response) Get() *ApiUsersCheckEmailGet200Response { + return v.value +} + +func (v *NullableApiUsersCheckEmailGet200Response) Set(val *ApiUsersCheckEmailGet200Response) { + v.value = val + v.isSet = true +} + +func (v NullableApiUsersCheckEmailGet200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableApiUsersCheckEmailGet200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiUsersCheckEmailGet200Response(val *ApiUsersCheckEmailGet200Response) *NullableApiUsersCheckEmailGet200Response { + return &NullableApiUsersCheckEmailGet200Response{value: val, isSet: true} +} + +func (v NullableApiUsersCheckEmailGet200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiUsersCheckEmailGet200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model__api_users_forgot_password_put_200_response.go b/pkg/api/rewardcloud/model__api_users_forgot_password_put_200_response.go new file mode 100644 index 0000000..1d89c6f --- /dev/null +++ b/pkg/api/rewardcloud/model__api_users_forgot_password_put_200_response.go @@ -0,0 +1,160 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ApiUsersForgotPasswordPut200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiUsersForgotPasswordPut200Response{} + +// ApiUsersForgotPasswordPut200Response struct for ApiUsersForgotPasswordPut200Response +type ApiUsersForgotPasswordPut200Response struct { + Msg *string `json:"msg,omitempty"` + Error *bool `json:"error,omitempty"` +} + +// NewApiUsersForgotPasswordPut200Response instantiates a new ApiUsersForgotPasswordPut200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiUsersForgotPasswordPut200Response() *ApiUsersForgotPasswordPut200Response { + this := ApiUsersForgotPasswordPut200Response{} + return &this +} + +// NewApiUsersForgotPasswordPut200ResponseWithDefaults instantiates a new ApiUsersForgotPasswordPut200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiUsersForgotPasswordPut200ResponseWithDefaults() *ApiUsersForgotPasswordPut200Response { + this := ApiUsersForgotPasswordPut200Response{} + return &this +} + +// GetMsg returns the Msg field value if set, zero value otherwise. +func (o *ApiUsersForgotPasswordPut200Response) GetMsg() string { + if o == nil || IsNil(o.Msg) { + var ret string + return ret + } + return *o.Msg +} + +// GetMsgOk returns a tuple with the Msg field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiUsersForgotPasswordPut200Response) GetMsgOk() (*string, bool) { + if o == nil || IsNil(o.Msg) { + return nil, false + } + return o.Msg, true +} + +// HasMsg returns a boolean if a field has been set. +func (o *ApiUsersForgotPasswordPut200Response) HasMsg() bool { + if o != nil && !IsNil(o.Msg) { + return true + } + + return false +} + +// SetMsg gets a reference to the given string and assigns it to the Msg field. +func (o *ApiUsersForgotPasswordPut200Response) SetMsg(v string) { + o.Msg = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *ApiUsersForgotPasswordPut200Response) GetError() bool { + if o == nil || IsNil(o.Error) { + var ret bool + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiUsersForgotPasswordPut200Response) GetErrorOk() (*bool, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *ApiUsersForgotPasswordPut200Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given bool and assigns it to the Error field. +func (o *ApiUsersForgotPasswordPut200Response) SetError(v bool) { + o.Error = &v +} + +func (o ApiUsersForgotPasswordPut200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiUsersForgotPasswordPut200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Msg) { + toSerialize["msg"] = o.Msg + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + return toSerialize, nil +} + +type NullableApiUsersForgotPasswordPut200Response struct { + value *ApiUsersForgotPasswordPut200Response + isSet bool +} + +func (v NullableApiUsersForgotPasswordPut200Response) Get() *ApiUsersForgotPasswordPut200Response { + return v.value +} + +func (v *NullableApiUsersForgotPasswordPut200Response) Set(val *ApiUsersForgotPasswordPut200Response) { + v.value = val + v.isSet = true +} + +func (v NullableApiUsersForgotPasswordPut200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableApiUsersForgotPasswordPut200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiUsersForgotPasswordPut200Response(val *ApiUsersForgotPasswordPut200Response) *NullableApiUsersForgotPasswordPut200Response { + return &NullableApiUsersForgotPasswordPut200Response{value: val, isSet: true} +} + +func (v NullableApiUsersForgotPasswordPut200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiUsersForgotPasswordPut200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model__api_users_forgot_password_put_request.go b/pkg/api/rewardcloud/model__api_users_forgot_password_put_request.go new file mode 100644 index 0000000..3fd3cda --- /dev/null +++ b/pkg/api/rewardcloud/model__api_users_forgot_password_put_request.go @@ -0,0 +1,124 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ApiUsersForgotPasswordPutRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiUsersForgotPasswordPutRequest{} + +// ApiUsersForgotPasswordPutRequest struct for ApiUsersForgotPasswordPutRequest +type ApiUsersForgotPasswordPutRequest struct { + Email *string `json:"email,omitempty"` +} + +// NewApiUsersForgotPasswordPutRequest instantiates a new ApiUsersForgotPasswordPutRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiUsersForgotPasswordPutRequest() *ApiUsersForgotPasswordPutRequest { + this := ApiUsersForgotPasswordPutRequest{} + return &this +} + +// NewApiUsersForgotPasswordPutRequestWithDefaults instantiates a new ApiUsersForgotPasswordPutRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiUsersForgotPasswordPutRequestWithDefaults() *ApiUsersForgotPasswordPutRequest { + this := ApiUsersForgotPasswordPutRequest{} + return &this +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *ApiUsersForgotPasswordPutRequest) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiUsersForgotPasswordPutRequest) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *ApiUsersForgotPasswordPutRequest) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *ApiUsersForgotPasswordPutRequest) SetEmail(v string) { + o.Email = &v +} + +func (o ApiUsersForgotPasswordPutRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiUsersForgotPasswordPutRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + return toSerialize, nil +} + +type NullableApiUsersForgotPasswordPutRequest struct { + value *ApiUsersForgotPasswordPutRequest + isSet bool +} + +func (v NullableApiUsersForgotPasswordPutRequest) Get() *ApiUsersForgotPasswordPutRequest { + return v.value +} + +func (v *NullableApiUsersForgotPasswordPutRequest) Set(val *ApiUsersForgotPasswordPutRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApiUsersForgotPasswordPutRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApiUsersForgotPasswordPutRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiUsersForgotPasswordPutRequest(val *ApiUsersForgotPasswordPutRequest) *NullableApiUsersForgotPasswordPutRequest { + return &NullableApiUsersForgotPasswordPutRequest{value: val, isSet: true} +} + +func (v NullableApiUsersForgotPasswordPutRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiUsersForgotPasswordPutRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_abstract_env_var.go b/pkg/api/rewardcloud/model_abstract_env_var.go new file mode 100644 index 0000000..9260c1b --- /dev/null +++ b/pkg/api/rewardcloud/model_abstract_env_var.go @@ -0,0 +1,573 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the AbstractEnvVar type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AbstractEnvVar{} + +// AbstractEnvVar +type AbstractEnvVar struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + RawValue NullableString `json:"rawValue,omitempty"` +} + +// NewAbstractEnvVar instantiates a new AbstractEnvVar object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAbstractEnvVar() *AbstractEnvVar { + this := AbstractEnvVar{} + return &this +} + +// NewAbstractEnvVarWithDefaults instantiates a new AbstractEnvVar object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAbstractEnvVarWithDefaults() *AbstractEnvVar { + this := AbstractEnvVar{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AbstractEnvVar) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractEnvVar) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *AbstractEnvVar) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvVar) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvVar) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *AbstractEnvVar) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *AbstractEnvVar) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *AbstractEnvVar) UnsetUuid() { + o.Uuid.Unset() +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvVar) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvVar) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *AbstractEnvVar) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *AbstractEnvVar) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *AbstractEnvVar) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvVar) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvVar) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *AbstractEnvVar) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *AbstractEnvVar) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *AbstractEnvVar) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvVar) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvVar) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *AbstractEnvVar) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *AbstractEnvVar) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *AbstractEnvVar) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvVar) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvVar) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *AbstractEnvVar) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *AbstractEnvVar) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *AbstractEnvVar) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvVar) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvVar) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *AbstractEnvVar) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *AbstractEnvVar) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *AbstractEnvVar) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvVar) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvVar) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *AbstractEnvVar) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *AbstractEnvVar) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *AbstractEnvVar) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AbstractEnvVar) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractEnvVar) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AbstractEnvVar) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *AbstractEnvVar) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractEnvVar) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *AbstractEnvVar) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetRawValue returns the RawValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvVar) GetRawValue() string { + if o == nil || IsNil(o.RawValue.Get()) { + var ret string + return ret + } + return *o.RawValue.Get() +} + +// GetRawValueOk returns a tuple with the RawValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvVar) GetRawValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RawValue.Get(), o.RawValue.IsSet() +} + +// HasRawValue returns a boolean if a field has been set. +func (o *AbstractEnvVar) HasRawValue() bool { + if o != nil && o.RawValue.IsSet() { + return true + } + + return false +} + +// SetRawValue gets a reference to the given NullableString and assigns it to the RawValue field. +func (o *AbstractEnvVar) SetRawValue(v string) { + o.RawValue.Set(&v) +} + +// SetRawValueNil sets the value for RawValue to be an explicit nil +func (o *AbstractEnvVar) SetRawValueNil() { + o.RawValue.Set(nil) +} + +// UnsetRawValue ensures that no value is present for RawValue, not even an explicit nil +func (o *AbstractEnvVar) UnsetRawValue() { + o.RawValue.Unset() +} + +func (o AbstractEnvVar) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AbstractEnvVar) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.RawValue.IsSet() { + toSerialize["rawValue"] = o.RawValue.Get() + } + return toSerialize, nil +} + +type NullableAbstractEnvVar struct { + value *AbstractEnvVar + isSet bool +} + +func (v NullableAbstractEnvVar) Get() *AbstractEnvVar { + return v.value +} + +func (v *NullableAbstractEnvVar) Set(val *AbstractEnvVar) { + v.value = val + v.isSet = true +} + +func (v NullableAbstractEnvVar) IsSet() bool { + return v.isSet +} + +func (v *NullableAbstractEnvVar) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAbstractEnvVar(val *AbstractEnvVar) *NullableAbstractEnvVar { + return &NullableAbstractEnvVar{value: val, isSet: true} +} + +func (v NullableAbstractEnvVar) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAbstractEnvVar) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_abstract_environment.go b/pkg/api/rewardcloud/model_abstract_environment.go new file mode 100644 index 0000000..d0cdd01 --- /dev/null +++ b/pkg/api/rewardcloud/model_abstract_environment.go @@ -0,0 +1,880 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the AbstractEnvironment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AbstractEnvironment{} + +// AbstractEnvironment +type AbstractEnvironment struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + DataTransferSettings NullableString `json:"dataTransferSettings,omitempty"` + IsStripDatabase NullableBool `json:"isStripDatabase,omitempty"` + IsAllowOutgoingEmails NullableBool `json:"isAllowOutgoingEmails,omitempty"` + IsAllowHtaccessDevtoolsProtection NullableBool `json:"isAllowHtaccessDevtoolsProtection,omitempty"` + IsInitSampleData NullableBool `json:"isInitSampleData,omitempty"` + EnvVar []string `json:"envVar,omitempty"` + EnvironmentComponent []string `json:"environmentComponent,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` +} + +// NewAbstractEnvironment instantiates a new AbstractEnvironment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAbstractEnvironment() *AbstractEnvironment { + this := AbstractEnvironment{} + return &this +} + +// NewAbstractEnvironmentWithDefaults instantiates a new AbstractEnvironment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAbstractEnvironmentWithDefaults() *AbstractEnvironment { + this := AbstractEnvironment{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AbstractEnvironment) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractEnvironment) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *AbstractEnvironment) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *AbstractEnvironment) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *AbstractEnvironment) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *AbstractEnvironment) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *AbstractEnvironment) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *AbstractEnvironment) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *AbstractEnvironment) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *AbstractEnvironment) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *AbstractEnvironment) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *AbstractEnvironment) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *AbstractEnvironment) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *AbstractEnvironment) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *AbstractEnvironment) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *AbstractEnvironment) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *AbstractEnvironment) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *AbstractEnvironment) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *AbstractEnvironment) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *AbstractEnvironment) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *AbstractEnvironment) UnsetStorage() { + o.Storage.Unset() +} + +// GetDataTransferSettings returns the DataTransferSettings field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetDataTransferSettings() string { + if o == nil || IsNil(o.DataTransferSettings.Get()) { + var ret string + return ret + } + return *o.DataTransferSettings.Get() +} + +// GetDataTransferSettingsOk returns a tuple with the DataTransferSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetDataTransferSettingsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DataTransferSettings.Get(), o.DataTransferSettings.IsSet() +} + +// HasDataTransferSettings returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasDataTransferSettings() bool { + if o != nil && o.DataTransferSettings.IsSet() { + return true + } + + return false +} + +// SetDataTransferSettings gets a reference to the given NullableString and assigns it to the DataTransferSettings field. +func (o *AbstractEnvironment) SetDataTransferSettings(v string) { + o.DataTransferSettings.Set(&v) +} + +// SetDataTransferSettingsNil sets the value for DataTransferSettings to be an explicit nil +func (o *AbstractEnvironment) SetDataTransferSettingsNil() { + o.DataTransferSettings.Set(nil) +} + +// UnsetDataTransferSettings ensures that no value is present for DataTransferSettings, not even an explicit nil +func (o *AbstractEnvironment) UnsetDataTransferSettings() { + o.DataTransferSettings.Unset() +} + +// GetIsStripDatabase returns the IsStripDatabase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetIsStripDatabase() bool { + if o == nil || IsNil(o.IsStripDatabase.Get()) { + var ret bool + return ret + } + return *o.IsStripDatabase.Get() +} + +// GetIsStripDatabaseOk returns a tuple with the IsStripDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetIsStripDatabaseOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsStripDatabase.Get(), o.IsStripDatabase.IsSet() +} + +// HasIsStripDatabase returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasIsStripDatabase() bool { + if o != nil && o.IsStripDatabase.IsSet() { + return true + } + + return false +} + +// SetIsStripDatabase gets a reference to the given NullableBool and assigns it to the IsStripDatabase field. +func (o *AbstractEnvironment) SetIsStripDatabase(v bool) { + o.IsStripDatabase.Set(&v) +} + +// SetIsStripDatabaseNil sets the value for IsStripDatabase to be an explicit nil +func (o *AbstractEnvironment) SetIsStripDatabaseNil() { + o.IsStripDatabase.Set(nil) +} + +// UnsetIsStripDatabase ensures that no value is present for IsStripDatabase, not even an explicit nil +func (o *AbstractEnvironment) UnsetIsStripDatabase() { + o.IsStripDatabase.Unset() +} + +// GetIsAllowOutgoingEmails returns the IsAllowOutgoingEmails field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetIsAllowOutgoingEmails() bool { + if o == nil || IsNil(o.IsAllowOutgoingEmails.Get()) { + var ret bool + return ret + } + return *o.IsAllowOutgoingEmails.Get() +} + +// GetIsAllowOutgoingEmailsOk returns a tuple with the IsAllowOutgoingEmails field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetIsAllowOutgoingEmailsOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsAllowOutgoingEmails.Get(), o.IsAllowOutgoingEmails.IsSet() +} + +// HasIsAllowOutgoingEmails returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasIsAllowOutgoingEmails() bool { + if o != nil && o.IsAllowOutgoingEmails.IsSet() { + return true + } + + return false +} + +// SetIsAllowOutgoingEmails gets a reference to the given NullableBool and assigns it to the IsAllowOutgoingEmails field. +func (o *AbstractEnvironment) SetIsAllowOutgoingEmails(v bool) { + o.IsAllowOutgoingEmails.Set(&v) +} + +// SetIsAllowOutgoingEmailsNil sets the value for IsAllowOutgoingEmails to be an explicit nil +func (o *AbstractEnvironment) SetIsAllowOutgoingEmailsNil() { + o.IsAllowOutgoingEmails.Set(nil) +} + +// UnsetIsAllowOutgoingEmails ensures that no value is present for IsAllowOutgoingEmails, not even an explicit nil +func (o *AbstractEnvironment) UnsetIsAllowOutgoingEmails() { + o.IsAllowOutgoingEmails.Unset() +} + +// GetIsAllowHtaccessDevtoolsProtection returns the IsAllowHtaccessDevtoolsProtection field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetIsAllowHtaccessDevtoolsProtection() bool { + if o == nil || IsNil(o.IsAllowHtaccessDevtoolsProtection.Get()) { + var ret bool + return ret + } + return *o.IsAllowHtaccessDevtoolsProtection.Get() +} + +// GetIsAllowHtaccessDevtoolsProtectionOk returns a tuple with the IsAllowHtaccessDevtoolsProtection field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetIsAllowHtaccessDevtoolsProtectionOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsAllowHtaccessDevtoolsProtection.Get(), o.IsAllowHtaccessDevtoolsProtection.IsSet() +} + +// HasIsAllowHtaccessDevtoolsProtection returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasIsAllowHtaccessDevtoolsProtection() bool { + if o != nil && o.IsAllowHtaccessDevtoolsProtection.IsSet() { + return true + } + + return false +} + +// SetIsAllowHtaccessDevtoolsProtection gets a reference to the given NullableBool and assigns it to the IsAllowHtaccessDevtoolsProtection field. +func (o *AbstractEnvironment) SetIsAllowHtaccessDevtoolsProtection(v bool) { + o.IsAllowHtaccessDevtoolsProtection.Set(&v) +} + +// SetIsAllowHtaccessDevtoolsProtectionNil sets the value for IsAllowHtaccessDevtoolsProtection to be an explicit nil +func (o *AbstractEnvironment) SetIsAllowHtaccessDevtoolsProtectionNil() { + o.IsAllowHtaccessDevtoolsProtection.Set(nil) +} + +// UnsetIsAllowHtaccessDevtoolsProtection ensures that no value is present for IsAllowHtaccessDevtoolsProtection, not even an explicit nil +func (o *AbstractEnvironment) UnsetIsAllowHtaccessDevtoolsProtection() { + o.IsAllowHtaccessDevtoolsProtection.Unset() +} + +// GetIsInitSampleData returns the IsInitSampleData field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetIsInitSampleData() bool { + if o == nil || IsNil(o.IsInitSampleData.Get()) { + var ret bool + return ret + } + return *o.IsInitSampleData.Get() +} + +// GetIsInitSampleDataOk returns a tuple with the IsInitSampleData field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetIsInitSampleDataOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInitSampleData.Get(), o.IsInitSampleData.IsSet() +} + +// HasIsInitSampleData returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasIsInitSampleData() bool { + if o != nil && o.IsInitSampleData.IsSet() { + return true + } + + return false +} + +// SetIsInitSampleData gets a reference to the given NullableBool and assigns it to the IsInitSampleData field. +func (o *AbstractEnvironment) SetIsInitSampleData(v bool) { + o.IsInitSampleData.Set(&v) +} + +// SetIsInitSampleDataNil sets the value for IsInitSampleData to be an explicit nil +func (o *AbstractEnvironment) SetIsInitSampleDataNil() { + o.IsInitSampleData.Set(nil) +} + +// UnsetIsInitSampleData ensures that no value is present for IsInitSampleData, not even an explicit nil +func (o *AbstractEnvironment) UnsetIsInitSampleData() { + o.IsInitSampleData.Unset() +} + +// GetEnvVar returns the EnvVar field value if set, zero value otherwise. +func (o *AbstractEnvironment) GetEnvVar() []string { + if o == nil || IsNil(o.EnvVar) { + var ret []string + return ret + } + return o.EnvVar +} + +// GetEnvVarOk returns a tuple with the EnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractEnvironment) GetEnvVarOk() ([]string, bool) { + if o == nil || IsNil(o.EnvVar) { + return nil, false + } + return o.EnvVar, true +} + +// HasEnvVar returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasEnvVar() bool { + if o != nil && !IsNil(o.EnvVar) { + return true + } + + return false +} + +// SetEnvVar gets a reference to the given []string and assigns it to the EnvVar field. +func (o *AbstractEnvironment) SetEnvVar(v []string) { + o.EnvVar = v +} + +// GetEnvironmentComponent returns the EnvironmentComponent field value if set, zero value otherwise. +func (o *AbstractEnvironment) GetEnvironmentComponent() []string { + if o == nil || IsNil(o.EnvironmentComponent) { + var ret []string + return ret + } + return o.EnvironmentComponent +} + +// GetEnvironmentComponentOk returns a tuple with the EnvironmentComponent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractEnvironment) GetEnvironmentComponentOk() ([]string, bool) { + if o == nil || IsNil(o.EnvironmentComponent) { + return nil, false + } + return o.EnvironmentComponent, true +} + +// HasEnvironmentComponent returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasEnvironmentComponent() bool { + if o != nil && !IsNil(o.EnvironmentComponent) { + return true + } + + return false +} + +// SetEnvironmentComponent gets a reference to the given []string and assigns it to the EnvironmentComponent field. +func (o *AbstractEnvironment) SetEnvironmentComponent(v []string) { + o.EnvironmentComponent = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AbstractEnvironment) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractEnvironment) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AbstractEnvironment) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *AbstractEnvironment) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractEnvironment) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *AbstractEnvironment) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *AbstractEnvironment) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *AbstractEnvironment) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *AbstractEnvironment) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractEnvironment) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractEnvironment) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *AbstractEnvironment) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *AbstractEnvironment) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *AbstractEnvironment) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *AbstractEnvironment) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +func (o AbstractEnvironment) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AbstractEnvironment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.DataTransferSettings.IsSet() { + toSerialize["dataTransferSettings"] = o.DataTransferSettings.Get() + } + if o.IsStripDatabase.IsSet() { + toSerialize["isStripDatabase"] = o.IsStripDatabase.Get() + } + if o.IsAllowOutgoingEmails.IsSet() { + toSerialize["isAllowOutgoingEmails"] = o.IsAllowOutgoingEmails.Get() + } + if o.IsAllowHtaccessDevtoolsProtection.IsSet() { + toSerialize["isAllowHtaccessDevtoolsProtection"] = o.IsAllowHtaccessDevtoolsProtection.Get() + } + if o.IsInitSampleData.IsSet() { + toSerialize["isInitSampleData"] = o.IsInitSampleData.Get() + } + if !IsNil(o.EnvVar) { + toSerialize["envVar"] = o.EnvVar + } + if !IsNil(o.EnvironmentComponent) { + toSerialize["environmentComponent"] = o.EnvironmentComponent + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + return toSerialize, nil +} + +type NullableAbstractEnvironment struct { + value *AbstractEnvironment + isSet bool +} + +func (v NullableAbstractEnvironment) Get() *AbstractEnvironment { + return v.value +} + +func (v *NullableAbstractEnvironment) Set(val *AbstractEnvironment) { + v.value = val + v.isSet = true +} + +func (v NullableAbstractEnvironment) IsSet() bool { + return v.isSet +} + +func (v *NullableAbstractEnvironment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAbstractEnvironment(val *AbstractEnvironment) *NullableAbstractEnvironment { + return &NullableAbstractEnvironment{value: val, isSet: true} +} + +func (v NullableAbstractEnvironment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAbstractEnvironment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_abstract_project.go b/pkg/api/rewardcloud/model_abstract_project.go new file mode 100644 index 0000000..0eb9b62 --- /dev/null +++ b/pkg/api/rewardcloud/model_abstract_project.go @@ -0,0 +1,775 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the AbstractProject type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AbstractProject{} + +// AbstractProject +type AbstractProject struct { + Id *int32 `json:"id,omitempty"` + Uuid *string `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + Code NullableString `json:"code,omitempty"` + Color NullableString `json:"color,omitempty"` + IsInitProjectSkeleton NullableBool `json:"isInitProjectSkeleton,omitempty"` + ComponentVersion []string `json:"componentVersion,omitempty"` + ProjectTypeVersion NullableString `json:"projectTypeVersion,omitempty"` + ProjectEnvVar []string `json:"projectEnvVar,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewAbstractProject instantiates a new AbstractProject object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAbstractProject() *AbstractProject { + this := AbstractProject{} + return &this +} + +// NewAbstractProjectWithDefaults instantiates a new AbstractProject object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAbstractProjectWithDefaults() *AbstractProject { + this := AbstractProject{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AbstractProject) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractProject) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AbstractProject) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *AbstractProject) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *AbstractProject) GetUuid() string { + if o == nil || IsNil(o.Uuid) { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractProject) GetUuidOk() (*string, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *AbstractProject) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *AbstractProject) SetUuid(v string) { + o.Uuid = &v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractProject) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractProject) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *AbstractProject) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *AbstractProject) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *AbstractProject) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *AbstractProject) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractProject) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractProject) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *AbstractProject) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *AbstractProject) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *AbstractProject) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *AbstractProject) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractProject) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractProject) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *AbstractProject) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *AbstractProject) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *AbstractProject) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *AbstractProject) UnsetIsActive() { + o.IsActive.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractProject) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractProject) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *AbstractProject) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *AbstractProject) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *AbstractProject) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *AbstractProject) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractProject) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractProject) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *AbstractProject) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *AbstractProject) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *AbstractProject) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *AbstractProject) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractProject) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractProject) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *AbstractProject) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *AbstractProject) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *AbstractProject) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *AbstractProject) UnsetStorage() { + o.Storage.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractProject) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractProject) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *AbstractProject) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *AbstractProject) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *AbstractProject) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *AbstractProject) UnsetCode() { + o.Code.Unset() +} + +// GetColor returns the Color field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractProject) GetColor() string { + if o == nil || IsNil(o.Color.Get()) { + var ret string + return ret + } + return *o.Color.Get() +} + +// GetColorOk returns a tuple with the Color field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractProject) GetColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Color.Get(), o.Color.IsSet() +} + +// HasColor returns a boolean if a field has been set. +func (o *AbstractProject) HasColor() bool { + if o != nil && o.Color.IsSet() { + return true + } + + return false +} + +// SetColor gets a reference to the given NullableString and assigns it to the Color field. +func (o *AbstractProject) SetColor(v string) { + o.Color.Set(&v) +} + +// SetColorNil sets the value for Color to be an explicit nil +func (o *AbstractProject) SetColorNil() { + o.Color.Set(nil) +} + +// UnsetColor ensures that no value is present for Color, not even an explicit nil +func (o *AbstractProject) UnsetColor() { + o.Color.Unset() +} + +// GetIsInitProjectSkeleton returns the IsInitProjectSkeleton field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractProject) GetIsInitProjectSkeleton() bool { + if o == nil || IsNil(o.IsInitProjectSkeleton.Get()) { + var ret bool + return ret + } + return *o.IsInitProjectSkeleton.Get() +} + +// GetIsInitProjectSkeletonOk returns a tuple with the IsInitProjectSkeleton field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractProject) GetIsInitProjectSkeletonOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInitProjectSkeleton.Get(), o.IsInitProjectSkeleton.IsSet() +} + +// HasIsInitProjectSkeleton returns a boolean if a field has been set. +func (o *AbstractProject) HasIsInitProjectSkeleton() bool { + if o != nil && o.IsInitProjectSkeleton.IsSet() { + return true + } + + return false +} + +// SetIsInitProjectSkeleton gets a reference to the given NullableBool and assigns it to the IsInitProjectSkeleton field. +func (o *AbstractProject) SetIsInitProjectSkeleton(v bool) { + o.IsInitProjectSkeleton.Set(&v) +} + +// SetIsInitProjectSkeletonNil sets the value for IsInitProjectSkeleton to be an explicit nil +func (o *AbstractProject) SetIsInitProjectSkeletonNil() { + o.IsInitProjectSkeleton.Set(nil) +} + +// UnsetIsInitProjectSkeleton ensures that no value is present for IsInitProjectSkeleton, not even an explicit nil +func (o *AbstractProject) UnsetIsInitProjectSkeleton() { + o.IsInitProjectSkeleton.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise. +func (o *AbstractProject) GetComponentVersion() []string { + if o == nil || IsNil(o.ComponentVersion) { + var ret []string + return ret + } + return o.ComponentVersion +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractProject) GetComponentVersionOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentVersion) { + return nil, false + } + return o.ComponentVersion, true +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *AbstractProject) HasComponentVersion() bool { + if o != nil && !IsNil(o.ComponentVersion) { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given []string and assigns it to the ComponentVersion field. +func (o *AbstractProject) SetComponentVersion(v []string) { + o.ComponentVersion = v +} + +// GetProjectTypeVersion returns the ProjectTypeVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AbstractProject) GetProjectTypeVersion() string { + if o == nil || IsNil(o.ProjectTypeVersion.Get()) { + var ret string + return ret + } + return *o.ProjectTypeVersion.Get() +} + +// GetProjectTypeVersionOk returns a tuple with the ProjectTypeVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AbstractProject) GetProjectTypeVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectTypeVersion.Get(), o.ProjectTypeVersion.IsSet() +} + +// HasProjectTypeVersion returns a boolean if a field has been set. +func (o *AbstractProject) HasProjectTypeVersion() bool { + if o != nil && o.ProjectTypeVersion.IsSet() { + return true + } + + return false +} + +// SetProjectTypeVersion gets a reference to the given NullableString and assigns it to the ProjectTypeVersion field. +func (o *AbstractProject) SetProjectTypeVersion(v string) { + o.ProjectTypeVersion.Set(&v) +} + +// SetProjectTypeVersionNil sets the value for ProjectTypeVersion to be an explicit nil +func (o *AbstractProject) SetProjectTypeVersionNil() { + o.ProjectTypeVersion.Set(nil) +} + +// UnsetProjectTypeVersion ensures that no value is present for ProjectTypeVersion, not even an explicit nil +func (o *AbstractProject) UnsetProjectTypeVersion() { + o.ProjectTypeVersion.Unset() +} + +// GetProjectEnvVar returns the ProjectEnvVar field value if set, zero value otherwise. +func (o *AbstractProject) GetProjectEnvVar() []string { + if o == nil || IsNil(o.ProjectEnvVar) { + var ret []string + return ret + } + return o.ProjectEnvVar +} + +// GetProjectEnvVarOk returns a tuple with the ProjectEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractProject) GetProjectEnvVarOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectEnvVar) { + return nil, false + } + return o.ProjectEnvVar, true +} + +// HasProjectEnvVar returns a boolean if a field has been set. +func (o *AbstractProject) HasProjectEnvVar() bool { + if o != nil && !IsNil(o.ProjectEnvVar) { + return true + } + + return false +} + +// SetProjectEnvVar gets a reference to the given []string and assigns it to the ProjectEnvVar field. +func (o *AbstractProject) SetProjectEnvVar(v []string) { + o.ProjectEnvVar = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AbstractProject) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractProject) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AbstractProject) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AbstractProject) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *AbstractProject) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbstractProject) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *AbstractProject) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *AbstractProject) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o AbstractProject) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AbstractProject) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Color.IsSet() { + toSerialize["color"] = o.Color.Get() + } + if o.IsInitProjectSkeleton.IsSet() { + toSerialize["isInitProjectSkeleton"] = o.IsInitProjectSkeleton.Get() + } + if !IsNil(o.ComponentVersion) { + toSerialize["componentVersion"] = o.ComponentVersion + } + if o.ProjectTypeVersion.IsSet() { + toSerialize["projectTypeVersion"] = o.ProjectTypeVersion.Get() + } + if !IsNil(o.ProjectEnvVar) { + toSerialize["projectEnvVar"] = o.ProjectEnvVar + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableAbstractProject struct { + value *AbstractProject + isSet bool +} + +func (v NullableAbstractProject) Get() *AbstractProject { + return v.value +} + +func (v *NullableAbstractProject) Set(val *AbstractProject) { + v.value = val + v.isSet = true +} + +func (v NullableAbstractProject) IsSet() bool { + return v.isSet +} + +func (v *NullableAbstractProject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAbstractProject(val *AbstractProject) *NullableAbstractProject { + return &NullableAbstractProject{value: val, isSet: true} +} + +func (v NullableAbstractProject) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAbstractProject) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_access_code.go b/pkg/api/rewardcloud/model_access_code.go new file mode 100644 index 0000000..2964509 --- /dev/null +++ b/pkg/api/rewardcloud/model_access_code.go @@ -0,0 +1,526 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the AccessCode type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccessCode{} + +// AccessCode Class AccessCode +type AccessCode struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + AccessCode NullableString `json:"accessCode,omitempty"` + User NullableString `json:"user,omitempty"` + UserId NullableString `json:"userId,omitempty"` + UsedAt NullableTime `json:"usedAt,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewAccessCode instantiates a new AccessCode object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAccessCode() *AccessCode { + this := AccessCode{} + return &this +} + +// NewAccessCodeWithDefaults instantiates a new AccessCode object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAccessCodeWithDefaults() *AccessCode { + this := AccessCode{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AccessCode) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessCode) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AccessCode) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *AccessCode) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccessCode) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccessCode) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *AccessCode) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *AccessCode) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *AccessCode) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *AccessCode) UnsetUuid() { + o.Uuid.Unset() +} + +// GetAccessCode returns the AccessCode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccessCode) GetAccessCode() string { + if o == nil || IsNil(o.AccessCode.Get()) { + var ret string + return ret + } + return *o.AccessCode.Get() +} + +// GetAccessCodeOk returns a tuple with the AccessCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccessCode) GetAccessCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AccessCode.Get(), o.AccessCode.IsSet() +} + +// HasAccessCode returns a boolean if a field has been set. +func (o *AccessCode) HasAccessCode() bool { + if o != nil && o.AccessCode.IsSet() { + return true + } + + return false +} + +// SetAccessCode gets a reference to the given NullableString and assigns it to the AccessCode field. +func (o *AccessCode) SetAccessCode(v string) { + o.AccessCode.Set(&v) +} + +// SetAccessCodeNil sets the value for AccessCode to be an explicit nil +func (o *AccessCode) SetAccessCodeNil() { + o.AccessCode.Set(nil) +} + +// UnsetAccessCode ensures that no value is present for AccessCode, not even an explicit nil +func (o *AccessCode) UnsetAccessCode() { + o.AccessCode.Unset() +} + +// GetUser returns the User field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccessCode) GetUser() string { + if o == nil || IsNil(o.User.Get()) { + var ret string + return ret + } + return *o.User.Get() +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccessCode) GetUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.User.Get(), o.User.IsSet() +} + +// HasUser returns a boolean if a field has been set. +func (o *AccessCode) HasUser() bool { + if o != nil && o.User.IsSet() { + return true + } + + return false +} + +// SetUser gets a reference to the given NullableString and assigns it to the User field. +func (o *AccessCode) SetUser(v string) { + o.User.Set(&v) +} + +// SetUserNil sets the value for User to be an explicit nil +func (o *AccessCode) SetUserNil() { + o.User.Set(nil) +} + +// UnsetUser ensures that no value is present for User, not even an explicit nil +func (o *AccessCode) UnsetUser() { + o.User.Unset() +} + +// GetUserId returns the UserId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccessCode) GetUserId() string { + if o == nil || IsNil(o.UserId.Get()) { + var ret string + return ret + } + return *o.UserId.Get() +} + +// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccessCode) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UserId.Get(), o.UserId.IsSet() +} + +// HasUserId returns a boolean if a field has been set. +func (o *AccessCode) HasUserId() bool { + if o != nil && o.UserId.IsSet() { + return true + } + + return false +} + +// SetUserId gets a reference to the given NullableString and assigns it to the UserId field. +func (o *AccessCode) SetUserId(v string) { + o.UserId.Set(&v) +} + +// SetUserIdNil sets the value for UserId to be an explicit nil +func (o *AccessCode) SetUserIdNil() { + o.UserId.Set(nil) +} + +// UnsetUserId ensures that no value is present for UserId, not even an explicit nil +func (o *AccessCode) UnsetUserId() { + o.UserId.Unset() +} + +// GetUsedAt returns the UsedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccessCode) GetUsedAt() time.Time { + if o == nil || IsNil(o.UsedAt.Get()) { + var ret time.Time + return ret + } + return *o.UsedAt.Get() +} + +// GetUsedAtOk returns a tuple with the UsedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccessCode) GetUsedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.UsedAt.Get(), o.UsedAt.IsSet() +} + +// HasUsedAt returns a boolean if a field has been set. +func (o *AccessCode) HasUsedAt() bool { + if o != nil && o.UsedAt.IsSet() { + return true + } + + return false +} + +// SetUsedAt gets a reference to the given NullableTime and assigns it to the UsedAt field. +func (o *AccessCode) SetUsedAt(v time.Time) { + o.UsedAt.Set(&v) +} + +// SetUsedAtNil sets the value for UsedAt to be an explicit nil +func (o *AccessCode) SetUsedAtNil() { + o.UsedAt.Set(nil) +} + +// UnsetUsedAt ensures that no value is present for UsedAt, not even an explicit nil +func (o *AccessCode) UnsetUsedAt() { + o.UsedAt.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccessCode) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccessCode) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *AccessCode) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *AccessCode) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *AccessCode) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *AccessCode) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccessCode) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccessCode) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *AccessCode) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *AccessCode) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *AccessCode) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *AccessCode) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AccessCode) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessCode) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AccessCode) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AccessCode) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *AccessCode) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessCode) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *AccessCode) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *AccessCode) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o AccessCode) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccessCode) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.AccessCode.IsSet() { + toSerialize["accessCode"] = o.AccessCode.Get() + } + if o.User.IsSet() { + toSerialize["user"] = o.User.Get() + } + if o.UserId.IsSet() { + toSerialize["userId"] = o.UserId.Get() + } + if o.UsedAt.IsSet() { + toSerialize["usedAt"] = o.UsedAt.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableAccessCode struct { + value *AccessCode + isSet bool +} + +func (v NullableAccessCode) Get() *AccessCode { + return v.value +} + +func (v *NullableAccessCode) Set(val *AccessCode) { + v.value = val + v.isSet = true +} + +func (v NullableAccessCode) IsSet() bool { + return v.isSet +} + +func (v *NullableAccessCode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccessCode(val *AccessCode) *NullableAccessCode { + return &NullableAccessCode{value: val, isSet: true} +} + +func (v NullableAccessCode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccessCode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_authentication_credentials.go b/pkg/api/rewardcloud/model_authentication_credentials.go new file mode 100644 index 0000000..e81c198 --- /dev/null +++ b/pkg/api/rewardcloud/model_authentication_credentials.go @@ -0,0 +1,160 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the AuthenticationCredentials type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticationCredentials{} + +// AuthenticationCredentials struct for AuthenticationCredentials +type AuthenticationCredentials struct { + Id *string `json:"id,omitempty"` + Password *string `json:"password,omitempty"` +} + +// NewAuthenticationCredentials instantiates a new AuthenticationCredentials object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAuthenticationCredentials() *AuthenticationCredentials { + this := AuthenticationCredentials{} + return &this +} + +// NewAuthenticationCredentialsWithDefaults instantiates a new AuthenticationCredentials object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAuthenticationCredentialsWithDefaults() *AuthenticationCredentials { + this := AuthenticationCredentials{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AuthenticationCredentials) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthenticationCredentials) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AuthenticationCredentials) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AuthenticationCredentials) SetId(v string) { + o.Id = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *AuthenticationCredentials) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthenticationCredentials) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *AuthenticationCredentials) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *AuthenticationCredentials) SetPassword(v string) { + o.Password = &v +} + +func (o AuthenticationCredentials) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticationCredentials) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + return toSerialize, nil +} + +type NullableAuthenticationCredentials struct { + value *AuthenticationCredentials + isSet bool +} + +func (v NullableAuthenticationCredentials) Get() *AuthenticationCredentials { + return v.value +} + +func (v *NullableAuthenticationCredentials) Set(val *AuthenticationCredentials) { + v.value = val + v.isSet = true +} + +func (v NullableAuthenticationCredentials) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthenticationCredentials) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthenticationCredentials(val *AuthenticationCredentials) *NullableAuthenticationCredentials { + return &NullableAuthenticationCredentials{value: val, isSet: true} +} + +func (v NullableAuthenticationCredentials) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthenticationCredentials) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_authentication_token.go b/pkg/api/rewardcloud/model_authentication_token.go new file mode 100644 index 0000000..724b6f6 --- /dev/null +++ b/pkg/api/rewardcloud/model_authentication_token.go @@ -0,0 +1,160 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the AuthenticationToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticationToken{} + +// AuthenticationToken struct for AuthenticationToken +type AuthenticationToken struct { + Token *string `json:"token,omitempty"` + Data *AuthenticationTokenData `json:"data,omitempty"` +} + +// NewAuthenticationToken instantiates a new AuthenticationToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAuthenticationToken() *AuthenticationToken { + this := AuthenticationToken{} + return &this +} + +// NewAuthenticationTokenWithDefaults instantiates a new AuthenticationToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAuthenticationTokenWithDefaults() *AuthenticationToken { + this := AuthenticationToken{} + return &this +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *AuthenticationToken) GetToken() string { + if o == nil || IsNil(o.Token) { + var ret string + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthenticationToken) GetTokenOk() (*string, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *AuthenticationToken) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *AuthenticationToken) SetToken(v string) { + o.Token = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *AuthenticationToken) GetData() AuthenticationTokenData { + if o == nil || IsNil(o.Data) { + var ret AuthenticationTokenData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthenticationToken) GetDataOk() (*AuthenticationTokenData, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *AuthenticationToken) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given AuthenticationTokenData and assigns it to the Data field. +func (o *AuthenticationToken) SetData(v AuthenticationTokenData) { + o.Data = &v +} + +func (o AuthenticationToken) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticationToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableAuthenticationToken struct { + value *AuthenticationToken + isSet bool +} + +func (v NullableAuthenticationToken) Get() *AuthenticationToken { + return v.value +} + +func (v *NullableAuthenticationToken) Set(val *AuthenticationToken) { + v.value = val + v.isSet = true +} + +func (v NullableAuthenticationToken) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthenticationToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthenticationToken(val *AuthenticationToken) *NullableAuthenticationToken { + return &NullableAuthenticationToken{value: val, isSet: true} +} + +func (v NullableAuthenticationToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthenticationToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_authentication_token_data.go b/pkg/api/rewardcloud/model_authentication_token_data.go new file mode 100644 index 0000000..0d92e1e --- /dev/null +++ b/pkg/api/rewardcloud/model_authentication_token_data.go @@ -0,0 +1,232 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the AuthenticationTokenData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticationTokenData{} + +// AuthenticationTokenData struct for AuthenticationTokenData +type AuthenticationTokenData struct { + Id *int32 `json:"id,omitempty"` + Fullname *string `json:"fullname,omitempty"` + Roles []string `json:"roles,omitempty"` + Teams []AuthenticationTokenDataTeamsInner `json:"teams,omitempty"` +} + +// NewAuthenticationTokenData instantiates a new AuthenticationTokenData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAuthenticationTokenData() *AuthenticationTokenData { + this := AuthenticationTokenData{} + return &this +} + +// NewAuthenticationTokenDataWithDefaults instantiates a new AuthenticationTokenData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAuthenticationTokenDataWithDefaults() *AuthenticationTokenData { + this := AuthenticationTokenData{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AuthenticationTokenData) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthenticationTokenData) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AuthenticationTokenData) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *AuthenticationTokenData) SetId(v int32) { + o.Id = &v +} + +// GetFullname returns the Fullname field value if set, zero value otherwise. +func (o *AuthenticationTokenData) GetFullname() string { + if o == nil || IsNil(o.Fullname) { + var ret string + return ret + } + return *o.Fullname +} + +// GetFullnameOk returns a tuple with the Fullname field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthenticationTokenData) GetFullnameOk() (*string, bool) { + if o == nil || IsNil(o.Fullname) { + return nil, false + } + return o.Fullname, true +} + +// HasFullname returns a boolean if a field has been set. +func (o *AuthenticationTokenData) HasFullname() bool { + if o != nil && !IsNil(o.Fullname) { + return true + } + + return false +} + +// SetFullname gets a reference to the given string and assigns it to the Fullname field. +func (o *AuthenticationTokenData) SetFullname(v string) { + o.Fullname = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *AuthenticationTokenData) GetRoles() []string { + if o == nil || IsNil(o.Roles) { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthenticationTokenData) GetRolesOk() ([]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *AuthenticationTokenData) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *AuthenticationTokenData) SetRoles(v []string) { + o.Roles = v +} + +// GetTeams returns the Teams field value if set, zero value otherwise. +func (o *AuthenticationTokenData) GetTeams() []AuthenticationTokenDataTeamsInner { + if o == nil || IsNil(o.Teams) { + var ret []AuthenticationTokenDataTeamsInner + return ret + } + return o.Teams +} + +// GetTeamsOk returns a tuple with the Teams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthenticationTokenData) GetTeamsOk() ([]AuthenticationTokenDataTeamsInner, bool) { + if o == nil || IsNil(o.Teams) { + return nil, false + } + return o.Teams, true +} + +// HasTeams returns a boolean if a field has been set. +func (o *AuthenticationTokenData) HasTeams() bool { + if o != nil && !IsNil(o.Teams) { + return true + } + + return false +} + +// SetTeams gets a reference to the given []AuthenticationTokenDataTeamsInner and assigns it to the Teams field. +func (o *AuthenticationTokenData) SetTeams(v []AuthenticationTokenDataTeamsInner) { + o.Teams = v +} + +func (o AuthenticationTokenData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticationTokenData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Fullname) { + toSerialize["fullname"] = o.Fullname + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Teams) { + toSerialize["teams"] = o.Teams + } + return toSerialize, nil +} + +type NullableAuthenticationTokenData struct { + value *AuthenticationTokenData + isSet bool +} + +func (v NullableAuthenticationTokenData) Get() *AuthenticationTokenData { + return v.value +} + +func (v *NullableAuthenticationTokenData) Set(val *AuthenticationTokenData) { + v.value = val + v.isSet = true +} + +func (v NullableAuthenticationTokenData) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthenticationTokenData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthenticationTokenData(val *AuthenticationTokenData) *NullableAuthenticationTokenData { + return &NullableAuthenticationTokenData{value: val, isSet: true} +} + +func (v NullableAuthenticationTokenData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthenticationTokenData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_authentication_token_data_teams_inner.go b/pkg/api/rewardcloud/model_authentication_token_data_teams_inner.go new file mode 100644 index 0000000..b8ccedf --- /dev/null +++ b/pkg/api/rewardcloud/model_authentication_token_data_teams_inner.go @@ -0,0 +1,124 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the AuthenticationTokenDataTeamsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticationTokenDataTeamsInner{} + +// AuthenticationTokenDataTeamsInner struct for AuthenticationTokenDataTeamsInner +type AuthenticationTokenDataTeamsInner struct { + Uuid *string `json:"uuid,omitempty"` +} + +// NewAuthenticationTokenDataTeamsInner instantiates a new AuthenticationTokenDataTeamsInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAuthenticationTokenDataTeamsInner() *AuthenticationTokenDataTeamsInner { + this := AuthenticationTokenDataTeamsInner{} + return &this +} + +// NewAuthenticationTokenDataTeamsInnerWithDefaults instantiates a new AuthenticationTokenDataTeamsInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAuthenticationTokenDataTeamsInnerWithDefaults() *AuthenticationTokenDataTeamsInner { + this := AuthenticationTokenDataTeamsInner{} + return &this +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *AuthenticationTokenDataTeamsInner) GetUuid() string { + if o == nil || IsNil(o.Uuid) { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthenticationTokenDataTeamsInner) GetUuidOk() (*string, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *AuthenticationTokenDataTeamsInner) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *AuthenticationTokenDataTeamsInner) SetUuid(v string) { + o.Uuid = &v +} + +func (o AuthenticationTokenDataTeamsInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticationTokenDataTeamsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + return toSerialize, nil +} + +type NullableAuthenticationTokenDataTeamsInner struct { + value *AuthenticationTokenDataTeamsInner + isSet bool +} + +func (v NullableAuthenticationTokenDataTeamsInner) Get() *AuthenticationTokenDataTeamsInner { + return v.value +} + +func (v *NullableAuthenticationTokenDataTeamsInner) Set(val *AuthenticationTokenDataTeamsInner) { + v.value = val + v.isSet = true +} + +func (v NullableAuthenticationTokenDataTeamsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthenticationTokenDataTeamsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthenticationTokenDataTeamsInner(val *AuthenticationTokenDataTeamsInner) *NullableAuthenticationTokenDataTeamsInner { + return &NullableAuthenticationTokenDataTeamsInner{value: val, isSet: true} +} + +func (v NullableAuthenticationTokenDataTeamsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthenticationTokenDataTeamsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_cluster.go b/pkg/api/rewardcloud/model_cluster.go new file mode 100644 index 0000000..3471243 --- /dev/null +++ b/pkg/api/rewardcloud/model_cluster.go @@ -0,0 +1,1001 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the Cluster type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Cluster{} + +// Cluster Class Cluster +type Cluster struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + // This is the 'Display name' in the infrastructure + Name *string `json:"name,omitempty"` + // This is the cluster's name in the infrastructure + CodeName *string `json:"codeName,omitempty"` + KubecostUrl NullableString `json:"kubecostUrl,omitempty"` + KubecostUser NullableString `json:"kubecostUser,omitempty"` + KubecostPass NullableString `json:"kubecostPass,omitempty"` + ChangeKubecostPass NullableString `json:"changeKubecostPass,omitempty"` + IsDefault NullableBool `json:"isDefault,omitempty"` + ClusterServer NullableString `json:"clusterServer,omitempty"` + ClusterCertificateAuthorityData NullableString `json:"clusterCertificateAuthorityData,omitempty"` + OidcIssuerUrl NullableString `json:"oidcIssuerUrl,omitempty"` + OidcClientID NullableString `json:"oidcClientID,omitempty"` + OidcClientSecret NullableString `json:"oidcClientSecret,omitempty"` + Environment []string `json:"environment,omitempty"` + Provider NullableString `json:"provider,omitempty"` + Products []string `json:"products,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewCluster instantiates a new Cluster object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCluster() *Cluster { + this := Cluster{} + return &this +} + +// NewClusterWithDefaults instantiates a new Cluster object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewClusterWithDefaults() *Cluster { + this := Cluster{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Cluster) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Cluster) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Cluster) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *Cluster) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *Cluster) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *Cluster) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *Cluster) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Cluster) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Cluster) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Cluster) SetName(v string) { + o.Name = &v +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise. +func (o *Cluster) GetCodeName() string { + if o == nil || IsNil(o.CodeName) { + var ret string + return ret + } + return *o.CodeName +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetCodeNameOk() (*string, bool) { + if o == nil || IsNil(o.CodeName) { + return nil, false + } + return o.CodeName, true +} + +// HasCodeName returns a boolean if a field has been set. +func (o *Cluster) HasCodeName() bool { + if o != nil && !IsNil(o.CodeName) { + return true + } + + return false +} + +// SetCodeName gets a reference to the given string and assigns it to the CodeName field. +func (o *Cluster) SetCodeName(v string) { + o.CodeName = &v +} + +// GetKubecostUrl returns the KubecostUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetKubecostUrl() string { + if o == nil || IsNil(o.KubecostUrl.Get()) { + var ret string + return ret + } + return *o.KubecostUrl.Get() +} + +// GetKubecostUrlOk returns a tuple with the KubecostUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetKubecostUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KubecostUrl.Get(), o.KubecostUrl.IsSet() +} + +// HasKubecostUrl returns a boolean if a field has been set. +func (o *Cluster) HasKubecostUrl() bool { + if o != nil && o.KubecostUrl.IsSet() { + return true + } + + return false +} + +// SetKubecostUrl gets a reference to the given NullableString and assigns it to the KubecostUrl field. +func (o *Cluster) SetKubecostUrl(v string) { + o.KubecostUrl.Set(&v) +} + +// SetKubecostUrlNil sets the value for KubecostUrl to be an explicit nil +func (o *Cluster) SetKubecostUrlNil() { + o.KubecostUrl.Set(nil) +} + +// UnsetKubecostUrl ensures that no value is present for KubecostUrl, not even an explicit nil +func (o *Cluster) UnsetKubecostUrl() { + o.KubecostUrl.Unset() +} + +// GetKubecostUser returns the KubecostUser field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetKubecostUser() string { + if o == nil || IsNil(o.KubecostUser.Get()) { + var ret string + return ret + } + return *o.KubecostUser.Get() +} + +// GetKubecostUserOk returns a tuple with the KubecostUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetKubecostUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KubecostUser.Get(), o.KubecostUser.IsSet() +} + +// HasKubecostUser returns a boolean if a field has been set. +func (o *Cluster) HasKubecostUser() bool { + if o != nil && o.KubecostUser.IsSet() { + return true + } + + return false +} + +// SetKubecostUser gets a reference to the given NullableString and assigns it to the KubecostUser field. +func (o *Cluster) SetKubecostUser(v string) { + o.KubecostUser.Set(&v) +} + +// SetKubecostUserNil sets the value for KubecostUser to be an explicit nil +func (o *Cluster) SetKubecostUserNil() { + o.KubecostUser.Set(nil) +} + +// UnsetKubecostUser ensures that no value is present for KubecostUser, not even an explicit nil +func (o *Cluster) UnsetKubecostUser() { + o.KubecostUser.Unset() +} + +// GetKubecostPass returns the KubecostPass field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetKubecostPass() string { + if o == nil || IsNil(o.KubecostPass.Get()) { + var ret string + return ret + } + return *o.KubecostPass.Get() +} + +// GetKubecostPassOk returns a tuple with the KubecostPass field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetKubecostPassOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KubecostPass.Get(), o.KubecostPass.IsSet() +} + +// HasKubecostPass returns a boolean if a field has been set. +func (o *Cluster) HasKubecostPass() bool { + if o != nil && o.KubecostPass.IsSet() { + return true + } + + return false +} + +// SetKubecostPass gets a reference to the given NullableString and assigns it to the KubecostPass field. +func (o *Cluster) SetKubecostPass(v string) { + o.KubecostPass.Set(&v) +} + +// SetKubecostPassNil sets the value for KubecostPass to be an explicit nil +func (o *Cluster) SetKubecostPassNil() { + o.KubecostPass.Set(nil) +} + +// UnsetKubecostPass ensures that no value is present for KubecostPass, not even an explicit nil +func (o *Cluster) UnsetKubecostPass() { + o.KubecostPass.Unset() +} + +// GetChangeKubecostPass returns the ChangeKubecostPass field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetChangeKubecostPass() string { + if o == nil || IsNil(o.ChangeKubecostPass.Get()) { + var ret string + return ret + } + return *o.ChangeKubecostPass.Get() +} + +// GetChangeKubecostPassOk returns a tuple with the ChangeKubecostPass field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetChangeKubecostPassOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ChangeKubecostPass.Get(), o.ChangeKubecostPass.IsSet() +} + +// HasChangeKubecostPass returns a boolean if a field has been set. +func (o *Cluster) HasChangeKubecostPass() bool { + if o != nil && o.ChangeKubecostPass.IsSet() { + return true + } + + return false +} + +// SetChangeKubecostPass gets a reference to the given NullableString and assigns it to the ChangeKubecostPass field. +func (o *Cluster) SetChangeKubecostPass(v string) { + o.ChangeKubecostPass.Set(&v) +} + +// SetChangeKubecostPassNil sets the value for ChangeKubecostPass to be an explicit nil +func (o *Cluster) SetChangeKubecostPassNil() { + o.ChangeKubecostPass.Set(nil) +} + +// UnsetChangeKubecostPass ensures that no value is present for ChangeKubecostPass, not even an explicit nil +func (o *Cluster) UnsetChangeKubecostPass() { + o.ChangeKubecostPass.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *Cluster) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *Cluster) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *Cluster) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *Cluster) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetClusterServer returns the ClusterServer field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetClusterServer() string { + if o == nil || IsNil(o.ClusterServer.Get()) { + var ret string + return ret + } + return *o.ClusterServer.Get() +} + +// GetClusterServerOk returns a tuple with the ClusterServer field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetClusterServerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClusterServer.Get(), o.ClusterServer.IsSet() +} + +// HasClusterServer returns a boolean if a field has been set. +func (o *Cluster) HasClusterServer() bool { + if o != nil && o.ClusterServer.IsSet() { + return true + } + + return false +} + +// SetClusterServer gets a reference to the given NullableString and assigns it to the ClusterServer field. +func (o *Cluster) SetClusterServer(v string) { + o.ClusterServer.Set(&v) +} + +// SetClusterServerNil sets the value for ClusterServer to be an explicit nil +func (o *Cluster) SetClusterServerNil() { + o.ClusterServer.Set(nil) +} + +// UnsetClusterServer ensures that no value is present for ClusterServer, not even an explicit nil +func (o *Cluster) UnsetClusterServer() { + o.ClusterServer.Unset() +} + +// GetClusterCertificateAuthorityData returns the ClusterCertificateAuthorityData field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetClusterCertificateAuthorityData() string { + if o == nil || IsNil(o.ClusterCertificateAuthorityData.Get()) { + var ret string + return ret + } + return *o.ClusterCertificateAuthorityData.Get() +} + +// GetClusterCertificateAuthorityDataOk returns a tuple with the ClusterCertificateAuthorityData field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetClusterCertificateAuthorityDataOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClusterCertificateAuthorityData.Get(), o.ClusterCertificateAuthorityData.IsSet() +} + +// HasClusterCertificateAuthorityData returns a boolean if a field has been set. +func (o *Cluster) HasClusterCertificateAuthorityData() bool { + if o != nil && o.ClusterCertificateAuthorityData.IsSet() { + return true + } + + return false +} + +// SetClusterCertificateAuthorityData gets a reference to the given NullableString and assigns it to the ClusterCertificateAuthorityData field. +func (o *Cluster) SetClusterCertificateAuthorityData(v string) { + o.ClusterCertificateAuthorityData.Set(&v) +} + +// SetClusterCertificateAuthorityDataNil sets the value for ClusterCertificateAuthorityData to be an explicit nil +func (o *Cluster) SetClusterCertificateAuthorityDataNil() { + o.ClusterCertificateAuthorityData.Set(nil) +} + +// UnsetClusterCertificateAuthorityData ensures that no value is present for ClusterCertificateAuthorityData, not even an explicit nil +func (o *Cluster) UnsetClusterCertificateAuthorityData() { + o.ClusterCertificateAuthorityData.Unset() +} + +// GetOidcIssuerUrl returns the OidcIssuerUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetOidcIssuerUrl() string { + if o == nil || IsNil(o.OidcIssuerUrl.Get()) { + var ret string + return ret + } + return *o.OidcIssuerUrl.Get() +} + +// GetOidcIssuerUrlOk returns a tuple with the OidcIssuerUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetOidcIssuerUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OidcIssuerUrl.Get(), o.OidcIssuerUrl.IsSet() +} + +// HasOidcIssuerUrl returns a boolean if a field has been set. +func (o *Cluster) HasOidcIssuerUrl() bool { + if o != nil && o.OidcIssuerUrl.IsSet() { + return true + } + + return false +} + +// SetOidcIssuerUrl gets a reference to the given NullableString and assigns it to the OidcIssuerUrl field. +func (o *Cluster) SetOidcIssuerUrl(v string) { + o.OidcIssuerUrl.Set(&v) +} + +// SetOidcIssuerUrlNil sets the value for OidcIssuerUrl to be an explicit nil +func (o *Cluster) SetOidcIssuerUrlNil() { + o.OidcIssuerUrl.Set(nil) +} + +// UnsetOidcIssuerUrl ensures that no value is present for OidcIssuerUrl, not even an explicit nil +func (o *Cluster) UnsetOidcIssuerUrl() { + o.OidcIssuerUrl.Unset() +} + +// GetOidcClientID returns the OidcClientID field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetOidcClientID() string { + if o == nil || IsNil(o.OidcClientID.Get()) { + var ret string + return ret + } + return *o.OidcClientID.Get() +} + +// GetOidcClientIDOk returns a tuple with the OidcClientID field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetOidcClientIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OidcClientID.Get(), o.OidcClientID.IsSet() +} + +// HasOidcClientID returns a boolean if a field has been set. +func (o *Cluster) HasOidcClientID() bool { + if o != nil && o.OidcClientID.IsSet() { + return true + } + + return false +} + +// SetOidcClientID gets a reference to the given NullableString and assigns it to the OidcClientID field. +func (o *Cluster) SetOidcClientID(v string) { + o.OidcClientID.Set(&v) +} + +// SetOidcClientIDNil sets the value for OidcClientID to be an explicit nil +func (o *Cluster) SetOidcClientIDNil() { + o.OidcClientID.Set(nil) +} + +// UnsetOidcClientID ensures that no value is present for OidcClientID, not even an explicit nil +func (o *Cluster) UnsetOidcClientID() { + o.OidcClientID.Unset() +} + +// GetOidcClientSecret returns the OidcClientSecret field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetOidcClientSecret() string { + if o == nil || IsNil(o.OidcClientSecret.Get()) { + var ret string + return ret + } + return *o.OidcClientSecret.Get() +} + +// GetOidcClientSecretOk returns a tuple with the OidcClientSecret field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetOidcClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OidcClientSecret.Get(), o.OidcClientSecret.IsSet() +} + +// HasOidcClientSecret returns a boolean if a field has been set. +func (o *Cluster) HasOidcClientSecret() bool { + if o != nil && o.OidcClientSecret.IsSet() { + return true + } + + return false +} + +// SetOidcClientSecret gets a reference to the given NullableString and assigns it to the OidcClientSecret field. +func (o *Cluster) SetOidcClientSecret(v string) { + o.OidcClientSecret.Set(&v) +} + +// SetOidcClientSecretNil sets the value for OidcClientSecret to be an explicit nil +func (o *Cluster) SetOidcClientSecretNil() { + o.OidcClientSecret.Set(nil) +} + +// UnsetOidcClientSecret ensures that no value is present for OidcClientSecret, not even an explicit nil +func (o *Cluster) UnsetOidcClientSecret() { + o.OidcClientSecret.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise. +func (o *Cluster) GetEnvironment() []string { + if o == nil || IsNil(o.Environment) { + var ret []string + return ret + } + return o.Environment +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetEnvironmentOk() ([]string, bool) { + if o == nil || IsNil(o.Environment) { + return nil, false + } + return o.Environment, true +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *Cluster) HasEnvironment() bool { + if o != nil && !IsNil(o.Environment) { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given []string and assigns it to the Environment field. +func (o *Cluster) SetEnvironment(v []string) { + o.Environment = v +} + +// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetProvider() string { + if o == nil || IsNil(o.Provider.Get()) { + var ret string + return ret + } + return *o.Provider.Get() +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Provider.Get(), o.Provider.IsSet() +} + +// HasProvider returns a boolean if a field has been set. +func (o *Cluster) HasProvider() bool { + if o != nil && o.Provider.IsSet() { + return true + } + + return false +} + +// SetProvider gets a reference to the given NullableString and assigns it to the Provider field. +func (o *Cluster) SetProvider(v string) { + o.Provider.Set(&v) +} + +// SetProviderNil sets the value for Provider to be an explicit nil +func (o *Cluster) SetProviderNil() { + o.Provider.Set(nil) +} + +// UnsetProvider ensures that no value is present for Provider, not even an explicit nil +func (o *Cluster) UnsetProvider() { + o.Provider.Unset() +} + +// GetProducts returns the Products field value if set, zero value otherwise. +func (o *Cluster) GetProducts() []string { + if o == nil || IsNil(o.Products) { + var ret []string + return ret + } + return o.Products +} + +// GetProductsOk returns a tuple with the Products field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetProductsOk() ([]string, bool) { + if o == nil || IsNil(o.Products) { + return nil, false + } + return o.Products, true +} + +// HasProducts returns a boolean if a field has been set. +func (o *Cluster) HasProducts() bool { + if o != nil && !IsNil(o.Products) { + return true + } + + return false +} + +// SetProducts gets a reference to the given []string and assigns it to the Products field. +func (o *Cluster) SetProducts(v []string) { + o.Products = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *Cluster) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *Cluster) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *Cluster) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *Cluster) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Cluster) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Cluster) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *Cluster) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *Cluster) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *Cluster) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *Cluster) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Cluster) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Cluster) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Cluster) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Cluster) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Cluster) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Cluster) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o Cluster) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Cluster) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.CodeName) { + toSerialize["codeName"] = o.CodeName + } + if o.KubecostUrl.IsSet() { + toSerialize["kubecostUrl"] = o.KubecostUrl.Get() + } + if o.KubecostUser.IsSet() { + toSerialize["kubecostUser"] = o.KubecostUser.Get() + } + if o.KubecostPass.IsSet() { + toSerialize["kubecostPass"] = o.KubecostPass.Get() + } + if o.ChangeKubecostPass.IsSet() { + toSerialize["changeKubecostPass"] = o.ChangeKubecostPass.Get() + } + if o.IsDefault.IsSet() { + toSerialize["isDefault"] = o.IsDefault.Get() + } + if o.ClusterServer.IsSet() { + toSerialize["clusterServer"] = o.ClusterServer.Get() + } + if o.ClusterCertificateAuthorityData.IsSet() { + toSerialize["clusterCertificateAuthorityData"] = o.ClusterCertificateAuthorityData.Get() + } + if o.OidcIssuerUrl.IsSet() { + toSerialize["oidcIssuerUrl"] = o.OidcIssuerUrl.Get() + } + if o.OidcClientID.IsSet() { + toSerialize["oidcClientID"] = o.OidcClientID.Get() + } + if o.OidcClientSecret.IsSet() { + toSerialize["oidcClientSecret"] = o.OidcClientSecret.Get() + } + if !IsNil(o.Environment) { + toSerialize["environment"] = o.Environment + } + if o.Provider.IsSet() { + toSerialize["provider"] = o.Provider.Get() + } + if !IsNil(o.Products) { + toSerialize["products"] = o.Products + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableCluster struct { + value *Cluster + isSet bool +} + +func (v NullableCluster) Get() *Cluster { + return v.value +} + +func (v *NullableCluster) Set(val *Cluster) { + v.value = val + v.isSet = true +} + +func (v NullableCluster) IsSet() bool { + return v.isSet +} + +func (v *NullableCluster) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCluster(val *Cluster) *NullableCluster { + return &NullableCluster{value: val, isSet: true} +} + +func (v NullableCluster) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCluster) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_cluster_cluster_with_provider.go b/pkg/api/rewardcloud/model_cluster_cluster_with_provider.go new file mode 100644 index 0000000..3ed44b1 --- /dev/null +++ b/pkg/api/rewardcloud/model_cluster_cluster_with_provider.go @@ -0,0 +1,172 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ClusterClusterWithProvider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClusterClusterWithProvider{} + +// ClusterClusterWithProvider Class Cluster +type ClusterClusterWithProvider struct { + // This is the 'Display name' in the infrastructure + Name *string `json:"name,omitempty"` + Provider NullableProviderClusterWithProvider `json:"provider,omitempty"` +} + +// NewClusterClusterWithProvider instantiates a new ClusterClusterWithProvider object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewClusterClusterWithProvider() *ClusterClusterWithProvider { + this := ClusterClusterWithProvider{} + return &this +} + +// NewClusterClusterWithProviderWithDefaults instantiates a new ClusterClusterWithProvider object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewClusterClusterWithProviderWithDefaults() *ClusterClusterWithProvider { + this := ClusterClusterWithProvider{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ClusterClusterWithProvider) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterClusterWithProvider) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ClusterClusterWithProvider) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ClusterClusterWithProvider) SetName(v string) { + o.Name = &v +} + +// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ClusterClusterWithProvider) GetProvider() ProviderClusterWithProvider { + if o == nil || IsNil(o.Provider.Get()) { + var ret ProviderClusterWithProvider + return ret + } + return *o.Provider.Get() +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ClusterClusterWithProvider) GetProviderOk() (*ProviderClusterWithProvider, bool) { + if o == nil { + return nil, false + } + return o.Provider.Get(), o.Provider.IsSet() +} + +// HasProvider returns a boolean if a field has been set. +func (o *ClusterClusterWithProvider) HasProvider() bool { + if o != nil && o.Provider.IsSet() { + return true + } + + return false +} + +// SetProvider gets a reference to the given NullableProviderClusterWithProvider and assigns it to the Provider field. +func (o *ClusterClusterWithProvider) SetProvider(v ProviderClusterWithProvider) { + o.Provider.Set(&v) +} + +// SetProviderNil sets the value for Provider to be an explicit nil +func (o *ClusterClusterWithProvider) SetProviderNil() { + o.Provider.Set(nil) +} + +// UnsetProvider ensures that no value is present for Provider, not even an explicit nil +func (o *ClusterClusterWithProvider) UnsetProvider() { + o.Provider.Unset() +} + +func (o ClusterClusterWithProvider) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClusterClusterWithProvider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Provider.IsSet() { + toSerialize["provider"] = o.Provider.Get() + } + return toSerialize, nil +} + +type NullableClusterClusterWithProvider struct { + value *ClusterClusterWithProvider + isSet bool +} + +func (v NullableClusterClusterWithProvider) Get() *ClusterClusterWithProvider { + return v.value +} + +func (v *NullableClusterClusterWithProvider) Set(val *ClusterClusterWithProvider) { + v.value = val + v.isSet = true +} + +func (v NullableClusterClusterWithProvider) IsSet() bool { + return v.isSet +} + +func (v *NullableClusterClusterWithProvider) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClusterClusterWithProvider(val *ClusterClusterWithProvider) *NullableClusterClusterWithProvider { + return &NullableClusterClusterWithProvider{value: val, isSet: true} +} + +func (v NullableClusterClusterWithProvider) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClusterClusterWithProvider) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_component.go b/pkg/api/rewardcloud/model_component.go new file mode 100644 index 0000000..ff975d3 --- /dev/null +++ b/pkg/api/rewardcloud/model_component.go @@ -0,0 +1,504 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the Component type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Component{} + +// Component Class Component +type Component struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + ComponentVersion []string `json:"componentVersion,omitempty"` + ProjectTypeVersion []string `json:"projectTypeVersion,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewComponent instantiates a new Component object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewComponent() *Component { + this := Component{} + return &this +} + +// NewComponentWithDefaults instantiates a new Component object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewComponentWithDefaults() *Component { + this := Component{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Component) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Component) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Component) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Component) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Component) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Component) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *Component) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *Component) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *Component) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *Component) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Component) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Component) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *Component) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *Component) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *Component) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *Component) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Component) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Component) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *Component) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *Component) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *Component) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *Component) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise. +func (o *Component) GetComponentVersion() []string { + if o == nil || IsNil(o.ComponentVersion) { + var ret []string + return ret + } + return o.ComponentVersion +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Component) GetComponentVersionOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentVersion) { + return nil, false + } + return o.ComponentVersion, true +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *Component) HasComponentVersion() bool { + if o != nil && !IsNil(o.ComponentVersion) { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given []string and assigns it to the ComponentVersion field. +func (o *Component) SetComponentVersion(v []string) { + o.ComponentVersion = v +} + +// GetProjectTypeVersion returns the ProjectTypeVersion field value if set, zero value otherwise. +func (o *Component) GetProjectTypeVersion() []string { + if o == nil || IsNil(o.ProjectTypeVersion) { + var ret []string + return ret + } + return o.ProjectTypeVersion +} + +// GetProjectTypeVersionOk returns a tuple with the ProjectTypeVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Component) GetProjectTypeVersionOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectTypeVersion) { + return nil, false + } + return o.ProjectTypeVersion, true +} + +// HasProjectTypeVersion returns a boolean if a field has been set. +func (o *Component) HasProjectTypeVersion() bool { + if o != nil && !IsNil(o.ProjectTypeVersion) { + return true + } + + return false +} + +// SetProjectTypeVersion gets a reference to the given []string and assigns it to the ProjectTypeVersion field. +func (o *Component) SetProjectTypeVersion(v []string) { + o.ProjectTypeVersion = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Component) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Component) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *Component) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *Component) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *Component) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *Component) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Component) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Component) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *Component) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *Component) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *Component) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *Component) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Component) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Component) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Component) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Component) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Component) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Component) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Component) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Component) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o Component) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Component) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if !IsNil(o.ComponentVersion) { + toSerialize["componentVersion"] = o.ComponentVersion + } + if !IsNil(o.ProjectTypeVersion) { + toSerialize["projectTypeVersion"] = o.ProjectTypeVersion + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableComponent struct { + value *Component + isSet bool +} + +func (v NullableComponent) Get() *Component { + return v.value +} + +func (v *NullableComponent) Set(val *Component) { + v.value = val + v.isSet = true +} + +func (v NullableComponent) IsSet() bool { + return v.isSet +} + +func (v *NullableComponent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponent(val *Component) *NullableComponent { + return &NullableComponent{value: val, isSet: true} +} + +func (v NullableComponent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_component_resource_limit.go b/pkg/api/rewardcloud/model_component_resource_limit.go new file mode 100644 index 0000000..f0ef623 --- /dev/null +++ b/pkg/api/rewardcloud/model_component_resource_limit.go @@ -0,0 +1,573 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ComponentResourceLimit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ComponentResourceLimit{} + +// ComponentResourceLimit Class ComponentResourceLimit +type ComponentResourceLimit struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + MinValue NullableInt32 `json:"minValue,omitempty"` + MaxValue NullableInt32 `json:"maxValue,omitempty"` + ProjectTypeVersion NullableString `json:"projectTypeVersion,omitempty"` + ResourceType NullableString `json:"resourceType,omitempty"` + ComponentVersion NullableString `json:"componentVersion,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewComponentResourceLimit instantiates a new ComponentResourceLimit object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewComponentResourceLimit() *ComponentResourceLimit { + this := ComponentResourceLimit{} + return &this +} + +// NewComponentResourceLimitWithDefaults instantiates a new ComponentResourceLimit object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewComponentResourceLimitWithDefaults() *ComponentResourceLimit { + this := ComponentResourceLimit{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ComponentResourceLimit) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentResourceLimit) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ComponentResourceLimit) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentResourceLimit) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentResourceLimit) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ComponentResourceLimit) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ComponentResourceLimit) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ComponentResourceLimit) UnsetUuid() { + o.Uuid.Unset() +} + +// GetMinValue returns the MinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentResourceLimit) GetMinValue() int32 { + if o == nil || IsNil(o.MinValue.Get()) { + var ret int32 + return ret + } + return *o.MinValue.Get() +} + +// GetMinValueOk returns a tuple with the MinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentResourceLimit) GetMinValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.MinValue.Get(), o.MinValue.IsSet() +} + +// HasMinValue returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasMinValue() bool { + if o != nil && o.MinValue.IsSet() { + return true + } + + return false +} + +// SetMinValue gets a reference to the given NullableInt32 and assigns it to the MinValue field. +func (o *ComponentResourceLimit) SetMinValue(v int32) { + o.MinValue.Set(&v) +} + +// SetMinValueNil sets the value for MinValue to be an explicit nil +func (o *ComponentResourceLimit) SetMinValueNil() { + o.MinValue.Set(nil) +} + +// UnsetMinValue ensures that no value is present for MinValue, not even an explicit nil +func (o *ComponentResourceLimit) UnsetMinValue() { + o.MinValue.Unset() +} + +// GetMaxValue returns the MaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentResourceLimit) GetMaxValue() int32 { + if o == nil || IsNil(o.MaxValue.Get()) { + var ret int32 + return ret + } + return *o.MaxValue.Get() +} + +// GetMaxValueOk returns a tuple with the MaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentResourceLimit) GetMaxValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.MaxValue.Get(), o.MaxValue.IsSet() +} + +// HasMaxValue returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasMaxValue() bool { + if o != nil && o.MaxValue.IsSet() { + return true + } + + return false +} + +// SetMaxValue gets a reference to the given NullableInt32 and assigns it to the MaxValue field. +func (o *ComponentResourceLimit) SetMaxValue(v int32) { + o.MaxValue.Set(&v) +} + +// SetMaxValueNil sets the value for MaxValue to be an explicit nil +func (o *ComponentResourceLimit) SetMaxValueNil() { + o.MaxValue.Set(nil) +} + +// UnsetMaxValue ensures that no value is present for MaxValue, not even an explicit nil +func (o *ComponentResourceLimit) UnsetMaxValue() { + o.MaxValue.Unset() +} + +// GetProjectTypeVersion returns the ProjectTypeVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentResourceLimit) GetProjectTypeVersion() string { + if o == nil || IsNil(o.ProjectTypeVersion.Get()) { + var ret string + return ret + } + return *o.ProjectTypeVersion.Get() +} + +// GetProjectTypeVersionOk returns a tuple with the ProjectTypeVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentResourceLimit) GetProjectTypeVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectTypeVersion.Get(), o.ProjectTypeVersion.IsSet() +} + +// HasProjectTypeVersion returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasProjectTypeVersion() bool { + if o != nil && o.ProjectTypeVersion.IsSet() { + return true + } + + return false +} + +// SetProjectTypeVersion gets a reference to the given NullableString and assigns it to the ProjectTypeVersion field. +func (o *ComponentResourceLimit) SetProjectTypeVersion(v string) { + o.ProjectTypeVersion.Set(&v) +} + +// SetProjectTypeVersionNil sets the value for ProjectTypeVersion to be an explicit nil +func (o *ComponentResourceLimit) SetProjectTypeVersionNil() { + o.ProjectTypeVersion.Set(nil) +} + +// UnsetProjectTypeVersion ensures that no value is present for ProjectTypeVersion, not even an explicit nil +func (o *ComponentResourceLimit) UnsetProjectTypeVersion() { + o.ProjectTypeVersion.Unset() +} + +// GetResourceType returns the ResourceType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentResourceLimit) GetResourceType() string { + if o == nil || IsNil(o.ResourceType.Get()) { + var ret string + return ret + } + return *o.ResourceType.Get() +} + +// GetResourceTypeOk returns a tuple with the ResourceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentResourceLimit) GetResourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceType.Get(), o.ResourceType.IsSet() +} + +// HasResourceType returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasResourceType() bool { + if o != nil && o.ResourceType.IsSet() { + return true + } + + return false +} + +// SetResourceType gets a reference to the given NullableString and assigns it to the ResourceType field. +func (o *ComponentResourceLimit) SetResourceType(v string) { + o.ResourceType.Set(&v) +} + +// SetResourceTypeNil sets the value for ResourceType to be an explicit nil +func (o *ComponentResourceLimit) SetResourceTypeNil() { + o.ResourceType.Set(nil) +} + +// UnsetResourceType ensures that no value is present for ResourceType, not even an explicit nil +func (o *ComponentResourceLimit) UnsetResourceType() { + o.ResourceType.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentResourceLimit) GetComponentVersion() string { + if o == nil || IsNil(o.ComponentVersion.Get()) { + var ret string + return ret + } + return *o.ComponentVersion.Get() +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentResourceLimit) GetComponentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ComponentVersion.Get(), o.ComponentVersion.IsSet() +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasComponentVersion() bool { + if o != nil && o.ComponentVersion.IsSet() { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given NullableString and assigns it to the ComponentVersion field. +func (o *ComponentResourceLimit) SetComponentVersion(v string) { + o.ComponentVersion.Set(&v) +} + +// SetComponentVersionNil sets the value for ComponentVersion to be an explicit nil +func (o *ComponentResourceLimit) SetComponentVersionNil() { + o.ComponentVersion.Set(nil) +} + +// UnsetComponentVersion ensures that no value is present for ComponentVersion, not even an explicit nil +func (o *ComponentResourceLimit) UnsetComponentVersion() { + o.ComponentVersion.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentResourceLimit) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentResourceLimit) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ComponentResourceLimit) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ComponentResourceLimit) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ComponentResourceLimit) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentResourceLimit) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentResourceLimit) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ComponentResourceLimit) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ComponentResourceLimit) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ComponentResourceLimit) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ComponentResourceLimit) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentResourceLimit) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ComponentResourceLimit) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ComponentResourceLimit) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentResourceLimit) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ComponentResourceLimit) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ComponentResourceLimit) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ComponentResourceLimit) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ComponentResourceLimit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.MinValue.IsSet() { + toSerialize["minValue"] = o.MinValue.Get() + } + if o.MaxValue.IsSet() { + toSerialize["maxValue"] = o.MaxValue.Get() + } + if o.ProjectTypeVersion.IsSet() { + toSerialize["projectTypeVersion"] = o.ProjectTypeVersion.Get() + } + if o.ResourceType.IsSet() { + toSerialize["resourceType"] = o.ResourceType.Get() + } + if o.ComponentVersion.IsSet() { + toSerialize["componentVersion"] = o.ComponentVersion.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableComponentResourceLimit struct { + value *ComponentResourceLimit + isSet bool +} + +func (v NullableComponentResourceLimit) Get() *ComponentResourceLimit { + return v.value +} + +func (v *NullableComponentResourceLimit) Set(val *ComponentResourceLimit) { + v.value = val + v.isSet = true +} + +func (v NullableComponentResourceLimit) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentResourceLimit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentResourceLimit(val *ComponentResourceLimit) *NullableComponentResourceLimit { + return &NullableComponentResourceLimit{value: val, isSet: true} +} + +func (v NullableComponentResourceLimit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentResourceLimit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_component_version.go b/pkg/api/rewardcloud/model_component_version.go new file mode 100644 index 0000000..72c1643 --- /dev/null +++ b/pkg/api/rewardcloud/model_component_version.go @@ -0,0 +1,612 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ComponentVersion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ComponentVersion{} + +// ComponentVersion Class ComponentVersion +type ComponentVersion struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Version NullableString `json:"version,omitempty"` + Component NullableString `json:"component,omitempty"` + ComponentVersionEnvVar []string `json:"componentVersionEnvVar,omitempty"` + Project []AbstractProject `json:"project,omitempty"` + EnvironmentComponent []string `json:"environmentComponent,omitempty"` + ComponentResourceLimit []string `json:"componentResourceLimit,omitempty"` + ProjectTypeVersions []string `json:"projectTypeVersions,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewComponentVersion instantiates a new ComponentVersion object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewComponentVersion() *ComponentVersion { + this := ComponentVersion{} + return &this +} + +// NewComponentVersionWithDefaults instantiates a new ComponentVersion object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewComponentVersionWithDefaults() *ComponentVersion { + this := ComponentVersion{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ComponentVersion) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersion) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ComponentVersion) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ComponentVersion) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersion) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersion) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ComponentVersion) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ComponentVersion) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ComponentVersion) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ComponentVersion) UnsetUuid() { + o.Uuid.Unset() +} + +// GetVersion returns the Version field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersion) GetVersion() string { + if o == nil || IsNil(o.Version.Get()) { + var ret string + return ret + } + return *o.Version.Get() +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersion) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Version.Get(), o.Version.IsSet() +} + +// HasVersion returns a boolean if a field has been set. +func (o *ComponentVersion) HasVersion() bool { + if o != nil && o.Version.IsSet() { + return true + } + + return false +} + +// SetVersion gets a reference to the given NullableString and assigns it to the Version field. +func (o *ComponentVersion) SetVersion(v string) { + o.Version.Set(&v) +} + +// SetVersionNil sets the value for Version to be an explicit nil +func (o *ComponentVersion) SetVersionNil() { + o.Version.Set(nil) +} + +// UnsetVersion ensures that no value is present for Version, not even an explicit nil +func (o *ComponentVersion) UnsetVersion() { + o.Version.Unset() +} + +// GetComponent returns the Component field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersion) GetComponent() string { + if o == nil || IsNil(o.Component.Get()) { + var ret string + return ret + } + return *o.Component.Get() +} + +// GetComponentOk returns a tuple with the Component field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersion) GetComponentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Component.Get(), o.Component.IsSet() +} + +// HasComponent returns a boolean if a field has been set. +func (o *ComponentVersion) HasComponent() bool { + if o != nil && o.Component.IsSet() { + return true + } + + return false +} + +// SetComponent gets a reference to the given NullableString and assigns it to the Component field. +func (o *ComponentVersion) SetComponent(v string) { + o.Component.Set(&v) +} + +// SetComponentNil sets the value for Component to be an explicit nil +func (o *ComponentVersion) SetComponentNil() { + o.Component.Set(nil) +} + +// UnsetComponent ensures that no value is present for Component, not even an explicit nil +func (o *ComponentVersion) UnsetComponent() { + o.Component.Unset() +} + +// GetComponentVersionEnvVar returns the ComponentVersionEnvVar field value if set, zero value otherwise. +func (o *ComponentVersion) GetComponentVersionEnvVar() []string { + if o == nil || IsNil(o.ComponentVersionEnvVar) { + var ret []string + return ret + } + return o.ComponentVersionEnvVar +} + +// GetComponentVersionEnvVarOk returns a tuple with the ComponentVersionEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersion) GetComponentVersionEnvVarOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentVersionEnvVar) { + return nil, false + } + return o.ComponentVersionEnvVar, true +} + +// HasComponentVersionEnvVar returns a boolean if a field has been set. +func (o *ComponentVersion) HasComponentVersionEnvVar() bool { + if o != nil && !IsNil(o.ComponentVersionEnvVar) { + return true + } + + return false +} + +// SetComponentVersionEnvVar gets a reference to the given []string and assigns it to the ComponentVersionEnvVar field. +func (o *ComponentVersion) SetComponentVersionEnvVar(v []string) { + o.ComponentVersionEnvVar = v +} + +// GetProject returns the Project field value if set, zero value otherwise. +func (o *ComponentVersion) GetProject() []AbstractProject { + if o == nil || IsNil(o.Project) { + var ret []AbstractProject + return ret + } + return o.Project +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersion) GetProjectOk() ([]AbstractProject, bool) { + if o == nil || IsNil(o.Project) { + return nil, false + } + return o.Project, true +} + +// HasProject returns a boolean if a field has been set. +func (o *ComponentVersion) HasProject() bool { + if o != nil && !IsNil(o.Project) { + return true + } + + return false +} + +// SetProject gets a reference to the given []AbstractProject and assigns it to the Project field. +func (o *ComponentVersion) SetProject(v []AbstractProject) { + o.Project = v +} + +// GetEnvironmentComponent returns the EnvironmentComponent field value if set, zero value otherwise. +func (o *ComponentVersion) GetEnvironmentComponent() []string { + if o == nil || IsNil(o.EnvironmentComponent) { + var ret []string + return ret + } + return o.EnvironmentComponent +} + +// GetEnvironmentComponentOk returns a tuple with the EnvironmentComponent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersion) GetEnvironmentComponentOk() ([]string, bool) { + if o == nil || IsNil(o.EnvironmentComponent) { + return nil, false + } + return o.EnvironmentComponent, true +} + +// HasEnvironmentComponent returns a boolean if a field has been set. +func (o *ComponentVersion) HasEnvironmentComponent() bool { + if o != nil && !IsNil(o.EnvironmentComponent) { + return true + } + + return false +} + +// SetEnvironmentComponent gets a reference to the given []string and assigns it to the EnvironmentComponent field. +func (o *ComponentVersion) SetEnvironmentComponent(v []string) { + o.EnvironmentComponent = v +} + +// GetComponentResourceLimit returns the ComponentResourceLimit field value if set, zero value otherwise. +func (o *ComponentVersion) GetComponentResourceLimit() []string { + if o == nil || IsNil(o.ComponentResourceLimit) { + var ret []string + return ret + } + return o.ComponentResourceLimit +} + +// GetComponentResourceLimitOk returns a tuple with the ComponentResourceLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersion) GetComponentResourceLimitOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentResourceLimit) { + return nil, false + } + return o.ComponentResourceLimit, true +} + +// HasComponentResourceLimit returns a boolean if a field has been set. +func (o *ComponentVersion) HasComponentResourceLimit() bool { + if o != nil && !IsNil(o.ComponentResourceLimit) { + return true + } + + return false +} + +// SetComponentResourceLimit gets a reference to the given []string and assigns it to the ComponentResourceLimit field. +func (o *ComponentVersion) SetComponentResourceLimit(v []string) { + o.ComponentResourceLimit = v +} + +// GetProjectTypeVersions returns the ProjectTypeVersions field value if set, zero value otherwise. +func (o *ComponentVersion) GetProjectTypeVersions() []string { + if o == nil || IsNil(o.ProjectTypeVersions) { + var ret []string + return ret + } + return o.ProjectTypeVersions +} + +// GetProjectTypeVersionsOk returns a tuple with the ProjectTypeVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersion) GetProjectTypeVersionsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectTypeVersions) { + return nil, false + } + return o.ProjectTypeVersions, true +} + +// HasProjectTypeVersions returns a boolean if a field has been set. +func (o *ComponentVersion) HasProjectTypeVersions() bool { + if o != nil && !IsNil(o.ProjectTypeVersions) { + return true + } + + return false +} + +// SetProjectTypeVersions gets a reference to the given []string and assigns it to the ProjectTypeVersions field. +func (o *ComponentVersion) SetProjectTypeVersions(v []string) { + o.ProjectTypeVersions = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersion) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersion) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ComponentVersion) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ComponentVersion) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ComponentVersion) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ComponentVersion) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersion) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersion) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ComponentVersion) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ComponentVersion) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ComponentVersion) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ComponentVersion) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ComponentVersion) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersion) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ComponentVersion) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ComponentVersion) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ComponentVersion) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersion) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ComponentVersion) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ComponentVersion) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ComponentVersion) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ComponentVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Version.IsSet() { + toSerialize["version"] = o.Version.Get() + } + if o.Component.IsSet() { + toSerialize["component"] = o.Component.Get() + } + if !IsNil(o.ComponentVersionEnvVar) { + toSerialize["componentVersionEnvVar"] = o.ComponentVersionEnvVar + } + if !IsNil(o.Project) { + toSerialize["project"] = o.Project + } + if !IsNil(o.EnvironmentComponent) { + toSerialize["environmentComponent"] = o.EnvironmentComponent + } + if !IsNil(o.ComponentResourceLimit) { + toSerialize["componentResourceLimit"] = o.ComponentResourceLimit + } + if !IsNil(o.ProjectTypeVersions) { + toSerialize["projectTypeVersions"] = o.ProjectTypeVersions + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableComponentVersion struct { + value *ComponentVersion + isSet bool +} + +func (v NullableComponentVersion) Get() *ComponentVersion { + return v.value +} + +func (v *NullableComponentVersion) Set(val *ComponentVersion) { + v.value = val + v.isSet = true +} + +func (v NullableComponentVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentVersion(val *ComponentVersion) *NullableComponentVersion { + return &NullableComponentVersion{value: val, isSet: true} +} + +func (v NullableComponentVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_component_version_env_var.go b/pkg/api/rewardcloud/model_component_version_env_var.go new file mode 100644 index 0000000..d7e5eb0 --- /dev/null +++ b/pkg/api/rewardcloud/model_component_version_env_var.go @@ -0,0 +1,645 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ComponentVersionEnvVar type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ComponentVersionEnvVar{} + +// ComponentVersionEnvVar Class ComponentVersionEnvVar +type ComponentVersionEnvVar struct { + ComponentVersion NullableString `json:"componentVersion,omitempty"` + ComponentVersionEnvVarExample []string `json:"componentVersionEnvVarExample,omitempty"` + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + Key NullableString `json:"key,omitempty"` + Note NullableString `json:"note,omitempty"` + IsRequired NullableBool `json:"isRequired,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarValidations []string `json:"envVarValidations,omitempty"` +} + +// NewComponentVersionEnvVar instantiates a new ComponentVersionEnvVar object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewComponentVersionEnvVar() *ComponentVersionEnvVar { + this := ComponentVersionEnvVar{} + return &this +} + +// NewComponentVersionEnvVarWithDefaults instantiates a new ComponentVersionEnvVar object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewComponentVersionEnvVarWithDefaults() *ComponentVersionEnvVar { + this := ComponentVersionEnvVar{} + return &this +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVar) GetComponentVersion() string { + if o == nil || IsNil(o.ComponentVersion.Get()) { + var ret string + return ret + } + return *o.ComponentVersion.Get() +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVar) GetComponentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ComponentVersion.Get(), o.ComponentVersion.IsSet() +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasComponentVersion() bool { + if o != nil && o.ComponentVersion.IsSet() { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given NullableString and assigns it to the ComponentVersion field. +func (o *ComponentVersionEnvVar) SetComponentVersion(v string) { + o.ComponentVersion.Set(&v) +} + +// SetComponentVersionNil sets the value for ComponentVersion to be an explicit nil +func (o *ComponentVersionEnvVar) SetComponentVersionNil() { + o.ComponentVersion.Set(nil) +} + +// UnsetComponentVersion ensures that no value is present for ComponentVersion, not even an explicit nil +func (o *ComponentVersionEnvVar) UnsetComponentVersion() { + o.ComponentVersion.Unset() +} + +// GetComponentVersionEnvVarExample returns the ComponentVersionEnvVarExample field value if set, zero value otherwise. +func (o *ComponentVersionEnvVar) GetComponentVersionEnvVarExample() []string { + if o == nil || IsNil(o.ComponentVersionEnvVarExample) { + var ret []string + return ret + } + return o.ComponentVersionEnvVarExample +} + +// GetComponentVersionEnvVarExampleOk returns a tuple with the ComponentVersionEnvVarExample field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersionEnvVar) GetComponentVersionEnvVarExampleOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentVersionEnvVarExample) { + return nil, false + } + return o.ComponentVersionEnvVarExample, true +} + +// HasComponentVersionEnvVarExample returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasComponentVersionEnvVarExample() bool { + if o != nil && !IsNil(o.ComponentVersionEnvVarExample) { + return true + } + + return false +} + +// SetComponentVersionEnvVarExample gets a reference to the given []string and assigns it to the ComponentVersionEnvVarExample field. +func (o *ComponentVersionEnvVar) SetComponentVersionEnvVarExample(v []string) { + o.ComponentVersionEnvVarExample = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ComponentVersionEnvVar) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersionEnvVar) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ComponentVersionEnvVar) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVar) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVar) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ComponentVersionEnvVar) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ComponentVersionEnvVar) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ComponentVersionEnvVar) UnsetUuid() { + o.Uuid.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVar) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVar) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ComponentVersionEnvVar) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ComponentVersionEnvVar) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ComponentVersionEnvVar) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVar) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVar) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ComponentVersionEnvVar) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ComponentVersionEnvVar) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ComponentVersionEnvVar) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ComponentVersionEnvVar) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersionEnvVar) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ComponentVersionEnvVar) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ComponentVersionEnvVar) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersionEnvVar) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ComponentVersionEnvVar) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVar) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVar) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *ComponentVersionEnvVar) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *ComponentVersionEnvVar) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *ComponentVersionEnvVar) UnsetKey() { + o.Key.Unset() +} + +// GetNote returns the Note field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVar) GetNote() string { + if o == nil || IsNil(o.Note.Get()) { + var ret string + return ret + } + return *o.Note.Get() +} + +// GetNoteOk returns a tuple with the Note field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVar) GetNoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Note.Get(), o.Note.IsSet() +} + +// HasNote returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasNote() bool { + if o != nil && o.Note.IsSet() { + return true + } + + return false +} + +// SetNote gets a reference to the given NullableString and assigns it to the Note field. +func (o *ComponentVersionEnvVar) SetNote(v string) { + o.Note.Set(&v) +} + +// SetNoteNil sets the value for Note to be an explicit nil +func (o *ComponentVersionEnvVar) SetNoteNil() { + o.Note.Set(nil) +} + +// UnsetNote ensures that no value is present for Note, not even an explicit nil +func (o *ComponentVersionEnvVar) UnsetNote() { + o.Note.Unset() +} + +// GetIsRequired returns the IsRequired field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVar) GetIsRequired() bool { + if o == nil || IsNil(o.IsRequired.Get()) { + var ret bool + return ret + } + return *o.IsRequired.Get() +} + +// GetIsRequiredOk returns a tuple with the IsRequired field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVar) GetIsRequiredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsRequired.Get(), o.IsRequired.IsSet() +} + +// HasIsRequired returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasIsRequired() bool { + if o != nil && o.IsRequired.IsSet() { + return true + } + + return false +} + +// SetIsRequired gets a reference to the given NullableBool and assigns it to the IsRequired field. +func (o *ComponentVersionEnvVar) SetIsRequired(v bool) { + o.IsRequired.Set(&v) +} + +// SetIsRequiredNil sets the value for IsRequired to be an explicit nil +func (o *ComponentVersionEnvVar) SetIsRequiredNil() { + o.IsRequired.Set(nil) +} + +// UnsetIsRequired ensures that no value is present for IsRequired, not even an explicit nil +func (o *ComponentVersionEnvVar) UnsetIsRequired() { + o.IsRequired.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVar) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVar) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *ComponentVersionEnvVar) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *ComponentVersionEnvVar) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *ComponentVersionEnvVar) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarValidations returns the EnvVarValidations field value if set, zero value otherwise. +func (o *ComponentVersionEnvVar) GetEnvVarValidations() []string { + if o == nil || IsNil(o.EnvVarValidations) { + var ret []string + return ret + } + return o.EnvVarValidations +} + +// GetEnvVarValidationsOk returns a tuple with the EnvVarValidations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersionEnvVar) GetEnvVarValidationsOk() ([]string, bool) { + if o == nil || IsNil(o.EnvVarValidations) { + return nil, false + } + return o.EnvVarValidations, true +} + +// HasEnvVarValidations returns a boolean if a field has been set. +func (o *ComponentVersionEnvVar) HasEnvVarValidations() bool { + if o != nil && !IsNil(o.EnvVarValidations) { + return true + } + + return false +} + +// SetEnvVarValidations gets a reference to the given []string and assigns it to the EnvVarValidations field. +func (o *ComponentVersionEnvVar) SetEnvVarValidations(v []string) { + o.EnvVarValidations = v +} + +func (o ComponentVersionEnvVar) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ComponentVersionEnvVar) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ComponentVersion.IsSet() { + toSerialize["componentVersion"] = o.ComponentVersion.Get() + } + if !IsNil(o.ComponentVersionEnvVarExample) { + toSerialize["componentVersionEnvVarExample"] = o.ComponentVersionEnvVarExample + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Note.IsSet() { + toSerialize["note"] = o.Note.Get() + } + if o.IsRequired.IsSet() { + toSerialize["isRequired"] = o.IsRequired.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if !IsNil(o.EnvVarValidations) { + toSerialize["envVarValidations"] = o.EnvVarValidations + } + return toSerialize, nil +} + +type NullableComponentVersionEnvVar struct { + value *ComponentVersionEnvVar + isSet bool +} + +func (v NullableComponentVersionEnvVar) Get() *ComponentVersionEnvVar { + return v.value +} + +func (v *NullableComponentVersionEnvVar) Set(val *ComponentVersionEnvVar) { + v.value = val + v.isSet = true +} + +func (v NullableComponentVersionEnvVar) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentVersionEnvVar) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentVersionEnvVar(val *ComponentVersionEnvVar) *NullableComponentVersionEnvVar { + return &NullableComponentVersionEnvVar{value: val, isSet: true} +} + +func (v NullableComponentVersionEnvVar) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentVersionEnvVar) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_component_version_env_var_example.go b/pkg/api/rewardcloud/model_component_version_env_var_example.go new file mode 100644 index 0000000..8386abf --- /dev/null +++ b/pkg/api/rewardcloud/model_component_version_env_var_example.go @@ -0,0 +1,479 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ComponentVersionEnvVarExample type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ComponentVersionEnvVarExample{} + +// ComponentVersionEnvVarExample Class ComponentVersionEnvVarExample +type ComponentVersionEnvVarExample struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Value NullableString `json:"value,omitempty"` + IsDefault NullableBool `json:"isDefault,omitempty"` + ComponentVersionEnvVar NullableString `json:"componentVersionEnvVar,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewComponentVersionEnvVarExample instantiates a new ComponentVersionEnvVarExample object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewComponentVersionEnvVarExample() *ComponentVersionEnvVarExample { + this := ComponentVersionEnvVarExample{} + return &this +} + +// NewComponentVersionEnvVarExampleWithDefaults instantiates a new ComponentVersionEnvVarExample object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewComponentVersionEnvVarExampleWithDefaults() *ComponentVersionEnvVarExample { + this := ComponentVersionEnvVarExample{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ComponentVersionEnvVarExample) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersionEnvVarExample) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ComponentVersionEnvVarExample) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ComponentVersionEnvVarExample) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVarExample) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVarExample) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ComponentVersionEnvVarExample) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ComponentVersionEnvVarExample) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ComponentVersionEnvVarExample) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ComponentVersionEnvVarExample) UnsetUuid() { + o.Uuid.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVarExample) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVarExample) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *ComponentVersionEnvVarExample) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *ComponentVersionEnvVarExample) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *ComponentVersionEnvVarExample) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *ComponentVersionEnvVarExample) UnsetValue() { + o.Value.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVarExample) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVarExample) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *ComponentVersionEnvVarExample) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *ComponentVersionEnvVarExample) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *ComponentVersionEnvVarExample) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *ComponentVersionEnvVarExample) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetComponentVersionEnvVar returns the ComponentVersionEnvVar field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVarExample) GetComponentVersionEnvVar() string { + if o == nil || IsNil(o.ComponentVersionEnvVar.Get()) { + var ret string + return ret + } + return *o.ComponentVersionEnvVar.Get() +} + +// GetComponentVersionEnvVarOk returns a tuple with the ComponentVersionEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVarExample) GetComponentVersionEnvVarOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ComponentVersionEnvVar.Get(), o.ComponentVersionEnvVar.IsSet() +} + +// HasComponentVersionEnvVar returns a boolean if a field has been set. +func (o *ComponentVersionEnvVarExample) HasComponentVersionEnvVar() bool { + if o != nil && o.ComponentVersionEnvVar.IsSet() { + return true + } + + return false +} + +// SetComponentVersionEnvVar gets a reference to the given NullableString and assigns it to the ComponentVersionEnvVar field. +func (o *ComponentVersionEnvVarExample) SetComponentVersionEnvVar(v string) { + o.ComponentVersionEnvVar.Set(&v) +} + +// SetComponentVersionEnvVarNil sets the value for ComponentVersionEnvVar to be an explicit nil +func (o *ComponentVersionEnvVarExample) SetComponentVersionEnvVarNil() { + o.ComponentVersionEnvVar.Set(nil) +} + +// UnsetComponentVersionEnvVar ensures that no value is present for ComponentVersionEnvVar, not even an explicit nil +func (o *ComponentVersionEnvVarExample) UnsetComponentVersionEnvVar() { + o.ComponentVersionEnvVar.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVarExample) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVarExample) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ComponentVersionEnvVarExample) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ComponentVersionEnvVarExample) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ComponentVersionEnvVarExample) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ComponentVersionEnvVarExample) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComponentVersionEnvVarExample) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComponentVersionEnvVarExample) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ComponentVersionEnvVarExample) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ComponentVersionEnvVarExample) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ComponentVersionEnvVarExample) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ComponentVersionEnvVarExample) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ComponentVersionEnvVarExample) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersionEnvVarExample) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ComponentVersionEnvVarExample) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ComponentVersionEnvVarExample) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ComponentVersionEnvVarExample) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentVersionEnvVarExample) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ComponentVersionEnvVarExample) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ComponentVersionEnvVarExample) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ComponentVersionEnvVarExample) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ComponentVersionEnvVarExample) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsDefault.IsSet() { + toSerialize["isDefault"] = o.IsDefault.Get() + } + if o.ComponentVersionEnvVar.IsSet() { + toSerialize["componentVersionEnvVar"] = o.ComponentVersionEnvVar.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableComponentVersionEnvVarExample struct { + value *ComponentVersionEnvVarExample + isSet bool +} + +func (v NullableComponentVersionEnvVarExample) Get() *ComponentVersionEnvVarExample { + return v.value +} + +func (v *NullableComponentVersionEnvVarExample) Set(val *ComponentVersionEnvVarExample) { + v.value = val + v.isSet = true +} + +func (v NullableComponentVersionEnvVarExample) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentVersionEnvVarExample) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentVersionEnvVarExample(val *ComponentVersionEnvVarExample) *NullableComponentVersionEnvVarExample { + return &NullableComponentVersionEnvVarExample{value: val, isSet: true} +} + +func (v NullableComponentVersionEnvVarExample) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentVersionEnvVarExample) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_credential_type.go b/pkg/api/rewardcloud/model_credential_type.go new file mode 100644 index 0000000..63a9049 --- /dev/null +++ b/pkg/api/rewardcloud/model_credential_type.go @@ -0,0 +1,468 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the CredentialType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialType{} + +// CredentialType Class CredentialType +type CredentialType struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + Git []string `json:"git,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewCredentialType instantiates a new CredentialType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCredentialType() *CredentialType { + this := CredentialType{} + return &this +} + +// NewCredentialTypeWithDefaults instantiates a new CredentialType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCredentialTypeWithDefaults() *CredentialType { + this := CredentialType{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CredentialType) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialType) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CredentialType) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *CredentialType) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CredentialType) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CredentialType) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *CredentialType) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *CredentialType) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *CredentialType) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *CredentialType) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CredentialType) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CredentialType) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *CredentialType) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *CredentialType) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *CredentialType) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *CredentialType) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CredentialType) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CredentialType) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *CredentialType) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *CredentialType) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *CredentialType) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *CredentialType) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetGit returns the Git field value if set, zero value otherwise. +func (o *CredentialType) GetGit() []string { + if o == nil || IsNil(o.Git) { + var ret []string + return ret + } + return o.Git +} + +// GetGitOk returns a tuple with the Git field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialType) GetGitOk() ([]string, bool) { + if o == nil || IsNil(o.Git) { + return nil, false + } + return o.Git, true +} + +// HasGit returns a boolean if a field has been set. +func (o *CredentialType) HasGit() bool { + if o != nil && !IsNil(o.Git) { + return true + } + + return false +} + +// SetGit gets a reference to the given []string and assigns it to the Git field. +func (o *CredentialType) SetGit(v []string) { + o.Git = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CredentialType) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CredentialType) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *CredentialType) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *CredentialType) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *CredentialType) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *CredentialType) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CredentialType) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CredentialType) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *CredentialType) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *CredentialType) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *CredentialType) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *CredentialType) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CredentialType) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialType) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CredentialType) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CredentialType) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CredentialType) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialType) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CredentialType) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CredentialType) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o CredentialType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CredentialType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if !IsNil(o.Git) { + toSerialize["git"] = o.Git + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableCredentialType struct { + value *CredentialType + isSet bool +} + +func (v NullableCredentialType) Get() *CredentialType { + return v.value +} + +func (v *NullableCredentialType) Set(val *CredentialType) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialType) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialType(val *CredentialType) *NullableCredentialType { + return &NullableCredentialType{value: val, isSet: true} +} + +func (v NullableCredentialType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_crypto_key_type.go b/pkg/api/rewardcloud/model_crypto_key_type.go new file mode 100644 index 0000000..d4a4ee7 --- /dev/null +++ b/pkg/api/rewardcloud/model_crypto_key_type.go @@ -0,0 +1,410 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the CryptoKeyType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CryptoKeyType{} + +// CryptoKeyType Class CryptoKeyType +type CryptoKeyType struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name *string `json:"name,omitempty"` + Gits []string `json:"gits,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewCryptoKeyType instantiates a new CryptoKeyType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCryptoKeyType() *CryptoKeyType { + this := CryptoKeyType{} + return &this +} + +// NewCryptoKeyTypeWithDefaults instantiates a new CryptoKeyType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCryptoKeyTypeWithDefaults() *CryptoKeyType { + this := CryptoKeyType{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CryptoKeyType) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CryptoKeyType) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CryptoKeyType) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *CryptoKeyType) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CryptoKeyType) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CryptoKeyType) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *CryptoKeyType) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *CryptoKeyType) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *CryptoKeyType) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *CryptoKeyType) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CryptoKeyType) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CryptoKeyType) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CryptoKeyType) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CryptoKeyType) SetName(v string) { + o.Name = &v +} + +// GetGits returns the Gits field value if set, zero value otherwise. +func (o *CryptoKeyType) GetGits() []string { + if o == nil || IsNil(o.Gits) { + var ret []string + return ret + } + return o.Gits +} + +// GetGitsOk returns a tuple with the Gits field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CryptoKeyType) GetGitsOk() ([]string, bool) { + if o == nil || IsNil(o.Gits) { + return nil, false + } + return o.Gits, true +} + +// HasGits returns a boolean if a field has been set. +func (o *CryptoKeyType) HasGits() bool { + if o != nil && !IsNil(o.Gits) { + return true + } + + return false +} + +// SetGits gets a reference to the given []string and assigns it to the Gits field. +func (o *CryptoKeyType) SetGits(v []string) { + o.Gits = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CryptoKeyType) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CryptoKeyType) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *CryptoKeyType) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *CryptoKeyType) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *CryptoKeyType) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *CryptoKeyType) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CryptoKeyType) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CryptoKeyType) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *CryptoKeyType) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *CryptoKeyType) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *CryptoKeyType) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *CryptoKeyType) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CryptoKeyType) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CryptoKeyType) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CryptoKeyType) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CryptoKeyType) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CryptoKeyType) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CryptoKeyType) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CryptoKeyType) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CryptoKeyType) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o CryptoKeyType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CryptoKeyType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Gits) { + toSerialize["gits"] = o.Gits + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableCryptoKeyType struct { + value *CryptoKeyType + isSet bool +} + +func (v NullableCryptoKeyType) Get() *CryptoKeyType { + return v.value +} + +func (v *NullableCryptoKeyType) Set(val *CryptoKeyType) { + v.value = val + v.isSet = true +} + +func (v NullableCryptoKeyType) IsSet() bool { + return v.isSet +} + +func (v *NullableCryptoKeyType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCryptoKeyType(val *CryptoKeyType) *NullableCryptoKeyType { + return &NullableCryptoKeyType{value: val, isSet: true} +} + +func (v NullableCryptoKeyType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCryptoKeyType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_data_transfer_data_type.go b/pkg/api/rewardcloud/model_data_transfer_data_type.go new file mode 100644 index 0000000..8072d12 --- /dev/null +++ b/pkg/api/rewardcloud/model_data_transfer_data_type.go @@ -0,0 +1,457 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the DataTransferDataType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataTransferDataType{} + +// DataTransferDataType Class DataTransferDataType +type DataTransferDataType struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + ExportedData []string `json:"exportedData,omitempty"` + ImportedData []string `json:"importedData,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewDataTransferDataType instantiates a new DataTransferDataType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDataTransferDataType() *DataTransferDataType { + this := DataTransferDataType{} + return &this +} + +// NewDataTransferDataTypeWithDefaults instantiates a new DataTransferDataType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDataTransferDataTypeWithDefaults() *DataTransferDataType { + this := DataTransferDataType{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DataTransferDataType) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataTransferDataType) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DataTransferDataType) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *DataTransferDataType) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataTransferDataType) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DataTransferDataType) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *DataTransferDataType) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *DataTransferDataType) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *DataTransferDataType) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *DataTransferDataType) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataTransferDataType) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DataTransferDataType) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *DataTransferDataType) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *DataTransferDataType) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *DataTransferDataType) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *DataTransferDataType) UnsetName() { + o.Name.Unset() +} + +// GetExportedData returns the ExportedData field value if set, zero value otherwise. +func (o *DataTransferDataType) GetExportedData() []string { + if o == nil || IsNil(o.ExportedData) { + var ret []string + return ret + } + return o.ExportedData +} + +// GetExportedDataOk returns a tuple with the ExportedData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataTransferDataType) GetExportedDataOk() ([]string, bool) { + if o == nil || IsNil(o.ExportedData) { + return nil, false + } + return o.ExportedData, true +} + +// HasExportedData returns a boolean if a field has been set. +func (o *DataTransferDataType) HasExportedData() bool { + if o != nil && !IsNil(o.ExportedData) { + return true + } + + return false +} + +// SetExportedData gets a reference to the given []string and assigns it to the ExportedData field. +func (o *DataTransferDataType) SetExportedData(v []string) { + o.ExportedData = v +} + +// GetImportedData returns the ImportedData field value if set, zero value otherwise. +func (o *DataTransferDataType) GetImportedData() []string { + if o == nil || IsNil(o.ImportedData) { + var ret []string + return ret + } + return o.ImportedData +} + +// GetImportedDataOk returns a tuple with the ImportedData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataTransferDataType) GetImportedDataOk() ([]string, bool) { + if o == nil || IsNil(o.ImportedData) { + return nil, false + } + return o.ImportedData, true +} + +// HasImportedData returns a boolean if a field has been set. +func (o *DataTransferDataType) HasImportedData() bool { + if o != nil && !IsNil(o.ImportedData) { + return true + } + + return false +} + +// SetImportedData gets a reference to the given []string and assigns it to the ImportedData field. +func (o *DataTransferDataType) SetImportedData(v []string) { + o.ImportedData = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataTransferDataType) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DataTransferDataType) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *DataTransferDataType) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *DataTransferDataType) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *DataTransferDataType) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *DataTransferDataType) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataTransferDataType) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DataTransferDataType) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *DataTransferDataType) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *DataTransferDataType) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *DataTransferDataType) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *DataTransferDataType) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DataTransferDataType) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataTransferDataType) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DataTransferDataType) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DataTransferDataType) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *DataTransferDataType) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataTransferDataType) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *DataTransferDataType) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *DataTransferDataType) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o DataTransferDataType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataTransferDataType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if !IsNil(o.ExportedData) { + toSerialize["exportedData"] = o.ExportedData + } + if !IsNil(o.ImportedData) { + toSerialize["importedData"] = o.ImportedData + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableDataTransferDataType struct { + value *DataTransferDataType + isSet bool +} + +func (v NullableDataTransferDataType) Get() *DataTransferDataType { + return v.value +} + +func (v *NullableDataTransferDataType) Set(val *DataTransferDataType) { + v.value = val + v.isSet = true +} + +func (v NullableDataTransferDataType) IsSet() bool { + return v.isSet +} + +func (v *NullableDataTransferDataType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataTransferDataType(val *DataTransferDataType) *NullableDataTransferDataType { + return &NullableDataTransferDataType{value: val, isSet: true} +} + +func (v NullableDataTransferDataType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataTransferDataType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_data_transfer_type.go b/pkg/api/rewardcloud/model_data_transfer_type.go new file mode 100644 index 0000000..ee6b737 --- /dev/null +++ b/pkg/api/rewardcloud/model_data_transfer_type.go @@ -0,0 +1,432 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the DataTransferType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataTransferType{} + +// DataTransferType Class DataTransferType +type DataTransferType struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewDataTransferType instantiates a new DataTransferType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDataTransferType() *DataTransferType { + this := DataTransferType{} + return &this +} + +// NewDataTransferTypeWithDefaults instantiates a new DataTransferType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDataTransferTypeWithDefaults() *DataTransferType { + this := DataTransferType{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DataTransferType) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataTransferType) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DataTransferType) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *DataTransferType) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataTransferType) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DataTransferType) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *DataTransferType) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *DataTransferType) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *DataTransferType) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *DataTransferType) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataTransferType) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DataTransferType) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *DataTransferType) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *DataTransferType) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *DataTransferType) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *DataTransferType) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataTransferType) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DataTransferType) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *DataTransferType) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *DataTransferType) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *DataTransferType) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *DataTransferType) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataTransferType) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DataTransferType) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *DataTransferType) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *DataTransferType) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *DataTransferType) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *DataTransferType) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataTransferType) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DataTransferType) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *DataTransferType) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *DataTransferType) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *DataTransferType) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *DataTransferType) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DataTransferType) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataTransferType) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DataTransferType) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DataTransferType) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *DataTransferType) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataTransferType) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *DataTransferType) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *DataTransferType) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o DataTransferType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataTransferType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableDataTransferType struct { + value *DataTransferType + isSet bool +} + +func (v NullableDataTransferType) Get() *DataTransferType { + return v.value +} + +func (v *NullableDataTransferType) Set(val *DataTransferType) { + v.value = val + v.isSet = true +} + +func (v NullableDataTransferType) IsSet() bool { + return v.isSet +} + +func (v *NullableDataTransferType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataTransferType(val *DataTransferType) *NullableDataTransferType { + return &NullableDataTransferType{value: val, isSet: true} +} + +func (v NullableDataTransferType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataTransferType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_env_var_type.go b/pkg/api/rewardcloud/model_env_var_type.go new file mode 100644 index 0000000..2b2fe22 --- /dev/null +++ b/pkg/api/rewardcloud/model_env_var_type.go @@ -0,0 +1,515 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvVarType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvVarType{} + +// EnvVarType Class EnvVarType +type EnvVarType struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + IsDefault NullableBool `json:"isDefault,omitempty"` + EnvVar []AbstractEnvVar `json:"envVar,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvVarType instantiates a new EnvVarType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvVarType() *EnvVarType { + this := EnvVarType{} + return &this +} + +// NewEnvVarTypeWithDefaults instantiates a new EnvVarType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvVarTypeWithDefaults() *EnvVarType { + this := EnvVarType{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvVarType) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvVarType) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvVarType) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvVarType) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarType) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarType) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvVarType) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvVarType) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvVarType) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvVarType) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarType) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarType) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *EnvVarType) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *EnvVarType) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *EnvVarType) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *EnvVarType) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarType) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarType) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *EnvVarType) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *EnvVarType) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *EnvVarType) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *EnvVarType) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarType) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarType) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *EnvVarType) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *EnvVarType) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *EnvVarType) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *EnvVarType) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetEnvVar returns the EnvVar field value if set, zero value otherwise. +func (o *EnvVarType) GetEnvVar() []AbstractEnvVar { + if o == nil || IsNil(o.EnvVar) { + var ret []AbstractEnvVar + return ret + } + return o.EnvVar +} + +// GetEnvVarOk returns a tuple with the EnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvVarType) GetEnvVarOk() ([]AbstractEnvVar, bool) { + if o == nil || IsNil(o.EnvVar) { + return nil, false + } + return o.EnvVar, true +} + +// HasEnvVar returns a boolean if a field has been set. +func (o *EnvVarType) HasEnvVar() bool { + if o != nil && !IsNil(o.EnvVar) { + return true + } + + return false +} + +// SetEnvVar gets a reference to the given []AbstractEnvVar and assigns it to the EnvVar field. +func (o *EnvVarType) SetEnvVar(v []AbstractEnvVar) { + o.EnvVar = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarType) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarType) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvVarType) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvVarType) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvVarType) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvVarType) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarType) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarType) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvVarType) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvVarType) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvVarType) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvVarType) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvVarType) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvVarType) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvVarType) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvVarType) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvVarType) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvVarType) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvVarType) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvVarType) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvVarType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvVarType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.IsDefault.IsSet() { + toSerialize["isDefault"] = o.IsDefault.Get() + } + if !IsNil(o.EnvVar) { + toSerialize["envVar"] = o.EnvVar + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvVarType struct { + value *EnvVarType + isSet bool +} + +func (v NullableEnvVarType) Get() *EnvVarType { + return v.value +} + +func (v *NullableEnvVarType) Set(val *EnvVarType) { + v.value = val + v.isSet = true +} + +func (v NullableEnvVarType) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvVarType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvVarType(val *EnvVarType) *NullableEnvVarType { + return &NullableEnvVarType{value: val, isSet: true} +} + +func (v NullableEnvVarType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvVarType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_env_var_validation.go b/pkg/api/rewardcloud/model_env_var_validation.go new file mode 100644 index 0000000..f662fbf --- /dev/null +++ b/pkg/api/rewardcloud/model_env_var_validation.go @@ -0,0 +1,479 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvVarValidation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvVarValidation{} + +// EnvVarValidation Class EnvVarValidation +type EnvVarValidation struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + Regexp NullableString `json:"regexp,omitempty"` + ValidationMessage NullableString `json:"validationMessage,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvVarValidation instantiates a new EnvVarValidation object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvVarValidation() *EnvVarValidation { + this := EnvVarValidation{} + return &this +} + +// NewEnvVarValidationWithDefaults instantiates a new EnvVarValidation object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvVarValidationWithDefaults() *EnvVarValidation { + this := EnvVarValidation{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvVarValidation) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvVarValidation) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvVarValidation) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvVarValidation) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarValidation) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarValidation) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvVarValidation) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvVarValidation) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvVarValidation) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvVarValidation) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarValidation) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarValidation) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *EnvVarValidation) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *EnvVarValidation) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *EnvVarValidation) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *EnvVarValidation) UnsetName() { + o.Name.Unset() +} + +// GetRegexp returns the Regexp field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarValidation) GetRegexp() string { + if o == nil || IsNil(o.Regexp.Get()) { + var ret string + return ret + } + return *o.Regexp.Get() +} + +// GetRegexpOk returns a tuple with the Regexp field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarValidation) GetRegexpOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Regexp.Get(), o.Regexp.IsSet() +} + +// HasRegexp returns a boolean if a field has been set. +func (o *EnvVarValidation) HasRegexp() bool { + if o != nil && o.Regexp.IsSet() { + return true + } + + return false +} + +// SetRegexp gets a reference to the given NullableString and assigns it to the Regexp field. +func (o *EnvVarValidation) SetRegexp(v string) { + o.Regexp.Set(&v) +} + +// SetRegexpNil sets the value for Regexp to be an explicit nil +func (o *EnvVarValidation) SetRegexpNil() { + o.Regexp.Set(nil) +} + +// UnsetRegexp ensures that no value is present for Regexp, not even an explicit nil +func (o *EnvVarValidation) UnsetRegexp() { + o.Regexp.Unset() +} + +// GetValidationMessage returns the ValidationMessage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarValidation) GetValidationMessage() string { + if o == nil || IsNil(o.ValidationMessage.Get()) { + var ret string + return ret + } + return *o.ValidationMessage.Get() +} + +// GetValidationMessageOk returns a tuple with the ValidationMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarValidation) GetValidationMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ValidationMessage.Get(), o.ValidationMessage.IsSet() +} + +// HasValidationMessage returns a boolean if a field has been set. +func (o *EnvVarValidation) HasValidationMessage() bool { + if o != nil && o.ValidationMessage.IsSet() { + return true + } + + return false +} + +// SetValidationMessage gets a reference to the given NullableString and assigns it to the ValidationMessage field. +func (o *EnvVarValidation) SetValidationMessage(v string) { + o.ValidationMessage.Set(&v) +} + +// SetValidationMessageNil sets the value for ValidationMessage to be an explicit nil +func (o *EnvVarValidation) SetValidationMessageNil() { + o.ValidationMessage.Set(nil) +} + +// UnsetValidationMessage ensures that no value is present for ValidationMessage, not even an explicit nil +func (o *EnvVarValidation) UnsetValidationMessage() { + o.ValidationMessage.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarValidation) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarValidation) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvVarValidation) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvVarValidation) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvVarValidation) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvVarValidation) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvVarValidation) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvVarValidation) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvVarValidation) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvVarValidation) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvVarValidation) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvVarValidation) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvVarValidation) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvVarValidation) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvVarValidation) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvVarValidation) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvVarValidation) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvVarValidation) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvVarValidation) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvVarValidation) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvVarValidation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvVarValidation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.Regexp.IsSet() { + toSerialize["regexp"] = o.Regexp.Get() + } + if o.ValidationMessage.IsSet() { + toSerialize["validationMessage"] = o.ValidationMessage.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvVarValidation struct { + value *EnvVarValidation + isSet bool +} + +func (v NullableEnvVarValidation) Get() *EnvVarValidation { + return v.value +} + +func (v *NullableEnvVarValidation) Set(val *EnvVarValidation) { + v.value = val + v.isSet = true +} + +func (v NullableEnvVarValidation) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvVarValidation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvVarValidation(val *EnvVarValidation) *NullableEnvVarValidation { + return &NullableEnvVarValidation{value: val, isSet: true} +} + +func (v NullableEnvVarValidation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvVarValidation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_access.go b/pkg/api/rewardcloud/model_environment_access.go new file mode 100644 index 0000000..fa6c779 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_access.go @@ -0,0 +1,761 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentAccess type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentAccess{} + +// EnvironmentAccess Class EnvironmentAccess +type EnvironmentAccess struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Environment NullableString `json:"environment,omitempty"` + Frontend NullableString `json:"frontend,omitempty"` + Backend NullableString `json:"backend,omitempty"` + Database NullableString `json:"database,omitempty"` + DevTools NullableString `json:"devTools,omitempty"` + Redis NullableString `json:"redis,omitempty"` + Rabbit NullableString `json:"rabbit,omitempty"` + Mailbox NullableString `json:"mailbox,omitempty"` + Webshell NullableString `json:"webshell,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentAccess instantiates a new EnvironmentAccess object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentAccess() *EnvironmentAccess { + this := EnvironmentAccess{} + return &this +} + +// NewEnvironmentAccessWithDefaults instantiates a new EnvironmentAccess object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentAccessWithDefaults() *EnvironmentAccess { + this := EnvironmentAccess{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentAccess) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccess) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentAccess) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentAccess) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentAccess) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentAccess) UnsetUuid() { + o.Uuid.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetEnvironment() string { + if o == nil || IsNil(o.Environment.Get()) { + var ret string + return ret + } + return *o.Environment.Get() +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Environment.Get(), o.Environment.IsSet() +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasEnvironment() bool { + if o != nil && o.Environment.IsSet() { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given NullableString and assigns it to the Environment field. +func (o *EnvironmentAccess) SetEnvironment(v string) { + o.Environment.Set(&v) +} + +// SetEnvironmentNil sets the value for Environment to be an explicit nil +func (o *EnvironmentAccess) SetEnvironmentNil() { + o.Environment.Set(nil) +} + +// UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil +func (o *EnvironmentAccess) UnsetEnvironment() { + o.Environment.Unset() +} + +// GetFrontend returns the Frontend field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetFrontend() string { + if o == nil || IsNil(o.Frontend.Get()) { + var ret string + return ret + } + return *o.Frontend.Get() +} + +// GetFrontendOk returns a tuple with the Frontend field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetFrontendOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Frontend.Get(), o.Frontend.IsSet() +} + +// HasFrontend returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasFrontend() bool { + if o != nil && o.Frontend.IsSet() { + return true + } + + return false +} + +// SetFrontend gets a reference to the given NullableString and assigns it to the Frontend field. +func (o *EnvironmentAccess) SetFrontend(v string) { + o.Frontend.Set(&v) +} + +// SetFrontendNil sets the value for Frontend to be an explicit nil +func (o *EnvironmentAccess) SetFrontendNil() { + o.Frontend.Set(nil) +} + +// UnsetFrontend ensures that no value is present for Frontend, not even an explicit nil +func (o *EnvironmentAccess) UnsetFrontend() { + o.Frontend.Unset() +} + +// GetBackend returns the Backend field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetBackend() string { + if o == nil || IsNil(o.Backend.Get()) { + var ret string + return ret + } + return *o.Backend.Get() +} + +// GetBackendOk returns a tuple with the Backend field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetBackendOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Backend.Get(), o.Backend.IsSet() +} + +// HasBackend returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasBackend() bool { + if o != nil && o.Backend.IsSet() { + return true + } + + return false +} + +// SetBackend gets a reference to the given NullableString and assigns it to the Backend field. +func (o *EnvironmentAccess) SetBackend(v string) { + o.Backend.Set(&v) +} + +// SetBackendNil sets the value for Backend to be an explicit nil +func (o *EnvironmentAccess) SetBackendNil() { + o.Backend.Set(nil) +} + +// UnsetBackend ensures that no value is present for Backend, not even an explicit nil +func (o *EnvironmentAccess) UnsetBackend() { + o.Backend.Unset() +} + +// GetDatabase returns the Database field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetDatabase() string { + if o == nil || IsNil(o.Database.Get()) { + var ret string + return ret + } + return *o.Database.Get() +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetDatabaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Database.Get(), o.Database.IsSet() +} + +// HasDatabase returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasDatabase() bool { + if o != nil && o.Database.IsSet() { + return true + } + + return false +} + +// SetDatabase gets a reference to the given NullableString and assigns it to the Database field. +func (o *EnvironmentAccess) SetDatabase(v string) { + o.Database.Set(&v) +} + +// SetDatabaseNil sets the value for Database to be an explicit nil +func (o *EnvironmentAccess) SetDatabaseNil() { + o.Database.Set(nil) +} + +// UnsetDatabase ensures that no value is present for Database, not even an explicit nil +func (o *EnvironmentAccess) UnsetDatabase() { + o.Database.Unset() +} + +// GetDevTools returns the DevTools field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetDevTools() string { + if o == nil || IsNil(o.DevTools.Get()) { + var ret string + return ret + } + return *o.DevTools.Get() +} + +// GetDevToolsOk returns a tuple with the DevTools field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetDevToolsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DevTools.Get(), o.DevTools.IsSet() +} + +// HasDevTools returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasDevTools() bool { + if o != nil && o.DevTools.IsSet() { + return true + } + + return false +} + +// SetDevTools gets a reference to the given NullableString and assigns it to the DevTools field. +func (o *EnvironmentAccess) SetDevTools(v string) { + o.DevTools.Set(&v) +} + +// SetDevToolsNil sets the value for DevTools to be an explicit nil +func (o *EnvironmentAccess) SetDevToolsNil() { + o.DevTools.Set(nil) +} + +// UnsetDevTools ensures that no value is present for DevTools, not even an explicit nil +func (o *EnvironmentAccess) UnsetDevTools() { + o.DevTools.Unset() +} + +// GetRedis returns the Redis field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetRedis() string { + if o == nil || IsNil(o.Redis.Get()) { + var ret string + return ret + } + return *o.Redis.Get() +} + +// GetRedisOk returns a tuple with the Redis field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetRedisOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Redis.Get(), o.Redis.IsSet() +} + +// HasRedis returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasRedis() bool { + if o != nil && o.Redis.IsSet() { + return true + } + + return false +} + +// SetRedis gets a reference to the given NullableString and assigns it to the Redis field. +func (o *EnvironmentAccess) SetRedis(v string) { + o.Redis.Set(&v) +} + +// SetRedisNil sets the value for Redis to be an explicit nil +func (o *EnvironmentAccess) SetRedisNil() { + o.Redis.Set(nil) +} + +// UnsetRedis ensures that no value is present for Redis, not even an explicit nil +func (o *EnvironmentAccess) UnsetRedis() { + o.Redis.Unset() +} + +// GetRabbit returns the Rabbit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetRabbit() string { + if o == nil || IsNil(o.Rabbit.Get()) { + var ret string + return ret + } + return *o.Rabbit.Get() +} + +// GetRabbitOk returns a tuple with the Rabbit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetRabbitOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Rabbit.Get(), o.Rabbit.IsSet() +} + +// HasRabbit returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasRabbit() bool { + if o != nil && o.Rabbit.IsSet() { + return true + } + + return false +} + +// SetRabbit gets a reference to the given NullableString and assigns it to the Rabbit field. +func (o *EnvironmentAccess) SetRabbit(v string) { + o.Rabbit.Set(&v) +} + +// SetRabbitNil sets the value for Rabbit to be an explicit nil +func (o *EnvironmentAccess) SetRabbitNil() { + o.Rabbit.Set(nil) +} + +// UnsetRabbit ensures that no value is present for Rabbit, not even an explicit nil +func (o *EnvironmentAccess) UnsetRabbit() { + o.Rabbit.Unset() +} + +// GetMailbox returns the Mailbox field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetMailbox() string { + if o == nil || IsNil(o.Mailbox.Get()) { + var ret string + return ret + } + return *o.Mailbox.Get() +} + +// GetMailboxOk returns a tuple with the Mailbox field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetMailboxOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Mailbox.Get(), o.Mailbox.IsSet() +} + +// HasMailbox returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasMailbox() bool { + if o != nil && o.Mailbox.IsSet() { + return true + } + + return false +} + +// SetMailbox gets a reference to the given NullableString and assigns it to the Mailbox field. +func (o *EnvironmentAccess) SetMailbox(v string) { + o.Mailbox.Set(&v) +} + +// SetMailboxNil sets the value for Mailbox to be an explicit nil +func (o *EnvironmentAccess) SetMailboxNil() { + o.Mailbox.Set(nil) +} + +// UnsetMailbox ensures that no value is present for Mailbox, not even an explicit nil +func (o *EnvironmentAccess) UnsetMailbox() { + o.Mailbox.Unset() +} + +// GetWebshell returns the Webshell field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetWebshell() string { + if o == nil || IsNil(o.Webshell.Get()) { + var ret string + return ret + } + return *o.Webshell.Get() +} + +// GetWebshellOk returns a tuple with the Webshell field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetWebshellOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Webshell.Get(), o.Webshell.IsSet() +} + +// HasWebshell returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasWebshell() bool { + if o != nil && o.Webshell.IsSet() { + return true + } + + return false +} + +// SetWebshell gets a reference to the given NullableString and assigns it to the Webshell field. +func (o *EnvironmentAccess) SetWebshell(v string) { + o.Webshell.Set(&v) +} + +// SetWebshellNil sets the value for Webshell to be an explicit nil +func (o *EnvironmentAccess) SetWebshellNil() { + o.Webshell.Set(nil) +} + +// UnsetWebshell ensures that no value is present for Webshell, not even an explicit nil +func (o *EnvironmentAccess) UnsetWebshell() { + o.Webshell.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentAccess) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentAccess) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentAccess) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccess) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccess) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentAccess) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentAccess) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentAccess) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccess) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccess) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentAccess) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccess) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccess) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccess) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentAccess) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentAccess) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentAccess) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Environment.IsSet() { + toSerialize["environment"] = o.Environment.Get() + } + if o.Frontend.IsSet() { + toSerialize["frontend"] = o.Frontend.Get() + } + if o.Backend.IsSet() { + toSerialize["backend"] = o.Backend.Get() + } + if o.Database.IsSet() { + toSerialize["database"] = o.Database.Get() + } + if o.DevTools.IsSet() { + toSerialize["devTools"] = o.DevTools.Get() + } + if o.Redis.IsSet() { + toSerialize["redis"] = o.Redis.Get() + } + if o.Rabbit.IsSet() { + toSerialize["rabbit"] = o.Rabbit.Get() + } + if o.Mailbox.IsSet() { + toSerialize["mailbox"] = o.Mailbox.Get() + } + if o.Webshell.IsSet() { + toSerialize["webshell"] = o.Webshell.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentAccess struct { + value *EnvironmentAccess + isSet bool +} + +func (v NullableEnvironmentAccess) Get() *EnvironmentAccess { + return v.value +} + +func (v *NullableEnvironmentAccess) Set(val *EnvironmentAccess) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentAccess) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentAccess) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentAccess(val *EnvironmentAccess) *NullableEnvironmentAccess { + return &NullableEnvironmentAccess{value: val, isSet: true} +} + +func (v NullableEnvironmentAccess) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentAccess) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_access_all_data_response.go b/pkg/api/rewardcloud/model_environment_access_all_data_response.go new file mode 100644 index 0000000..02b0a17 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_access_all_data_response.go @@ -0,0 +1,88 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentAccessAllDataResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentAccessAllDataResponse{} + +// EnvironmentAccessAllDataResponse struct for EnvironmentAccessAllDataResponse +type EnvironmentAccessAllDataResponse struct { +} + +// NewEnvironmentAccessAllDataResponse instantiates a new EnvironmentAccessAllDataResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentAccessAllDataResponse() *EnvironmentAccessAllDataResponse { + this := EnvironmentAccessAllDataResponse{} + return &this +} + +// NewEnvironmentAccessAllDataResponseWithDefaults instantiates a new EnvironmentAccessAllDataResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentAccessAllDataResponseWithDefaults() *EnvironmentAccessAllDataResponse { + this := EnvironmentAccessAllDataResponse{} + return &this +} + +func (o EnvironmentAccessAllDataResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentAccessAllDataResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + return toSerialize, nil +} + +type NullableEnvironmentAccessAllDataResponse struct { + value *EnvironmentAccessAllDataResponse + isSet bool +} + +func (v NullableEnvironmentAccessAllDataResponse) Get() *EnvironmentAccessAllDataResponse { + return v.value +} + +func (v *NullableEnvironmentAccessAllDataResponse) Set(val *EnvironmentAccessAllDataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentAccessAllDataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentAccessAllDataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentAccessAllDataResponse(val *EnvironmentAccessAllDataResponse) *NullableEnvironmentAccessAllDataResponse { + return &NullableEnvironmentAccessAllDataResponse{value: val, isSet: true} +} + +func (v NullableEnvironmentAccessAllDataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentAccessAllDataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_access_backend.go b/pkg/api/rewardcloud/model_environment_access_backend.go new file mode 100644 index 0000000..10a19b3 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_access_backend.go @@ -0,0 +1,526 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentAccessBackend type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentAccessBackend{} + +// EnvironmentAccessBackend Class EnvironmentAccessBackend +type EnvironmentAccessBackend struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Url NullableString `json:"url,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` + EnvironmentAccess NullableString `json:"environmentAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentAccessBackend instantiates a new EnvironmentAccessBackend object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentAccessBackend() *EnvironmentAccessBackend { + this := EnvironmentAccessBackend{} + return &this +} + +// NewEnvironmentAccessBackendWithDefaults instantiates a new EnvironmentAccessBackend object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentAccessBackendWithDefaults() *EnvironmentAccessBackend { + this := EnvironmentAccessBackend{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentAccessBackend) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessBackend) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentAccessBackend) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentAccessBackend) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessBackend) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessBackend) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentAccessBackend) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentAccessBackend) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentAccessBackend) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentAccessBackend) UnsetUuid() { + o.Uuid.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessBackend) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessBackend) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *EnvironmentAccessBackend) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *EnvironmentAccessBackend) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *EnvironmentAccessBackend) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *EnvironmentAccessBackend) UnsetUrl() { + o.Url.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessBackend) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessBackend) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *EnvironmentAccessBackend) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *EnvironmentAccessBackend) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *EnvironmentAccessBackend) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *EnvironmentAccessBackend) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessBackend) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessBackend) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *EnvironmentAccessBackend) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *EnvironmentAccessBackend) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *EnvironmentAccessBackend) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *EnvironmentAccessBackend) UnsetPassword() { + o.Password.Unset() +} + +// GetEnvironmentAccess returns the EnvironmentAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessBackend) GetEnvironmentAccess() string { + if o == nil || IsNil(o.EnvironmentAccess.Get()) { + var ret string + return ret + } + return *o.EnvironmentAccess.Get() +} + +// GetEnvironmentAccessOk returns a tuple with the EnvironmentAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessBackend) GetEnvironmentAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentAccess.Get(), o.EnvironmentAccess.IsSet() +} + +// HasEnvironmentAccess returns a boolean if a field has been set. +func (o *EnvironmentAccessBackend) HasEnvironmentAccess() bool { + if o != nil && o.EnvironmentAccess.IsSet() { + return true + } + + return false +} + +// SetEnvironmentAccess gets a reference to the given NullableString and assigns it to the EnvironmentAccess field. +func (o *EnvironmentAccessBackend) SetEnvironmentAccess(v string) { + o.EnvironmentAccess.Set(&v) +} + +// SetEnvironmentAccessNil sets the value for EnvironmentAccess to be an explicit nil +func (o *EnvironmentAccessBackend) SetEnvironmentAccessNil() { + o.EnvironmentAccess.Set(nil) +} + +// UnsetEnvironmentAccess ensures that no value is present for EnvironmentAccess, not even an explicit nil +func (o *EnvironmentAccessBackend) UnsetEnvironmentAccess() { + o.EnvironmentAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessBackend) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessBackend) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessBackend) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentAccessBackend) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentAccessBackend) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentAccessBackend) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessBackend) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessBackend) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessBackend) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentAccessBackend) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentAccessBackend) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentAccessBackend) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessBackend) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessBackend) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessBackend) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentAccessBackend) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessBackend) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessBackend) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessBackend) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentAccessBackend) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentAccessBackend) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentAccessBackend) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.EnvironmentAccess.IsSet() { + toSerialize["environmentAccess"] = o.EnvironmentAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentAccessBackend struct { + value *EnvironmentAccessBackend + isSet bool +} + +func (v NullableEnvironmentAccessBackend) Get() *EnvironmentAccessBackend { + return v.value +} + +func (v *NullableEnvironmentAccessBackend) Set(val *EnvironmentAccessBackend) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentAccessBackend) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentAccessBackend) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentAccessBackend(val *EnvironmentAccessBackend) *NullableEnvironmentAccessBackend { + return &NullableEnvironmentAccessBackend{value: val, isSet: true} +} + +func (v NullableEnvironmentAccessBackend) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentAccessBackend) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_access_database.go b/pkg/api/rewardcloud/model_environment_access_database.go new file mode 100644 index 0000000..a674c87 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_access_database.go @@ -0,0 +1,714 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentAccessDatabase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentAccessDatabase{} + +// EnvironmentAccessDatabase Class EnvironmentAccessDatabase +type EnvironmentAccessDatabase struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Url NullableString `json:"url,omitempty"` + Host NullableString `json:"host,omitempty"` + Port NullableInt32 `json:"port,omitempty"` + Scheme NullableString `json:"scheme,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` + RootPassword NullableString `json:"rootPassword,omitempty"` + EnvironmentAccess NullableString `json:"environmentAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentAccessDatabase instantiates a new EnvironmentAccessDatabase object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentAccessDatabase() *EnvironmentAccessDatabase { + this := EnvironmentAccessDatabase{} + return &this +} + +// NewEnvironmentAccessDatabaseWithDefaults instantiates a new EnvironmentAccessDatabase object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentAccessDatabaseWithDefaults() *EnvironmentAccessDatabase { + this := EnvironmentAccessDatabase{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentAccessDatabase) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessDatabase) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentAccessDatabase) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentAccessDatabase) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentAccessDatabase) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetUuid() { + o.Uuid.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *EnvironmentAccessDatabase) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *EnvironmentAccessDatabase) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetUrl() { + o.Url.Unset() +} + +// GetHost returns the Host field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetHost() string { + if o == nil || IsNil(o.Host.Get()) { + var ret string + return ret + } + return *o.Host.Get() +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetHostOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Host.Get(), o.Host.IsSet() +} + +// HasHost returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasHost() bool { + if o != nil && o.Host.IsSet() { + return true + } + + return false +} + +// SetHost gets a reference to the given NullableString and assigns it to the Host field. +func (o *EnvironmentAccessDatabase) SetHost(v string) { + o.Host.Set(&v) +} + +// SetHostNil sets the value for Host to be an explicit nil +func (o *EnvironmentAccessDatabase) SetHostNil() { + o.Host.Set(nil) +} + +// UnsetHost ensures that no value is present for Host, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetHost() { + o.Host.Unset() +} + +// GetPort returns the Port field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetPort() int32 { + if o == nil || IsNil(o.Port.Get()) { + var ret int32 + return ret + } + return *o.Port.Get() +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Port.Get(), o.Port.IsSet() +} + +// HasPort returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasPort() bool { + if o != nil && o.Port.IsSet() { + return true + } + + return false +} + +// SetPort gets a reference to the given NullableInt32 and assigns it to the Port field. +func (o *EnvironmentAccessDatabase) SetPort(v int32) { + o.Port.Set(&v) +} + +// SetPortNil sets the value for Port to be an explicit nil +func (o *EnvironmentAccessDatabase) SetPortNil() { + o.Port.Set(nil) +} + +// UnsetPort ensures that no value is present for Port, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetPort() { + o.Port.Unset() +} + +// GetScheme returns the Scheme field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetScheme() string { + if o == nil || IsNil(o.Scheme.Get()) { + var ret string + return ret + } + return *o.Scheme.Get() +} + +// GetSchemeOk returns a tuple with the Scheme field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetSchemeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Scheme.Get(), o.Scheme.IsSet() +} + +// HasScheme returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasScheme() bool { + if o != nil && o.Scheme.IsSet() { + return true + } + + return false +} + +// SetScheme gets a reference to the given NullableString and assigns it to the Scheme field. +func (o *EnvironmentAccessDatabase) SetScheme(v string) { + o.Scheme.Set(&v) +} + +// SetSchemeNil sets the value for Scheme to be an explicit nil +func (o *EnvironmentAccessDatabase) SetSchemeNil() { + o.Scheme.Set(nil) +} + +// UnsetScheme ensures that no value is present for Scheme, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetScheme() { + o.Scheme.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *EnvironmentAccessDatabase) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *EnvironmentAccessDatabase) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *EnvironmentAccessDatabase) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *EnvironmentAccessDatabase) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetPassword() { + o.Password.Unset() +} + +// GetRootPassword returns the RootPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetRootPassword() string { + if o == nil || IsNil(o.RootPassword.Get()) { + var ret string + return ret + } + return *o.RootPassword.Get() +} + +// GetRootPasswordOk returns a tuple with the RootPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetRootPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RootPassword.Get(), o.RootPassword.IsSet() +} + +// HasRootPassword returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasRootPassword() bool { + if o != nil && o.RootPassword.IsSet() { + return true + } + + return false +} + +// SetRootPassword gets a reference to the given NullableString and assigns it to the RootPassword field. +func (o *EnvironmentAccessDatabase) SetRootPassword(v string) { + o.RootPassword.Set(&v) +} + +// SetRootPasswordNil sets the value for RootPassword to be an explicit nil +func (o *EnvironmentAccessDatabase) SetRootPasswordNil() { + o.RootPassword.Set(nil) +} + +// UnsetRootPassword ensures that no value is present for RootPassword, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetRootPassword() { + o.RootPassword.Unset() +} + +// GetEnvironmentAccess returns the EnvironmentAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetEnvironmentAccess() string { + if o == nil || IsNil(o.EnvironmentAccess.Get()) { + var ret string + return ret + } + return *o.EnvironmentAccess.Get() +} + +// GetEnvironmentAccessOk returns a tuple with the EnvironmentAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetEnvironmentAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentAccess.Get(), o.EnvironmentAccess.IsSet() +} + +// HasEnvironmentAccess returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasEnvironmentAccess() bool { + if o != nil && o.EnvironmentAccess.IsSet() { + return true + } + + return false +} + +// SetEnvironmentAccess gets a reference to the given NullableString and assigns it to the EnvironmentAccess field. +func (o *EnvironmentAccessDatabase) SetEnvironmentAccess(v string) { + o.EnvironmentAccess.Set(&v) +} + +// SetEnvironmentAccessNil sets the value for EnvironmentAccess to be an explicit nil +func (o *EnvironmentAccessDatabase) SetEnvironmentAccessNil() { + o.EnvironmentAccess.Set(nil) +} + +// UnsetEnvironmentAccess ensures that no value is present for EnvironmentAccess, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetEnvironmentAccess() { + o.EnvironmentAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentAccessDatabase) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentAccessDatabase) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDatabase) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDatabase) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentAccessDatabase) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentAccessDatabase) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentAccessDatabase) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessDatabase) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessDatabase) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentAccessDatabase) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessDatabase) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessDatabase) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessDatabase) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentAccessDatabase) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentAccessDatabase) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentAccessDatabase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.Host.IsSet() { + toSerialize["host"] = o.Host.Get() + } + if o.Port.IsSet() { + toSerialize["port"] = o.Port.Get() + } + if o.Scheme.IsSet() { + toSerialize["scheme"] = o.Scheme.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.RootPassword.IsSet() { + toSerialize["rootPassword"] = o.RootPassword.Get() + } + if o.EnvironmentAccess.IsSet() { + toSerialize["environmentAccess"] = o.EnvironmentAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentAccessDatabase struct { + value *EnvironmentAccessDatabase + isSet bool +} + +func (v NullableEnvironmentAccessDatabase) Get() *EnvironmentAccessDatabase { + return v.value +} + +func (v *NullableEnvironmentAccessDatabase) Set(val *EnvironmentAccessDatabase) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentAccessDatabase) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentAccessDatabase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentAccessDatabase(val *EnvironmentAccessDatabase) *NullableEnvironmentAccessDatabase { + return &NullableEnvironmentAccessDatabase{value: val, isSet: true} +} + +func (v NullableEnvironmentAccessDatabase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentAccessDatabase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_access_dev_tools.go b/pkg/api/rewardcloud/model_environment_access_dev_tools.go new file mode 100644 index 0000000..1ab355d --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_access_dev_tools.go @@ -0,0 +1,526 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentAccessDevTools type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentAccessDevTools{} + +// EnvironmentAccessDevTools Class EnvironmentAccessDevTools +type EnvironmentAccessDevTools struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Url NullableString `json:"url,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` + EnvironmentAccess NullableString `json:"environmentAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentAccessDevTools instantiates a new EnvironmentAccessDevTools object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentAccessDevTools() *EnvironmentAccessDevTools { + this := EnvironmentAccessDevTools{} + return &this +} + +// NewEnvironmentAccessDevToolsWithDefaults instantiates a new EnvironmentAccessDevTools object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentAccessDevToolsWithDefaults() *EnvironmentAccessDevTools { + this := EnvironmentAccessDevTools{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentAccessDevTools) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessDevTools) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentAccessDevTools) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentAccessDevTools) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDevTools) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDevTools) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentAccessDevTools) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentAccessDevTools) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentAccessDevTools) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentAccessDevTools) UnsetUuid() { + o.Uuid.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDevTools) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDevTools) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *EnvironmentAccessDevTools) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *EnvironmentAccessDevTools) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *EnvironmentAccessDevTools) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *EnvironmentAccessDevTools) UnsetUrl() { + o.Url.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDevTools) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDevTools) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *EnvironmentAccessDevTools) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *EnvironmentAccessDevTools) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *EnvironmentAccessDevTools) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *EnvironmentAccessDevTools) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDevTools) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDevTools) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *EnvironmentAccessDevTools) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *EnvironmentAccessDevTools) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *EnvironmentAccessDevTools) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *EnvironmentAccessDevTools) UnsetPassword() { + o.Password.Unset() +} + +// GetEnvironmentAccess returns the EnvironmentAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDevTools) GetEnvironmentAccess() string { + if o == nil || IsNil(o.EnvironmentAccess.Get()) { + var ret string + return ret + } + return *o.EnvironmentAccess.Get() +} + +// GetEnvironmentAccessOk returns a tuple with the EnvironmentAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDevTools) GetEnvironmentAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentAccess.Get(), o.EnvironmentAccess.IsSet() +} + +// HasEnvironmentAccess returns a boolean if a field has been set. +func (o *EnvironmentAccessDevTools) HasEnvironmentAccess() bool { + if o != nil && o.EnvironmentAccess.IsSet() { + return true + } + + return false +} + +// SetEnvironmentAccess gets a reference to the given NullableString and assigns it to the EnvironmentAccess field. +func (o *EnvironmentAccessDevTools) SetEnvironmentAccess(v string) { + o.EnvironmentAccess.Set(&v) +} + +// SetEnvironmentAccessNil sets the value for EnvironmentAccess to be an explicit nil +func (o *EnvironmentAccessDevTools) SetEnvironmentAccessNil() { + o.EnvironmentAccess.Set(nil) +} + +// UnsetEnvironmentAccess ensures that no value is present for EnvironmentAccess, not even an explicit nil +func (o *EnvironmentAccessDevTools) UnsetEnvironmentAccess() { + o.EnvironmentAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDevTools) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDevTools) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessDevTools) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentAccessDevTools) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentAccessDevTools) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentAccessDevTools) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessDevTools) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessDevTools) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessDevTools) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentAccessDevTools) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentAccessDevTools) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentAccessDevTools) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessDevTools) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessDevTools) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessDevTools) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentAccessDevTools) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessDevTools) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessDevTools) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessDevTools) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentAccessDevTools) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentAccessDevTools) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentAccessDevTools) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.EnvironmentAccess.IsSet() { + toSerialize["environmentAccess"] = o.EnvironmentAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentAccessDevTools struct { + value *EnvironmentAccessDevTools + isSet bool +} + +func (v NullableEnvironmentAccessDevTools) Get() *EnvironmentAccessDevTools { + return v.value +} + +func (v *NullableEnvironmentAccessDevTools) Set(val *EnvironmentAccessDevTools) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentAccessDevTools) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentAccessDevTools) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentAccessDevTools(val *EnvironmentAccessDevTools) *NullableEnvironmentAccessDevTools { + return &NullableEnvironmentAccessDevTools{value: val, isSet: true} +} + +func (v NullableEnvironmentAccessDevTools) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentAccessDevTools) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_access_frontend.go b/pkg/api/rewardcloud/model_environment_access_frontend.go new file mode 100644 index 0000000..f67d56d --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_access_frontend.go @@ -0,0 +1,526 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentAccessFrontend type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentAccessFrontend{} + +// EnvironmentAccessFrontend Class EnvironmentAccessFrontend +type EnvironmentAccessFrontend struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Domain NullableString `json:"domain,omitempty"` + Path NullableString `json:"path,omitempty"` + Url NullableString `json:"url,omitempty"` + EnvironmentAccess NullableString `json:"environmentAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentAccessFrontend instantiates a new EnvironmentAccessFrontend object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentAccessFrontend() *EnvironmentAccessFrontend { + this := EnvironmentAccessFrontend{} + return &this +} + +// NewEnvironmentAccessFrontendWithDefaults instantiates a new EnvironmentAccessFrontend object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentAccessFrontendWithDefaults() *EnvironmentAccessFrontend { + this := EnvironmentAccessFrontend{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentAccessFrontend) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessFrontend) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentAccessFrontend) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentAccessFrontend) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessFrontend) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessFrontend) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentAccessFrontend) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentAccessFrontend) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentAccessFrontend) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentAccessFrontend) UnsetUuid() { + o.Uuid.Unset() +} + +// GetDomain returns the Domain field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessFrontend) GetDomain() string { + if o == nil || IsNil(o.Domain.Get()) { + var ret string + return ret + } + return *o.Domain.Get() +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessFrontend) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Domain.Get(), o.Domain.IsSet() +} + +// HasDomain returns a boolean if a field has been set. +func (o *EnvironmentAccessFrontend) HasDomain() bool { + if o != nil && o.Domain.IsSet() { + return true + } + + return false +} + +// SetDomain gets a reference to the given NullableString and assigns it to the Domain field. +func (o *EnvironmentAccessFrontend) SetDomain(v string) { + o.Domain.Set(&v) +} + +// SetDomainNil sets the value for Domain to be an explicit nil +func (o *EnvironmentAccessFrontend) SetDomainNil() { + o.Domain.Set(nil) +} + +// UnsetDomain ensures that no value is present for Domain, not even an explicit nil +func (o *EnvironmentAccessFrontend) UnsetDomain() { + o.Domain.Unset() +} + +// GetPath returns the Path field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessFrontend) GetPath() string { + if o == nil || IsNil(o.Path.Get()) { + var ret string + return ret + } + return *o.Path.Get() +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessFrontend) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Path.Get(), o.Path.IsSet() +} + +// HasPath returns a boolean if a field has been set. +func (o *EnvironmentAccessFrontend) HasPath() bool { + if o != nil && o.Path.IsSet() { + return true + } + + return false +} + +// SetPath gets a reference to the given NullableString and assigns it to the Path field. +func (o *EnvironmentAccessFrontend) SetPath(v string) { + o.Path.Set(&v) +} + +// SetPathNil sets the value for Path to be an explicit nil +func (o *EnvironmentAccessFrontend) SetPathNil() { + o.Path.Set(nil) +} + +// UnsetPath ensures that no value is present for Path, not even an explicit nil +func (o *EnvironmentAccessFrontend) UnsetPath() { + o.Path.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessFrontend) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessFrontend) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *EnvironmentAccessFrontend) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *EnvironmentAccessFrontend) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *EnvironmentAccessFrontend) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *EnvironmentAccessFrontend) UnsetUrl() { + o.Url.Unset() +} + +// GetEnvironmentAccess returns the EnvironmentAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessFrontend) GetEnvironmentAccess() string { + if o == nil || IsNil(o.EnvironmentAccess.Get()) { + var ret string + return ret + } + return *o.EnvironmentAccess.Get() +} + +// GetEnvironmentAccessOk returns a tuple with the EnvironmentAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessFrontend) GetEnvironmentAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentAccess.Get(), o.EnvironmentAccess.IsSet() +} + +// HasEnvironmentAccess returns a boolean if a field has been set. +func (o *EnvironmentAccessFrontend) HasEnvironmentAccess() bool { + if o != nil && o.EnvironmentAccess.IsSet() { + return true + } + + return false +} + +// SetEnvironmentAccess gets a reference to the given NullableString and assigns it to the EnvironmentAccess field. +func (o *EnvironmentAccessFrontend) SetEnvironmentAccess(v string) { + o.EnvironmentAccess.Set(&v) +} + +// SetEnvironmentAccessNil sets the value for EnvironmentAccess to be an explicit nil +func (o *EnvironmentAccessFrontend) SetEnvironmentAccessNil() { + o.EnvironmentAccess.Set(nil) +} + +// UnsetEnvironmentAccess ensures that no value is present for EnvironmentAccess, not even an explicit nil +func (o *EnvironmentAccessFrontend) UnsetEnvironmentAccess() { + o.EnvironmentAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessFrontend) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessFrontend) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessFrontend) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentAccessFrontend) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentAccessFrontend) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentAccessFrontend) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessFrontend) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessFrontend) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessFrontend) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentAccessFrontend) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentAccessFrontend) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentAccessFrontend) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessFrontend) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessFrontend) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessFrontend) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentAccessFrontend) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessFrontend) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessFrontend) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessFrontend) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentAccessFrontend) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentAccessFrontend) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentAccessFrontend) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Domain.IsSet() { + toSerialize["domain"] = o.Domain.Get() + } + if o.Path.IsSet() { + toSerialize["path"] = o.Path.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.EnvironmentAccess.IsSet() { + toSerialize["environmentAccess"] = o.EnvironmentAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentAccessFrontend struct { + value *EnvironmentAccessFrontend + isSet bool +} + +func (v NullableEnvironmentAccessFrontend) Get() *EnvironmentAccessFrontend { + return v.value +} + +func (v *NullableEnvironmentAccessFrontend) Set(val *EnvironmentAccessFrontend) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentAccessFrontend) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentAccessFrontend) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentAccessFrontend(val *EnvironmentAccessFrontend) *NullableEnvironmentAccessFrontend { + return &NullableEnvironmentAccessFrontend{value: val, isSet: true} +} + +func (v NullableEnvironmentAccessFrontend) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentAccessFrontend) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_access_mailbox.go b/pkg/api/rewardcloud/model_environment_access_mailbox.go new file mode 100644 index 0000000..e5909c0 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_access_mailbox.go @@ -0,0 +1,432 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentAccessMailbox type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentAccessMailbox{} + +// EnvironmentAccessMailbox Class EnvironmentAccessMailbox +type EnvironmentAccessMailbox struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Url NullableString `json:"url,omitempty"` + EnvironmentAccess NullableString `json:"environmentAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentAccessMailbox instantiates a new EnvironmentAccessMailbox object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentAccessMailbox() *EnvironmentAccessMailbox { + this := EnvironmentAccessMailbox{} + return &this +} + +// NewEnvironmentAccessMailboxWithDefaults instantiates a new EnvironmentAccessMailbox object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentAccessMailboxWithDefaults() *EnvironmentAccessMailbox { + this := EnvironmentAccessMailbox{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentAccessMailbox) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessMailbox) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentAccessMailbox) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentAccessMailbox) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessMailbox) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessMailbox) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentAccessMailbox) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentAccessMailbox) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentAccessMailbox) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentAccessMailbox) UnsetUuid() { + o.Uuid.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessMailbox) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessMailbox) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *EnvironmentAccessMailbox) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *EnvironmentAccessMailbox) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *EnvironmentAccessMailbox) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *EnvironmentAccessMailbox) UnsetUrl() { + o.Url.Unset() +} + +// GetEnvironmentAccess returns the EnvironmentAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessMailbox) GetEnvironmentAccess() string { + if o == nil || IsNil(o.EnvironmentAccess.Get()) { + var ret string + return ret + } + return *o.EnvironmentAccess.Get() +} + +// GetEnvironmentAccessOk returns a tuple with the EnvironmentAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessMailbox) GetEnvironmentAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentAccess.Get(), o.EnvironmentAccess.IsSet() +} + +// HasEnvironmentAccess returns a boolean if a field has been set. +func (o *EnvironmentAccessMailbox) HasEnvironmentAccess() bool { + if o != nil && o.EnvironmentAccess.IsSet() { + return true + } + + return false +} + +// SetEnvironmentAccess gets a reference to the given NullableString and assigns it to the EnvironmentAccess field. +func (o *EnvironmentAccessMailbox) SetEnvironmentAccess(v string) { + o.EnvironmentAccess.Set(&v) +} + +// SetEnvironmentAccessNil sets the value for EnvironmentAccess to be an explicit nil +func (o *EnvironmentAccessMailbox) SetEnvironmentAccessNil() { + o.EnvironmentAccess.Set(nil) +} + +// UnsetEnvironmentAccess ensures that no value is present for EnvironmentAccess, not even an explicit nil +func (o *EnvironmentAccessMailbox) UnsetEnvironmentAccess() { + o.EnvironmentAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessMailbox) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessMailbox) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessMailbox) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentAccessMailbox) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentAccessMailbox) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentAccessMailbox) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessMailbox) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessMailbox) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessMailbox) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentAccessMailbox) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentAccessMailbox) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentAccessMailbox) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessMailbox) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessMailbox) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessMailbox) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentAccessMailbox) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessMailbox) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessMailbox) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessMailbox) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentAccessMailbox) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentAccessMailbox) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentAccessMailbox) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.EnvironmentAccess.IsSet() { + toSerialize["environmentAccess"] = o.EnvironmentAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentAccessMailbox struct { + value *EnvironmentAccessMailbox + isSet bool +} + +func (v NullableEnvironmentAccessMailbox) Get() *EnvironmentAccessMailbox { + return v.value +} + +func (v *NullableEnvironmentAccessMailbox) Set(val *EnvironmentAccessMailbox) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentAccessMailbox) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentAccessMailbox) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentAccessMailbox(val *EnvironmentAccessMailbox) *NullableEnvironmentAccessMailbox { + return &NullableEnvironmentAccessMailbox{value: val, isSet: true} +} + +func (v NullableEnvironmentAccessMailbox) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentAccessMailbox) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_access_rabbit.go b/pkg/api/rewardcloud/model_environment_access_rabbit.go new file mode 100644 index 0000000..3722689 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_access_rabbit.go @@ -0,0 +1,620 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentAccessRabbit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentAccessRabbit{} + +// EnvironmentAccessRabbit Class EnvironmentAccessRabbit +type EnvironmentAccessRabbit struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Url NullableString `json:"url,omitempty"` + Host NullableString `json:"host,omitempty"` + Port NullableInt32 `json:"port,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` + EnvironmentAccess NullableString `json:"environmentAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentAccessRabbit instantiates a new EnvironmentAccessRabbit object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentAccessRabbit() *EnvironmentAccessRabbit { + this := EnvironmentAccessRabbit{} + return &this +} + +// NewEnvironmentAccessRabbitWithDefaults instantiates a new EnvironmentAccessRabbit object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentAccessRabbitWithDefaults() *EnvironmentAccessRabbit { + this := EnvironmentAccessRabbit{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentAccessRabbit) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessRabbit) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentAccessRabbit) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRabbit) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRabbit) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentAccessRabbit) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentAccessRabbit) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentAccessRabbit) UnsetUuid() { + o.Uuid.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRabbit) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRabbit) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *EnvironmentAccessRabbit) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *EnvironmentAccessRabbit) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *EnvironmentAccessRabbit) UnsetUrl() { + o.Url.Unset() +} + +// GetHost returns the Host field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRabbit) GetHost() string { + if o == nil || IsNil(o.Host.Get()) { + var ret string + return ret + } + return *o.Host.Get() +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRabbit) GetHostOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Host.Get(), o.Host.IsSet() +} + +// HasHost returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasHost() bool { + if o != nil && o.Host.IsSet() { + return true + } + + return false +} + +// SetHost gets a reference to the given NullableString and assigns it to the Host field. +func (o *EnvironmentAccessRabbit) SetHost(v string) { + o.Host.Set(&v) +} + +// SetHostNil sets the value for Host to be an explicit nil +func (o *EnvironmentAccessRabbit) SetHostNil() { + o.Host.Set(nil) +} + +// UnsetHost ensures that no value is present for Host, not even an explicit nil +func (o *EnvironmentAccessRabbit) UnsetHost() { + o.Host.Unset() +} + +// GetPort returns the Port field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRabbit) GetPort() int32 { + if o == nil || IsNil(o.Port.Get()) { + var ret int32 + return ret + } + return *o.Port.Get() +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRabbit) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Port.Get(), o.Port.IsSet() +} + +// HasPort returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasPort() bool { + if o != nil && o.Port.IsSet() { + return true + } + + return false +} + +// SetPort gets a reference to the given NullableInt32 and assigns it to the Port field. +func (o *EnvironmentAccessRabbit) SetPort(v int32) { + o.Port.Set(&v) +} + +// SetPortNil sets the value for Port to be an explicit nil +func (o *EnvironmentAccessRabbit) SetPortNil() { + o.Port.Set(nil) +} + +// UnsetPort ensures that no value is present for Port, not even an explicit nil +func (o *EnvironmentAccessRabbit) UnsetPort() { + o.Port.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRabbit) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRabbit) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *EnvironmentAccessRabbit) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *EnvironmentAccessRabbit) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *EnvironmentAccessRabbit) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRabbit) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRabbit) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *EnvironmentAccessRabbit) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *EnvironmentAccessRabbit) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *EnvironmentAccessRabbit) UnsetPassword() { + o.Password.Unset() +} + +// GetEnvironmentAccess returns the EnvironmentAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRabbit) GetEnvironmentAccess() string { + if o == nil || IsNil(o.EnvironmentAccess.Get()) { + var ret string + return ret + } + return *o.EnvironmentAccess.Get() +} + +// GetEnvironmentAccessOk returns a tuple with the EnvironmentAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRabbit) GetEnvironmentAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentAccess.Get(), o.EnvironmentAccess.IsSet() +} + +// HasEnvironmentAccess returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasEnvironmentAccess() bool { + if o != nil && o.EnvironmentAccess.IsSet() { + return true + } + + return false +} + +// SetEnvironmentAccess gets a reference to the given NullableString and assigns it to the EnvironmentAccess field. +func (o *EnvironmentAccessRabbit) SetEnvironmentAccess(v string) { + o.EnvironmentAccess.Set(&v) +} + +// SetEnvironmentAccessNil sets the value for EnvironmentAccess to be an explicit nil +func (o *EnvironmentAccessRabbit) SetEnvironmentAccessNil() { + o.EnvironmentAccess.Set(nil) +} + +// UnsetEnvironmentAccess ensures that no value is present for EnvironmentAccess, not even an explicit nil +func (o *EnvironmentAccessRabbit) UnsetEnvironmentAccess() { + o.EnvironmentAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRabbit) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRabbit) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentAccessRabbit) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentAccessRabbit) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentAccessRabbit) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRabbit) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRabbit) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentAccessRabbit) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentAccessRabbit) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentAccessRabbit) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessRabbit) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessRabbit) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentAccessRabbit) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessRabbit) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessRabbit) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessRabbit) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentAccessRabbit) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentAccessRabbit) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentAccessRabbit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.Host.IsSet() { + toSerialize["host"] = o.Host.Get() + } + if o.Port.IsSet() { + toSerialize["port"] = o.Port.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.EnvironmentAccess.IsSet() { + toSerialize["environmentAccess"] = o.EnvironmentAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentAccessRabbit struct { + value *EnvironmentAccessRabbit + isSet bool +} + +func (v NullableEnvironmentAccessRabbit) Get() *EnvironmentAccessRabbit { + return v.value +} + +func (v *NullableEnvironmentAccessRabbit) Set(val *EnvironmentAccessRabbit) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentAccessRabbit) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentAccessRabbit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentAccessRabbit(val *EnvironmentAccessRabbit) *NullableEnvironmentAccessRabbit { + return &NullableEnvironmentAccessRabbit{value: val, isSet: true} +} + +func (v NullableEnvironmentAccessRabbit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentAccessRabbit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_access_redis.go b/pkg/api/rewardcloud/model_environment_access_redis.go new file mode 100644 index 0000000..14cd18d --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_access_redis.go @@ -0,0 +1,573 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentAccessRedis type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentAccessRedis{} + +// EnvironmentAccessRedis Class EnvironmentAccessRedis +type EnvironmentAccessRedis struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Url NullableString `json:"url,omitempty"` + Host NullableString `json:"host,omitempty"` + Port NullableInt32 `json:"port,omitempty"` + Password NullableString `json:"password,omitempty"` + EnvironmentAccess NullableString `json:"environmentAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentAccessRedis instantiates a new EnvironmentAccessRedis object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentAccessRedis() *EnvironmentAccessRedis { + this := EnvironmentAccessRedis{} + return &this +} + +// NewEnvironmentAccessRedisWithDefaults instantiates a new EnvironmentAccessRedis object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentAccessRedisWithDefaults() *EnvironmentAccessRedis { + this := EnvironmentAccessRedis{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentAccessRedis) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessRedis) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentAccessRedis) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRedis) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRedis) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentAccessRedis) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentAccessRedis) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentAccessRedis) UnsetUuid() { + o.Uuid.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRedis) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRedis) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *EnvironmentAccessRedis) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *EnvironmentAccessRedis) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *EnvironmentAccessRedis) UnsetUrl() { + o.Url.Unset() +} + +// GetHost returns the Host field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRedis) GetHost() string { + if o == nil || IsNil(o.Host.Get()) { + var ret string + return ret + } + return *o.Host.Get() +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRedis) GetHostOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Host.Get(), o.Host.IsSet() +} + +// HasHost returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasHost() bool { + if o != nil && o.Host.IsSet() { + return true + } + + return false +} + +// SetHost gets a reference to the given NullableString and assigns it to the Host field. +func (o *EnvironmentAccessRedis) SetHost(v string) { + o.Host.Set(&v) +} + +// SetHostNil sets the value for Host to be an explicit nil +func (o *EnvironmentAccessRedis) SetHostNil() { + o.Host.Set(nil) +} + +// UnsetHost ensures that no value is present for Host, not even an explicit nil +func (o *EnvironmentAccessRedis) UnsetHost() { + o.Host.Unset() +} + +// GetPort returns the Port field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRedis) GetPort() int32 { + if o == nil || IsNil(o.Port.Get()) { + var ret int32 + return ret + } + return *o.Port.Get() +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRedis) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Port.Get(), o.Port.IsSet() +} + +// HasPort returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasPort() bool { + if o != nil && o.Port.IsSet() { + return true + } + + return false +} + +// SetPort gets a reference to the given NullableInt32 and assigns it to the Port field. +func (o *EnvironmentAccessRedis) SetPort(v int32) { + o.Port.Set(&v) +} + +// SetPortNil sets the value for Port to be an explicit nil +func (o *EnvironmentAccessRedis) SetPortNil() { + o.Port.Set(nil) +} + +// UnsetPort ensures that no value is present for Port, not even an explicit nil +func (o *EnvironmentAccessRedis) UnsetPort() { + o.Port.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRedis) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRedis) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *EnvironmentAccessRedis) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *EnvironmentAccessRedis) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *EnvironmentAccessRedis) UnsetPassword() { + o.Password.Unset() +} + +// GetEnvironmentAccess returns the EnvironmentAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRedis) GetEnvironmentAccess() string { + if o == nil || IsNil(o.EnvironmentAccess.Get()) { + var ret string + return ret + } + return *o.EnvironmentAccess.Get() +} + +// GetEnvironmentAccessOk returns a tuple with the EnvironmentAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRedis) GetEnvironmentAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentAccess.Get(), o.EnvironmentAccess.IsSet() +} + +// HasEnvironmentAccess returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasEnvironmentAccess() bool { + if o != nil && o.EnvironmentAccess.IsSet() { + return true + } + + return false +} + +// SetEnvironmentAccess gets a reference to the given NullableString and assigns it to the EnvironmentAccess field. +func (o *EnvironmentAccessRedis) SetEnvironmentAccess(v string) { + o.EnvironmentAccess.Set(&v) +} + +// SetEnvironmentAccessNil sets the value for EnvironmentAccess to be an explicit nil +func (o *EnvironmentAccessRedis) SetEnvironmentAccessNil() { + o.EnvironmentAccess.Set(nil) +} + +// UnsetEnvironmentAccess ensures that no value is present for EnvironmentAccess, not even an explicit nil +func (o *EnvironmentAccessRedis) UnsetEnvironmentAccess() { + o.EnvironmentAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRedis) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRedis) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentAccessRedis) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentAccessRedis) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentAccessRedis) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessRedis) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessRedis) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentAccessRedis) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentAccessRedis) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentAccessRedis) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessRedis) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessRedis) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentAccessRedis) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessRedis) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessRedis) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessRedis) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentAccessRedis) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentAccessRedis) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentAccessRedis) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.Host.IsSet() { + toSerialize["host"] = o.Host.Get() + } + if o.Port.IsSet() { + toSerialize["port"] = o.Port.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.EnvironmentAccess.IsSet() { + toSerialize["environmentAccess"] = o.EnvironmentAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentAccessRedis struct { + value *EnvironmentAccessRedis + isSet bool +} + +func (v NullableEnvironmentAccessRedis) Get() *EnvironmentAccessRedis { + return v.value +} + +func (v *NullableEnvironmentAccessRedis) Set(val *EnvironmentAccessRedis) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentAccessRedis) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentAccessRedis) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentAccessRedis(val *EnvironmentAccessRedis) *NullableEnvironmentAccessRedis { + return &NullableEnvironmentAccessRedis{value: val, isSet: true} +} + +func (v NullableEnvironmentAccessRedis) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentAccessRedis) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_access_webshell.go b/pkg/api/rewardcloud/model_environment_access_webshell.go new file mode 100644 index 0000000..3127562 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_access_webshell.go @@ -0,0 +1,526 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentAccessWebshell type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentAccessWebshell{} + +// EnvironmentAccessWebshell Class EnvironmentAccessWebshell +type EnvironmentAccessWebshell struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Url NullableString `json:"url,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` + EnvironmentAccess NullableString `json:"environmentAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentAccessWebshell instantiates a new EnvironmentAccessWebshell object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentAccessWebshell() *EnvironmentAccessWebshell { + this := EnvironmentAccessWebshell{} + return &this +} + +// NewEnvironmentAccessWebshellWithDefaults instantiates a new EnvironmentAccessWebshell object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentAccessWebshellWithDefaults() *EnvironmentAccessWebshell { + this := EnvironmentAccessWebshell{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentAccessWebshell) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessWebshell) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentAccessWebshell) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentAccessWebshell) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessWebshell) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessWebshell) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentAccessWebshell) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentAccessWebshell) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentAccessWebshell) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentAccessWebshell) UnsetUuid() { + o.Uuid.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessWebshell) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessWebshell) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *EnvironmentAccessWebshell) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *EnvironmentAccessWebshell) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *EnvironmentAccessWebshell) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *EnvironmentAccessWebshell) UnsetUrl() { + o.Url.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessWebshell) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessWebshell) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *EnvironmentAccessWebshell) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *EnvironmentAccessWebshell) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *EnvironmentAccessWebshell) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *EnvironmentAccessWebshell) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessWebshell) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessWebshell) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *EnvironmentAccessWebshell) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *EnvironmentAccessWebshell) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *EnvironmentAccessWebshell) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *EnvironmentAccessWebshell) UnsetPassword() { + o.Password.Unset() +} + +// GetEnvironmentAccess returns the EnvironmentAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessWebshell) GetEnvironmentAccess() string { + if o == nil || IsNil(o.EnvironmentAccess.Get()) { + var ret string + return ret + } + return *o.EnvironmentAccess.Get() +} + +// GetEnvironmentAccessOk returns a tuple with the EnvironmentAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessWebshell) GetEnvironmentAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentAccess.Get(), o.EnvironmentAccess.IsSet() +} + +// HasEnvironmentAccess returns a boolean if a field has been set. +func (o *EnvironmentAccessWebshell) HasEnvironmentAccess() bool { + if o != nil && o.EnvironmentAccess.IsSet() { + return true + } + + return false +} + +// SetEnvironmentAccess gets a reference to the given NullableString and assigns it to the EnvironmentAccess field. +func (o *EnvironmentAccessWebshell) SetEnvironmentAccess(v string) { + o.EnvironmentAccess.Set(&v) +} + +// SetEnvironmentAccessNil sets the value for EnvironmentAccess to be an explicit nil +func (o *EnvironmentAccessWebshell) SetEnvironmentAccessNil() { + o.EnvironmentAccess.Set(nil) +} + +// UnsetEnvironmentAccess ensures that no value is present for EnvironmentAccess, not even an explicit nil +func (o *EnvironmentAccessWebshell) UnsetEnvironmentAccess() { + o.EnvironmentAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessWebshell) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessWebshell) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessWebshell) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentAccessWebshell) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentAccessWebshell) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentAccessWebshell) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentAccessWebshell) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentAccessWebshell) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentAccessWebshell) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentAccessWebshell) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentAccessWebshell) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentAccessWebshell) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessWebshell) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessWebshell) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessWebshell) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentAccessWebshell) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentAccessWebshell) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentAccessWebshell) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentAccessWebshell) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentAccessWebshell) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentAccessWebshell) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentAccessWebshell) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.EnvironmentAccess.IsSet() { + toSerialize["environmentAccess"] = o.EnvironmentAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentAccessWebshell struct { + value *EnvironmentAccessWebshell + isSet bool +} + +func (v NullableEnvironmentAccessWebshell) Get() *EnvironmentAccessWebshell { + return v.value +} + +func (v *NullableEnvironmentAccessWebshell) Set(val *EnvironmentAccessWebshell) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentAccessWebshell) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentAccessWebshell) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentAccessWebshell(val *EnvironmentAccessWebshell) *NullableEnvironmentAccessWebshell { + return &NullableEnvironmentAccessWebshell{value: val, isSet: true} +} + +func (v NullableEnvironmentAccessWebshell) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentAccessWebshell) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_component.go b/pkg/api/rewardcloud/model_environment_component.go new file mode 100644 index 0000000..43a3a7c --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_component.go @@ -0,0 +1,620 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentComponent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentComponent{} + +// EnvironmentComponent Class EnvironmentComponent +type EnvironmentComponent struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + Node NullableInt32 `json:"node,omitempty"` + ComponentVersion NullableString `json:"componentVersion,omitempty"` + Environment NullableAbstractEnvironment `json:"environment,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentComponent instantiates a new EnvironmentComponent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentComponent() *EnvironmentComponent { + this := EnvironmentComponent{} + return &this +} + +// NewEnvironmentComponentWithDefaults instantiates a new EnvironmentComponent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentComponentWithDefaults() *EnvironmentComponent { + this := EnvironmentComponent{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentComponent) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentComponent) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentComponent) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponent) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponent) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentComponent) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentComponent) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentComponent) UnsetUuid() { + o.Uuid.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponent) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponent) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *EnvironmentComponent) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *EnvironmentComponent) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *EnvironmentComponent) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponent) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponent) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *EnvironmentComponent) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *EnvironmentComponent) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *EnvironmentComponent) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponent) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponent) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *EnvironmentComponent) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *EnvironmentComponent) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *EnvironmentComponent) UnsetStorage() { + o.Storage.Unset() +} + +// GetNode returns the Node field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponent) GetNode() int32 { + if o == nil || IsNil(o.Node.Get()) { + var ret int32 + return ret + } + return *o.Node.Get() +} + +// GetNodeOk returns a tuple with the Node field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponent) GetNodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Node.Get(), o.Node.IsSet() +} + +// HasNode returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasNode() bool { + if o != nil && o.Node.IsSet() { + return true + } + + return false +} + +// SetNode gets a reference to the given NullableInt32 and assigns it to the Node field. +func (o *EnvironmentComponent) SetNode(v int32) { + o.Node.Set(&v) +} + +// SetNodeNil sets the value for Node to be an explicit nil +func (o *EnvironmentComponent) SetNodeNil() { + o.Node.Set(nil) +} + +// UnsetNode ensures that no value is present for Node, not even an explicit nil +func (o *EnvironmentComponent) UnsetNode() { + o.Node.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponent) GetComponentVersion() string { + if o == nil || IsNil(o.ComponentVersion.Get()) { + var ret string + return ret + } + return *o.ComponentVersion.Get() +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponent) GetComponentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ComponentVersion.Get(), o.ComponentVersion.IsSet() +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasComponentVersion() bool { + if o != nil && o.ComponentVersion.IsSet() { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given NullableString and assigns it to the ComponentVersion field. +func (o *EnvironmentComponent) SetComponentVersion(v string) { + o.ComponentVersion.Set(&v) +} + +// SetComponentVersionNil sets the value for ComponentVersion to be an explicit nil +func (o *EnvironmentComponent) SetComponentVersionNil() { + o.ComponentVersion.Set(nil) +} + +// UnsetComponentVersion ensures that no value is present for ComponentVersion, not even an explicit nil +func (o *EnvironmentComponent) UnsetComponentVersion() { + o.ComponentVersion.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponent) GetEnvironment() AbstractEnvironment { + if o == nil || IsNil(o.Environment.Get()) { + var ret AbstractEnvironment + return ret + } + return *o.Environment.Get() +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponent) GetEnvironmentOk() (*AbstractEnvironment, bool) { + if o == nil { + return nil, false + } + return o.Environment.Get(), o.Environment.IsSet() +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasEnvironment() bool { + if o != nil && o.Environment.IsSet() { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given NullableAbstractEnvironment and assigns it to the Environment field. +func (o *EnvironmentComponent) SetEnvironment(v AbstractEnvironment) { + o.Environment.Set(&v) +} + +// SetEnvironmentNil sets the value for Environment to be an explicit nil +func (o *EnvironmentComponent) SetEnvironmentNil() { + o.Environment.Set(nil) +} + +// UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil +func (o *EnvironmentComponent) UnsetEnvironment() { + o.Environment.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponent) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponent) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentComponent) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentComponent) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentComponent) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponent) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponent) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentComponent) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentComponent) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentComponent) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentComponent) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentComponent) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentComponent) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentComponent) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentComponent) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentComponent) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentComponent) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentComponent) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentComponent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.Node.IsSet() { + toSerialize["node"] = o.Node.Get() + } + if o.ComponentVersion.IsSet() { + toSerialize["componentVersion"] = o.ComponentVersion.Get() + } + if o.Environment.IsSet() { + toSerialize["environment"] = o.Environment.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentComponent struct { + value *EnvironmentComponent + isSet bool +} + +func (v NullableEnvironmentComponent) Get() *EnvironmentComponent { + return v.value +} + +func (v *NullableEnvironmentComponent) Set(val *EnvironmentComponent) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentComponent) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentComponent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentComponent(val *EnvironmentComponent) *NullableEnvironmentComponent { + return &NullableEnvironmentComponent{value: val, isSet: true} +} + +func (v NullableEnvironmentComponent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentComponent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_component_environment_input.go b/pkg/api/rewardcloud/model_environment_component_environment_input.go new file mode 100644 index 0000000..d513c9a --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_component_environment_input.go @@ -0,0 +1,323 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentComponentEnvironmentInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentComponentEnvironmentInput{} + +// EnvironmentComponentEnvironmentInput Class EnvironmentComponent +type EnvironmentComponentEnvironmentInput struct { + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + Node NullableInt32 `json:"node,omitempty"` + ComponentVersion NullableString `json:"componentVersion,omitempty"` +} + +// NewEnvironmentComponentEnvironmentInput instantiates a new EnvironmentComponentEnvironmentInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentComponentEnvironmentInput() *EnvironmentComponentEnvironmentInput { + this := EnvironmentComponentEnvironmentInput{} + return &this +} + +// NewEnvironmentComponentEnvironmentInputWithDefaults instantiates a new EnvironmentComponentEnvironmentInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentComponentEnvironmentInputWithDefaults() *EnvironmentComponentEnvironmentInput { + this := EnvironmentComponentEnvironmentInput{} + return &this +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentEnvironmentInput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentEnvironmentInput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *EnvironmentComponentEnvironmentInput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *EnvironmentComponentEnvironmentInput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *EnvironmentComponentEnvironmentInput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *EnvironmentComponentEnvironmentInput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentEnvironmentInput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentEnvironmentInput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *EnvironmentComponentEnvironmentInput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *EnvironmentComponentEnvironmentInput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *EnvironmentComponentEnvironmentInput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *EnvironmentComponentEnvironmentInput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentEnvironmentInput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentEnvironmentInput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *EnvironmentComponentEnvironmentInput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *EnvironmentComponentEnvironmentInput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *EnvironmentComponentEnvironmentInput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *EnvironmentComponentEnvironmentInput) UnsetStorage() { + o.Storage.Unset() +} + +// GetNode returns the Node field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentEnvironmentInput) GetNode() int32 { + if o == nil || IsNil(o.Node.Get()) { + var ret int32 + return ret + } + return *o.Node.Get() +} + +// GetNodeOk returns a tuple with the Node field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentEnvironmentInput) GetNodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Node.Get(), o.Node.IsSet() +} + +// HasNode returns a boolean if a field has been set. +func (o *EnvironmentComponentEnvironmentInput) HasNode() bool { + if o != nil && o.Node.IsSet() { + return true + } + + return false +} + +// SetNode gets a reference to the given NullableInt32 and assigns it to the Node field. +func (o *EnvironmentComponentEnvironmentInput) SetNode(v int32) { + o.Node.Set(&v) +} + +// SetNodeNil sets the value for Node to be an explicit nil +func (o *EnvironmentComponentEnvironmentInput) SetNodeNil() { + o.Node.Set(nil) +} + +// UnsetNode ensures that no value is present for Node, not even an explicit nil +func (o *EnvironmentComponentEnvironmentInput) UnsetNode() { + o.Node.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentEnvironmentInput) GetComponentVersion() string { + if o == nil || IsNil(o.ComponentVersion.Get()) { + var ret string + return ret + } + return *o.ComponentVersion.Get() +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentEnvironmentInput) GetComponentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ComponentVersion.Get(), o.ComponentVersion.IsSet() +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *EnvironmentComponentEnvironmentInput) HasComponentVersion() bool { + if o != nil && o.ComponentVersion.IsSet() { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given NullableString and assigns it to the ComponentVersion field. +func (o *EnvironmentComponentEnvironmentInput) SetComponentVersion(v string) { + o.ComponentVersion.Set(&v) +} + +// SetComponentVersionNil sets the value for ComponentVersion to be an explicit nil +func (o *EnvironmentComponentEnvironmentInput) SetComponentVersionNil() { + o.ComponentVersion.Set(nil) +} + +// UnsetComponentVersion ensures that no value is present for ComponentVersion, not even an explicit nil +func (o *EnvironmentComponentEnvironmentInput) UnsetComponentVersion() { + o.ComponentVersion.Unset() +} + +func (o EnvironmentComponentEnvironmentInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentComponentEnvironmentInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.Node.IsSet() { + toSerialize["node"] = o.Node.Get() + } + if o.ComponentVersion.IsSet() { + toSerialize["componentVersion"] = o.ComponentVersion.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentComponentEnvironmentInput struct { + value *EnvironmentComponentEnvironmentInput + isSet bool +} + +func (v NullableEnvironmentComponentEnvironmentInput) Get() *EnvironmentComponentEnvironmentInput { + return v.value +} + +func (v *NullableEnvironmentComponentEnvironmentInput) Set(val *EnvironmentComponentEnvironmentInput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentComponentEnvironmentInput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentComponentEnvironmentInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentComponentEnvironmentInput(val *EnvironmentComponentEnvironmentInput) *NullableEnvironmentComponentEnvironmentInput { + return &NullableEnvironmentComponentEnvironmentInput{value: val, isSet: true} +} + +func (v NullableEnvironmentComponentEnvironmentInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentComponentEnvironmentInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_component_environment_output.go b/pkg/api/rewardcloud/model_environment_component_environment_output.go new file mode 100644 index 0000000..1cecc19 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_component_environment_output.go @@ -0,0 +1,323 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentComponentEnvironmentOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentComponentEnvironmentOutput{} + +// EnvironmentComponentEnvironmentOutput +type EnvironmentComponentEnvironmentOutput struct { + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + Node NullableInt32 `json:"node,omitempty"` + ComponentVersion NullableString `json:"componentVersion,omitempty"` +} + +// NewEnvironmentComponentEnvironmentOutput instantiates a new EnvironmentComponentEnvironmentOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentComponentEnvironmentOutput() *EnvironmentComponentEnvironmentOutput { + this := EnvironmentComponentEnvironmentOutput{} + return &this +} + +// NewEnvironmentComponentEnvironmentOutputWithDefaults instantiates a new EnvironmentComponentEnvironmentOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentComponentEnvironmentOutputWithDefaults() *EnvironmentComponentEnvironmentOutput { + this := EnvironmentComponentEnvironmentOutput{} + return &this +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentEnvironmentOutput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentEnvironmentOutput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *EnvironmentComponentEnvironmentOutput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *EnvironmentComponentEnvironmentOutput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *EnvironmentComponentEnvironmentOutput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *EnvironmentComponentEnvironmentOutput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentEnvironmentOutput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentEnvironmentOutput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *EnvironmentComponentEnvironmentOutput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *EnvironmentComponentEnvironmentOutput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *EnvironmentComponentEnvironmentOutput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *EnvironmentComponentEnvironmentOutput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentEnvironmentOutput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentEnvironmentOutput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *EnvironmentComponentEnvironmentOutput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *EnvironmentComponentEnvironmentOutput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *EnvironmentComponentEnvironmentOutput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *EnvironmentComponentEnvironmentOutput) UnsetStorage() { + o.Storage.Unset() +} + +// GetNode returns the Node field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentEnvironmentOutput) GetNode() int32 { + if o == nil || IsNil(o.Node.Get()) { + var ret int32 + return ret + } + return *o.Node.Get() +} + +// GetNodeOk returns a tuple with the Node field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentEnvironmentOutput) GetNodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Node.Get(), o.Node.IsSet() +} + +// HasNode returns a boolean if a field has been set. +func (o *EnvironmentComponentEnvironmentOutput) HasNode() bool { + if o != nil && o.Node.IsSet() { + return true + } + + return false +} + +// SetNode gets a reference to the given NullableInt32 and assigns it to the Node field. +func (o *EnvironmentComponentEnvironmentOutput) SetNode(v int32) { + o.Node.Set(&v) +} + +// SetNodeNil sets the value for Node to be an explicit nil +func (o *EnvironmentComponentEnvironmentOutput) SetNodeNil() { + o.Node.Set(nil) +} + +// UnsetNode ensures that no value is present for Node, not even an explicit nil +func (o *EnvironmentComponentEnvironmentOutput) UnsetNode() { + o.Node.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentEnvironmentOutput) GetComponentVersion() string { + if o == nil || IsNil(o.ComponentVersion.Get()) { + var ret string + return ret + } + return *o.ComponentVersion.Get() +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentEnvironmentOutput) GetComponentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ComponentVersion.Get(), o.ComponentVersion.IsSet() +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *EnvironmentComponentEnvironmentOutput) HasComponentVersion() bool { + if o != nil && o.ComponentVersion.IsSet() { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given NullableString and assigns it to the ComponentVersion field. +func (o *EnvironmentComponentEnvironmentOutput) SetComponentVersion(v string) { + o.ComponentVersion.Set(&v) +} + +// SetComponentVersionNil sets the value for ComponentVersion to be an explicit nil +func (o *EnvironmentComponentEnvironmentOutput) SetComponentVersionNil() { + o.ComponentVersion.Set(nil) +} + +// UnsetComponentVersion ensures that no value is present for ComponentVersion, not even an explicit nil +func (o *EnvironmentComponentEnvironmentOutput) UnsetComponentVersion() { + o.ComponentVersion.Unset() +} + +func (o EnvironmentComponentEnvironmentOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentComponentEnvironmentOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.Node.IsSet() { + toSerialize["node"] = o.Node.Get() + } + if o.ComponentVersion.IsSet() { + toSerialize["componentVersion"] = o.ComponentVersion.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentComponentEnvironmentOutput struct { + value *EnvironmentComponentEnvironmentOutput + isSet bool +} + +func (v NullableEnvironmentComponentEnvironmentOutput) Get() *EnvironmentComponentEnvironmentOutput { + return v.value +} + +func (v *NullableEnvironmentComponentEnvironmentOutput) Set(val *EnvironmentComponentEnvironmentOutput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentComponentEnvironmentOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentComponentEnvironmentOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentComponentEnvironmentOutput(val *EnvironmentComponentEnvironmentOutput) *NullableEnvironmentComponentEnvironmentOutput { + return &NullableEnvironmentComponentEnvironmentOutput{value: val, isSet: true} +} + +func (v NullableEnvironmentComponentEnvironmentOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentComponentEnvironmentOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_component_template_environment_input.go b/pkg/api/rewardcloud/model_environment_component_template_environment_input.go new file mode 100644 index 0000000..ce10e00 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_component_template_environment_input.go @@ -0,0 +1,323 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentComponentTemplateEnvironmentInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentComponentTemplateEnvironmentInput{} + +// EnvironmentComponentTemplateEnvironmentInput Class EnvironmentComponent +type EnvironmentComponentTemplateEnvironmentInput struct { + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + Node NullableInt32 `json:"node,omitempty"` + ComponentVersion NullableString `json:"componentVersion,omitempty"` +} + +// NewEnvironmentComponentTemplateEnvironmentInput instantiates a new EnvironmentComponentTemplateEnvironmentInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentComponentTemplateEnvironmentInput() *EnvironmentComponentTemplateEnvironmentInput { + this := EnvironmentComponentTemplateEnvironmentInput{} + return &this +} + +// NewEnvironmentComponentTemplateEnvironmentInputWithDefaults instantiates a new EnvironmentComponentTemplateEnvironmentInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentComponentTemplateEnvironmentInputWithDefaults() *EnvironmentComponentTemplateEnvironmentInput { + this := EnvironmentComponentTemplateEnvironmentInput{} + return &this +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentTemplateEnvironmentInput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentTemplateEnvironmentInput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *EnvironmentComponentTemplateEnvironmentInput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *EnvironmentComponentTemplateEnvironmentInput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentInput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentInput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentTemplateEnvironmentInput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentTemplateEnvironmentInput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *EnvironmentComponentTemplateEnvironmentInput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *EnvironmentComponentTemplateEnvironmentInput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentInput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentInput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentTemplateEnvironmentInput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentTemplateEnvironmentInput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *EnvironmentComponentTemplateEnvironmentInput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *EnvironmentComponentTemplateEnvironmentInput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentInput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentInput) UnsetStorage() { + o.Storage.Unset() +} + +// GetNode returns the Node field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentTemplateEnvironmentInput) GetNode() int32 { + if o == nil || IsNil(o.Node.Get()) { + var ret int32 + return ret + } + return *o.Node.Get() +} + +// GetNodeOk returns a tuple with the Node field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentTemplateEnvironmentInput) GetNodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Node.Get(), o.Node.IsSet() +} + +// HasNode returns a boolean if a field has been set. +func (o *EnvironmentComponentTemplateEnvironmentInput) HasNode() bool { + if o != nil && o.Node.IsSet() { + return true + } + + return false +} + +// SetNode gets a reference to the given NullableInt32 and assigns it to the Node field. +func (o *EnvironmentComponentTemplateEnvironmentInput) SetNode(v int32) { + o.Node.Set(&v) +} + +// SetNodeNil sets the value for Node to be an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentInput) SetNodeNil() { + o.Node.Set(nil) +} + +// UnsetNode ensures that no value is present for Node, not even an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentInput) UnsetNode() { + o.Node.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentTemplateEnvironmentInput) GetComponentVersion() string { + if o == nil || IsNil(o.ComponentVersion.Get()) { + var ret string + return ret + } + return *o.ComponentVersion.Get() +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentTemplateEnvironmentInput) GetComponentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ComponentVersion.Get(), o.ComponentVersion.IsSet() +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *EnvironmentComponentTemplateEnvironmentInput) HasComponentVersion() bool { + if o != nil && o.ComponentVersion.IsSet() { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given NullableString and assigns it to the ComponentVersion field. +func (o *EnvironmentComponentTemplateEnvironmentInput) SetComponentVersion(v string) { + o.ComponentVersion.Set(&v) +} + +// SetComponentVersionNil sets the value for ComponentVersion to be an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentInput) SetComponentVersionNil() { + o.ComponentVersion.Set(nil) +} + +// UnsetComponentVersion ensures that no value is present for ComponentVersion, not even an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentInput) UnsetComponentVersion() { + o.ComponentVersion.Unset() +} + +func (o EnvironmentComponentTemplateEnvironmentInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentComponentTemplateEnvironmentInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.Node.IsSet() { + toSerialize["node"] = o.Node.Get() + } + if o.ComponentVersion.IsSet() { + toSerialize["componentVersion"] = o.ComponentVersion.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentComponentTemplateEnvironmentInput struct { + value *EnvironmentComponentTemplateEnvironmentInput + isSet bool +} + +func (v NullableEnvironmentComponentTemplateEnvironmentInput) Get() *EnvironmentComponentTemplateEnvironmentInput { + return v.value +} + +func (v *NullableEnvironmentComponentTemplateEnvironmentInput) Set(val *EnvironmentComponentTemplateEnvironmentInput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentComponentTemplateEnvironmentInput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentComponentTemplateEnvironmentInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentComponentTemplateEnvironmentInput(val *EnvironmentComponentTemplateEnvironmentInput) *NullableEnvironmentComponentTemplateEnvironmentInput { + return &NullableEnvironmentComponentTemplateEnvironmentInput{value: val, isSet: true} +} + +func (v NullableEnvironmentComponentTemplateEnvironmentInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentComponentTemplateEnvironmentInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_component_template_environment_output.go b/pkg/api/rewardcloud/model_environment_component_template_environment_output.go new file mode 100644 index 0000000..15bb2ed --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_component_template_environment_output.go @@ -0,0 +1,323 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentComponentTemplateEnvironmentOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentComponentTemplateEnvironmentOutput{} + +// EnvironmentComponentTemplateEnvironmentOutput +type EnvironmentComponentTemplateEnvironmentOutput struct { + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + Node NullableInt32 `json:"node,omitempty"` + ComponentVersion NullableString `json:"componentVersion,omitempty"` +} + +// NewEnvironmentComponentTemplateEnvironmentOutput instantiates a new EnvironmentComponentTemplateEnvironmentOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentComponentTemplateEnvironmentOutput() *EnvironmentComponentTemplateEnvironmentOutput { + this := EnvironmentComponentTemplateEnvironmentOutput{} + return &this +} + +// NewEnvironmentComponentTemplateEnvironmentOutputWithDefaults instantiates a new EnvironmentComponentTemplateEnvironmentOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentComponentTemplateEnvironmentOutputWithDefaults() *EnvironmentComponentTemplateEnvironmentOutput { + this := EnvironmentComponentTemplateEnvironmentOutput{} + return &this +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentTemplateEnvironmentOutput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentTemplateEnvironmentOutput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *EnvironmentComponentTemplateEnvironmentOutput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *EnvironmentComponentTemplateEnvironmentOutput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentOutput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentOutput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentTemplateEnvironmentOutput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentTemplateEnvironmentOutput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *EnvironmentComponentTemplateEnvironmentOutput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *EnvironmentComponentTemplateEnvironmentOutput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentOutput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentOutput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentTemplateEnvironmentOutput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentTemplateEnvironmentOutput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *EnvironmentComponentTemplateEnvironmentOutput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *EnvironmentComponentTemplateEnvironmentOutput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentOutput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentOutput) UnsetStorage() { + o.Storage.Unset() +} + +// GetNode returns the Node field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentTemplateEnvironmentOutput) GetNode() int32 { + if o == nil || IsNil(o.Node.Get()) { + var ret int32 + return ret + } + return *o.Node.Get() +} + +// GetNodeOk returns a tuple with the Node field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentTemplateEnvironmentOutput) GetNodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Node.Get(), o.Node.IsSet() +} + +// HasNode returns a boolean if a field has been set. +func (o *EnvironmentComponentTemplateEnvironmentOutput) HasNode() bool { + if o != nil && o.Node.IsSet() { + return true + } + + return false +} + +// SetNode gets a reference to the given NullableInt32 and assigns it to the Node field. +func (o *EnvironmentComponentTemplateEnvironmentOutput) SetNode(v int32) { + o.Node.Set(&v) +} + +// SetNodeNil sets the value for Node to be an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentOutput) SetNodeNil() { + o.Node.Set(nil) +} + +// UnsetNode ensures that no value is present for Node, not even an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentOutput) UnsetNode() { + o.Node.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentComponentTemplateEnvironmentOutput) GetComponentVersion() string { + if o == nil || IsNil(o.ComponentVersion.Get()) { + var ret string + return ret + } + return *o.ComponentVersion.Get() +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentComponentTemplateEnvironmentOutput) GetComponentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ComponentVersion.Get(), o.ComponentVersion.IsSet() +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *EnvironmentComponentTemplateEnvironmentOutput) HasComponentVersion() bool { + if o != nil && o.ComponentVersion.IsSet() { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given NullableString and assigns it to the ComponentVersion field. +func (o *EnvironmentComponentTemplateEnvironmentOutput) SetComponentVersion(v string) { + o.ComponentVersion.Set(&v) +} + +// SetComponentVersionNil sets the value for ComponentVersion to be an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentOutput) SetComponentVersionNil() { + o.ComponentVersion.Set(nil) +} + +// UnsetComponentVersion ensures that no value is present for ComponentVersion, not even an explicit nil +func (o *EnvironmentComponentTemplateEnvironmentOutput) UnsetComponentVersion() { + o.ComponentVersion.Unset() +} + +func (o EnvironmentComponentTemplateEnvironmentOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentComponentTemplateEnvironmentOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.Node.IsSet() { + toSerialize["node"] = o.Node.Get() + } + if o.ComponentVersion.IsSet() { + toSerialize["componentVersion"] = o.ComponentVersion.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentComponentTemplateEnvironmentOutput struct { + value *EnvironmentComponentTemplateEnvironmentOutput + isSet bool +} + +func (v NullableEnvironmentComponentTemplateEnvironmentOutput) Get() *EnvironmentComponentTemplateEnvironmentOutput { + return v.value +} + +func (v *NullableEnvironmentComponentTemplateEnvironmentOutput) Set(val *EnvironmentComponentTemplateEnvironmentOutput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentComponentTemplateEnvironmentOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentComponentTemplateEnvironmentOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentComponentTemplateEnvironmentOutput(val *EnvironmentComponentTemplateEnvironmentOutput) *NullableEnvironmentComponentTemplateEnvironmentOutput { + return &NullableEnvironmentComponentTemplateEnvironmentOutput{value: val, isSet: true} +} + +func (v NullableEnvironmentComponentTemplateEnvironmentOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentComponentTemplateEnvironmentOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_costs.go b/pkg/api/rewardcloud/model_environment_costs.go new file mode 100644 index 0000000..b882765 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_costs.go @@ -0,0 +1,124 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentCosts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentCosts{} + +// EnvironmentCosts struct for EnvironmentCosts +type EnvironmentCosts struct { + Uuid *EnvironmentCostsUuid `json:"uuid,omitempty"` +} + +// NewEnvironmentCosts instantiates a new EnvironmentCosts object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentCosts() *EnvironmentCosts { + this := EnvironmentCosts{} + return &this +} + +// NewEnvironmentCostsWithDefaults instantiates a new EnvironmentCosts object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentCostsWithDefaults() *EnvironmentCosts { + this := EnvironmentCosts{} + return &this +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *EnvironmentCosts) GetUuid() EnvironmentCostsUuid { + if o == nil || IsNil(o.Uuid) { + var ret EnvironmentCostsUuid + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentCosts) GetUuidOk() (*EnvironmentCostsUuid, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentCosts) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given EnvironmentCostsUuid and assigns it to the Uuid field. +func (o *EnvironmentCosts) SetUuid(v EnvironmentCostsUuid) { + o.Uuid = &v +} + +func (o EnvironmentCosts) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentCosts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + return toSerialize, nil +} + +type NullableEnvironmentCosts struct { + value *EnvironmentCosts + isSet bool +} + +func (v NullableEnvironmentCosts) Get() *EnvironmentCosts { + return v.value +} + +func (v *NullableEnvironmentCosts) Set(val *EnvironmentCosts) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentCosts) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentCosts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentCosts(val *EnvironmentCosts) *NullableEnvironmentCosts { + return &NullableEnvironmentCosts{value: val, isSet: true} +} + +func (v NullableEnvironmentCosts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentCosts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_costs_uuid.go b/pkg/api/rewardcloud/model_environment_costs_uuid.go new file mode 100644 index 0000000..5a3680f --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_costs_uuid.go @@ -0,0 +1,160 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentCostsUuid type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentCostsUuid{} + +// EnvironmentCostsUuid struct for EnvironmentCostsUuid +type EnvironmentCostsUuid struct { + Costs []map[string]interface{} `json:"costs,omitempty"` + Environment *EnvironmentEnvironmentOutput `json:"environment,omitempty"` +} + +// NewEnvironmentCostsUuid instantiates a new EnvironmentCostsUuid object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentCostsUuid() *EnvironmentCostsUuid { + this := EnvironmentCostsUuid{} + return &this +} + +// NewEnvironmentCostsUuidWithDefaults instantiates a new EnvironmentCostsUuid object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentCostsUuidWithDefaults() *EnvironmentCostsUuid { + this := EnvironmentCostsUuid{} + return &this +} + +// GetCosts returns the Costs field value if set, zero value otherwise. +func (o *EnvironmentCostsUuid) GetCosts() []map[string]interface{} { + if o == nil || IsNil(o.Costs) { + var ret []map[string]interface{} + return ret + } + return o.Costs +} + +// GetCostsOk returns a tuple with the Costs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentCostsUuid) GetCostsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Costs) { + return nil, false + } + return o.Costs, true +} + +// HasCosts returns a boolean if a field has been set. +func (o *EnvironmentCostsUuid) HasCosts() bool { + if o != nil && !IsNil(o.Costs) { + return true + } + + return false +} + +// SetCosts gets a reference to the given []map[string]interface{} and assigns it to the Costs field. +func (o *EnvironmentCostsUuid) SetCosts(v []map[string]interface{}) { + o.Costs = v +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise. +func (o *EnvironmentCostsUuid) GetEnvironment() EnvironmentEnvironmentOutput { + if o == nil || IsNil(o.Environment) { + var ret EnvironmentEnvironmentOutput + return ret + } + return *o.Environment +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentCostsUuid) GetEnvironmentOk() (*EnvironmentEnvironmentOutput, bool) { + if o == nil || IsNil(o.Environment) { + return nil, false + } + return o.Environment, true +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *EnvironmentCostsUuid) HasEnvironment() bool { + if o != nil && !IsNil(o.Environment) { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given EnvironmentEnvironmentOutput and assigns it to the Environment field. +func (o *EnvironmentCostsUuid) SetEnvironment(v EnvironmentEnvironmentOutput) { + o.Environment = &v +} + +func (o EnvironmentCostsUuid) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentCostsUuid) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Costs) { + toSerialize["costs"] = o.Costs + } + if !IsNil(o.Environment) { + toSerialize["environment"] = o.Environment + } + return toSerialize, nil +} + +type NullableEnvironmentCostsUuid struct { + value *EnvironmentCostsUuid + isSet bool +} + +func (v NullableEnvironmentCostsUuid) Get() *EnvironmentCostsUuid { + return v.value +} + +func (v *NullableEnvironmentCostsUuid) Set(val *EnvironmentCostsUuid) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentCostsUuid) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentCostsUuid) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentCostsUuid(val *EnvironmentCostsUuid) *NullableEnvironmentCostsUuid { + return &NullableEnvironmentCostsUuid{value: val, isSet: true} +} + +func (v NullableEnvironmentCostsUuid) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentCostsUuid) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_custom_domain.go b/pkg/api/rewardcloud/model_environment_custom_domain.go new file mode 100644 index 0000000..ebf1506 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_custom_domain.go @@ -0,0 +1,526 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentCustomDomain type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentCustomDomain{} + +// EnvironmentCustomDomain Class EnvironmentCustomDomain +type EnvironmentCustomDomain struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Hostname NullableString `json:"hostname,omitempty"` + CertificateData NullableString `json:"certificateData,omitempty"` + CertificateKey NullableString `json:"certificateKey,omitempty"` + Environment NullableString `json:"environment,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentCustomDomain instantiates a new EnvironmentCustomDomain object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentCustomDomain() *EnvironmentCustomDomain { + this := EnvironmentCustomDomain{} + return &this +} + +// NewEnvironmentCustomDomainWithDefaults instantiates a new EnvironmentCustomDomain object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentCustomDomainWithDefaults() *EnvironmentCustomDomain { + this := EnvironmentCustomDomain{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentCustomDomain) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentCustomDomain) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentCustomDomain) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentCustomDomain) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomain) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomain) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentCustomDomain) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentCustomDomain) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentCustomDomain) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentCustomDomain) UnsetUuid() { + o.Uuid.Unset() +} + +// GetHostname returns the Hostname field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomain) GetHostname() string { + if o == nil || IsNil(o.Hostname.Get()) { + var ret string + return ret + } + return *o.Hostname.Get() +} + +// GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomain) GetHostnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Hostname.Get(), o.Hostname.IsSet() +} + +// HasHostname returns a boolean if a field has been set. +func (o *EnvironmentCustomDomain) HasHostname() bool { + if o != nil && o.Hostname.IsSet() { + return true + } + + return false +} + +// SetHostname gets a reference to the given NullableString and assigns it to the Hostname field. +func (o *EnvironmentCustomDomain) SetHostname(v string) { + o.Hostname.Set(&v) +} + +// SetHostnameNil sets the value for Hostname to be an explicit nil +func (o *EnvironmentCustomDomain) SetHostnameNil() { + o.Hostname.Set(nil) +} + +// UnsetHostname ensures that no value is present for Hostname, not even an explicit nil +func (o *EnvironmentCustomDomain) UnsetHostname() { + o.Hostname.Unset() +} + +// GetCertificateData returns the CertificateData field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomain) GetCertificateData() string { + if o == nil || IsNil(o.CertificateData.Get()) { + var ret string + return ret + } + return *o.CertificateData.Get() +} + +// GetCertificateDataOk returns a tuple with the CertificateData field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomain) GetCertificateDataOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CertificateData.Get(), o.CertificateData.IsSet() +} + +// HasCertificateData returns a boolean if a field has been set. +func (o *EnvironmentCustomDomain) HasCertificateData() bool { + if o != nil && o.CertificateData.IsSet() { + return true + } + + return false +} + +// SetCertificateData gets a reference to the given NullableString and assigns it to the CertificateData field. +func (o *EnvironmentCustomDomain) SetCertificateData(v string) { + o.CertificateData.Set(&v) +} + +// SetCertificateDataNil sets the value for CertificateData to be an explicit nil +func (o *EnvironmentCustomDomain) SetCertificateDataNil() { + o.CertificateData.Set(nil) +} + +// UnsetCertificateData ensures that no value is present for CertificateData, not even an explicit nil +func (o *EnvironmentCustomDomain) UnsetCertificateData() { + o.CertificateData.Unset() +} + +// GetCertificateKey returns the CertificateKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomain) GetCertificateKey() string { + if o == nil || IsNil(o.CertificateKey.Get()) { + var ret string + return ret + } + return *o.CertificateKey.Get() +} + +// GetCertificateKeyOk returns a tuple with the CertificateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomain) GetCertificateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CertificateKey.Get(), o.CertificateKey.IsSet() +} + +// HasCertificateKey returns a boolean if a field has been set. +func (o *EnvironmentCustomDomain) HasCertificateKey() bool { + if o != nil && o.CertificateKey.IsSet() { + return true + } + + return false +} + +// SetCertificateKey gets a reference to the given NullableString and assigns it to the CertificateKey field. +func (o *EnvironmentCustomDomain) SetCertificateKey(v string) { + o.CertificateKey.Set(&v) +} + +// SetCertificateKeyNil sets the value for CertificateKey to be an explicit nil +func (o *EnvironmentCustomDomain) SetCertificateKeyNil() { + o.CertificateKey.Set(nil) +} + +// UnsetCertificateKey ensures that no value is present for CertificateKey, not even an explicit nil +func (o *EnvironmentCustomDomain) UnsetCertificateKey() { + o.CertificateKey.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomain) GetEnvironment() string { + if o == nil || IsNil(o.Environment.Get()) { + var ret string + return ret + } + return *o.Environment.Get() +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomain) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Environment.Get(), o.Environment.IsSet() +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *EnvironmentCustomDomain) HasEnvironment() bool { + if o != nil && o.Environment.IsSet() { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given NullableString and assigns it to the Environment field. +func (o *EnvironmentCustomDomain) SetEnvironment(v string) { + o.Environment.Set(&v) +} + +// SetEnvironmentNil sets the value for Environment to be an explicit nil +func (o *EnvironmentCustomDomain) SetEnvironmentNil() { + o.Environment.Set(nil) +} + +// UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil +func (o *EnvironmentCustomDomain) UnsetEnvironment() { + o.Environment.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomain) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomain) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentCustomDomain) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentCustomDomain) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentCustomDomain) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentCustomDomain) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomain) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomain) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentCustomDomain) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentCustomDomain) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentCustomDomain) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentCustomDomain) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentCustomDomain) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentCustomDomain) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentCustomDomain) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentCustomDomain) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentCustomDomain) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentCustomDomain) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentCustomDomain) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentCustomDomain) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentCustomDomain) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentCustomDomain) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Hostname.IsSet() { + toSerialize["hostname"] = o.Hostname.Get() + } + if o.CertificateData.IsSet() { + toSerialize["certificateData"] = o.CertificateData.Get() + } + if o.CertificateKey.IsSet() { + toSerialize["certificateKey"] = o.CertificateKey.Get() + } + if o.Environment.IsSet() { + toSerialize["environment"] = o.Environment.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentCustomDomain struct { + value *EnvironmentCustomDomain + isSet bool +} + +func (v NullableEnvironmentCustomDomain) Get() *EnvironmentCustomDomain { + return v.value +} + +func (v *NullableEnvironmentCustomDomain) Set(val *EnvironmentCustomDomain) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentCustomDomain) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentCustomDomain) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentCustomDomain(val *EnvironmentCustomDomain) *NullableEnvironmentCustomDomain { + return &NullableEnvironmentCustomDomain{value: val, isSet: true} +} + +func (v NullableEnvironmentCustomDomain) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentCustomDomain) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_custom_domain_environment_input.go b/pkg/api/rewardcloud/model_environment_custom_domain_environment_input.go new file mode 100644 index 0000000..c62a72a --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_custom_domain_environment_input.go @@ -0,0 +1,229 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentCustomDomainEnvironmentInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentCustomDomainEnvironmentInput{} + +// EnvironmentCustomDomainEnvironmentInput Class EnvironmentCustomDomain +type EnvironmentCustomDomainEnvironmentInput struct { + Hostname NullableString `json:"hostname,omitempty"` + CertificateData NullableString `json:"certificateData,omitempty"` + CertificateKey NullableString `json:"certificateKey,omitempty"` +} + +// NewEnvironmentCustomDomainEnvironmentInput instantiates a new EnvironmentCustomDomainEnvironmentInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentCustomDomainEnvironmentInput() *EnvironmentCustomDomainEnvironmentInput { + this := EnvironmentCustomDomainEnvironmentInput{} + return &this +} + +// NewEnvironmentCustomDomainEnvironmentInputWithDefaults instantiates a new EnvironmentCustomDomainEnvironmentInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentCustomDomainEnvironmentInputWithDefaults() *EnvironmentCustomDomainEnvironmentInput { + this := EnvironmentCustomDomainEnvironmentInput{} + return &this +} + +// GetHostname returns the Hostname field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomainEnvironmentInput) GetHostname() string { + if o == nil || IsNil(o.Hostname.Get()) { + var ret string + return ret + } + return *o.Hostname.Get() +} + +// GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomainEnvironmentInput) GetHostnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Hostname.Get(), o.Hostname.IsSet() +} + +// HasHostname returns a boolean if a field has been set. +func (o *EnvironmentCustomDomainEnvironmentInput) HasHostname() bool { + if o != nil && o.Hostname.IsSet() { + return true + } + + return false +} + +// SetHostname gets a reference to the given NullableString and assigns it to the Hostname field. +func (o *EnvironmentCustomDomainEnvironmentInput) SetHostname(v string) { + o.Hostname.Set(&v) +} + +// SetHostnameNil sets the value for Hostname to be an explicit nil +func (o *EnvironmentCustomDomainEnvironmentInput) SetHostnameNil() { + o.Hostname.Set(nil) +} + +// UnsetHostname ensures that no value is present for Hostname, not even an explicit nil +func (o *EnvironmentCustomDomainEnvironmentInput) UnsetHostname() { + o.Hostname.Unset() +} + +// GetCertificateData returns the CertificateData field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomainEnvironmentInput) GetCertificateData() string { + if o == nil || IsNil(o.CertificateData.Get()) { + var ret string + return ret + } + return *o.CertificateData.Get() +} + +// GetCertificateDataOk returns a tuple with the CertificateData field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomainEnvironmentInput) GetCertificateDataOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CertificateData.Get(), o.CertificateData.IsSet() +} + +// HasCertificateData returns a boolean if a field has been set. +func (o *EnvironmentCustomDomainEnvironmentInput) HasCertificateData() bool { + if o != nil && o.CertificateData.IsSet() { + return true + } + + return false +} + +// SetCertificateData gets a reference to the given NullableString and assigns it to the CertificateData field. +func (o *EnvironmentCustomDomainEnvironmentInput) SetCertificateData(v string) { + o.CertificateData.Set(&v) +} + +// SetCertificateDataNil sets the value for CertificateData to be an explicit nil +func (o *EnvironmentCustomDomainEnvironmentInput) SetCertificateDataNil() { + o.CertificateData.Set(nil) +} + +// UnsetCertificateData ensures that no value is present for CertificateData, not even an explicit nil +func (o *EnvironmentCustomDomainEnvironmentInput) UnsetCertificateData() { + o.CertificateData.Unset() +} + +// GetCertificateKey returns the CertificateKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomainEnvironmentInput) GetCertificateKey() string { + if o == nil || IsNil(o.CertificateKey.Get()) { + var ret string + return ret + } + return *o.CertificateKey.Get() +} + +// GetCertificateKeyOk returns a tuple with the CertificateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomainEnvironmentInput) GetCertificateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CertificateKey.Get(), o.CertificateKey.IsSet() +} + +// HasCertificateKey returns a boolean if a field has been set. +func (o *EnvironmentCustomDomainEnvironmentInput) HasCertificateKey() bool { + if o != nil && o.CertificateKey.IsSet() { + return true + } + + return false +} + +// SetCertificateKey gets a reference to the given NullableString and assigns it to the CertificateKey field. +func (o *EnvironmentCustomDomainEnvironmentInput) SetCertificateKey(v string) { + o.CertificateKey.Set(&v) +} + +// SetCertificateKeyNil sets the value for CertificateKey to be an explicit nil +func (o *EnvironmentCustomDomainEnvironmentInput) SetCertificateKeyNil() { + o.CertificateKey.Set(nil) +} + +// UnsetCertificateKey ensures that no value is present for CertificateKey, not even an explicit nil +func (o *EnvironmentCustomDomainEnvironmentInput) UnsetCertificateKey() { + o.CertificateKey.Unset() +} + +func (o EnvironmentCustomDomainEnvironmentInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentCustomDomainEnvironmentInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Hostname.IsSet() { + toSerialize["hostname"] = o.Hostname.Get() + } + if o.CertificateData.IsSet() { + toSerialize["certificateData"] = o.CertificateData.Get() + } + if o.CertificateKey.IsSet() { + toSerialize["certificateKey"] = o.CertificateKey.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentCustomDomainEnvironmentInput struct { + value *EnvironmentCustomDomainEnvironmentInput + isSet bool +} + +func (v NullableEnvironmentCustomDomainEnvironmentInput) Get() *EnvironmentCustomDomainEnvironmentInput { + return v.value +} + +func (v *NullableEnvironmentCustomDomainEnvironmentInput) Set(val *EnvironmentCustomDomainEnvironmentInput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentCustomDomainEnvironmentInput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentCustomDomainEnvironmentInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentCustomDomainEnvironmentInput(val *EnvironmentCustomDomainEnvironmentInput) *NullableEnvironmentCustomDomainEnvironmentInput { + return &NullableEnvironmentCustomDomainEnvironmentInput{value: val, isSet: true} +} + +func (v NullableEnvironmentCustomDomainEnvironmentInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentCustomDomainEnvironmentInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_custom_domain_environment_output.go b/pkg/api/rewardcloud/model_environment_custom_domain_environment_output.go new file mode 100644 index 0000000..80652ea --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_custom_domain_environment_output.go @@ -0,0 +1,229 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentCustomDomainEnvironmentOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentCustomDomainEnvironmentOutput{} + +// EnvironmentCustomDomainEnvironmentOutput +type EnvironmentCustomDomainEnvironmentOutput struct { + Hostname NullableString `json:"hostname,omitempty"` + CertificateData NullableString `json:"certificateData,omitempty"` + CertificateKey NullableString `json:"certificateKey,omitempty"` +} + +// NewEnvironmentCustomDomainEnvironmentOutput instantiates a new EnvironmentCustomDomainEnvironmentOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentCustomDomainEnvironmentOutput() *EnvironmentCustomDomainEnvironmentOutput { + this := EnvironmentCustomDomainEnvironmentOutput{} + return &this +} + +// NewEnvironmentCustomDomainEnvironmentOutputWithDefaults instantiates a new EnvironmentCustomDomainEnvironmentOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentCustomDomainEnvironmentOutputWithDefaults() *EnvironmentCustomDomainEnvironmentOutput { + this := EnvironmentCustomDomainEnvironmentOutput{} + return &this +} + +// GetHostname returns the Hostname field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomainEnvironmentOutput) GetHostname() string { + if o == nil || IsNil(o.Hostname.Get()) { + var ret string + return ret + } + return *o.Hostname.Get() +} + +// GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomainEnvironmentOutput) GetHostnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Hostname.Get(), o.Hostname.IsSet() +} + +// HasHostname returns a boolean if a field has been set. +func (o *EnvironmentCustomDomainEnvironmentOutput) HasHostname() bool { + if o != nil && o.Hostname.IsSet() { + return true + } + + return false +} + +// SetHostname gets a reference to the given NullableString and assigns it to the Hostname field. +func (o *EnvironmentCustomDomainEnvironmentOutput) SetHostname(v string) { + o.Hostname.Set(&v) +} + +// SetHostnameNil sets the value for Hostname to be an explicit nil +func (o *EnvironmentCustomDomainEnvironmentOutput) SetHostnameNil() { + o.Hostname.Set(nil) +} + +// UnsetHostname ensures that no value is present for Hostname, not even an explicit nil +func (o *EnvironmentCustomDomainEnvironmentOutput) UnsetHostname() { + o.Hostname.Unset() +} + +// GetCertificateData returns the CertificateData field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomainEnvironmentOutput) GetCertificateData() string { + if o == nil || IsNil(o.CertificateData.Get()) { + var ret string + return ret + } + return *o.CertificateData.Get() +} + +// GetCertificateDataOk returns a tuple with the CertificateData field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomainEnvironmentOutput) GetCertificateDataOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CertificateData.Get(), o.CertificateData.IsSet() +} + +// HasCertificateData returns a boolean if a field has been set. +func (o *EnvironmentCustomDomainEnvironmentOutput) HasCertificateData() bool { + if o != nil && o.CertificateData.IsSet() { + return true + } + + return false +} + +// SetCertificateData gets a reference to the given NullableString and assigns it to the CertificateData field. +func (o *EnvironmentCustomDomainEnvironmentOutput) SetCertificateData(v string) { + o.CertificateData.Set(&v) +} + +// SetCertificateDataNil sets the value for CertificateData to be an explicit nil +func (o *EnvironmentCustomDomainEnvironmentOutput) SetCertificateDataNil() { + o.CertificateData.Set(nil) +} + +// UnsetCertificateData ensures that no value is present for CertificateData, not even an explicit nil +func (o *EnvironmentCustomDomainEnvironmentOutput) UnsetCertificateData() { + o.CertificateData.Unset() +} + +// GetCertificateKey returns the CertificateKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCustomDomainEnvironmentOutput) GetCertificateKey() string { + if o == nil || IsNil(o.CertificateKey.Get()) { + var ret string + return ret + } + return *o.CertificateKey.Get() +} + +// GetCertificateKeyOk returns a tuple with the CertificateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCustomDomainEnvironmentOutput) GetCertificateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CertificateKey.Get(), o.CertificateKey.IsSet() +} + +// HasCertificateKey returns a boolean if a field has been set. +func (o *EnvironmentCustomDomainEnvironmentOutput) HasCertificateKey() bool { + if o != nil && o.CertificateKey.IsSet() { + return true + } + + return false +} + +// SetCertificateKey gets a reference to the given NullableString and assigns it to the CertificateKey field. +func (o *EnvironmentCustomDomainEnvironmentOutput) SetCertificateKey(v string) { + o.CertificateKey.Set(&v) +} + +// SetCertificateKeyNil sets the value for CertificateKey to be an explicit nil +func (o *EnvironmentCustomDomainEnvironmentOutput) SetCertificateKeyNil() { + o.CertificateKey.Set(nil) +} + +// UnsetCertificateKey ensures that no value is present for CertificateKey, not even an explicit nil +func (o *EnvironmentCustomDomainEnvironmentOutput) UnsetCertificateKey() { + o.CertificateKey.Unset() +} + +func (o EnvironmentCustomDomainEnvironmentOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentCustomDomainEnvironmentOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Hostname.IsSet() { + toSerialize["hostname"] = o.Hostname.Get() + } + if o.CertificateData.IsSet() { + toSerialize["certificateData"] = o.CertificateData.Get() + } + if o.CertificateKey.IsSet() { + toSerialize["certificateKey"] = o.CertificateKey.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentCustomDomainEnvironmentOutput struct { + value *EnvironmentCustomDomainEnvironmentOutput + isSet bool +} + +func (v NullableEnvironmentCustomDomainEnvironmentOutput) Get() *EnvironmentCustomDomainEnvironmentOutput { + return v.value +} + +func (v *NullableEnvironmentCustomDomainEnvironmentOutput) Set(val *EnvironmentCustomDomainEnvironmentOutput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentCustomDomainEnvironmentOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentCustomDomainEnvironmentOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentCustomDomainEnvironmentOutput(val *EnvironmentCustomDomainEnvironmentOutput) *NullableEnvironmentCustomDomainEnvironmentOutput { + return &NullableEnvironmentCustomDomainEnvironmentOutput{value: val, isSet: true} +} + +func (v NullableEnvironmentCustomDomainEnvironmentOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentCustomDomainEnvironmentOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_env_var.go b/pkg/api/rewardcloud/model_environment_env_var.go new file mode 100644 index 0000000..1f5e69a --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_env_var.go @@ -0,0 +1,620 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentEnvVar type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentEnvVar{} + +// EnvironmentEnvVar +type EnvironmentEnvVar struct { + Environment NullableAbstractEnvironment `json:"environment,omitempty"` + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` + RawValue NullableString `json:"rawValue,omitempty"` +} + +// NewEnvironmentEnvVar instantiates a new EnvironmentEnvVar object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentEnvVar() *EnvironmentEnvVar { + this := EnvironmentEnvVar{} + return &this +} + +// NewEnvironmentEnvVarWithDefaults instantiates a new EnvironmentEnvVar object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentEnvVarWithDefaults() *EnvironmentEnvVar { + this := EnvironmentEnvVar{} + return &this +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVar) GetEnvironment() AbstractEnvironment { + if o == nil || IsNil(o.Environment.Get()) { + var ret AbstractEnvironment + return ret + } + return *o.Environment.Get() +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVar) GetEnvironmentOk() (*AbstractEnvironment, bool) { + if o == nil { + return nil, false + } + return o.Environment.Get(), o.Environment.IsSet() +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasEnvironment() bool { + if o != nil && o.Environment.IsSet() { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given NullableAbstractEnvironment and assigns it to the Environment field. +func (o *EnvironmentEnvVar) SetEnvironment(v AbstractEnvironment) { + o.Environment.Set(&v) +} + +// SetEnvironmentNil sets the value for Environment to be an explicit nil +func (o *EnvironmentEnvVar) SetEnvironmentNil() { + o.Environment.Set(nil) +} + +// UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil +func (o *EnvironmentEnvVar) UnsetEnvironment() { + o.Environment.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentEnvVar) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvVar) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentEnvVar) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVar) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVar) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentEnvVar) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentEnvVar) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentEnvVar) UnsetUuid() { + o.Uuid.Unset() +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVar) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVar) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *EnvironmentEnvVar) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *EnvironmentEnvVar) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *EnvironmentEnvVar) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVar) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVar) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *EnvironmentEnvVar) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *EnvironmentEnvVar) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *EnvironmentEnvVar) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVar) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVar) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *EnvironmentEnvVar) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *EnvironmentEnvVar) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *EnvironmentEnvVar) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVar) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVar) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentEnvVar) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentEnvVar) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentEnvVar) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVar) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVar) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentEnvVar) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentEnvVar) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentEnvVar) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentEnvVar) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvVar) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentEnvVar) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentEnvVar) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvVar) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentEnvVar) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVar) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVar) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *EnvironmentEnvVar) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *EnvironmentEnvVar) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *EnvironmentEnvVar) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +// GetRawValue returns the RawValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVar) GetRawValue() string { + if o == nil || IsNil(o.RawValue.Get()) { + var ret string + return ret + } + return *o.RawValue.Get() +} + +// GetRawValueOk returns a tuple with the RawValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVar) GetRawValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RawValue.Get(), o.RawValue.IsSet() +} + +// HasRawValue returns a boolean if a field has been set. +func (o *EnvironmentEnvVar) HasRawValue() bool { + if o != nil && o.RawValue.IsSet() { + return true + } + + return false +} + +// SetRawValue gets a reference to the given NullableString and assigns it to the RawValue field. +func (o *EnvironmentEnvVar) SetRawValue(v string) { + o.RawValue.Set(&v) +} + +// SetRawValueNil sets the value for RawValue to be an explicit nil +func (o *EnvironmentEnvVar) SetRawValueNil() { + o.RawValue.Set(nil) +} + +// UnsetRawValue ensures that no value is present for RawValue, not even an explicit nil +func (o *EnvironmentEnvVar) UnsetRawValue() { + o.RawValue.Unset() +} + +func (o EnvironmentEnvVar) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentEnvVar) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Environment.IsSet() { + toSerialize["environment"] = o.Environment.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + if o.RawValue.IsSet() { + toSerialize["rawValue"] = o.RawValue.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentEnvVar struct { + value *EnvironmentEnvVar + isSet bool +} + +func (v NullableEnvironmentEnvVar) Get() *EnvironmentEnvVar { + return v.value +} + +func (v *NullableEnvironmentEnvVar) Set(val *EnvironmentEnvVar) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentEnvVar) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentEnvVar) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentEnvVar(val *EnvironmentEnvVar) *NullableEnvironmentEnvVar { + return &NullableEnvironmentEnvVar{value: val, isSet: true} +} + +func (v NullableEnvironmentEnvVar) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentEnvVar) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_env_var_environment_input.go b/pkg/api/rewardcloud/model_environment_env_var_environment_input.go new file mode 100644 index 0000000..8c2b26e --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_env_var_environment_input.go @@ -0,0 +1,276 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentEnvVarEnvironmentInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentEnvVarEnvironmentInput{} + +// EnvironmentEnvVarEnvironmentInput Class EnvVar +type EnvironmentEnvVarEnvironmentInput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewEnvironmentEnvVarEnvironmentInput instantiates a new EnvironmentEnvVarEnvironmentInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentEnvVarEnvironmentInput() *EnvironmentEnvVarEnvironmentInput { + this := EnvironmentEnvVarEnvironmentInput{} + return &this +} + +// NewEnvironmentEnvVarEnvironmentInputWithDefaults instantiates a new EnvironmentEnvVarEnvironmentInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentEnvVarEnvironmentInputWithDefaults() *EnvironmentEnvVarEnvironmentInput { + this := EnvironmentEnvVarEnvironmentInput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarEnvironmentInput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarEnvironmentInput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *EnvironmentEnvVarEnvironmentInput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *EnvironmentEnvVarEnvironmentInput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *EnvironmentEnvVarEnvironmentInput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *EnvironmentEnvVarEnvironmentInput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarEnvironmentInput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarEnvironmentInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *EnvironmentEnvVarEnvironmentInput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *EnvironmentEnvVarEnvironmentInput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *EnvironmentEnvVarEnvironmentInput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *EnvironmentEnvVarEnvironmentInput) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarEnvironmentInput) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarEnvironmentInput) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *EnvironmentEnvVarEnvironmentInput) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *EnvironmentEnvVarEnvironmentInput) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *EnvironmentEnvVarEnvironmentInput) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *EnvironmentEnvVarEnvironmentInput) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarEnvironmentInput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarEnvironmentInput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *EnvironmentEnvVarEnvironmentInput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *EnvironmentEnvVarEnvironmentInput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *EnvironmentEnvVarEnvironmentInput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *EnvironmentEnvVarEnvironmentInput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o EnvironmentEnvVarEnvironmentInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentEnvVarEnvironmentInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentEnvVarEnvironmentInput struct { + value *EnvironmentEnvVarEnvironmentInput + isSet bool +} + +func (v NullableEnvironmentEnvVarEnvironmentInput) Get() *EnvironmentEnvVarEnvironmentInput { + return v.value +} + +func (v *NullableEnvironmentEnvVarEnvironmentInput) Set(val *EnvironmentEnvVarEnvironmentInput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentEnvVarEnvironmentInput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentEnvVarEnvironmentInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentEnvVarEnvironmentInput(val *EnvironmentEnvVarEnvironmentInput) *NullableEnvironmentEnvVarEnvironmentInput { + return &NullableEnvironmentEnvVarEnvironmentInput{value: val, isSet: true} +} + +func (v NullableEnvironmentEnvVarEnvironmentInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentEnvVarEnvironmentInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_env_var_environment_output.go b/pkg/api/rewardcloud/model_environment_env_var_environment_output.go new file mode 100644 index 0000000..5be315a --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_env_var_environment_output.go @@ -0,0 +1,276 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentEnvVarEnvironmentOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentEnvVarEnvironmentOutput{} + +// EnvironmentEnvVarEnvironmentOutput +type EnvironmentEnvVarEnvironmentOutput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewEnvironmentEnvVarEnvironmentOutput instantiates a new EnvironmentEnvVarEnvironmentOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentEnvVarEnvironmentOutput() *EnvironmentEnvVarEnvironmentOutput { + this := EnvironmentEnvVarEnvironmentOutput{} + return &this +} + +// NewEnvironmentEnvVarEnvironmentOutputWithDefaults instantiates a new EnvironmentEnvVarEnvironmentOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentEnvVarEnvironmentOutputWithDefaults() *EnvironmentEnvVarEnvironmentOutput { + this := EnvironmentEnvVarEnvironmentOutput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarEnvironmentOutput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarEnvironmentOutput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *EnvironmentEnvVarEnvironmentOutput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *EnvironmentEnvVarEnvironmentOutput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *EnvironmentEnvVarEnvironmentOutput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *EnvironmentEnvVarEnvironmentOutput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarEnvironmentOutput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarEnvironmentOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *EnvironmentEnvVarEnvironmentOutput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *EnvironmentEnvVarEnvironmentOutput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *EnvironmentEnvVarEnvironmentOutput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *EnvironmentEnvVarEnvironmentOutput) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarEnvironmentOutput) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarEnvironmentOutput) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *EnvironmentEnvVarEnvironmentOutput) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *EnvironmentEnvVarEnvironmentOutput) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *EnvironmentEnvVarEnvironmentOutput) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *EnvironmentEnvVarEnvironmentOutput) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarEnvironmentOutput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarEnvironmentOutput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *EnvironmentEnvVarEnvironmentOutput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *EnvironmentEnvVarEnvironmentOutput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *EnvironmentEnvVarEnvironmentOutput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *EnvironmentEnvVarEnvironmentOutput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o EnvironmentEnvVarEnvironmentOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentEnvVarEnvironmentOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentEnvVarEnvironmentOutput struct { + value *EnvironmentEnvVarEnvironmentOutput + isSet bool +} + +func (v NullableEnvironmentEnvVarEnvironmentOutput) Get() *EnvironmentEnvVarEnvironmentOutput { + return v.value +} + +func (v *NullableEnvironmentEnvVarEnvironmentOutput) Set(val *EnvironmentEnvVarEnvironmentOutput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentEnvVarEnvironmentOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentEnvVarEnvironmentOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentEnvVarEnvironmentOutput(val *EnvironmentEnvVarEnvironmentOutput) *NullableEnvironmentEnvVarEnvironmentOutput { + return &NullableEnvironmentEnvVarEnvironmentOutput{value: val, isSet: true} +} + +func (v NullableEnvironmentEnvVarEnvironmentOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentEnvVarEnvironmentOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_env_var_template_environment_input.go b/pkg/api/rewardcloud/model_environment_env_var_template_environment_input.go new file mode 100644 index 0000000..102f264 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_env_var_template_environment_input.go @@ -0,0 +1,229 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentEnvVarTemplateEnvironmentInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentEnvVarTemplateEnvironmentInput{} + +// EnvironmentEnvVarTemplateEnvironmentInput Class EnvVar +type EnvironmentEnvVarTemplateEnvironmentInput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewEnvironmentEnvVarTemplateEnvironmentInput instantiates a new EnvironmentEnvVarTemplateEnvironmentInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentEnvVarTemplateEnvironmentInput() *EnvironmentEnvVarTemplateEnvironmentInput { + this := EnvironmentEnvVarTemplateEnvironmentInput{} + return &this +} + +// NewEnvironmentEnvVarTemplateEnvironmentInputWithDefaults instantiates a new EnvironmentEnvVarTemplateEnvironmentInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentEnvVarTemplateEnvironmentInputWithDefaults() *EnvironmentEnvVarTemplateEnvironmentInput { + this := EnvironmentEnvVarTemplateEnvironmentInput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarTemplateEnvironmentInput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarTemplateEnvironmentInput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *EnvironmentEnvVarTemplateEnvironmentInput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *EnvironmentEnvVarTemplateEnvironmentInput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentInput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentInput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarTemplateEnvironmentInput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarTemplateEnvironmentInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *EnvironmentEnvVarTemplateEnvironmentInput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *EnvironmentEnvVarTemplateEnvironmentInput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentInput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentInput) UnsetValue() { + o.Value.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarTemplateEnvironmentInput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarTemplateEnvironmentInput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *EnvironmentEnvVarTemplateEnvironmentInput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *EnvironmentEnvVarTemplateEnvironmentInput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentInput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentInput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o EnvironmentEnvVarTemplateEnvironmentInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentEnvVarTemplateEnvironmentInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentEnvVarTemplateEnvironmentInput struct { + value *EnvironmentEnvVarTemplateEnvironmentInput + isSet bool +} + +func (v NullableEnvironmentEnvVarTemplateEnvironmentInput) Get() *EnvironmentEnvVarTemplateEnvironmentInput { + return v.value +} + +func (v *NullableEnvironmentEnvVarTemplateEnvironmentInput) Set(val *EnvironmentEnvVarTemplateEnvironmentInput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentEnvVarTemplateEnvironmentInput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentEnvVarTemplateEnvironmentInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentEnvVarTemplateEnvironmentInput(val *EnvironmentEnvVarTemplateEnvironmentInput) *NullableEnvironmentEnvVarTemplateEnvironmentInput { + return &NullableEnvironmentEnvVarTemplateEnvironmentInput{value: val, isSet: true} +} + +func (v NullableEnvironmentEnvVarTemplateEnvironmentInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentEnvVarTemplateEnvironmentInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_env_var_template_environment_output.go b/pkg/api/rewardcloud/model_environment_env_var_template_environment_output.go new file mode 100644 index 0000000..0147f3e --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_env_var_template_environment_output.go @@ -0,0 +1,229 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentEnvVarTemplateEnvironmentOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentEnvVarTemplateEnvironmentOutput{} + +// EnvironmentEnvVarTemplateEnvironmentOutput +type EnvironmentEnvVarTemplateEnvironmentOutput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewEnvironmentEnvVarTemplateEnvironmentOutput instantiates a new EnvironmentEnvVarTemplateEnvironmentOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentEnvVarTemplateEnvironmentOutput() *EnvironmentEnvVarTemplateEnvironmentOutput { + this := EnvironmentEnvVarTemplateEnvironmentOutput{} + return &this +} + +// NewEnvironmentEnvVarTemplateEnvironmentOutputWithDefaults instantiates a new EnvironmentEnvVarTemplateEnvironmentOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentEnvVarTemplateEnvironmentOutputWithDefaults() *EnvironmentEnvVarTemplateEnvironmentOutput { + this := EnvironmentEnvVarTemplateEnvironmentOutput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) UnsetValue() { + o.Value.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *EnvironmentEnvVarTemplateEnvironmentOutput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o EnvironmentEnvVarTemplateEnvironmentOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentEnvVarTemplateEnvironmentOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentEnvVarTemplateEnvironmentOutput struct { + value *EnvironmentEnvVarTemplateEnvironmentOutput + isSet bool +} + +func (v NullableEnvironmentEnvVarTemplateEnvironmentOutput) Get() *EnvironmentEnvVarTemplateEnvironmentOutput { + return v.value +} + +func (v *NullableEnvironmentEnvVarTemplateEnvironmentOutput) Set(val *EnvironmentEnvVarTemplateEnvironmentOutput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentEnvVarTemplateEnvironmentOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentEnvVarTemplateEnvironmentOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentEnvVarTemplateEnvironmentOutput(val *EnvironmentEnvVarTemplateEnvironmentOutput) *NullableEnvironmentEnvVarTemplateEnvironmentOutput { + return &NullableEnvironmentEnvVarTemplateEnvironmentOutput{value: val, isSet: true} +} + +func (v NullableEnvironmentEnvVarTemplateEnvironmentOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentEnvVarTemplateEnvironmentOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_environment_input.go b/pkg/api/rewardcloud/model_environment_environment_input.go new file mode 100644 index 0000000..ef1357b --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_environment_input.go @@ -0,0 +1,1009 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentEnvironmentInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentEnvironmentInput{} + +// EnvironmentEnvironmentInput Class Environment +type EnvironmentEnvironmentInput struct { + TemplateIri NullableString `json:"templateIri,omitempty"` + Project NullableString `json:"project,omitempty"` + Provider NullableString `json:"provider,omitempty"` + State NullableString `json:"state,omitempty"` + Cluster NullableString `json:"cluster,omitempty"` + ExportedData []string `json:"exportedData,omitempty"` + ImportedData []string `json:"importedData,omitempty"` + EnvironmentCustomDomain []EnvironmentCustomDomainEnvironmentInput `json:"environmentCustomDomain,omitempty"` + EnvironmentMagentoHostMapping []EnvironmentMagentoHostMappingEnvironmentInput `json:"environmentMagentoHostMapping,omitempty"` + TargetRefName NullableString `json:"targetRefName,omitempty"` + Name NullableString `json:"name,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + DataTransferSettings NullableString `json:"dataTransferSettings,omitempty"` + IsStripDatabase NullableBool `json:"isStripDatabase,omitempty"` + IsAllowOutgoingEmails NullableBool `json:"isAllowOutgoingEmails,omitempty"` + IsAllowHtaccessDevtoolsProtection NullableBool `json:"isAllowHtaccessDevtoolsProtection,omitempty"` + IsInitSampleData NullableBool `json:"isInitSampleData,omitempty"` + EnvVar []EnvironmentEnvVarEnvironmentInput `json:"envVar,omitempty"` + EnvironmentComponent []EnvironmentComponentEnvironmentInput `json:"environmentComponent,omitempty"` +} + +// NewEnvironmentEnvironmentInput instantiates a new EnvironmentEnvironmentInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentEnvironmentInput() *EnvironmentEnvironmentInput { + this := EnvironmentEnvironmentInput{} + return &this +} + +// NewEnvironmentEnvironmentInputWithDefaults instantiates a new EnvironmentEnvironmentInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentEnvironmentInputWithDefaults() *EnvironmentEnvironmentInput { + this := EnvironmentEnvironmentInput{} + return &this +} + +// GetTemplateIri returns the TemplateIri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetTemplateIri() string { + if o == nil || IsNil(o.TemplateIri.Get()) { + var ret string + return ret + } + return *o.TemplateIri.Get() +} + +// GetTemplateIriOk returns a tuple with the TemplateIri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetTemplateIriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TemplateIri.Get(), o.TemplateIri.IsSet() +} + +// HasTemplateIri returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasTemplateIri() bool { + if o != nil && o.TemplateIri.IsSet() { + return true + } + + return false +} + +// SetTemplateIri gets a reference to the given NullableString and assigns it to the TemplateIri field. +func (o *EnvironmentEnvironmentInput) SetTemplateIri(v string) { + o.TemplateIri.Set(&v) +} + +// SetTemplateIriNil sets the value for TemplateIri to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetTemplateIriNil() { + o.TemplateIri.Set(nil) +} + +// UnsetTemplateIri ensures that no value is present for TemplateIri, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetTemplateIri() { + o.TemplateIri.Unset() +} + +// GetProject returns the Project field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetProject() string { + if o == nil || IsNil(o.Project.Get()) { + var ret string + return ret + } + return *o.Project.Get() +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Project.Get(), o.Project.IsSet() +} + +// HasProject returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasProject() bool { + if o != nil && o.Project.IsSet() { + return true + } + + return false +} + +// SetProject gets a reference to the given NullableString and assigns it to the Project field. +func (o *EnvironmentEnvironmentInput) SetProject(v string) { + o.Project.Set(&v) +} + +// SetProjectNil sets the value for Project to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetProjectNil() { + o.Project.Set(nil) +} + +// UnsetProject ensures that no value is present for Project, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetProject() { + o.Project.Unset() +} + +// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetProvider() string { + if o == nil || IsNil(o.Provider.Get()) { + var ret string + return ret + } + return *o.Provider.Get() +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Provider.Get(), o.Provider.IsSet() +} + +// HasProvider returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasProvider() bool { + if o != nil && o.Provider.IsSet() { + return true + } + + return false +} + +// SetProvider gets a reference to the given NullableString and assigns it to the Provider field. +func (o *EnvironmentEnvironmentInput) SetProvider(v string) { + o.Provider.Set(&v) +} + +// SetProviderNil sets the value for Provider to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetProviderNil() { + o.Provider.Set(nil) +} + +// UnsetProvider ensures that no value is present for Provider, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetProvider() { + o.Provider.Unset() +} + +// GetState returns the State field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetState() string { + if o == nil || IsNil(o.State.Get()) { + var ret string + return ret + } + return *o.State.Get() +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.State.Get(), o.State.IsSet() +} + +// HasState returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasState() bool { + if o != nil && o.State.IsSet() { + return true + } + + return false +} + +// SetState gets a reference to the given NullableString and assigns it to the State field. +func (o *EnvironmentEnvironmentInput) SetState(v string) { + o.State.Set(&v) +} + +// SetStateNil sets the value for State to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetStateNil() { + o.State.Set(nil) +} + +// UnsetState ensures that no value is present for State, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetState() { + o.State.Unset() +} + +// GetCluster returns the Cluster field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetCluster() string { + if o == nil || IsNil(o.Cluster.Get()) { + var ret string + return ret + } + return *o.Cluster.Get() +} + +// GetClusterOk returns a tuple with the Cluster field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetClusterOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Cluster.Get(), o.Cluster.IsSet() +} + +// HasCluster returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasCluster() bool { + if o != nil && o.Cluster.IsSet() { + return true + } + + return false +} + +// SetCluster gets a reference to the given NullableString and assigns it to the Cluster field. +func (o *EnvironmentEnvironmentInput) SetCluster(v string) { + o.Cluster.Set(&v) +} + +// SetClusterNil sets the value for Cluster to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetClusterNil() { + o.Cluster.Set(nil) +} + +// UnsetCluster ensures that no value is present for Cluster, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetCluster() { + o.Cluster.Unset() +} + +// GetExportedData returns the ExportedData field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentInput) GetExportedData() []string { + if o == nil || IsNil(o.ExportedData) { + var ret []string + return ret + } + return o.ExportedData +} + +// GetExportedDataOk returns a tuple with the ExportedData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentInput) GetExportedDataOk() ([]string, bool) { + if o == nil || IsNil(o.ExportedData) { + return nil, false + } + return o.ExportedData, true +} + +// HasExportedData returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasExportedData() bool { + if o != nil && !IsNil(o.ExportedData) { + return true + } + + return false +} + +// SetExportedData gets a reference to the given []string and assigns it to the ExportedData field. +func (o *EnvironmentEnvironmentInput) SetExportedData(v []string) { + o.ExportedData = v +} + +// GetImportedData returns the ImportedData field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentInput) GetImportedData() []string { + if o == nil || IsNil(o.ImportedData) { + var ret []string + return ret + } + return o.ImportedData +} + +// GetImportedDataOk returns a tuple with the ImportedData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentInput) GetImportedDataOk() ([]string, bool) { + if o == nil || IsNil(o.ImportedData) { + return nil, false + } + return o.ImportedData, true +} + +// HasImportedData returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasImportedData() bool { + if o != nil && !IsNil(o.ImportedData) { + return true + } + + return false +} + +// SetImportedData gets a reference to the given []string and assigns it to the ImportedData field. +func (o *EnvironmentEnvironmentInput) SetImportedData(v []string) { + o.ImportedData = v +} + +// GetEnvironmentCustomDomain returns the EnvironmentCustomDomain field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentInput) GetEnvironmentCustomDomain() []EnvironmentCustomDomainEnvironmentInput { + if o == nil || IsNil(o.EnvironmentCustomDomain) { + var ret []EnvironmentCustomDomainEnvironmentInput + return ret + } + return o.EnvironmentCustomDomain +} + +// GetEnvironmentCustomDomainOk returns a tuple with the EnvironmentCustomDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentInput) GetEnvironmentCustomDomainOk() ([]EnvironmentCustomDomainEnvironmentInput, bool) { + if o == nil || IsNil(o.EnvironmentCustomDomain) { + return nil, false + } + return o.EnvironmentCustomDomain, true +} + +// HasEnvironmentCustomDomain returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasEnvironmentCustomDomain() bool { + if o != nil && !IsNil(o.EnvironmentCustomDomain) { + return true + } + + return false +} + +// SetEnvironmentCustomDomain gets a reference to the given []EnvironmentCustomDomainEnvironmentInput and assigns it to the EnvironmentCustomDomain field. +func (o *EnvironmentEnvironmentInput) SetEnvironmentCustomDomain(v []EnvironmentCustomDomainEnvironmentInput) { + o.EnvironmentCustomDomain = v +} + +// GetEnvironmentMagentoHostMapping returns the EnvironmentMagentoHostMapping field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentInput) GetEnvironmentMagentoHostMapping() []EnvironmentMagentoHostMappingEnvironmentInput { + if o == nil || IsNil(o.EnvironmentMagentoHostMapping) { + var ret []EnvironmentMagentoHostMappingEnvironmentInput + return ret + } + return o.EnvironmentMagentoHostMapping +} + +// GetEnvironmentMagentoHostMappingOk returns a tuple with the EnvironmentMagentoHostMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentInput) GetEnvironmentMagentoHostMappingOk() ([]EnvironmentMagentoHostMappingEnvironmentInput, bool) { + if o == nil || IsNil(o.EnvironmentMagentoHostMapping) { + return nil, false + } + return o.EnvironmentMagentoHostMapping, true +} + +// HasEnvironmentMagentoHostMapping returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasEnvironmentMagentoHostMapping() bool { + if o != nil && !IsNil(o.EnvironmentMagentoHostMapping) { + return true + } + + return false +} + +// SetEnvironmentMagentoHostMapping gets a reference to the given []EnvironmentMagentoHostMappingEnvironmentInput and assigns it to the EnvironmentMagentoHostMapping field. +func (o *EnvironmentEnvironmentInput) SetEnvironmentMagentoHostMapping(v []EnvironmentMagentoHostMappingEnvironmentInput) { + o.EnvironmentMagentoHostMapping = v +} + +// GetTargetRefName returns the TargetRefName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetTargetRefName() string { + if o == nil || IsNil(o.TargetRefName.Get()) { + var ret string + return ret + } + return *o.TargetRefName.Get() +} + +// GetTargetRefNameOk returns a tuple with the TargetRefName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetTargetRefNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TargetRefName.Get(), o.TargetRefName.IsSet() +} + +// HasTargetRefName returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasTargetRefName() bool { + if o != nil && o.TargetRefName.IsSet() { + return true + } + + return false +} + +// SetTargetRefName gets a reference to the given NullableString and assigns it to the TargetRefName field. +func (o *EnvironmentEnvironmentInput) SetTargetRefName(v string) { + o.TargetRefName.Set(&v) +} + +// SetTargetRefNameNil sets the value for TargetRefName to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetTargetRefNameNil() { + o.TargetRefName.Set(nil) +} + +// UnsetTargetRefName ensures that no value is present for TargetRefName, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetTargetRefName() { + o.TargetRefName.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *EnvironmentEnvironmentInput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetName() { + o.Name.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *EnvironmentEnvironmentInput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *EnvironmentEnvironmentInput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *EnvironmentEnvironmentInput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetStorage() { + o.Storage.Unset() +} + +// GetDataTransferSettings returns the DataTransferSettings field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetDataTransferSettings() string { + if o == nil || IsNil(o.DataTransferSettings.Get()) { + var ret string + return ret + } + return *o.DataTransferSettings.Get() +} + +// GetDataTransferSettingsOk returns a tuple with the DataTransferSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetDataTransferSettingsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DataTransferSettings.Get(), o.DataTransferSettings.IsSet() +} + +// HasDataTransferSettings returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasDataTransferSettings() bool { + if o != nil && o.DataTransferSettings.IsSet() { + return true + } + + return false +} + +// SetDataTransferSettings gets a reference to the given NullableString and assigns it to the DataTransferSettings field. +func (o *EnvironmentEnvironmentInput) SetDataTransferSettings(v string) { + o.DataTransferSettings.Set(&v) +} + +// SetDataTransferSettingsNil sets the value for DataTransferSettings to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetDataTransferSettingsNil() { + o.DataTransferSettings.Set(nil) +} + +// UnsetDataTransferSettings ensures that no value is present for DataTransferSettings, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetDataTransferSettings() { + o.DataTransferSettings.Unset() +} + +// GetIsStripDatabase returns the IsStripDatabase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetIsStripDatabase() bool { + if o == nil || IsNil(o.IsStripDatabase.Get()) { + var ret bool + return ret + } + return *o.IsStripDatabase.Get() +} + +// GetIsStripDatabaseOk returns a tuple with the IsStripDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetIsStripDatabaseOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsStripDatabase.Get(), o.IsStripDatabase.IsSet() +} + +// HasIsStripDatabase returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasIsStripDatabase() bool { + if o != nil && o.IsStripDatabase.IsSet() { + return true + } + + return false +} + +// SetIsStripDatabase gets a reference to the given NullableBool and assigns it to the IsStripDatabase field. +func (o *EnvironmentEnvironmentInput) SetIsStripDatabase(v bool) { + o.IsStripDatabase.Set(&v) +} + +// SetIsStripDatabaseNil sets the value for IsStripDatabase to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetIsStripDatabaseNil() { + o.IsStripDatabase.Set(nil) +} + +// UnsetIsStripDatabase ensures that no value is present for IsStripDatabase, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetIsStripDatabase() { + o.IsStripDatabase.Unset() +} + +// GetIsAllowOutgoingEmails returns the IsAllowOutgoingEmails field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetIsAllowOutgoingEmails() bool { + if o == nil || IsNil(o.IsAllowOutgoingEmails.Get()) { + var ret bool + return ret + } + return *o.IsAllowOutgoingEmails.Get() +} + +// GetIsAllowOutgoingEmailsOk returns a tuple with the IsAllowOutgoingEmails field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetIsAllowOutgoingEmailsOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsAllowOutgoingEmails.Get(), o.IsAllowOutgoingEmails.IsSet() +} + +// HasIsAllowOutgoingEmails returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasIsAllowOutgoingEmails() bool { + if o != nil && o.IsAllowOutgoingEmails.IsSet() { + return true + } + + return false +} + +// SetIsAllowOutgoingEmails gets a reference to the given NullableBool and assigns it to the IsAllowOutgoingEmails field. +func (o *EnvironmentEnvironmentInput) SetIsAllowOutgoingEmails(v bool) { + o.IsAllowOutgoingEmails.Set(&v) +} + +// SetIsAllowOutgoingEmailsNil sets the value for IsAllowOutgoingEmails to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetIsAllowOutgoingEmailsNil() { + o.IsAllowOutgoingEmails.Set(nil) +} + +// UnsetIsAllowOutgoingEmails ensures that no value is present for IsAllowOutgoingEmails, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetIsAllowOutgoingEmails() { + o.IsAllowOutgoingEmails.Unset() +} + +// GetIsAllowHtaccessDevtoolsProtection returns the IsAllowHtaccessDevtoolsProtection field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetIsAllowHtaccessDevtoolsProtection() bool { + if o == nil || IsNil(o.IsAllowHtaccessDevtoolsProtection.Get()) { + var ret bool + return ret + } + return *o.IsAllowHtaccessDevtoolsProtection.Get() +} + +// GetIsAllowHtaccessDevtoolsProtectionOk returns a tuple with the IsAllowHtaccessDevtoolsProtection field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetIsAllowHtaccessDevtoolsProtectionOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsAllowHtaccessDevtoolsProtection.Get(), o.IsAllowHtaccessDevtoolsProtection.IsSet() +} + +// HasIsAllowHtaccessDevtoolsProtection returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasIsAllowHtaccessDevtoolsProtection() bool { + if o != nil && o.IsAllowHtaccessDevtoolsProtection.IsSet() { + return true + } + + return false +} + +// SetIsAllowHtaccessDevtoolsProtection gets a reference to the given NullableBool and assigns it to the IsAllowHtaccessDevtoolsProtection field. +func (o *EnvironmentEnvironmentInput) SetIsAllowHtaccessDevtoolsProtection(v bool) { + o.IsAllowHtaccessDevtoolsProtection.Set(&v) +} + +// SetIsAllowHtaccessDevtoolsProtectionNil sets the value for IsAllowHtaccessDevtoolsProtection to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetIsAllowHtaccessDevtoolsProtectionNil() { + o.IsAllowHtaccessDevtoolsProtection.Set(nil) +} + +// UnsetIsAllowHtaccessDevtoolsProtection ensures that no value is present for IsAllowHtaccessDevtoolsProtection, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetIsAllowHtaccessDevtoolsProtection() { + o.IsAllowHtaccessDevtoolsProtection.Unset() +} + +// GetIsInitSampleData returns the IsInitSampleData field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentInput) GetIsInitSampleData() bool { + if o == nil || IsNil(o.IsInitSampleData.Get()) { + var ret bool + return ret + } + return *o.IsInitSampleData.Get() +} + +// GetIsInitSampleDataOk returns a tuple with the IsInitSampleData field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentInput) GetIsInitSampleDataOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInitSampleData.Get(), o.IsInitSampleData.IsSet() +} + +// HasIsInitSampleData returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasIsInitSampleData() bool { + if o != nil && o.IsInitSampleData.IsSet() { + return true + } + + return false +} + +// SetIsInitSampleData gets a reference to the given NullableBool and assigns it to the IsInitSampleData field. +func (o *EnvironmentEnvironmentInput) SetIsInitSampleData(v bool) { + o.IsInitSampleData.Set(&v) +} + +// SetIsInitSampleDataNil sets the value for IsInitSampleData to be an explicit nil +func (o *EnvironmentEnvironmentInput) SetIsInitSampleDataNil() { + o.IsInitSampleData.Set(nil) +} + +// UnsetIsInitSampleData ensures that no value is present for IsInitSampleData, not even an explicit nil +func (o *EnvironmentEnvironmentInput) UnsetIsInitSampleData() { + o.IsInitSampleData.Unset() +} + +// GetEnvVar returns the EnvVar field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentInput) GetEnvVar() []EnvironmentEnvVarEnvironmentInput { + if o == nil || IsNil(o.EnvVar) { + var ret []EnvironmentEnvVarEnvironmentInput + return ret + } + return o.EnvVar +} + +// GetEnvVarOk returns a tuple with the EnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentInput) GetEnvVarOk() ([]EnvironmentEnvVarEnvironmentInput, bool) { + if o == nil || IsNil(o.EnvVar) { + return nil, false + } + return o.EnvVar, true +} + +// HasEnvVar returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasEnvVar() bool { + if o != nil && !IsNil(o.EnvVar) { + return true + } + + return false +} + +// SetEnvVar gets a reference to the given []EnvironmentEnvVarEnvironmentInput and assigns it to the EnvVar field. +func (o *EnvironmentEnvironmentInput) SetEnvVar(v []EnvironmentEnvVarEnvironmentInput) { + o.EnvVar = v +} + +// GetEnvironmentComponent returns the EnvironmentComponent field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentInput) GetEnvironmentComponent() []EnvironmentComponentEnvironmentInput { + if o == nil || IsNil(o.EnvironmentComponent) { + var ret []EnvironmentComponentEnvironmentInput + return ret + } + return o.EnvironmentComponent +} + +// GetEnvironmentComponentOk returns a tuple with the EnvironmentComponent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentInput) GetEnvironmentComponentOk() ([]EnvironmentComponentEnvironmentInput, bool) { + if o == nil || IsNil(o.EnvironmentComponent) { + return nil, false + } + return o.EnvironmentComponent, true +} + +// HasEnvironmentComponent returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentInput) HasEnvironmentComponent() bool { + if o != nil && !IsNil(o.EnvironmentComponent) { + return true + } + + return false +} + +// SetEnvironmentComponent gets a reference to the given []EnvironmentComponentEnvironmentInput and assigns it to the EnvironmentComponent field. +func (o *EnvironmentEnvironmentInput) SetEnvironmentComponent(v []EnvironmentComponentEnvironmentInput) { + o.EnvironmentComponent = v +} + +func (o EnvironmentEnvironmentInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentEnvironmentInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.TemplateIri.IsSet() { + toSerialize["templateIri"] = o.TemplateIri.Get() + } + if o.Project.IsSet() { + toSerialize["project"] = o.Project.Get() + } + if o.Provider.IsSet() { + toSerialize["provider"] = o.Provider.Get() + } + if o.State.IsSet() { + toSerialize["state"] = o.State.Get() + } + if o.Cluster.IsSet() { + toSerialize["cluster"] = o.Cluster.Get() + } + if !IsNil(o.ExportedData) { + toSerialize["exportedData"] = o.ExportedData + } + if !IsNil(o.ImportedData) { + toSerialize["importedData"] = o.ImportedData + } + if !IsNil(o.EnvironmentCustomDomain) { + toSerialize["environmentCustomDomain"] = o.EnvironmentCustomDomain + } + if !IsNil(o.EnvironmentMagentoHostMapping) { + toSerialize["environmentMagentoHostMapping"] = o.EnvironmentMagentoHostMapping + } + if o.TargetRefName.IsSet() { + toSerialize["targetRefName"] = o.TargetRefName.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.DataTransferSettings.IsSet() { + toSerialize["dataTransferSettings"] = o.DataTransferSettings.Get() + } + if o.IsStripDatabase.IsSet() { + toSerialize["isStripDatabase"] = o.IsStripDatabase.Get() + } + if o.IsAllowOutgoingEmails.IsSet() { + toSerialize["isAllowOutgoingEmails"] = o.IsAllowOutgoingEmails.Get() + } + if o.IsAllowHtaccessDevtoolsProtection.IsSet() { + toSerialize["isAllowHtaccessDevtoolsProtection"] = o.IsAllowHtaccessDevtoolsProtection.Get() + } + if o.IsInitSampleData.IsSet() { + toSerialize["isInitSampleData"] = o.IsInitSampleData.Get() + } + if !IsNil(o.EnvVar) { + toSerialize["envVar"] = o.EnvVar + } + if !IsNil(o.EnvironmentComponent) { + toSerialize["environmentComponent"] = o.EnvironmentComponent + } + return toSerialize, nil +} + +type NullableEnvironmentEnvironmentInput struct { + value *EnvironmentEnvironmentInput + isSet bool +} + +func (v NullableEnvironmentEnvironmentInput) Get() *EnvironmentEnvironmentInput { + return v.value +} + +func (v *NullableEnvironmentEnvironmentInput) Set(val *EnvironmentEnvironmentInput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentEnvironmentInput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentEnvironmentInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentEnvironmentInput(val *EnvironmentEnvironmentInput) *NullableEnvironmentEnvironmentInput { + return &NullableEnvironmentEnvironmentInput{value: val, isSet: true} +} + +func (v NullableEnvironmentEnvironmentInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentEnvironmentInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_environment_output.go b/pkg/api/rewardcloud/model_environment_environment_output.go new file mode 100644 index 0000000..f0a0e93 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_environment_output.go @@ -0,0 +1,1306 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentEnvironmentOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentEnvironmentOutput{} + +// EnvironmentEnvironmentOutput Class Environment +type EnvironmentEnvironmentOutput struct { + TemplateIri NullableString `json:"templateIri,omitempty"` + Project NullableString `json:"project,omitempty"` + Provider NullableString `json:"provider,omitempty"` + State NullableString `json:"state,omitempty"` + Cluster NullableString `json:"cluster,omitempty"` + EnvironmentAccess NullableString `json:"environmentAccess,omitempty"` + ExportedData []string `json:"exportedData,omitempty"` + ImportedData []string `json:"importedData,omitempty"` + StateByInfra NullableString `json:"stateByInfra,omitempty"` + EnvironmentCustomDomain []EnvironmentCustomDomainEnvironmentOutput `json:"environmentCustomDomain,omitempty"` + EnvironmentMagentoHostMapping []EnvironmentMagentoHostMappingEnvironmentOutput `json:"environmentMagentoHostMapping,omitempty"` + TargetRefName NullableString `json:"targetRefName,omitempty"` + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + DataTransferSettings NullableString `json:"dataTransferSettings,omitempty"` + IsStripDatabase NullableBool `json:"isStripDatabase,omitempty"` + IsAllowOutgoingEmails NullableBool `json:"isAllowOutgoingEmails,omitempty"` + IsAllowHtaccessDevtoolsProtection NullableBool `json:"isAllowHtaccessDevtoolsProtection,omitempty"` + IsInitSampleData NullableBool `json:"isInitSampleData,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + EnvVar []EnvironmentEnvVarEnvironmentOutput `json:"envVar,omitempty"` + EnvironmentComponent []EnvironmentComponentEnvironmentOutput `json:"environmentComponent,omitempty"` +} + +// NewEnvironmentEnvironmentOutput instantiates a new EnvironmentEnvironmentOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentEnvironmentOutput() *EnvironmentEnvironmentOutput { + this := EnvironmentEnvironmentOutput{} + return &this +} + +// NewEnvironmentEnvironmentOutputWithDefaults instantiates a new EnvironmentEnvironmentOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentEnvironmentOutputWithDefaults() *EnvironmentEnvironmentOutput { + this := EnvironmentEnvironmentOutput{} + return &this +} + +// GetTemplateIri returns the TemplateIri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetTemplateIri() string { + if o == nil || IsNil(o.TemplateIri.Get()) { + var ret string + return ret + } + return *o.TemplateIri.Get() +} + +// GetTemplateIriOk returns a tuple with the TemplateIri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetTemplateIriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TemplateIri.Get(), o.TemplateIri.IsSet() +} + +// HasTemplateIri returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasTemplateIri() bool { + if o != nil && o.TemplateIri.IsSet() { + return true + } + + return false +} + +// SetTemplateIri gets a reference to the given NullableString and assigns it to the TemplateIri field. +func (o *EnvironmentEnvironmentOutput) SetTemplateIri(v string) { + o.TemplateIri.Set(&v) +} + +// SetTemplateIriNil sets the value for TemplateIri to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetTemplateIriNil() { + o.TemplateIri.Set(nil) +} + +// UnsetTemplateIri ensures that no value is present for TemplateIri, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetTemplateIri() { + o.TemplateIri.Unset() +} + +// GetProject returns the Project field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetProject() string { + if o == nil || IsNil(o.Project.Get()) { + var ret string + return ret + } + return *o.Project.Get() +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Project.Get(), o.Project.IsSet() +} + +// HasProject returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasProject() bool { + if o != nil && o.Project.IsSet() { + return true + } + + return false +} + +// SetProject gets a reference to the given NullableString and assigns it to the Project field. +func (o *EnvironmentEnvironmentOutput) SetProject(v string) { + o.Project.Set(&v) +} + +// SetProjectNil sets the value for Project to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetProjectNil() { + o.Project.Set(nil) +} + +// UnsetProject ensures that no value is present for Project, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetProject() { + o.Project.Unset() +} + +// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetProvider() string { + if o == nil || IsNil(o.Provider.Get()) { + var ret string + return ret + } + return *o.Provider.Get() +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Provider.Get(), o.Provider.IsSet() +} + +// HasProvider returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasProvider() bool { + if o != nil && o.Provider.IsSet() { + return true + } + + return false +} + +// SetProvider gets a reference to the given NullableString and assigns it to the Provider field. +func (o *EnvironmentEnvironmentOutput) SetProvider(v string) { + o.Provider.Set(&v) +} + +// SetProviderNil sets the value for Provider to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetProviderNil() { + o.Provider.Set(nil) +} + +// UnsetProvider ensures that no value is present for Provider, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetProvider() { + o.Provider.Unset() +} + +// GetState returns the State field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetState() string { + if o == nil || IsNil(o.State.Get()) { + var ret string + return ret + } + return *o.State.Get() +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.State.Get(), o.State.IsSet() +} + +// HasState returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasState() bool { + if o != nil && o.State.IsSet() { + return true + } + + return false +} + +// SetState gets a reference to the given NullableString and assigns it to the State field. +func (o *EnvironmentEnvironmentOutput) SetState(v string) { + o.State.Set(&v) +} + +// SetStateNil sets the value for State to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetStateNil() { + o.State.Set(nil) +} + +// UnsetState ensures that no value is present for State, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetState() { + o.State.Unset() +} + +// GetCluster returns the Cluster field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetCluster() string { + if o == nil || IsNil(o.Cluster.Get()) { + var ret string + return ret + } + return *o.Cluster.Get() +} + +// GetClusterOk returns a tuple with the Cluster field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetClusterOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Cluster.Get(), o.Cluster.IsSet() +} + +// HasCluster returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasCluster() bool { + if o != nil && o.Cluster.IsSet() { + return true + } + + return false +} + +// SetCluster gets a reference to the given NullableString and assigns it to the Cluster field. +func (o *EnvironmentEnvironmentOutput) SetCluster(v string) { + o.Cluster.Set(&v) +} + +// SetClusterNil sets the value for Cluster to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetClusterNil() { + o.Cluster.Set(nil) +} + +// UnsetCluster ensures that no value is present for Cluster, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetCluster() { + o.Cluster.Unset() +} + +// GetEnvironmentAccess returns the EnvironmentAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetEnvironmentAccess() string { + if o == nil || IsNil(o.EnvironmentAccess.Get()) { + var ret string + return ret + } + return *o.EnvironmentAccess.Get() +} + +// GetEnvironmentAccessOk returns a tuple with the EnvironmentAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetEnvironmentAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentAccess.Get(), o.EnvironmentAccess.IsSet() +} + +// HasEnvironmentAccess returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasEnvironmentAccess() bool { + if o != nil && o.EnvironmentAccess.IsSet() { + return true + } + + return false +} + +// SetEnvironmentAccess gets a reference to the given NullableString and assigns it to the EnvironmentAccess field. +func (o *EnvironmentEnvironmentOutput) SetEnvironmentAccess(v string) { + o.EnvironmentAccess.Set(&v) +} + +// SetEnvironmentAccessNil sets the value for EnvironmentAccess to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetEnvironmentAccessNil() { + o.EnvironmentAccess.Set(nil) +} + +// UnsetEnvironmentAccess ensures that no value is present for EnvironmentAccess, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetEnvironmentAccess() { + o.EnvironmentAccess.Unset() +} + +// GetExportedData returns the ExportedData field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentOutput) GetExportedData() []string { + if o == nil || IsNil(o.ExportedData) { + var ret []string + return ret + } + return o.ExportedData +} + +// GetExportedDataOk returns a tuple with the ExportedData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentOutput) GetExportedDataOk() ([]string, bool) { + if o == nil || IsNil(o.ExportedData) { + return nil, false + } + return o.ExportedData, true +} + +// HasExportedData returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasExportedData() bool { + if o != nil && !IsNil(o.ExportedData) { + return true + } + + return false +} + +// SetExportedData gets a reference to the given []string and assigns it to the ExportedData field. +func (o *EnvironmentEnvironmentOutput) SetExportedData(v []string) { + o.ExportedData = v +} + +// GetImportedData returns the ImportedData field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentOutput) GetImportedData() []string { + if o == nil || IsNil(o.ImportedData) { + var ret []string + return ret + } + return o.ImportedData +} + +// GetImportedDataOk returns a tuple with the ImportedData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentOutput) GetImportedDataOk() ([]string, bool) { + if o == nil || IsNil(o.ImportedData) { + return nil, false + } + return o.ImportedData, true +} + +// HasImportedData returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasImportedData() bool { + if o != nil && !IsNil(o.ImportedData) { + return true + } + + return false +} + +// SetImportedData gets a reference to the given []string and assigns it to the ImportedData field. +func (o *EnvironmentEnvironmentOutput) SetImportedData(v []string) { + o.ImportedData = v +} + +// GetStateByInfra returns the StateByInfra field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetStateByInfra() string { + if o == nil || IsNil(o.StateByInfra.Get()) { + var ret string + return ret + } + return *o.StateByInfra.Get() +} + +// GetStateByInfraOk returns a tuple with the StateByInfra field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetStateByInfraOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.StateByInfra.Get(), o.StateByInfra.IsSet() +} + +// HasStateByInfra returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasStateByInfra() bool { + if o != nil && o.StateByInfra.IsSet() { + return true + } + + return false +} + +// SetStateByInfra gets a reference to the given NullableString and assigns it to the StateByInfra field. +func (o *EnvironmentEnvironmentOutput) SetStateByInfra(v string) { + o.StateByInfra.Set(&v) +} + +// SetStateByInfraNil sets the value for StateByInfra to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetStateByInfraNil() { + o.StateByInfra.Set(nil) +} + +// UnsetStateByInfra ensures that no value is present for StateByInfra, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetStateByInfra() { + o.StateByInfra.Unset() +} + +// GetEnvironmentCustomDomain returns the EnvironmentCustomDomain field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentOutput) GetEnvironmentCustomDomain() []EnvironmentCustomDomainEnvironmentOutput { + if o == nil || IsNil(o.EnvironmentCustomDomain) { + var ret []EnvironmentCustomDomainEnvironmentOutput + return ret + } + return o.EnvironmentCustomDomain +} + +// GetEnvironmentCustomDomainOk returns a tuple with the EnvironmentCustomDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentOutput) GetEnvironmentCustomDomainOk() ([]EnvironmentCustomDomainEnvironmentOutput, bool) { + if o == nil || IsNil(o.EnvironmentCustomDomain) { + return nil, false + } + return o.EnvironmentCustomDomain, true +} + +// HasEnvironmentCustomDomain returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasEnvironmentCustomDomain() bool { + if o != nil && !IsNil(o.EnvironmentCustomDomain) { + return true + } + + return false +} + +// SetEnvironmentCustomDomain gets a reference to the given []EnvironmentCustomDomainEnvironmentOutput and assigns it to the EnvironmentCustomDomain field. +func (o *EnvironmentEnvironmentOutput) SetEnvironmentCustomDomain(v []EnvironmentCustomDomainEnvironmentOutput) { + o.EnvironmentCustomDomain = v +} + +// GetEnvironmentMagentoHostMapping returns the EnvironmentMagentoHostMapping field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentOutput) GetEnvironmentMagentoHostMapping() []EnvironmentMagentoHostMappingEnvironmentOutput { + if o == nil || IsNil(o.EnvironmentMagentoHostMapping) { + var ret []EnvironmentMagentoHostMappingEnvironmentOutput + return ret + } + return o.EnvironmentMagentoHostMapping +} + +// GetEnvironmentMagentoHostMappingOk returns a tuple with the EnvironmentMagentoHostMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentOutput) GetEnvironmentMagentoHostMappingOk() ([]EnvironmentMagentoHostMappingEnvironmentOutput, bool) { + if o == nil || IsNil(o.EnvironmentMagentoHostMapping) { + return nil, false + } + return o.EnvironmentMagentoHostMapping, true +} + +// HasEnvironmentMagentoHostMapping returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasEnvironmentMagentoHostMapping() bool { + if o != nil && !IsNil(o.EnvironmentMagentoHostMapping) { + return true + } + + return false +} + +// SetEnvironmentMagentoHostMapping gets a reference to the given []EnvironmentMagentoHostMappingEnvironmentOutput and assigns it to the EnvironmentMagentoHostMapping field. +func (o *EnvironmentEnvironmentOutput) SetEnvironmentMagentoHostMapping(v []EnvironmentMagentoHostMappingEnvironmentOutput) { + o.EnvironmentMagentoHostMapping = v +} + +// GetTargetRefName returns the TargetRefName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetTargetRefName() string { + if o == nil || IsNil(o.TargetRefName.Get()) { + var ret string + return ret + } + return *o.TargetRefName.Get() +} + +// GetTargetRefNameOk returns a tuple with the TargetRefName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetTargetRefNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TargetRefName.Get(), o.TargetRefName.IsSet() +} + +// HasTargetRefName returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasTargetRefName() bool { + if o != nil && o.TargetRefName.IsSet() { + return true + } + + return false +} + +// SetTargetRefName gets a reference to the given NullableString and assigns it to the TargetRefName field. +func (o *EnvironmentEnvironmentOutput) SetTargetRefName(v string) { + o.TargetRefName.Set(&v) +} + +// SetTargetRefNameNil sets the value for TargetRefName to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetTargetRefNameNil() { + o.TargetRefName.Set(nil) +} + +// UnsetTargetRefName ensures that no value is present for TargetRefName, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetTargetRefName() { + o.TargetRefName.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentOutput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentOutput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentEnvironmentOutput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentEnvironmentOutput) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *EnvironmentEnvironmentOutput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *EnvironmentEnvironmentOutput) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *EnvironmentEnvironmentOutput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *EnvironmentEnvironmentOutput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *EnvironmentEnvironmentOutput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetStorage() { + o.Storage.Unset() +} + +// GetDataTransferSettings returns the DataTransferSettings field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetDataTransferSettings() string { + if o == nil || IsNil(o.DataTransferSettings.Get()) { + var ret string + return ret + } + return *o.DataTransferSettings.Get() +} + +// GetDataTransferSettingsOk returns a tuple with the DataTransferSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetDataTransferSettingsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DataTransferSettings.Get(), o.DataTransferSettings.IsSet() +} + +// HasDataTransferSettings returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasDataTransferSettings() bool { + if o != nil && o.DataTransferSettings.IsSet() { + return true + } + + return false +} + +// SetDataTransferSettings gets a reference to the given NullableString and assigns it to the DataTransferSettings field. +func (o *EnvironmentEnvironmentOutput) SetDataTransferSettings(v string) { + o.DataTransferSettings.Set(&v) +} + +// SetDataTransferSettingsNil sets the value for DataTransferSettings to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetDataTransferSettingsNil() { + o.DataTransferSettings.Set(nil) +} + +// UnsetDataTransferSettings ensures that no value is present for DataTransferSettings, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetDataTransferSettings() { + o.DataTransferSettings.Unset() +} + +// GetIsStripDatabase returns the IsStripDatabase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetIsStripDatabase() bool { + if o == nil || IsNil(o.IsStripDatabase.Get()) { + var ret bool + return ret + } + return *o.IsStripDatabase.Get() +} + +// GetIsStripDatabaseOk returns a tuple with the IsStripDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetIsStripDatabaseOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsStripDatabase.Get(), o.IsStripDatabase.IsSet() +} + +// HasIsStripDatabase returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasIsStripDatabase() bool { + if o != nil && o.IsStripDatabase.IsSet() { + return true + } + + return false +} + +// SetIsStripDatabase gets a reference to the given NullableBool and assigns it to the IsStripDatabase field. +func (o *EnvironmentEnvironmentOutput) SetIsStripDatabase(v bool) { + o.IsStripDatabase.Set(&v) +} + +// SetIsStripDatabaseNil sets the value for IsStripDatabase to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetIsStripDatabaseNil() { + o.IsStripDatabase.Set(nil) +} + +// UnsetIsStripDatabase ensures that no value is present for IsStripDatabase, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetIsStripDatabase() { + o.IsStripDatabase.Unset() +} + +// GetIsAllowOutgoingEmails returns the IsAllowOutgoingEmails field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetIsAllowOutgoingEmails() bool { + if o == nil || IsNil(o.IsAllowOutgoingEmails.Get()) { + var ret bool + return ret + } + return *o.IsAllowOutgoingEmails.Get() +} + +// GetIsAllowOutgoingEmailsOk returns a tuple with the IsAllowOutgoingEmails field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetIsAllowOutgoingEmailsOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsAllowOutgoingEmails.Get(), o.IsAllowOutgoingEmails.IsSet() +} + +// HasIsAllowOutgoingEmails returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasIsAllowOutgoingEmails() bool { + if o != nil && o.IsAllowOutgoingEmails.IsSet() { + return true + } + + return false +} + +// SetIsAllowOutgoingEmails gets a reference to the given NullableBool and assigns it to the IsAllowOutgoingEmails field. +func (o *EnvironmentEnvironmentOutput) SetIsAllowOutgoingEmails(v bool) { + o.IsAllowOutgoingEmails.Set(&v) +} + +// SetIsAllowOutgoingEmailsNil sets the value for IsAllowOutgoingEmails to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetIsAllowOutgoingEmailsNil() { + o.IsAllowOutgoingEmails.Set(nil) +} + +// UnsetIsAllowOutgoingEmails ensures that no value is present for IsAllowOutgoingEmails, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetIsAllowOutgoingEmails() { + o.IsAllowOutgoingEmails.Unset() +} + +// GetIsAllowHtaccessDevtoolsProtection returns the IsAllowHtaccessDevtoolsProtection field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetIsAllowHtaccessDevtoolsProtection() bool { + if o == nil || IsNil(o.IsAllowHtaccessDevtoolsProtection.Get()) { + var ret bool + return ret + } + return *o.IsAllowHtaccessDevtoolsProtection.Get() +} + +// GetIsAllowHtaccessDevtoolsProtectionOk returns a tuple with the IsAllowHtaccessDevtoolsProtection field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetIsAllowHtaccessDevtoolsProtectionOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsAllowHtaccessDevtoolsProtection.Get(), o.IsAllowHtaccessDevtoolsProtection.IsSet() +} + +// HasIsAllowHtaccessDevtoolsProtection returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasIsAllowHtaccessDevtoolsProtection() bool { + if o != nil && o.IsAllowHtaccessDevtoolsProtection.IsSet() { + return true + } + + return false +} + +// SetIsAllowHtaccessDevtoolsProtection gets a reference to the given NullableBool and assigns it to the IsAllowHtaccessDevtoolsProtection field. +func (o *EnvironmentEnvironmentOutput) SetIsAllowHtaccessDevtoolsProtection(v bool) { + o.IsAllowHtaccessDevtoolsProtection.Set(&v) +} + +// SetIsAllowHtaccessDevtoolsProtectionNil sets the value for IsAllowHtaccessDevtoolsProtection to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetIsAllowHtaccessDevtoolsProtectionNil() { + o.IsAllowHtaccessDevtoolsProtection.Set(nil) +} + +// UnsetIsAllowHtaccessDevtoolsProtection ensures that no value is present for IsAllowHtaccessDevtoolsProtection, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetIsAllowHtaccessDevtoolsProtection() { + o.IsAllowHtaccessDevtoolsProtection.Unset() +} + +// GetIsInitSampleData returns the IsInitSampleData field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentEnvironmentOutput) GetIsInitSampleData() bool { + if o == nil || IsNil(o.IsInitSampleData.Get()) { + var ret bool + return ret + } + return *o.IsInitSampleData.Get() +} + +// GetIsInitSampleDataOk returns a tuple with the IsInitSampleData field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentEnvironmentOutput) GetIsInitSampleDataOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInitSampleData.Get(), o.IsInitSampleData.IsSet() +} + +// HasIsInitSampleData returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasIsInitSampleData() bool { + if o != nil && o.IsInitSampleData.IsSet() { + return true + } + + return false +} + +// SetIsInitSampleData gets a reference to the given NullableBool and assigns it to the IsInitSampleData field. +func (o *EnvironmentEnvironmentOutput) SetIsInitSampleData(v bool) { + o.IsInitSampleData.Set(&v) +} + +// SetIsInitSampleDataNil sets the value for IsInitSampleData to be an explicit nil +func (o *EnvironmentEnvironmentOutput) SetIsInitSampleDataNil() { + o.IsInitSampleData.Set(nil) +} + +// UnsetIsInitSampleData ensures that no value is present for IsInitSampleData, not even an explicit nil +func (o *EnvironmentEnvironmentOutput) UnsetIsInitSampleData() { + o.IsInitSampleData.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentOutput) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentOutput) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentEnvironmentOutput) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentOutput) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentOutput) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentEnvironmentOutput) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetEnvVar returns the EnvVar field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentOutput) GetEnvVar() []EnvironmentEnvVarEnvironmentOutput { + if o == nil || IsNil(o.EnvVar) { + var ret []EnvironmentEnvVarEnvironmentOutput + return ret + } + return o.EnvVar +} + +// GetEnvVarOk returns a tuple with the EnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentOutput) GetEnvVarOk() ([]EnvironmentEnvVarEnvironmentOutput, bool) { + if o == nil || IsNil(o.EnvVar) { + return nil, false + } + return o.EnvVar, true +} + +// HasEnvVar returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasEnvVar() bool { + if o != nil && !IsNil(o.EnvVar) { + return true + } + + return false +} + +// SetEnvVar gets a reference to the given []EnvironmentEnvVarEnvironmentOutput and assigns it to the EnvVar field. +func (o *EnvironmentEnvironmentOutput) SetEnvVar(v []EnvironmentEnvVarEnvironmentOutput) { + o.EnvVar = v +} + +// GetEnvironmentComponent returns the EnvironmentComponent field value if set, zero value otherwise. +func (o *EnvironmentEnvironmentOutput) GetEnvironmentComponent() []EnvironmentComponentEnvironmentOutput { + if o == nil || IsNil(o.EnvironmentComponent) { + var ret []EnvironmentComponentEnvironmentOutput + return ret + } + return o.EnvironmentComponent +} + +// GetEnvironmentComponentOk returns a tuple with the EnvironmentComponent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentEnvironmentOutput) GetEnvironmentComponentOk() ([]EnvironmentComponentEnvironmentOutput, bool) { + if o == nil || IsNil(o.EnvironmentComponent) { + return nil, false + } + return o.EnvironmentComponent, true +} + +// HasEnvironmentComponent returns a boolean if a field has been set. +func (o *EnvironmentEnvironmentOutput) HasEnvironmentComponent() bool { + if o != nil && !IsNil(o.EnvironmentComponent) { + return true + } + + return false +} + +// SetEnvironmentComponent gets a reference to the given []EnvironmentComponentEnvironmentOutput and assigns it to the EnvironmentComponent field. +func (o *EnvironmentEnvironmentOutput) SetEnvironmentComponent(v []EnvironmentComponentEnvironmentOutput) { + o.EnvironmentComponent = v +} + +func (o EnvironmentEnvironmentOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentEnvironmentOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.TemplateIri.IsSet() { + toSerialize["templateIri"] = o.TemplateIri.Get() + } + if o.Project.IsSet() { + toSerialize["project"] = o.Project.Get() + } + if o.Provider.IsSet() { + toSerialize["provider"] = o.Provider.Get() + } + if o.State.IsSet() { + toSerialize["state"] = o.State.Get() + } + if o.Cluster.IsSet() { + toSerialize["cluster"] = o.Cluster.Get() + } + if o.EnvironmentAccess.IsSet() { + toSerialize["environmentAccess"] = o.EnvironmentAccess.Get() + } + if !IsNil(o.ExportedData) { + toSerialize["exportedData"] = o.ExportedData + } + if !IsNil(o.ImportedData) { + toSerialize["importedData"] = o.ImportedData + } + if o.StateByInfra.IsSet() { + toSerialize["stateByInfra"] = o.StateByInfra.Get() + } + if !IsNil(o.EnvironmentCustomDomain) { + toSerialize["environmentCustomDomain"] = o.EnvironmentCustomDomain + } + if !IsNil(o.EnvironmentMagentoHostMapping) { + toSerialize["environmentMagentoHostMapping"] = o.EnvironmentMagentoHostMapping + } + if o.TargetRefName.IsSet() { + toSerialize["targetRefName"] = o.TargetRefName.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.DataTransferSettings.IsSet() { + toSerialize["dataTransferSettings"] = o.DataTransferSettings.Get() + } + if o.IsStripDatabase.IsSet() { + toSerialize["isStripDatabase"] = o.IsStripDatabase.Get() + } + if o.IsAllowOutgoingEmails.IsSet() { + toSerialize["isAllowOutgoingEmails"] = o.IsAllowOutgoingEmails.Get() + } + if o.IsAllowHtaccessDevtoolsProtection.IsSet() { + toSerialize["isAllowHtaccessDevtoolsProtection"] = o.IsAllowHtaccessDevtoolsProtection.Get() + } + if o.IsInitSampleData.IsSet() { + toSerialize["isInitSampleData"] = o.IsInitSampleData.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if !IsNil(o.EnvVar) { + toSerialize["envVar"] = o.EnvVar + } + if !IsNil(o.EnvironmentComponent) { + toSerialize["environmentComponent"] = o.EnvironmentComponent + } + return toSerialize, nil +} + +type NullableEnvironmentEnvironmentOutput struct { + value *EnvironmentEnvironmentOutput + isSet bool +} + +func (v NullableEnvironmentEnvironmentOutput) Get() *EnvironmentEnvironmentOutput { + return v.value +} + +func (v *NullableEnvironmentEnvironmentOutput) Set(val *EnvironmentEnvironmentOutput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentEnvironmentOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentEnvironmentOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentEnvironmentOutput(val *EnvironmentEnvironmentOutput) *NullableEnvironmentEnvironmentOutput { + return &NullableEnvironmentEnvironmentOutput{value: val, isSet: true} +} + +func (v NullableEnvironmentEnvironmentOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentEnvironmentOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_log_stream_response.go b/pkg/api/rewardcloud/model_environment_log_stream_response.go new file mode 100644 index 0000000..500a80c --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_log_stream_response.go @@ -0,0 +1,160 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentLogStreamResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentLogStreamResponse{} + +// EnvironmentLogStreamResponse struct for EnvironmentLogStreamResponse +type EnvironmentLogStreamResponse struct { + Topic *string `json:"topic,omitempty"` + Token *string `json:"token,omitempty"` +} + +// NewEnvironmentLogStreamResponse instantiates a new EnvironmentLogStreamResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentLogStreamResponse() *EnvironmentLogStreamResponse { + this := EnvironmentLogStreamResponse{} + return &this +} + +// NewEnvironmentLogStreamResponseWithDefaults instantiates a new EnvironmentLogStreamResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentLogStreamResponseWithDefaults() *EnvironmentLogStreamResponse { + this := EnvironmentLogStreamResponse{} + return &this +} + +// GetTopic returns the Topic field value if set, zero value otherwise. +func (o *EnvironmentLogStreamResponse) GetTopic() string { + if o == nil || IsNil(o.Topic) { + var ret string + return ret + } + return *o.Topic +} + +// GetTopicOk returns a tuple with the Topic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentLogStreamResponse) GetTopicOk() (*string, bool) { + if o == nil || IsNil(o.Topic) { + return nil, false + } + return o.Topic, true +} + +// HasTopic returns a boolean if a field has been set. +func (o *EnvironmentLogStreamResponse) HasTopic() bool { + if o != nil && !IsNil(o.Topic) { + return true + } + + return false +} + +// SetTopic gets a reference to the given string and assigns it to the Topic field. +func (o *EnvironmentLogStreamResponse) SetTopic(v string) { + o.Topic = &v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *EnvironmentLogStreamResponse) GetToken() string { + if o == nil || IsNil(o.Token) { + var ret string + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentLogStreamResponse) GetTokenOk() (*string, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *EnvironmentLogStreamResponse) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *EnvironmentLogStreamResponse) SetToken(v string) { + o.Token = &v +} + +func (o EnvironmentLogStreamResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentLogStreamResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Topic) { + toSerialize["topic"] = o.Topic + } + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + return toSerialize, nil +} + +type NullableEnvironmentLogStreamResponse struct { + value *EnvironmentLogStreamResponse + isSet bool +} + +func (v NullableEnvironmentLogStreamResponse) Get() *EnvironmentLogStreamResponse { + return v.value +} + +func (v *NullableEnvironmentLogStreamResponse) Set(val *EnvironmentLogStreamResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentLogStreamResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentLogStreamResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentLogStreamResponse(val *EnvironmentLogStreamResponse) *NullableEnvironmentLogStreamResponse { + return &NullableEnvironmentLogStreamResponse{value: val, isSet: true} +} + +func (v NullableEnvironmentLogStreamResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentLogStreamResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_magento_host_mapping.go b/pkg/api/rewardcloud/model_environment_magento_host_mapping.go new file mode 100644 index 0000000..12318b3 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_magento_host_mapping.go @@ -0,0 +1,526 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentMagentoHostMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentMagentoHostMapping{} + +// EnvironmentMagentoHostMapping Class EnvironmentCustomDomain +type EnvironmentMagentoHostMapping struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Hostname NullableString `json:"hostname,omitempty"` + MageRunCode NullableString `json:"mageRunCode,omitempty"` + MageRunType NullableString `json:"mageRunType,omitempty"` + Environment NullableString `json:"environment,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentMagentoHostMapping instantiates a new EnvironmentMagentoHostMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentMagentoHostMapping() *EnvironmentMagentoHostMapping { + this := EnvironmentMagentoHostMapping{} + return &this +} + +// NewEnvironmentMagentoHostMappingWithDefaults instantiates a new EnvironmentMagentoHostMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentMagentoHostMappingWithDefaults() *EnvironmentMagentoHostMapping { + this := EnvironmentMagentoHostMapping{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentMagentoHostMapping) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentMagentoHostMapping) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMapping) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentMagentoHostMapping) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMapping) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMapping) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMapping) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentMagentoHostMapping) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentMagentoHostMapping) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentMagentoHostMapping) UnsetUuid() { + o.Uuid.Unset() +} + +// GetHostname returns the Hostname field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMapping) GetHostname() string { + if o == nil || IsNil(o.Hostname.Get()) { + var ret string + return ret + } + return *o.Hostname.Get() +} + +// GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMapping) GetHostnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Hostname.Get(), o.Hostname.IsSet() +} + +// HasHostname returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMapping) HasHostname() bool { + if o != nil && o.Hostname.IsSet() { + return true + } + + return false +} + +// SetHostname gets a reference to the given NullableString and assigns it to the Hostname field. +func (o *EnvironmentMagentoHostMapping) SetHostname(v string) { + o.Hostname.Set(&v) +} + +// SetHostnameNil sets the value for Hostname to be an explicit nil +func (o *EnvironmentMagentoHostMapping) SetHostnameNil() { + o.Hostname.Set(nil) +} + +// UnsetHostname ensures that no value is present for Hostname, not even an explicit nil +func (o *EnvironmentMagentoHostMapping) UnsetHostname() { + o.Hostname.Unset() +} + +// GetMageRunCode returns the MageRunCode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMapping) GetMageRunCode() string { + if o == nil || IsNil(o.MageRunCode.Get()) { + var ret string + return ret + } + return *o.MageRunCode.Get() +} + +// GetMageRunCodeOk returns a tuple with the MageRunCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMapping) GetMageRunCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MageRunCode.Get(), o.MageRunCode.IsSet() +} + +// HasMageRunCode returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMapping) HasMageRunCode() bool { + if o != nil && o.MageRunCode.IsSet() { + return true + } + + return false +} + +// SetMageRunCode gets a reference to the given NullableString and assigns it to the MageRunCode field. +func (o *EnvironmentMagentoHostMapping) SetMageRunCode(v string) { + o.MageRunCode.Set(&v) +} + +// SetMageRunCodeNil sets the value for MageRunCode to be an explicit nil +func (o *EnvironmentMagentoHostMapping) SetMageRunCodeNil() { + o.MageRunCode.Set(nil) +} + +// UnsetMageRunCode ensures that no value is present for MageRunCode, not even an explicit nil +func (o *EnvironmentMagentoHostMapping) UnsetMageRunCode() { + o.MageRunCode.Unset() +} + +// GetMageRunType returns the MageRunType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMapping) GetMageRunType() string { + if o == nil || IsNil(o.MageRunType.Get()) { + var ret string + return ret + } + return *o.MageRunType.Get() +} + +// GetMageRunTypeOk returns a tuple with the MageRunType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMapping) GetMageRunTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MageRunType.Get(), o.MageRunType.IsSet() +} + +// HasMageRunType returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMapping) HasMageRunType() bool { + if o != nil && o.MageRunType.IsSet() { + return true + } + + return false +} + +// SetMageRunType gets a reference to the given NullableString and assigns it to the MageRunType field. +func (o *EnvironmentMagentoHostMapping) SetMageRunType(v string) { + o.MageRunType.Set(&v) +} + +// SetMageRunTypeNil sets the value for MageRunType to be an explicit nil +func (o *EnvironmentMagentoHostMapping) SetMageRunTypeNil() { + o.MageRunType.Set(nil) +} + +// UnsetMageRunType ensures that no value is present for MageRunType, not even an explicit nil +func (o *EnvironmentMagentoHostMapping) UnsetMageRunType() { + o.MageRunType.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMapping) GetEnvironment() string { + if o == nil || IsNil(o.Environment.Get()) { + var ret string + return ret + } + return *o.Environment.Get() +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMapping) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Environment.Get(), o.Environment.IsSet() +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMapping) HasEnvironment() bool { + if o != nil && o.Environment.IsSet() { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given NullableString and assigns it to the Environment field. +func (o *EnvironmentMagentoHostMapping) SetEnvironment(v string) { + o.Environment.Set(&v) +} + +// SetEnvironmentNil sets the value for Environment to be an explicit nil +func (o *EnvironmentMagentoHostMapping) SetEnvironmentNil() { + o.Environment.Set(nil) +} + +// UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil +func (o *EnvironmentMagentoHostMapping) UnsetEnvironment() { + o.Environment.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMapping) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMapping) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMapping) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *EnvironmentMagentoHostMapping) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *EnvironmentMagentoHostMapping) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *EnvironmentMagentoHostMapping) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMapping) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMapping) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMapping) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *EnvironmentMagentoHostMapping) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *EnvironmentMagentoHostMapping) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *EnvironmentMagentoHostMapping) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentMagentoHostMapping) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentMagentoHostMapping) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMapping) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentMagentoHostMapping) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentMagentoHostMapping) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentMagentoHostMapping) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMapping) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentMagentoHostMapping) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentMagentoHostMapping) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentMagentoHostMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Hostname.IsSet() { + toSerialize["hostname"] = o.Hostname.Get() + } + if o.MageRunCode.IsSet() { + toSerialize["mageRunCode"] = o.MageRunCode.Get() + } + if o.MageRunType.IsSet() { + toSerialize["mageRunType"] = o.MageRunType.Get() + } + if o.Environment.IsSet() { + toSerialize["environment"] = o.Environment.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentMagentoHostMapping struct { + value *EnvironmentMagentoHostMapping + isSet bool +} + +func (v NullableEnvironmentMagentoHostMapping) Get() *EnvironmentMagentoHostMapping { + return v.value +} + +func (v *NullableEnvironmentMagentoHostMapping) Set(val *EnvironmentMagentoHostMapping) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentMagentoHostMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentMagentoHostMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentMagentoHostMapping(val *EnvironmentMagentoHostMapping) *NullableEnvironmentMagentoHostMapping { + return &NullableEnvironmentMagentoHostMapping{value: val, isSet: true} +} + +func (v NullableEnvironmentMagentoHostMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentMagentoHostMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_magento_host_mapping_environment_input.go b/pkg/api/rewardcloud/model_environment_magento_host_mapping_environment_input.go new file mode 100644 index 0000000..4aae4b9 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_magento_host_mapping_environment_input.go @@ -0,0 +1,229 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentMagentoHostMappingEnvironmentInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentMagentoHostMappingEnvironmentInput{} + +// EnvironmentMagentoHostMappingEnvironmentInput Class EnvironmentCustomDomain +type EnvironmentMagentoHostMappingEnvironmentInput struct { + Hostname NullableString `json:"hostname,omitempty"` + MageRunCode NullableString `json:"mageRunCode,omitempty"` + MageRunType NullableString `json:"mageRunType,omitempty"` +} + +// NewEnvironmentMagentoHostMappingEnvironmentInput instantiates a new EnvironmentMagentoHostMappingEnvironmentInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentMagentoHostMappingEnvironmentInput() *EnvironmentMagentoHostMappingEnvironmentInput { + this := EnvironmentMagentoHostMappingEnvironmentInput{} + return &this +} + +// NewEnvironmentMagentoHostMappingEnvironmentInputWithDefaults instantiates a new EnvironmentMagentoHostMappingEnvironmentInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentMagentoHostMappingEnvironmentInputWithDefaults() *EnvironmentMagentoHostMappingEnvironmentInput { + this := EnvironmentMagentoHostMappingEnvironmentInput{} + return &this +} + +// GetHostname returns the Hostname field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMappingEnvironmentInput) GetHostname() string { + if o == nil || IsNil(o.Hostname.Get()) { + var ret string + return ret + } + return *o.Hostname.Get() +} + +// GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMappingEnvironmentInput) GetHostnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Hostname.Get(), o.Hostname.IsSet() +} + +// HasHostname returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMappingEnvironmentInput) HasHostname() bool { + if o != nil && o.Hostname.IsSet() { + return true + } + + return false +} + +// SetHostname gets a reference to the given NullableString and assigns it to the Hostname field. +func (o *EnvironmentMagentoHostMappingEnvironmentInput) SetHostname(v string) { + o.Hostname.Set(&v) +} + +// SetHostnameNil sets the value for Hostname to be an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentInput) SetHostnameNil() { + o.Hostname.Set(nil) +} + +// UnsetHostname ensures that no value is present for Hostname, not even an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentInput) UnsetHostname() { + o.Hostname.Unset() +} + +// GetMageRunCode returns the MageRunCode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMappingEnvironmentInput) GetMageRunCode() string { + if o == nil || IsNil(o.MageRunCode.Get()) { + var ret string + return ret + } + return *o.MageRunCode.Get() +} + +// GetMageRunCodeOk returns a tuple with the MageRunCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMappingEnvironmentInput) GetMageRunCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MageRunCode.Get(), o.MageRunCode.IsSet() +} + +// HasMageRunCode returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMappingEnvironmentInput) HasMageRunCode() bool { + if o != nil && o.MageRunCode.IsSet() { + return true + } + + return false +} + +// SetMageRunCode gets a reference to the given NullableString and assigns it to the MageRunCode field. +func (o *EnvironmentMagentoHostMappingEnvironmentInput) SetMageRunCode(v string) { + o.MageRunCode.Set(&v) +} + +// SetMageRunCodeNil sets the value for MageRunCode to be an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentInput) SetMageRunCodeNil() { + o.MageRunCode.Set(nil) +} + +// UnsetMageRunCode ensures that no value is present for MageRunCode, not even an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentInput) UnsetMageRunCode() { + o.MageRunCode.Unset() +} + +// GetMageRunType returns the MageRunType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMappingEnvironmentInput) GetMageRunType() string { + if o == nil || IsNil(o.MageRunType.Get()) { + var ret string + return ret + } + return *o.MageRunType.Get() +} + +// GetMageRunTypeOk returns a tuple with the MageRunType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMappingEnvironmentInput) GetMageRunTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MageRunType.Get(), o.MageRunType.IsSet() +} + +// HasMageRunType returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMappingEnvironmentInput) HasMageRunType() bool { + if o != nil && o.MageRunType.IsSet() { + return true + } + + return false +} + +// SetMageRunType gets a reference to the given NullableString and assigns it to the MageRunType field. +func (o *EnvironmentMagentoHostMappingEnvironmentInput) SetMageRunType(v string) { + o.MageRunType.Set(&v) +} + +// SetMageRunTypeNil sets the value for MageRunType to be an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentInput) SetMageRunTypeNil() { + o.MageRunType.Set(nil) +} + +// UnsetMageRunType ensures that no value is present for MageRunType, not even an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentInput) UnsetMageRunType() { + o.MageRunType.Unset() +} + +func (o EnvironmentMagentoHostMappingEnvironmentInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentMagentoHostMappingEnvironmentInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Hostname.IsSet() { + toSerialize["hostname"] = o.Hostname.Get() + } + if o.MageRunCode.IsSet() { + toSerialize["mageRunCode"] = o.MageRunCode.Get() + } + if o.MageRunType.IsSet() { + toSerialize["mageRunType"] = o.MageRunType.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentMagentoHostMappingEnvironmentInput struct { + value *EnvironmentMagentoHostMappingEnvironmentInput + isSet bool +} + +func (v NullableEnvironmentMagentoHostMappingEnvironmentInput) Get() *EnvironmentMagentoHostMappingEnvironmentInput { + return v.value +} + +func (v *NullableEnvironmentMagentoHostMappingEnvironmentInput) Set(val *EnvironmentMagentoHostMappingEnvironmentInput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentMagentoHostMappingEnvironmentInput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentMagentoHostMappingEnvironmentInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentMagentoHostMappingEnvironmentInput(val *EnvironmentMagentoHostMappingEnvironmentInput) *NullableEnvironmentMagentoHostMappingEnvironmentInput { + return &NullableEnvironmentMagentoHostMappingEnvironmentInput{value: val, isSet: true} +} + +func (v NullableEnvironmentMagentoHostMappingEnvironmentInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentMagentoHostMappingEnvironmentInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_magento_host_mapping_environment_output.go b/pkg/api/rewardcloud/model_environment_magento_host_mapping_environment_output.go new file mode 100644 index 0000000..f966b4b --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_magento_host_mapping_environment_output.go @@ -0,0 +1,229 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the EnvironmentMagentoHostMappingEnvironmentOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentMagentoHostMappingEnvironmentOutput{} + +// EnvironmentMagentoHostMappingEnvironmentOutput +type EnvironmentMagentoHostMappingEnvironmentOutput struct { + Hostname NullableString `json:"hostname,omitempty"` + MageRunCode NullableString `json:"mageRunCode,omitempty"` + MageRunType NullableString `json:"mageRunType,omitempty"` +} + +// NewEnvironmentMagentoHostMappingEnvironmentOutput instantiates a new EnvironmentMagentoHostMappingEnvironmentOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentMagentoHostMappingEnvironmentOutput() *EnvironmentMagentoHostMappingEnvironmentOutput { + this := EnvironmentMagentoHostMappingEnvironmentOutput{} + return &this +} + +// NewEnvironmentMagentoHostMappingEnvironmentOutputWithDefaults instantiates a new EnvironmentMagentoHostMappingEnvironmentOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentMagentoHostMappingEnvironmentOutputWithDefaults() *EnvironmentMagentoHostMappingEnvironmentOutput { + this := EnvironmentMagentoHostMappingEnvironmentOutput{} + return &this +} + +// GetHostname returns the Hostname field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) GetHostname() string { + if o == nil || IsNil(o.Hostname.Get()) { + var ret string + return ret + } + return *o.Hostname.Get() +} + +// GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) GetHostnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Hostname.Get(), o.Hostname.IsSet() +} + +// HasHostname returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) HasHostname() bool { + if o != nil && o.Hostname.IsSet() { + return true + } + + return false +} + +// SetHostname gets a reference to the given NullableString and assigns it to the Hostname field. +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) SetHostname(v string) { + o.Hostname.Set(&v) +} + +// SetHostnameNil sets the value for Hostname to be an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) SetHostnameNil() { + o.Hostname.Set(nil) +} + +// UnsetHostname ensures that no value is present for Hostname, not even an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) UnsetHostname() { + o.Hostname.Unset() +} + +// GetMageRunCode returns the MageRunCode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) GetMageRunCode() string { + if o == nil || IsNil(o.MageRunCode.Get()) { + var ret string + return ret + } + return *o.MageRunCode.Get() +} + +// GetMageRunCodeOk returns a tuple with the MageRunCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) GetMageRunCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MageRunCode.Get(), o.MageRunCode.IsSet() +} + +// HasMageRunCode returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) HasMageRunCode() bool { + if o != nil && o.MageRunCode.IsSet() { + return true + } + + return false +} + +// SetMageRunCode gets a reference to the given NullableString and assigns it to the MageRunCode field. +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) SetMageRunCode(v string) { + o.MageRunCode.Set(&v) +} + +// SetMageRunCodeNil sets the value for MageRunCode to be an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) SetMageRunCodeNil() { + o.MageRunCode.Set(nil) +} + +// UnsetMageRunCode ensures that no value is present for MageRunCode, not even an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) UnsetMageRunCode() { + o.MageRunCode.Unset() +} + +// GetMageRunType returns the MageRunType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) GetMageRunType() string { + if o == nil || IsNil(o.MageRunType.Get()) { + var ret string + return ret + } + return *o.MageRunType.Get() +} + +// GetMageRunTypeOk returns a tuple with the MageRunType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) GetMageRunTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MageRunType.Get(), o.MageRunType.IsSet() +} + +// HasMageRunType returns a boolean if a field has been set. +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) HasMageRunType() bool { + if o != nil && o.MageRunType.IsSet() { + return true + } + + return false +} + +// SetMageRunType gets a reference to the given NullableString and assigns it to the MageRunType field. +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) SetMageRunType(v string) { + o.MageRunType.Set(&v) +} + +// SetMageRunTypeNil sets the value for MageRunType to be an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) SetMageRunTypeNil() { + o.MageRunType.Set(nil) +} + +// UnsetMageRunType ensures that no value is present for MageRunType, not even an explicit nil +func (o *EnvironmentMagentoHostMappingEnvironmentOutput) UnsetMageRunType() { + o.MageRunType.Unset() +} + +func (o EnvironmentMagentoHostMappingEnvironmentOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentMagentoHostMappingEnvironmentOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Hostname.IsSet() { + toSerialize["hostname"] = o.Hostname.Get() + } + if o.MageRunCode.IsSet() { + toSerialize["mageRunCode"] = o.MageRunCode.Get() + } + if o.MageRunType.IsSet() { + toSerialize["mageRunType"] = o.MageRunType.Get() + } + return toSerialize, nil +} + +type NullableEnvironmentMagentoHostMappingEnvironmentOutput struct { + value *EnvironmentMagentoHostMappingEnvironmentOutput + isSet bool +} + +func (v NullableEnvironmentMagentoHostMappingEnvironmentOutput) Get() *EnvironmentMagentoHostMappingEnvironmentOutput { + return v.value +} + +func (v *NullableEnvironmentMagentoHostMappingEnvironmentOutput) Set(val *EnvironmentMagentoHostMappingEnvironmentOutput) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentMagentoHostMappingEnvironmentOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentMagentoHostMappingEnvironmentOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentMagentoHostMappingEnvironmentOutput(val *EnvironmentMagentoHostMappingEnvironmentOutput) *NullableEnvironmentMagentoHostMappingEnvironmentOutput { + return &NullableEnvironmentMagentoHostMappingEnvironmentOutput{value: val, isSet: true} +} + +func (v NullableEnvironmentMagentoHostMappingEnvironmentOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentMagentoHostMappingEnvironmentOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_environment_message_history.go b/pkg/api/rewardcloud/model_environment_message_history.go new file mode 100644 index 0000000..3891d11 --- /dev/null +++ b/pkg/api/rewardcloud/model_environment_message_history.go @@ -0,0 +1,761 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentMessageHistory type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentMessageHistory{} + +// EnvironmentMessageHistory +type EnvironmentMessageHistory struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Environment NullableString `json:"environment,omitempty"` + EntityType NullableString `json:"entityType,omitempty"` + Action NullableString `json:"action,omitempty"` + Status NullableString `json:"status,omitempty"` + StatusCode NullableInt32 `json:"statusCode,omitempty"` + RcStatus NullableInt32 `json:"rcStatus,omitempty"` + Message NullableString `json:"message,omitempty"` + Header NullableString `json:"header,omitempty"` + EventAt NullableString `json:"eventAt,omitempty"` + EntityUuid NullableString `json:"entityUuid,omitempty"` + DataTransferId NullableString `json:"dataTransferId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewEnvironmentMessageHistory instantiates a new EnvironmentMessageHistory object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentMessageHistory() *EnvironmentMessageHistory { + this := EnvironmentMessageHistory{} + return &this +} + +// NewEnvironmentMessageHistoryWithDefaults instantiates a new EnvironmentMessageHistory object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentMessageHistoryWithDefaults() *EnvironmentMessageHistory { + this := EnvironmentMessageHistory{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EnvironmentMessageHistory) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentMessageHistory) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EnvironmentMessageHistory) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *EnvironmentMessageHistory) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *EnvironmentMessageHistory) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetUuid() { + o.Uuid.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetEnvironment() string { + if o == nil || IsNil(o.Environment.Get()) { + var ret string + return ret + } + return *o.Environment.Get() +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Environment.Get(), o.Environment.IsSet() +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasEnvironment() bool { + if o != nil && o.Environment.IsSet() { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given NullableString and assigns it to the Environment field. +func (o *EnvironmentMessageHistory) SetEnvironment(v string) { + o.Environment.Set(&v) +} + +// SetEnvironmentNil sets the value for Environment to be an explicit nil +func (o *EnvironmentMessageHistory) SetEnvironmentNil() { + o.Environment.Set(nil) +} + +// UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetEnvironment() { + o.Environment.Unset() +} + +// GetEntityType returns the EntityType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetEntityType() string { + if o == nil || IsNil(o.EntityType.Get()) { + var ret string + return ret + } + return *o.EntityType.Get() +} + +// GetEntityTypeOk returns a tuple with the EntityType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetEntityTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EntityType.Get(), o.EntityType.IsSet() +} + +// HasEntityType returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasEntityType() bool { + if o != nil && o.EntityType.IsSet() { + return true + } + + return false +} + +// SetEntityType gets a reference to the given NullableString and assigns it to the EntityType field. +func (o *EnvironmentMessageHistory) SetEntityType(v string) { + o.EntityType.Set(&v) +} + +// SetEntityTypeNil sets the value for EntityType to be an explicit nil +func (o *EnvironmentMessageHistory) SetEntityTypeNil() { + o.EntityType.Set(nil) +} + +// UnsetEntityType ensures that no value is present for EntityType, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetEntityType() { + o.EntityType.Unset() +} + +// GetAction returns the Action field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetAction() string { + if o == nil || IsNil(o.Action.Get()) { + var ret string + return ret + } + return *o.Action.Get() +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Action.Get(), o.Action.IsSet() +} + +// HasAction returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasAction() bool { + if o != nil && o.Action.IsSet() { + return true + } + + return false +} + +// SetAction gets a reference to the given NullableString and assigns it to the Action field. +func (o *EnvironmentMessageHistory) SetAction(v string) { + o.Action.Set(&v) +} + +// SetActionNil sets the value for Action to be an explicit nil +func (o *EnvironmentMessageHistory) SetActionNil() { + o.Action.Set(nil) +} + +// UnsetAction ensures that no value is present for Action, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetAction() { + o.Action.Unset() +} + +// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetStatus() string { + if o == nil || IsNil(o.Status.Get()) { + var ret string + return ret + } + return *o.Status.Get() +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status.Get(), o.Status.IsSet() +} + +// HasStatus returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasStatus() bool { + if o != nil && o.Status.IsSet() { + return true + } + + return false +} + +// SetStatus gets a reference to the given NullableString and assigns it to the Status field. +func (o *EnvironmentMessageHistory) SetStatus(v string) { + o.Status.Set(&v) +} + +// SetStatusNil sets the value for Status to be an explicit nil +func (o *EnvironmentMessageHistory) SetStatusNil() { + o.Status.Set(nil) +} + +// UnsetStatus ensures that no value is present for Status, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetStatus() { + o.Status.Unset() +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode.Get()) { + var ret int32 + return ret + } + return *o.StatusCode.Get() +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetStatusCodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.StatusCode.Get(), o.StatusCode.IsSet() +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasStatusCode() bool { + if o != nil && o.StatusCode.IsSet() { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given NullableInt32 and assigns it to the StatusCode field. +func (o *EnvironmentMessageHistory) SetStatusCode(v int32) { + o.StatusCode.Set(&v) +} + +// SetStatusCodeNil sets the value for StatusCode to be an explicit nil +func (o *EnvironmentMessageHistory) SetStatusCodeNil() { + o.StatusCode.Set(nil) +} + +// UnsetStatusCode ensures that no value is present for StatusCode, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetStatusCode() { + o.StatusCode.Unset() +} + +// GetRcStatus returns the RcStatus field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetRcStatus() int32 { + if o == nil || IsNil(o.RcStatus.Get()) { + var ret int32 + return ret + } + return *o.RcStatus.Get() +} + +// GetRcStatusOk returns a tuple with the RcStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetRcStatusOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.RcStatus.Get(), o.RcStatus.IsSet() +} + +// HasRcStatus returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasRcStatus() bool { + if o != nil && o.RcStatus.IsSet() { + return true + } + + return false +} + +// SetRcStatus gets a reference to the given NullableInt32 and assigns it to the RcStatus field. +func (o *EnvironmentMessageHistory) SetRcStatus(v int32) { + o.RcStatus.Set(&v) +} + +// SetRcStatusNil sets the value for RcStatus to be an explicit nil +func (o *EnvironmentMessageHistory) SetRcStatusNil() { + o.RcStatus.Set(nil) +} + +// UnsetRcStatus ensures that no value is present for RcStatus, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetRcStatus() { + o.RcStatus.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *EnvironmentMessageHistory) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *EnvironmentMessageHistory) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetMessage() { + o.Message.Unset() +} + +// GetHeader returns the Header field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetHeader() string { + if o == nil || IsNil(o.Header.Get()) { + var ret string + return ret + } + return *o.Header.Get() +} + +// GetHeaderOk returns a tuple with the Header field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetHeaderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Header.Get(), o.Header.IsSet() +} + +// HasHeader returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasHeader() bool { + if o != nil && o.Header.IsSet() { + return true + } + + return false +} + +// SetHeader gets a reference to the given NullableString and assigns it to the Header field. +func (o *EnvironmentMessageHistory) SetHeader(v string) { + o.Header.Set(&v) +} + +// SetHeaderNil sets the value for Header to be an explicit nil +func (o *EnvironmentMessageHistory) SetHeaderNil() { + o.Header.Set(nil) +} + +// UnsetHeader ensures that no value is present for Header, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetHeader() { + o.Header.Unset() +} + +// GetEventAt returns the EventAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetEventAt() string { + if o == nil || IsNil(o.EventAt.Get()) { + var ret string + return ret + } + return *o.EventAt.Get() +} + +// GetEventAtOk returns a tuple with the EventAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetEventAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EventAt.Get(), o.EventAt.IsSet() +} + +// HasEventAt returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasEventAt() bool { + if o != nil && o.EventAt.IsSet() { + return true + } + + return false +} + +// SetEventAt gets a reference to the given NullableString and assigns it to the EventAt field. +func (o *EnvironmentMessageHistory) SetEventAt(v string) { + o.EventAt.Set(&v) +} + +// SetEventAtNil sets the value for EventAt to be an explicit nil +func (o *EnvironmentMessageHistory) SetEventAtNil() { + o.EventAt.Set(nil) +} + +// UnsetEventAt ensures that no value is present for EventAt, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetEventAt() { + o.EventAt.Unset() +} + +// GetEntityUuid returns the EntityUuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetEntityUuid() string { + if o == nil || IsNil(o.EntityUuid.Get()) { + var ret string + return ret + } + return *o.EntityUuid.Get() +} + +// GetEntityUuidOk returns a tuple with the EntityUuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetEntityUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EntityUuid.Get(), o.EntityUuid.IsSet() +} + +// HasEntityUuid returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasEntityUuid() bool { + if o != nil && o.EntityUuid.IsSet() { + return true + } + + return false +} + +// SetEntityUuid gets a reference to the given NullableString and assigns it to the EntityUuid field. +func (o *EnvironmentMessageHistory) SetEntityUuid(v string) { + o.EntityUuid.Set(&v) +} + +// SetEntityUuidNil sets the value for EntityUuid to be an explicit nil +func (o *EnvironmentMessageHistory) SetEntityUuidNil() { + o.EntityUuid.Set(nil) +} + +// UnsetEntityUuid ensures that no value is present for EntityUuid, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetEntityUuid() { + o.EntityUuid.Unset() +} + +// GetDataTransferId returns the DataTransferId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentMessageHistory) GetDataTransferId() string { + if o == nil || IsNil(o.DataTransferId.Get()) { + var ret string + return ret + } + return *o.DataTransferId.Get() +} + +// GetDataTransferIdOk returns a tuple with the DataTransferId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentMessageHistory) GetDataTransferIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DataTransferId.Get(), o.DataTransferId.IsSet() +} + +// HasDataTransferId returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasDataTransferId() bool { + if o != nil && o.DataTransferId.IsSet() { + return true + } + + return false +} + +// SetDataTransferId gets a reference to the given NullableString and assigns it to the DataTransferId field. +func (o *EnvironmentMessageHistory) SetDataTransferId(v string) { + o.DataTransferId.Set(&v) +} + +// SetDataTransferIdNil sets the value for DataTransferId to be an explicit nil +func (o *EnvironmentMessageHistory) SetDataTransferIdNil() { + o.DataTransferId.Set(nil) +} + +// UnsetDataTransferId ensures that no value is present for DataTransferId, not even an explicit nil +func (o *EnvironmentMessageHistory) UnsetDataTransferId() { + o.DataTransferId.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EnvironmentMessageHistory) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentMessageHistory) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EnvironmentMessageHistory) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *EnvironmentMessageHistory) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentMessageHistory) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *EnvironmentMessageHistory) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *EnvironmentMessageHistory) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o EnvironmentMessageHistory) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentMessageHistory) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Environment.IsSet() { + toSerialize["environment"] = o.Environment.Get() + } + if o.EntityType.IsSet() { + toSerialize["entityType"] = o.EntityType.Get() + } + if o.Action.IsSet() { + toSerialize["action"] = o.Action.Get() + } + if o.Status.IsSet() { + toSerialize["status"] = o.Status.Get() + } + if o.StatusCode.IsSet() { + toSerialize["statusCode"] = o.StatusCode.Get() + } + if o.RcStatus.IsSet() { + toSerialize["rcStatus"] = o.RcStatus.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Header.IsSet() { + toSerialize["header"] = o.Header.Get() + } + if o.EventAt.IsSet() { + toSerialize["eventAt"] = o.EventAt.Get() + } + if o.EntityUuid.IsSet() { + toSerialize["entityUuid"] = o.EntityUuid.Get() + } + if o.DataTransferId.IsSet() { + toSerialize["dataTransferId"] = o.DataTransferId.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableEnvironmentMessageHistory struct { + value *EnvironmentMessageHistory + isSet bool +} + +func (v NullableEnvironmentMessageHistory) Get() *EnvironmentMessageHistory { + return v.value +} + +func (v *NullableEnvironmentMessageHistory) Set(val *EnvironmentMessageHistory) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentMessageHistory) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentMessageHistory) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentMessageHistory(val *EnvironmentMessageHistory) *NullableEnvironmentMessageHistory { + return &NullableEnvironmentMessageHistory{value: val, isSet: true} +} + +func (v NullableEnvironmentMessageHistory) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentMessageHistory) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_exported_data.go b/pkg/api/rewardcloud/model_exported_data.go new file mode 100644 index 0000000..83db990 --- /dev/null +++ b/pkg/api/rewardcloud/model_exported_data.go @@ -0,0 +1,573 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ExportedData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExportedData{} + +// ExportedData Class ExportedData +type ExportedData struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Url NullableString `json:"url,omitempty"` + IsStripDatabase NullableBool `json:"isStripDatabase,omitempty"` + DataTransferDataType NullableString `json:"dataTransferDataType,omitempty"` + Environment NullableString `json:"environment,omitempty"` + State NullableString `json:"state,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` +} + +// NewExportedData instantiates a new ExportedData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExportedData() *ExportedData { + this := ExportedData{} + return &this +} + +// NewExportedDataWithDefaults instantiates a new ExportedData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExportedDataWithDefaults() *ExportedData { + this := ExportedData{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ExportedData) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportedData) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ExportedData) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ExportedData) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportedData) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportedData) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ExportedData) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ExportedData) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ExportedData) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ExportedData) UnsetUuid() { + o.Uuid.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportedData) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportedData) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *ExportedData) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *ExportedData) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *ExportedData) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *ExportedData) UnsetUrl() { + o.Url.Unset() +} + +// GetIsStripDatabase returns the IsStripDatabase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportedData) GetIsStripDatabase() bool { + if o == nil || IsNil(o.IsStripDatabase.Get()) { + var ret bool + return ret + } + return *o.IsStripDatabase.Get() +} + +// GetIsStripDatabaseOk returns a tuple with the IsStripDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportedData) GetIsStripDatabaseOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsStripDatabase.Get(), o.IsStripDatabase.IsSet() +} + +// HasIsStripDatabase returns a boolean if a field has been set. +func (o *ExportedData) HasIsStripDatabase() bool { + if o != nil && o.IsStripDatabase.IsSet() { + return true + } + + return false +} + +// SetIsStripDatabase gets a reference to the given NullableBool and assigns it to the IsStripDatabase field. +func (o *ExportedData) SetIsStripDatabase(v bool) { + o.IsStripDatabase.Set(&v) +} + +// SetIsStripDatabaseNil sets the value for IsStripDatabase to be an explicit nil +func (o *ExportedData) SetIsStripDatabaseNil() { + o.IsStripDatabase.Set(nil) +} + +// UnsetIsStripDatabase ensures that no value is present for IsStripDatabase, not even an explicit nil +func (o *ExportedData) UnsetIsStripDatabase() { + o.IsStripDatabase.Unset() +} + +// GetDataTransferDataType returns the DataTransferDataType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportedData) GetDataTransferDataType() string { + if o == nil || IsNil(o.DataTransferDataType.Get()) { + var ret string + return ret + } + return *o.DataTransferDataType.Get() +} + +// GetDataTransferDataTypeOk returns a tuple with the DataTransferDataType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportedData) GetDataTransferDataTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DataTransferDataType.Get(), o.DataTransferDataType.IsSet() +} + +// HasDataTransferDataType returns a boolean if a field has been set. +func (o *ExportedData) HasDataTransferDataType() bool { + if o != nil && o.DataTransferDataType.IsSet() { + return true + } + + return false +} + +// SetDataTransferDataType gets a reference to the given NullableString and assigns it to the DataTransferDataType field. +func (o *ExportedData) SetDataTransferDataType(v string) { + o.DataTransferDataType.Set(&v) +} + +// SetDataTransferDataTypeNil sets the value for DataTransferDataType to be an explicit nil +func (o *ExportedData) SetDataTransferDataTypeNil() { + o.DataTransferDataType.Set(nil) +} + +// UnsetDataTransferDataType ensures that no value is present for DataTransferDataType, not even an explicit nil +func (o *ExportedData) UnsetDataTransferDataType() { + o.DataTransferDataType.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportedData) GetEnvironment() string { + if o == nil || IsNil(o.Environment.Get()) { + var ret string + return ret + } + return *o.Environment.Get() +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportedData) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Environment.Get(), o.Environment.IsSet() +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *ExportedData) HasEnvironment() bool { + if o != nil && o.Environment.IsSet() { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given NullableString and assigns it to the Environment field. +func (o *ExportedData) SetEnvironment(v string) { + o.Environment.Set(&v) +} + +// SetEnvironmentNil sets the value for Environment to be an explicit nil +func (o *ExportedData) SetEnvironmentNil() { + o.Environment.Set(nil) +} + +// UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil +func (o *ExportedData) UnsetEnvironment() { + o.Environment.Unset() +} + +// GetState returns the State field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportedData) GetState() string { + if o == nil || IsNil(o.State.Get()) { + var ret string + return ret + } + return *o.State.Get() +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportedData) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.State.Get(), o.State.IsSet() +} + +// HasState returns a boolean if a field has been set. +func (o *ExportedData) HasState() bool { + if o != nil && o.State.IsSet() { + return true + } + + return false +} + +// SetState gets a reference to the given NullableString and assigns it to the State field. +func (o *ExportedData) SetState(v string) { + o.State.Set(&v) +} + +// SetStateNil sets the value for State to be an explicit nil +func (o *ExportedData) SetStateNil() { + o.State.Set(nil) +} + +// UnsetState ensures that no value is present for State, not even an explicit nil +func (o *ExportedData) UnsetState() { + o.State.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ExportedData) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportedData) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ExportedData) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ExportedData) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ExportedData) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportedData) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ExportedData) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ExportedData) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportedData) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportedData) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ExportedData) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ExportedData) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ExportedData) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ExportedData) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportedData) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportedData) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ExportedData) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ExportedData) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ExportedData) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ExportedData) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +func (o ExportedData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExportedData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.IsStripDatabase.IsSet() { + toSerialize["isStripDatabase"] = o.IsStripDatabase.Get() + } + if o.DataTransferDataType.IsSet() { + toSerialize["dataTransferDataType"] = o.DataTransferDataType.Get() + } + if o.Environment.IsSet() { + toSerialize["environment"] = o.Environment.Get() + } + if o.State.IsSet() { + toSerialize["state"] = o.State.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + return toSerialize, nil +} + +type NullableExportedData struct { + value *ExportedData + isSet bool +} + +func (v NullableExportedData) Get() *ExportedData { + return v.value +} + +func (v *NullableExportedData) Set(val *ExportedData) { + v.value = val + v.isSet = true +} + +func (v NullableExportedData) IsSet() bool { + return v.isSet +} + +func (v *NullableExportedData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExportedData(val *ExportedData) *NullableExportedData { + return &NullableExportedData{value: val, isSet: true} +} + +func (v NullableExportedData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExportedData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_finance_api_token_response.go b/pkg/api/rewardcloud/model_finance_api_token_response.go new file mode 100644 index 0000000..379ca8f --- /dev/null +++ b/pkg/api/rewardcloud/model_finance_api_token_response.go @@ -0,0 +1,160 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the FinanceApiTokenResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FinanceApiTokenResponse{} + +// FinanceApiTokenResponse struct for FinanceApiTokenResponse +type FinanceApiTokenResponse struct { + Token *string `json:"token,omitempty"` + Data *AuthenticationTokenData `json:"data,omitempty"` +} + +// NewFinanceApiTokenResponse instantiates a new FinanceApiTokenResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFinanceApiTokenResponse() *FinanceApiTokenResponse { + this := FinanceApiTokenResponse{} + return &this +} + +// NewFinanceApiTokenResponseWithDefaults instantiates a new FinanceApiTokenResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFinanceApiTokenResponseWithDefaults() *FinanceApiTokenResponse { + this := FinanceApiTokenResponse{} + return &this +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *FinanceApiTokenResponse) GetToken() string { + if o == nil || IsNil(o.Token) { + var ret string + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceApiTokenResponse) GetTokenOk() (*string, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *FinanceApiTokenResponse) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *FinanceApiTokenResponse) SetToken(v string) { + o.Token = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *FinanceApiTokenResponse) GetData() AuthenticationTokenData { + if o == nil || IsNil(o.Data) { + var ret AuthenticationTokenData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceApiTokenResponse) GetDataOk() (*AuthenticationTokenData, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *FinanceApiTokenResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given AuthenticationTokenData and assigns it to the Data field. +func (o *FinanceApiTokenResponse) SetData(v AuthenticationTokenData) { + o.Data = &v +} + +func (o FinanceApiTokenResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FinanceApiTokenResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableFinanceApiTokenResponse struct { + value *FinanceApiTokenResponse + isSet bool +} + +func (v NullableFinanceApiTokenResponse) Get() *FinanceApiTokenResponse { + return v.value +} + +func (v *NullableFinanceApiTokenResponse) Set(val *FinanceApiTokenResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFinanceApiTokenResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFinanceApiTokenResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFinanceApiTokenResponse(val *FinanceApiTokenResponse) *NullableFinanceApiTokenResponse { + return &NullableFinanceApiTokenResponse{value: val, isSet: true} +} + +func (v NullableFinanceApiTokenResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFinanceApiTokenResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_finance_costs_response.go b/pkg/api/rewardcloud/model_finance_costs_response.go new file mode 100644 index 0000000..6372d04 --- /dev/null +++ b/pkg/api/rewardcloud/model_finance_costs_response.go @@ -0,0 +1,124 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the FinanceCostsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FinanceCostsResponse{} + +// FinanceCostsResponse struct for FinanceCostsResponse +type FinanceCostsResponse struct { + Summary *FinanceCostsResponseSummary `json:"summary,omitempty"` +} + +// NewFinanceCostsResponse instantiates a new FinanceCostsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFinanceCostsResponse() *FinanceCostsResponse { + this := FinanceCostsResponse{} + return &this +} + +// NewFinanceCostsResponseWithDefaults instantiates a new FinanceCostsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFinanceCostsResponseWithDefaults() *FinanceCostsResponse { + this := FinanceCostsResponse{} + return &this +} + +// GetSummary returns the Summary field value if set, zero value otherwise. +func (o *FinanceCostsResponse) GetSummary() FinanceCostsResponseSummary { + if o == nil || IsNil(o.Summary) { + var ret FinanceCostsResponseSummary + return ret + } + return *o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceCostsResponse) GetSummaryOk() (*FinanceCostsResponseSummary, bool) { + if o == nil || IsNil(o.Summary) { + return nil, false + } + return o.Summary, true +} + +// HasSummary returns a boolean if a field has been set. +func (o *FinanceCostsResponse) HasSummary() bool { + if o != nil && !IsNil(o.Summary) { + return true + } + + return false +} + +// SetSummary gets a reference to the given FinanceCostsResponseSummary and assigns it to the Summary field. +func (o *FinanceCostsResponse) SetSummary(v FinanceCostsResponseSummary) { + o.Summary = &v +} + +func (o FinanceCostsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FinanceCostsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Summary) { + toSerialize["summary"] = o.Summary + } + return toSerialize, nil +} + +type NullableFinanceCostsResponse struct { + value *FinanceCostsResponse + isSet bool +} + +func (v NullableFinanceCostsResponse) Get() *FinanceCostsResponse { + return v.value +} + +func (v *NullableFinanceCostsResponse) Set(val *FinanceCostsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFinanceCostsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFinanceCostsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFinanceCostsResponse(val *FinanceCostsResponse) *NullableFinanceCostsResponse { + return &NullableFinanceCostsResponse{value: val, isSet: true} +} + +func (v NullableFinanceCostsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFinanceCostsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_finance_costs_response_summary.go b/pkg/api/rewardcloud/model_finance_costs_response_summary.go new file mode 100644 index 0000000..8c6c29f --- /dev/null +++ b/pkg/api/rewardcloud/model_finance_costs_response_summary.go @@ -0,0 +1,304 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the FinanceCostsResponseSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FinanceCostsResponseSummary{} + +// FinanceCostsResponseSummary struct for FinanceCostsResponseSummary +type FinanceCostsResponseSummary struct { + CpuCoreHours *int32 `json:"cpuCoreHours,omitempty"` + RamByteHours *int32 `json:"ramByteHours,omitempty"` + PvByteHours *int32 `json:"pvByteHours,omitempty"` + CpuCost *int32 `json:"cpuCost,omitempty"` + RamCost *int32 `json:"ramCost,omitempty"` + PvCost *int32 `json:"pvCost,omitempty"` +} + +// NewFinanceCostsResponseSummary instantiates a new FinanceCostsResponseSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFinanceCostsResponseSummary() *FinanceCostsResponseSummary { + this := FinanceCostsResponseSummary{} + return &this +} + +// NewFinanceCostsResponseSummaryWithDefaults instantiates a new FinanceCostsResponseSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFinanceCostsResponseSummaryWithDefaults() *FinanceCostsResponseSummary { + this := FinanceCostsResponseSummary{} + return &this +} + +// GetCpuCoreHours returns the CpuCoreHours field value if set, zero value otherwise. +func (o *FinanceCostsResponseSummary) GetCpuCoreHours() int32 { + if o == nil || IsNil(o.CpuCoreHours) { + var ret int32 + return ret + } + return *o.CpuCoreHours +} + +// GetCpuCoreHoursOk returns a tuple with the CpuCoreHours field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceCostsResponseSummary) GetCpuCoreHoursOk() (*int32, bool) { + if o == nil || IsNil(o.CpuCoreHours) { + return nil, false + } + return o.CpuCoreHours, true +} + +// HasCpuCoreHours returns a boolean if a field has been set. +func (o *FinanceCostsResponseSummary) HasCpuCoreHours() bool { + if o != nil && !IsNil(o.CpuCoreHours) { + return true + } + + return false +} + +// SetCpuCoreHours gets a reference to the given int32 and assigns it to the CpuCoreHours field. +func (o *FinanceCostsResponseSummary) SetCpuCoreHours(v int32) { + o.CpuCoreHours = &v +} + +// GetRamByteHours returns the RamByteHours field value if set, zero value otherwise. +func (o *FinanceCostsResponseSummary) GetRamByteHours() int32 { + if o == nil || IsNil(o.RamByteHours) { + var ret int32 + return ret + } + return *o.RamByteHours +} + +// GetRamByteHoursOk returns a tuple with the RamByteHours field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceCostsResponseSummary) GetRamByteHoursOk() (*int32, bool) { + if o == nil || IsNil(o.RamByteHours) { + return nil, false + } + return o.RamByteHours, true +} + +// HasRamByteHours returns a boolean if a field has been set. +func (o *FinanceCostsResponseSummary) HasRamByteHours() bool { + if o != nil && !IsNil(o.RamByteHours) { + return true + } + + return false +} + +// SetRamByteHours gets a reference to the given int32 and assigns it to the RamByteHours field. +func (o *FinanceCostsResponseSummary) SetRamByteHours(v int32) { + o.RamByteHours = &v +} + +// GetPvByteHours returns the PvByteHours field value if set, zero value otherwise. +func (o *FinanceCostsResponseSummary) GetPvByteHours() int32 { + if o == nil || IsNil(o.PvByteHours) { + var ret int32 + return ret + } + return *o.PvByteHours +} + +// GetPvByteHoursOk returns a tuple with the PvByteHours field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceCostsResponseSummary) GetPvByteHoursOk() (*int32, bool) { + if o == nil || IsNil(o.PvByteHours) { + return nil, false + } + return o.PvByteHours, true +} + +// HasPvByteHours returns a boolean if a field has been set. +func (o *FinanceCostsResponseSummary) HasPvByteHours() bool { + if o != nil && !IsNil(o.PvByteHours) { + return true + } + + return false +} + +// SetPvByteHours gets a reference to the given int32 and assigns it to the PvByteHours field. +func (o *FinanceCostsResponseSummary) SetPvByteHours(v int32) { + o.PvByteHours = &v +} + +// GetCpuCost returns the CpuCost field value if set, zero value otherwise. +func (o *FinanceCostsResponseSummary) GetCpuCost() int32 { + if o == nil || IsNil(o.CpuCost) { + var ret int32 + return ret + } + return *o.CpuCost +} + +// GetCpuCostOk returns a tuple with the CpuCost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceCostsResponseSummary) GetCpuCostOk() (*int32, bool) { + if o == nil || IsNil(o.CpuCost) { + return nil, false + } + return o.CpuCost, true +} + +// HasCpuCost returns a boolean if a field has been set. +func (o *FinanceCostsResponseSummary) HasCpuCost() bool { + if o != nil && !IsNil(o.CpuCost) { + return true + } + + return false +} + +// SetCpuCost gets a reference to the given int32 and assigns it to the CpuCost field. +func (o *FinanceCostsResponseSummary) SetCpuCost(v int32) { + o.CpuCost = &v +} + +// GetRamCost returns the RamCost field value if set, zero value otherwise. +func (o *FinanceCostsResponseSummary) GetRamCost() int32 { + if o == nil || IsNil(o.RamCost) { + var ret int32 + return ret + } + return *o.RamCost +} + +// GetRamCostOk returns a tuple with the RamCost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceCostsResponseSummary) GetRamCostOk() (*int32, bool) { + if o == nil || IsNil(o.RamCost) { + return nil, false + } + return o.RamCost, true +} + +// HasRamCost returns a boolean if a field has been set. +func (o *FinanceCostsResponseSummary) HasRamCost() bool { + if o != nil && !IsNil(o.RamCost) { + return true + } + + return false +} + +// SetRamCost gets a reference to the given int32 and assigns it to the RamCost field. +func (o *FinanceCostsResponseSummary) SetRamCost(v int32) { + o.RamCost = &v +} + +// GetPvCost returns the PvCost field value if set, zero value otherwise. +func (o *FinanceCostsResponseSummary) GetPvCost() int32 { + if o == nil || IsNil(o.PvCost) { + var ret int32 + return ret + } + return *o.PvCost +} + +// GetPvCostOk returns a tuple with the PvCost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceCostsResponseSummary) GetPvCostOk() (*int32, bool) { + if o == nil || IsNil(o.PvCost) { + return nil, false + } + return o.PvCost, true +} + +// HasPvCost returns a boolean if a field has been set. +func (o *FinanceCostsResponseSummary) HasPvCost() bool { + if o != nil && !IsNil(o.PvCost) { + return true + } + + return false +} + +// SetPvCost gets a reference to the given int32 and assigns it to the PvCost field. +func (o *FinanceCostsResponseSummary) SetPvCost(v int32) { + o.PvCost = &v +} + +func (o FinanceCostsResponseSummary) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FinanceCostsResponseSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CpuCoreHours) { + toSerialize["cpuCoreHours"] = o.CpuCoreHours + } + if !IsNil(o.RamByteHours) { + toSerialize["ramByteHours"] = o.RamByteHours + } + if !IsNil(o.PvByteHours) { + toSerialize["pvByteHours"] = o.PvByteHours + } + if !IsNil(o.CpuCost) { + toSerialize["cpuCost"] = o.CpuCost + } + if !IsNil(o.RamCost) { + toSerialize["ramCost"] = o.RamCost + } + if !IsNil(o.PvCost) { + toSerialize["pvCost"] = o.PvCost + } + return toSerialize, nil +} + +type NullableFinanceCostsResponseSummary struct { + value *FinanceCostsResponseSummary + isSet bool +} + +func (v NullableFinanceCostsResponseSummary) Get() *FinanceCostsResponseSummary { + return v.value +} + +func (v *NullableFinanceCostsResponseSummary) Set(val *FinanceCostsResponseSummary) { + v.value = val + v.isSet = true +} + +func (v NullableFinanceCostsResponseSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableFinanceCostsResponseSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFinanceCostsResponseSummary(val *FinanceCostsResponseSummary) *NullableFinanceCostsResponseSummary { + return &NullableFinanceCostsResponseSummary{value: val, isSet: true} +} + +func (v NullableFinanceCostsResponseSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFinanceCostsResponseSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_finance_invoices_response.go b/pkg/api/rewardcloud/model_finance_invoices_response.go new file mode 100644 index 0000000..3647abe --- /dev/null +++ b/pkg/api/rewardcloud/model_finance_invoices_response.go @@ -0,0 +1,196 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the FinanceInvoicesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FinanceInvoicesResponse{} + +// FinanceInvoicesResponse struct for FinanceInvoicesResponse +type FinanceInvoicesResponse struct { + Costomer map[string]interface{} `json:"costomer,omitempty"` + PaymentMethods []map[string]interface{} `json:"paymentMethods,omitempty"` + Invoices []map[string]interface{} `json:"invoices,omitempty"` +} + +// NewFinanceInvoicesResponse instantiates a new FinanceInvoicesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFinanceInvoicesResponse() *FinanceInvoicesResponse { + this := FinanceInvoicesResponse{} + return &this +} + +// NewFinanceInvoicesResponseWithDefaults instantiates a new FinanceInvoicesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFinanceInvoicesResponseWithDefaults() *FinanceInvoicesResponse { + this := FinanceInvoicesResponse{} + return &this +} + +// GetCostomer returns the Costomer field value if set, zero value otherwise. +func (o *FinanceInvoicesResponse) GetCostomer() map[string]interface{} { + if o == nil || IsNil(o.Costomer) { + var ret map[string]interface{} + return ret + } + return o.Costomer +} + +// GetCostomerOk returns a tuple with the Costomer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceInvoicesResponse) GetCostomerOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Costomer) { + return map[string]interface{}{}, false + } + return o.Costomer, true +} + +// HasCostomer returns a boolean if a field has been set. +func (o *FinanceInvoicesResponse) HasCostomer() bool { + if o != nil && !IsNil(o.Costomer) { + return true + } + + return false +} + +// SetCostomer gets a reference to the given map[string]interface{} and assigns it to the Costomer field. +func (o *FinanceInvoicesResponse) SetCostomer(v map[string]interface{}) { + o.Costomer = v +} + +// GetPaymentMethods returns the PaymentMethods field value if set, zero value otherwise. +func (o *FinanceInvoicesResponse) GetPaymentMethods() []map[string]interface{} { + if o == nil || IsNil(o.PaymentMethods) { + var ret []map[string]interface{} + return ret + } + return o.PaymentMethods +} + +// GetPaymentMethodsOk returns a tuple with the PaymentMethods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceInvoicesResponse) GetPaymentMethodsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.PaymentMethods) { + return nil, false + } + return o.PaymentMethods, true +} + +// HasPaymentMethods returns a boolean if a field has been set. +func (o *FinanceInvoicesResponse) HasPaymentMethods() bool { + if o != nil && !IsNil(o.PaymentMethods) { + return true + } + + return false +} + +// SetPaymentMethods gets a reference to the given []map[string]interface{} and assigns it to the PaymentMethods field. +func (o *FinanceInvoicesResponse) SetPaymentMethods(v []map[string]interface{}) { + o.PaymentMethods = v +} + +// GetInvoices returns the Invoices field value if set, zero value otherwise. +func (o *FinanceInvoicesResponse) GetInvoices() []map[string]interface{} { + if o == nil || IsNil(o.Invoices) { + var ret []map[string]interface{} + return ret + } + return o.Invoices +} + +// GetInvoicesOk returns a tuple with the Invoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinanceInvoicesResponse) GetInvoicesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Invoices) { + return nil, false + } + return o.Invoices, true +} + +// HasInvoices returns a boolean if a field has been set. +func (o *FinanceInvoicesResponse) HasInvoices() bool { + if o != nil && !IsNil(o.Invoices) { + return true + } + + return false +} + +// SetInvoices gets a reference to the given []map[string]interface{} and assigns it to the Invoices field. +func (o *FinanceInvoicesResponse) SetInvoices(v []map[string]interface{}) { + o.Invoices = v +} + +func (o FinanceInvoicesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FinanceInvoicesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Costomer) { + toSerialize["costomer"] = o.Costomer + } + if !IsNil(o.PaymentMethods) { + toSerialize["paymentMethods"] = o.PaymentMethods + } + if !IsNil(o.Invoices) { + toSerialize["invoices"] = o.Invoices + } + return toSerialize, nil +} + +type NullableFinanceInvoicesResponse struct { + value *FinanceInvoicesResponse + isSet bool +} + +func (v NullableFinanceInvoicesResponse) Get() *FinanceInvoicesResponse { + return v.value +} + +func (v *NullableFinanceInvoicesResponse) Set(val *FinanceInvoicesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFinanceInvoicesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFinanceInvoicesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFinanceInvoicesResponse(val *FinanceInvoicesResponse) *NullableFinanceInvoicesResponse { + return &NullableFinanceInvoicesResponse{value: val, isSet: true} +} + +func (v NullableFinanceInvoicesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFinanceInvoicesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_git_git_input.go b/pkg/api/rewardcloud/model_git_git_input.go new file mode 100644 index 0000000..bcaf117 --- /dev/null +++ b/pkg/api/rewardcloud/model_git_git_input.go @@ -0,0 +1,417 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the GitGitInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitGitInput{} + +// GitGitInput Class Git +type GitGitInput struct { + Repo NullableString `json:"repo,omitempty"` + Path NullableString `json:"path,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` + GitType NullableString `json:"gitType,omitempty"` + CredentialType NullableString `json:"credentialType,omitempty"` + CryptoKeyType NullableString `json:"cryptoKeyType,omitempty"` +} + +// NewGitGitInput instantiates a new GitGitInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitGitInput() *GitGitInput { + this := GitGitInput{} + return &this +} + +// NewGitGitInputWithDefaults instantiates a new GitGitInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitGitInputWithDefaults() *GitGitInput { + this := GitGitInput{} + return &this +} + +// GetRepo returns the Repo field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitInput) GetRepo() string { + if o == nil || IsNil(o.Repo.Get()) { + var ret string + return ret + } + return *o.Repo.Get() +} + +// GetRepoOk returns a tuple with the Repo field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitInput) GetRepoOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repo.Get(), o.Repo.IsSet() +} + +// HasRepo returns a boolean if a field has been set. +func (o *GitGitInput) HasRepo() bool { + if o != nil && o.Repo.IsSet() { + return true + } + + return false +} + +// SetRepo gets a reference to the given NullableString and assigns it to the Repo field. +func (o *GitGitInput) SetRepo(v string) { + o.Repo.Set(&v) +} + +// SetRepoNil sets the value for Repo to be an explicit nil +func (o *GitGitInput) SetRepoNil() { + o.Repo.Set(nil) +} + +// UnsetRepo ensures that no value is present for Repo, not even an explicit nil +func (o *GitGitInput) UnsetRepo() { + o.Repo.Unset() +} + +// GetPath returns the Path field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitInput) GetPath() string { + if o == nil || IsNil(o.Path.Get()) { + var ret string + return ret + } + return *o.Path.Get() +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitInput) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Path.Get(), o.Path.IsSet() +} + +// HasPath returns a boolean if a field has been set. +func (o *GitGitInput) HasPath() bool { + if o != nil && o.Path.IsSet() { + return true + } + + return false +} + +// SetPath gets a reference to the given NullableString and assigns it to the Path field. +func (o *GitGitInput) SetPath(v string) { + o.Path.Set(&v) +} + +// SetPathNil sets the value for Path to be an explicit nil +func (o *GitGitInput) SetPathNil() { + o.Path.Set(nil) +} + +// UnsetPath ensures that no value is present for Path, not even an explicit nil +func (o *GitGitInput) UnsetPath() { + o.Path.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitInput) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitInput) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *GitGitInput) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *GitGitInput) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *GitGitInput) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *GitGitInput) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitInput) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitInput) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *GitGitInput) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *GitGitInput) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *GitGitInput) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *GitGitInput) UnsetPassword() { + o.Password.Unset() +} + +// GetGitType returns the GitType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitInput) GetGitType() string { + if o == nil || IsNil(o.GitType.Get()) { + var ret string + return ret + } + return *o.GitType.Get() +} + +// GetGitTypeOk returns a tuple with the GitType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitInput) GetGitTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GitType.Get(), o.GitType.IsSet() +} + +// HasGitType returns a boolean if a field has been set. +func (o *GitGitInput) HasGitType() bool { + if o != nil && o.GitType.IsSet() { + return true + } + + return false +} + +// SetGitType gets a reference to the given NullableString and assigns it to the GitType field. +func (o *GitGitInput) SetGitType(v string) { + o.GitType.Set(&v) +} + +// SetGitTypeNil sets the value for GitType to be an explicit nil +func (o *GitGitInput) SetGitTypeNil() { + o.GitType.Set(nil) +} + +// UnsetGitType ensures that no value is present for GitType, not even an explicit nil +func (o *GitGitInput) UnsetGitType() { + o.GitType.Unset() +} + +// GetCredentialType returns the CredentialType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitInput) GetCredentialType() string { + if o == nil || IsNil(o.CredentialType.Get()) { + var ret string + return ret + } + return *o.CredentialType.Get() +} + +// GetCredentialTypeOk returns a tuple with the CredentialType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitInput) GetCredentialTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CredentialType.Get(), o.CredentialType.IsSet() +} + +// HasCredentialType returns a boolean if a field has been set. +func (o *GitGitInput) HasCredentialType() bool { + if o != nil && o.CredentialType.IsSet() { + return true + } + + return false +} + +// SetCredentialType gets a reference to the given NullableString and assigns it to the CredentialType field. +func (o *GitGitInput) SetCredentialType(v string) { + o.CredentialType.Set(&v) +} + +// SetCredentialTypeNil sets the value for CredentialType to be an explicit nil +func (o *GitGitInput) SetCredentialTypeNil() { + o.CredentialType.Set(nil) +} + +// UnsetCredentialType ensures that no value is present for CredentialType, not even an explicit nil +func (o *GitGitInput) UnsetCredentialType() { + o.CredentialType.Unset() +} + +// GetCryptoKeyType returns the CryptoKeyType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitInput) GetCryptoKeyType() string { + if o == nil || IsNil(o.CryptoKeyType.Get()) { + var ret string + return ret + } + return *o.CryptoKeyType.Get() +} + +// GetCryptoKeyTypeOk returns a tuple with the CryptoKeyType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitInput) GetCryptoKeyTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CryptoKeyType.Get(), o.CryptoKeyType.IsSet() +} + +// HasCryptoKeyType returns a boolean if a field has been set. +func (o *GitGitInput) HasCryptoKeyType() bool { + if o != nil && o.CryptoKeyType.IsSet() { + return true + } + + return false +} + +// SetCryptoKeyType gets a reference to the given NullableString and assigns it to the CryptoKeyType field. +func (o *GitGitInput) SetCryptoKeyType(v string) { + o.CryptoKeyType.Set(&v) +} + +// SetCryptoKeyTypeNil sets the value for CryptoKeyType to be an explicit nil +func (o *GitGitInput) SetCryptoKeyTypeNil() { + o.CryptoKeyType.Set(nil) +} + +// UnsetCryptoKeyType ensures that no value is present for CryptoKeyType, not even an explicit nil +func (o *GitGitInput) UnsetCryptoKeyType() { + o.CryptoKeyType.Unset() +} + +func (o GitGitInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitGitInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Repo.IsSet() { + toSerialize["repo"] = o.Repo.Get() + } + if o.Path.IsSet() { + toSerialize["path"] = o.Path.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.GitType.IsSet() { + toSerialize["gitType"] = o.GitType.Get() + } + if o.CredentialType.IsSet() { + toSerialize["credentialType"] = o.CredentialType.Get() + } + if o.CryptoKeyType.IsSet() { + toSerialize["cryptoKeyType"] = o.CryptoKeyType.Get() + } + return toSerialize, nil +} + +type NullableGitGitInput struct { + value *GitGitInput + isSet bool +} + +func (v NullableGitGitInput) Get() *GitGitInput { + return v.value +} + +func (v *NullableGitGitInput) Set(val *GitGitInput) { + v.value = val + v.isSet = true +} + +func (v NullableGitGitInput) IsSet() bool { + return v.isSet +} + +func (v *NullableGitGitInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitGitInput(val *GitGitInput) *NullableGitGitInput { + return &NullableGitGitInput{value: val, isSet: true} +} + +func (v NullableGitGitInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitGitInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_git_git_output.go b/pkg/api/rewardcloud/model_git_git_output.go new file mode 100644 index 0000000..8314462 --- /dev/null +++ b/pkg/api/rewardcloud/model_git_git_output.go @@ -0,0 +1,547 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the GitGitOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitGitOutput{} + +// GitGitOutput Class Git +type GitGitOutput struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Repo NullableString `json:"repo,omitempty"` + Path NullableString `json:"path,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` + PublicKey NullableString `json:"publicKey,omitempty"` + GitType NullableString `json:"gitType,omitempty"` + CredentialType NullableString `json:"credentialType,omitempty"` + CryptoKeyType NullableString `json:"cryptoKeyType,omitempty"` +} + +// NewGitGitOutput instantiates a new GitGitOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitGitOutput() *GitGitOutput { + this := GitGitOutput{} + return &this +} + +// NewGitGitOutputWithDefaults instantiates a new GitGitOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitGitOutputWithDefaults() *GitGitOutput { + this := GitGitOutput{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GitGitOutput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitGitOutput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GitGitOutput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *GitGitOutput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitOutput) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitOutput) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *GitGitOutput) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *GitGitOutput) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *GitGitOutput) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *GitGitOutput) UnsetUuid() { + o.Uuid.Unset() +} + +// GetRepo returns the Repo field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitOutput) GetRepo() string { + if o == nil || IsNil(o.Repo.Get()) { + var ret string + return ret + } + return *o.Repo.Get() +} + +// GetRepoOk returns a tuple with the Repo field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitOutput) GetRepoOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repo.Get(), o.Repo.IsSet() +} + +// HasRepo returns a boolean if a field has been set. +func (o *GitGitOutput) HasRepo() bool { + if o != nil && o.Repo.IsSet() { + return true + } + + return false +} + +// SetRepo gets a reference to the given NullableString and assigns it to the Repo field. +func (o *GitGitOutput) SetRepo(v string) { + o.Repo.Set(&v) +} + +// SetRepoNil sets the value for Repo to be an explicit nil +func (o *GitGitOutput) SetRepoNil() { + o.Repo.Set(nil) +} + +// UnsetRepo ensures that no value is present for Repo, not even an explicit nil +func (o *GitGitOutput) UnsetRepo() { + o.Repo.Unset() +} + +// GetPath returns the Path field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitOutput) GetPath() string { + if o == nil || IsNil(o.Path.Get()) { + var ret string + return ret + } + return *o.Path.Get() +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitOutput) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Path.Get(), o.Path.IsSet() +} + +// HasPath returns a boolean if a field has been set. +func (o *GitGitOutput) HasPath() bool { + if o != nil && o.Path.IsSet() { + return true + } + + return false +} + +// SetPath gets a reference to the given NullableString and assigns it to the Path field. +func (o *GitGitOutput) SetPath(v string) { + o.Path.Set(&v) +} + +// SetPathNil sets the value for Path to be an explicit nil +func (o *GitGitOutput) SetPathNil() { + o.Path.Set(nil) +} + +// UnsetPath ensures that no value is present for Path, not even an explicit nil +func (o *GitGitOutput) UnsetPath() { + o.Path.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitOutput) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitOutput) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *GitGitOutput) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *GitGitOutput) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *GitGitOutput) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *GitGitOutput) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitOutput) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitOutput) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *GitGitOutput) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *GitGitOutput) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *GitGitOutput) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *GitGitOutput) UnsetPassword() { + o.Password.Unset() +} + +// GetPublicKey returns the PublicKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitOutput) GetPublicKey() string { + if o == nil || IsNil(o.PublicKey.Get()) { + var ret string + return ret + } + return *o.PublicKey.Get() +} + +// GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitOutput) GetPublicKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PublicKey.Get(), o.PublicKey.IsSet() +} + +// HasPublicKey returns a boolean if a field has been set. +func (o *GitGitOutput) HasPublicKey() bool { + if o != nil && o.PublicKey.IsSet() { + return true + } + + return false +} + +// SetPublicKey gets a reference to the given NullableString and assigns it to the PublicKey field. +func (o *GitGitOutput) SetPublicKey(v string) { + o.PublicKey.Set(&v) +} + +// SetPublicKeyNil sets the value for PublicKey to be an explicit nil +func (o *GitGitOutput) SetPublicKeyNil() { + o.PublicKey.Set(nil) +} + +// UnsetPublicKey ensures that no value is present for PublicKey, not even an explicit nil +func (o *GitGitOutput) UnsetPublicKey() { + o.PublicKey.Unset() +} + +// GetGitType returns the GitType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitOutput) GetGitType() string { + if o == nil || IsNil(o.GitType.Get()) { + var ret string + return ret + } + return *o.GitType.Get() +} + +// GetGitTypeOk returns a tuple with the GitType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitOutput) GetGitTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GitType.Get(), o.GitType.IsSet() +} + +// HasGitType returns a boolean if a field has been set. +func (o *GitGitOutput) HasGitType() bool { + if o != nil && o.GitType.IsSet() { + return true + } + + return false +} + +// SetGitType gets a reference to the given NullableString and assigns it to the GitType field. +func (o *GitGitOutput) SetGitType(v string) { + o.GitType.Set(&v) +} + +// SetGitTypeNil sets the value for GitType to be an explicit nil +func (o *GitGitOutput) SetGitTypeNil() { + o.GitType.Set(nil) +} + +// UnsetGitType ensures that no value is present for GitType, not even an explicit nil +func (o *GitGitOutput) UnsetGitType() { + o.GitType.Unset() +} + +// GetCredentialType returns the CredentialType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitOutput) GetCredentialType() string { + if o == nil || IsNil(o.CredentialType.Get()) { + var ret string + return ret + } + return *o.CredentialType.Get() +} + +// GetCredentialTypeOk returns a tuple with the CredentialType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitOutput) GetCredentialTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CredentialType.Get(), o.CredentialType.IsSet() +} + +// HasCredentialType returns a boolean if a field has been set. +func (o *GitGitOutput) HasCredentialType() bool { + if o != nil && o.CredentialType.IsSet() { + return true + } + + return false +} + +// SetCredentialType gets a reference to the given NullableString and assigns it to the CredentialType field. +func (o *GitGitOutput) SetCredentialType(v string) { + o.CredentialType.Set(&v) +} + +// SetCredentialTypeNil sets the value for CredentialType to be an explicit nil +func (o *GitGitOutput) SetCredentialTypeNil() { + o.CredentialType.Set(nil) +} + +// UnsetCredentialType ensures that no value is present for CredentialType, not even an explicit nil +func (o *GitGitOutput) UnsetCredentialType() { + o.CredentialType.Unset() +} + +// GetCryptoKeyType returns the CryptoKeyType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitGitOutput) GetCryptoKeyType() string { + if o == nil || IsNil(o.CryptoKeyType.Get()) { + var ret string + return ret + } + return *o.CryptoKeyType.Get() +} + +// GetCryptoKeyTypeOk returns a tuple with the CryptoKeyType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitGitOutput) GetCryptoKeyTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CryptoKeyType.Get(), o.CryptoKeyType.IsSet() +} + +// HasCryptoKeyType returns a boolean if a field has been set. +func (o *GitGitOutput) HasCryptoKeyType() bool { + if o != nil && o.CryptoKeyType.IsSet() { + return true + } + + return false +} + +// SetCryptoKeyType gets a reference to the given NullableString and assigns it to the CryptoKeyType field. +func (o *GitGitOutput) SetCryptoKeyType(v string) { + o.CryptoKeyType.Set(&v) +} + +// SetCryptoKeyTypeNil sets the value for CryptoKeyType to be an explicit nil +func (o *GitGitOutput) SetCryptoKeyTypeNil() { + o.CryptoKeyType.Set(nil) +} + +// UnsetCryptoKeyType ensures that no value is present for CryptoKeyType, not even an explicit nil +func (o *GitGitOutput) UnsetCryptoKeyType() { + o.CryptoKeyType.Unset() +} + +func (o GitGitOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitGitOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Repo.IsSet() { + toSerialize["repo"] = o.Repo.Get() + } + if o.Path.IsSet() { + toSerialize["path"] = o.Path.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.PublicKey.IsSet() { + toSerialize["publicKey"] = o.PublicKey.Get() + } + if o.GitType.IsSet() { + toSerialize["gitType"] = o.GitType.Get() + } + if o.CredentialType.IsSet() { + toSerialize["credentialType"] = o.CredentialType.Get() + } + if o.CryptoKeyType.IsSet() { + toSerialize["cryptoKeyType"] = o.CryptoKeyType.Get() + } + return toSerialize, nil +} + +type NullableGitGitOutput struct { + value *GitGitOutput + isSet bool +} + +func (v NullableGitGitOutput) Get() *GitGitOutput { + return v.value +} + +func (v *NullableGitGitOutput) Set(val *GitGitOutput) { + v.value = val + v.isSet = true +} + +func (v NullableGitGitOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableGitGitOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitGitOutput(val *GitGitOutput) *NullableGitGitOutput { + return &NullableGitGitOutput{value: val, isSet: true} +} + +func (v NullableGitGitOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitGitOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_git_type.go b/pkg/api/rewardcloud/model_git_type.go new file mode 100644 index 0000000..2605c00 --- /dev/null +++ b/pkg/api/rewardcloud/model_git_type.go @@ -0,0 +1,421 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the GitType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitType{} + +// GitType Class GitType +type GitType struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + Git []string `json:"git,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewGitType instantiates a new GitType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitType() *GitType { + this := GitType{} + return &this +} + +// NewGitTypeWithDefaults instantiates a new GitType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitTypeWithDefaults() *GitType { + this := GitType{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GitType) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitType) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GitType) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *GitType) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitType) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitType) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *GitType) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *GitType) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *GitType) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *GitType) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitType) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitType) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *GitType) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *GitType) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *GitType) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *GitType) UnsetName() { + o.Name.Unset() +} + +// GetGit returns the Git field value if set, zero value otherwise. +func (o *GitType) GetGit() []string { + if o == nil || IsNil(o.Git) { + var ret []string + return ret + } + return o.Git +} + +// GetGitOk returns a tuple with the Git field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitType) GetGitOk() ([]string, bool) { + if o == nil || IsNil(o.Git) { + return nil, false + } + return o.Git, true +} + +// HasGit returns a boolean if a field has been set. +func (o *GitType) HasGit() bool { + if o != nil && !IsNil(o.Git) { + return true + } + + return false +} + +// SetGit gets a reference to the given []string and assigns it to the Git field. +func (o *GitType) SetGit(v []string) { + o.Git = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitType) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitType) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *GitType) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *GitType) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *GitType) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *GitType) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GitType) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GitType) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *GitType) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *GitType) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *GitType) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *GitType) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GitType) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitType) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GitType) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *GitType) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *GitType) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitType) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *GitType) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *GitType) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o GitType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if !IsNil(o.Git) { + toSerialize["git"] = o.Git + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableGitType struct { + value *GitType + isSet bool +} + +func (v NullableGitType) Get() *GitType { + return v.value +} + +func (v *NullableGitType) Set(val *GitType) { + v.value = val + v.isSet = true +} + +func (v NullableGitType) IsSet() bool { + return v.isSet +} + +func (v *NullableGitType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitType(val *GitType) *NullableGitType { + return &NullableGitType{value: val, isSet: true} +} + +func (v NullableGitType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_imported_data.go b/pkg/api/rewardcloud/model_imported_data.go new file mode 100644 index 0000000..3d2f1ba --- /dev/null +++ b/pkg/api/rewardcloud/model_imported_data.go @@ -0,0 +1,479 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ImportedData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportedData{} + +// ImportedData Class ImportedData +type ImportedData struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Environment NullableString `json:"environment,omitempty"` + DataTransferDataType NullableString `json:"dataTransferDataType,omitempty"` + State NullableString `json:"state,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` +} + +// NewImportedData instantiates a new ImportedData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportedData() *ImportedData { + this := ImportedData{} + return &this +} + +// NewImportedDataWithDefaults instantiates a new ImportedData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportedDataWithDefaults() *ImportedData { + this := ImportedData{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ImportedData) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportedData) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ImportedData) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ImportedData) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ImportedData) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ImportedData) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ImportedData) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ImportedData) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ImportedData) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ImportedData) UnsetUuid() { + o.Uuid.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ImportedData) GetEnvironment() string { + if o == nil || IsNil(o.Environment.Get()) { + var ret string + return ret + } + return *o.Environment.Get() +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ImportedData) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Environment.Get(), o.Environment.IsSet() +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *ImportedData) HasEnvironment() bool { + if o != nil && o.Environment.IsSet() { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given NullableString and assigns it to the Environment field. +func (o *ImportedData) SetEnvironment(v string) { + o.Environment.Set(&v) +} + +// SetEnvironmentNil sets the value for Environment to be an explicit nil +func (o *ImportedData) SetEnvironmentNil() { + o.Environment.Set(nil) +} + +// UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil +func (o *ImportedData) UnsetEnvironment() { + o.Environment.Unset() +} + +// GetDataTransferDataType returns the DataTransferDataType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ImportedData) GetDataTransferDataType() string { + if o == nil || IsNil(o.DataTransferDataType.Get()) { + var ret string + return ret + } + return *o.DataTransferDataType.Get() +} + +// GetDataTransferDataTypeOk returns a tuple with the DataTransferDataType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ImportedData) GetDataTransferDataTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DataTransferDataType.Get(), o.DataTransferDataType.IsSet() +} + +// HasDataTransferDataType returns a boolean if a field has been set. +func (o *ImportedData) HasDataTransferDataType() bool { + if o != nil && o.DataTransferDataType.IsSet() { + return true + } + + return false +} + +// SetDataTransferDataType gets a reference to the given NullableString and assigns it to the DataTransferDataType field. +func (o *ImportedData) SetDataTransferDataType(v string) { + o.DataTransferDataType.Set(&v) +} + +// SetDataTransferDataTypeNil sets the value for DataTransferDataType to be an explicit nil +func (o *ImportedData) SetDataTransferDataTypeNil() { + o.DataTransferDataType.Set(nil) +} + +// UnsetDataTransferDataType ensures that no value is present for DataTransferDataType, not even an explicit nil +func (o *ImportedData) UnsetDataTransferDataType() { + o.DataTransferDataType.Unset() +} + +// GetState returns the State field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ImportedData) GetState() string { + if o == nil || IsNil(o.State.Get()) { + var ret string + return ret + } + return *o.State.Get() +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ImportedData) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.State.Get(), o.State.IsSet() +} + +// HasState returns a boolean if a field has been set. +func (o *ImportedData) HasState() bool { + if o != nil && o.State.IsSet() { + return true + } + + return false +} + +// SetState gets a reference to the given NullableString and assigns it to the State field. +func (o *ImportedData) SetState(v string) { + o.State.Set(&v) +} + +// SetStateNil sets the value for State to be an explicit nil +func (o *ImportedData) SetStateNil() { + o.State.Set(nil) +} + +// UnsetState ensures that no value is present for State, not even an explicit nil +func (o *ImportedData) UnsetState() { + o.State.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ImportedData) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportedData) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ImportedData) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ImportedData) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ImportedData) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportedData) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ImportedData) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ImportedData) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ImportedData) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ImportedData) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ImportedData) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ImportedData) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ImportedData) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ImportedData) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ImportedData) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ImportedData) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ImportedData) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ImportedData) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ImportedData) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ImportedData) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +func (o ImportedData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImportedData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Environment.IsSet() { + toSerialize["environment"] = o.Environment.Get() + } + if o.DataTransferDataType.IsSet() { + toSerialize["dataTransferDataType"] = o.DataTransferDataType.Get() + } + if o.State.IsSet() { + toSerialize["state"] = o.State.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + return toSerialize, nil +} + +type NullableImportedData struct { + value *ImportedData + isSet bool +} + +func (v NullableImportedData) Get() *ImportedData { + return v.value +} + +func (v *NullableImportedData) Set(val *ImportedData) { + v.value = val + v.isSet = true +} + +func (v NullableImportedData) IsSet() bool { + return v.isSet +} + +func (v *NullableImportedData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportedData(val *ImportedData) *NullableImportedData { + return &NullableImportedData{value: val, isSet: true} +} + +func (v NullableImportedData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportedData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_invitation_invitation_input.go b/pkg/api/rewardcloud/model_invitation_invitation_input.go new file mode 100644 index 0000000..0d8f22b --- /dev/null +++ b/pkg/api/rewardcloud/model_invitation_invitation_input.go @@ -0,0 +1,229 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the InvitationInvitationInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InvitationInvitationInput{} + +// InvitationInvitationInput Class Invitation +type InvitationInvitationInput struct { + User NullableString `json:"user,omitempty"` + Team NullableString `json:"team,omitempty"` + Email NullableString `json:"email,omitempty"` +} + +// NewInvitationInvitationInput instantiates a new InvitationInvitationInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInvitationInvitationInput() *InvitationInvitationInput { + this := InvitationInvitationInput{} + return &this +} + +// NewInvitationInvitationInputWithDefaults instantiates a new InvitationInvitationInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInvitationInvitationInputWithDefaults() *InvitationInvitationInput { + this := InvitationInvitationInput{} + return &this +} + +// GetUser returns the User field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *InvitationInvitationInput) GetUser() string { + if o == nil || IsNil(o.User.Get()) { + var ret string + return ret + } + return *o.User.Get() +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *InvitationInvitationInput) GetUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.User.Get(), o.User.IsSet() +} + +// HasUser returns a boolean if a field has been set. +func (o *InvitationInvitationInput) HasUser() bool { + if o != nil && o.User.IsSet() { + return true + } + + return false +} + +// SetUser gets a reference to the given NullableString and assigns it to the User field. +func (o *InvitationInvitationInput) SetUser(v string) { + o.User.Set(&v) +} + +// SetUserNil sets the value for User to be an explicit nil +func (o *InvitationInvitationInput) SetUserNil() { + o.User.Set(nil) +} + +// UnsetUser ensures that no value is present for User, not even an explicit nil +func (o *InvitationInvitationInput) UnsetUser() { + o.User.Unset() +} + +// GetTeam returns the Team field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *InvitationInvitationInput) GetTeam() string { + if o == nil || IsNil(o.Team.Get()) { + var ret string + return ret + } + return *o.Team.Get() +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *InvitationInvitationInput) GetTeamOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Team.Get(), o.Team.IsSet() +} + +// HasTeam returns a boolean if a field has been set. +func (o *InvitationInvitationInput) HasTeam() bool { + if o != nil && o.Team.IsSet() { + return true + } + + return false +} + +// SetTeam gets a reference to the given NullableString and assigns it to the Team field. +func (o *InvitationInvitationInput) SetTeam(v string) { + o.Team.Set(&v) +} + +// SetTeamNil sets the value for Team to be an explicit nil +func (o *InvitationInvitationInput) SetTeamNil() { + o.Team.Set(nil) +} + +// UnsetTeam ensures that no value is present for Team, not even an explicit nil +func (o *InvitationInvitationInput) UnsetTeam() { + o.Team.Unset() +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *InvitationInvitationInput) GetEmail() string { + if o == nil || IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *InvitationInvitationInput) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *InvitationInvitationInput) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *InvitationInvitationInput) SetEmail(v string) { + o.Email.Set(&v) +} + +// SetEmailNil sets the value for Email to be an explicit nil +func (o *InvitationInvitationInput) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *InvitationInvitationInput) UnsetEmail() { + o.Email.Unset() +} + +func (o InvitationInvitationInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InvitationInvitationInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.User.IsSet() { + toSerialize["user"] = o.User.Get() + } + if o.Team.IsSet() { + toSerialize["team"] = o.Team.Get() + } + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + return toSerialize, nil +} + +type NullableInvitationInvitationInput struct { + value *InvitationInvitationInput + isSet bool +} + +func (v NullableInvitationInvitationInput) Get() *InvitationInvitationInput { + return v.value +} + +func (v *NullableInvitationInvitationInput) Set(val *InvitationInvitationInput) { + v.value = val + v.isSet = true +} + +func (v NullableInvitationInvitationInput) IsSet() bool { + return v.isSet +} + +func (v *NullableInvitationInvitationInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInvitationInvitationInput(val *InvitationInvitationInput) *NullableInvitationInvitationInput { + return &NullableInvitationInvitationInput{value: val, isSet: true} +} + +func (v NullableInvitationInvitationInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInvitationInvitationInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_invitation_invitation_output.go b/pkg/api/rewardcloud/model_invitation_invitation_output.go new file mode 100644 index 0000000..0cf458d --- /dev/null +++ b/pkg/api/rewardcloud/model_invitation_invitation_output.go @@ -0,0 +1,432 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the InvitationInvitationOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InvitationInvitationOutput{} + +// InvitationInvitationOutput Class Invitation +type InvitationInvitationOutput struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + User NullableString `json:"user,omitempty"` + Team NullableString `json:"team,omitempty"` + State *bool `json:"state,omitempty"` + Email NullableString `json:"email,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + ExpiredAt NullableTime `json:"expiredAt,omitempty"` +} + +// NewInvitationInvitationOutput instantiates a new InvitationInvitationOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInvitationInvitationOutput() *InvitationInvitationOutput { + this := InvitationInvitationOutput{} + return &this +} + +// NewInvitationInvitationOutputWithDefaults instantiates a new InvitationInvitationOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInvitationInvitationOutputWithDefaults() *InvitationInvitationOutput { + this := InvitationInvitationOutput{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InvitationInvitationOutput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvitationInvitationOutput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *InvitationInvitationOutput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *InvitationInvitationOutput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *InvitationInvitationOutput) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *InvitationInvitationOutput) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *InvitationInvitationOutput) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *InvitationInvitationOutput) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *InvitationInvitationOutput) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *InvitationInvitationOutput) UnsetUuid() { + o.Uuid.Unset() +} + +// GetUser returns the User field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *InvitationInvitationOutput) GetUser() string { + if o == nil || IsNil(o.User.Get()) { + var ret string + return ret + } + return *o.User.Get() +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *InvitationInvitationOutput) GetUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.User.Get(), o.User.IsSet() +} + +// HasUser returns a boolean if a field has been set. +func (o *InvitationInvitationOutput) HasUser() bool { + if o != nil && o.User.IsSet() { + return true + } + + return false +} + +// SetUser gets a reference to the given NullableString and assigns it to the User field. +func (o *InvitationInvitationOutput) SetUser(v string) { + o.User.Set(&v) +} + +// SetUserNil sets the value for User to be an explicit nil +func (o *InvitationInvitationOutput) SetUserNil() { + o.User.Set(nil) +} + +// UnsetUser ensures that no value is present for User, not even an explicit nil +func (o *InvitationInvitationOutput) UnsetUser() { + o.User.Unset() +} + +// GetTeam returns the Team field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *InvitationInvitationOutput) GetTeam() string { + if o == nil || IsNil(o.Team.Get()) { + var ret string + return ret + } + return *o.Team.Get() +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *InvitationInvitationOutput) GetTeamOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Team.Get(), o.Team.IsSet() +} + +// HasTeam returns a boolean if a field has been set. +func (o *InvitationInvitationOutput) HasTeam() bool { + if o != nil && o.Team.IsSet() { + return true + } + + return false +} + +// SetTeam gets a reference to the given NullableString and assigns it to the Team field. +func (o *InvitationInvitationOutput) SetTeam(v string) { + o.Team.Set(&v) +} + +// SetTeamNil sets the value for Team to be an explicit nil +func (o *InvitationInvitationOutput) SetTeamNil() { + o.Team.Set(nil) +} + +// UnsetTeam ensures that no value is present for Team, not even an explicit nil +func (o *InvitationInvitationOutput) UnsetTeam() { + o.Team.Unset() +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *InvitationInvitationOutput) GetState() bool { + if o == nil || IsNil(o.State) { + var ret bool + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvitationInvitationOutput) GetStateOk() (*bool, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *InvitationInvitationOutput) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given bool and assigns it to the State field. +func (o *InvitationInvitationOutput) SetState(v bool) { + o.State = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *InvitationInvitationOutput) GetEmail() string { + if o == nil || IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *InvitationInvitationOutput) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *InvitationInvitationOutput) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *InvitationInvitationOutput) SetEmail(v string) { + o.Email.Set(&v) +} + +// SetEmailNil sets the value for Email to be an explicit nil +func (o *InvitationInvitationOutput) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *InvitationInvitationOutput) UnsetEmail() { + o.Email.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *InvitationInvitationOutput) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvitationInvitationOutput) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *InvitationInvitationOutput) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *InvitationInvitationOutput) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetExpiredAt returns the ExpiredAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *InvitationInvitationOutput) GetExpiredAt() time.Time { + if o == nil || IsNil(o.ExpiredAt.Get()) { + var ret time.Time + return ret + } + return *o.ExpiredAt.Get() +} + +// GetExpiredAtOk returns a tuple with the ExpiredAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *InvitationInvitationOutput) GetExpiredAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ExpiredAt.Get(), o.ExpiredAt.IsSet() +} + +// HasExpiredAt returns a boolean if a field has been set. +func (o *InvitationInvitationOutput) HasExpiredAt() bool { + if o != nil && o.ExpiredAt.IsSet() { + return true + } + + return false +} + +// SetExpiredAt gets a reference to the given NullableTime and assigns it to the ExpiredAt field. +func (o *InvitationInvitationOutput) SetExpiredAt(v time.Time) { + o.ExpiredAt.Set(&v) +} + +// SetExpiredAtNil sets the value for ExpiredAt to be an explicit nil +func (o *InvitationInvitationOutput) SetExpiredAtNil() { + o.ExpiredAt.Set(nil) +} + +// UnsetExpiredAt ensures that no value is present for ExpiredAt, not even an explicit nil +func (o *InvitationInvitationOutput) UnsetExpiredAt() { + o.ExpiredAt.Unset() +} + +func (o InvitationInvitationOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InvitationInvitationOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.User.IsSet() { + toSerialize["user"] = o.User.Get() + } + if o.Team.IsSet() { + toSerialize["team"] = o.Team.Get() + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if o.ExpiredAt.IsSet() { + toSerialize["expiredAt"] = o.ExpiredAt.Get() + } + return toSerialize, nil +} + +type NullableInvitationInvitationOutput struct { + value *InvitationInvitationOutput + isSet bool +} + +func (v NullableInvitationInvitationOutput) Get() *InvitationInvitationOutput { + return v.value +} + +func (v *NullableInvitationInvitationOutput) Set(val *InvitationInvitationOutput) { + v.value = val + v.isSet = true +} + +func (v NullableInvitationInvitationOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableInvitationInvitationOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInvitationInvitationOutput(val *InvitationInvitationOutput) *NullableInvitationInvitationOutput { + return &NullableInvitationInvitationOutput{value: val, isSet: true} +} + +func (v NullableInvitationInvitationOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInvitationInvitationOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_mercure_discover_response.go b/pkg/api/rewardcloud/model_mercure_discover_response.go new file mode 100644 index 0000000..05b8a72 --- /dev/null +++ b/pkg/api/rewardcloud/model_mercure_discover_response.go @@ -0,0 +1,124 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the MercureDiscoverResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MercureDiscoverResponse{} + +// MercureDiscoverResponse struct for MercureDiscoverResponse +type MercureDiscoverResponse struct { + Data []string `json:"data,omitempty"` +} + +// NewMercureDiscoverResponse instantiates a new MercureDiscoverResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMercureDiscoverResponse() *MercureDiscoverResponse { + this := MercureDiscoverResponse{} + return &this +} + +// NewMercureDiscoverResponseWithDefaults instantiates a new MercureDiscoverResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMercureDiscoverResponseWithDefaults() *MercureDiscoverResponse { + this := MercureDiscoverResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *MercureDiscoverResponse) GetData() []string { + if o == nil || IsNil(o.Data) { + var ret []string + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MercureDiscoverResponse) GetDataOk() ([]string, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *MercureDiscoverResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []string and assigns it to the Data field. +func (o *MercureDiscoverResponse) SetData(v []string) { + o.Data = v +} + +func (o MercureDiscoverResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MercureDiscoverResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableMercureDiscoverResponse struct { + value *MercureDiscoverResponse + isSet bool +} + +func (v NullableMercureDiscoverResponse) Get() *MercureDiscoverResponse { + return v.value +} + +func (v *NullableMercureDiscoverResponse) Set(val *MercureDiscoverResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMercureDiscoverResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMercureDiscoverResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMercureDiscoverResponse(val *MercureDiscoverResponse) *NullableMercureDiscoverResponse { + return &NullableMercureDiscoverResponse{value: val, isSet: true} +} + +func (v NullableMercureDiscoverResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMercureDiscoverResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_organisation_env_var.go b/pkg/api/rewardcloud/model_organisation_env_var.go new file mode 100644 index 0000000..495d819 --- /dev/null +++ b/pkg/api/rewardcloud/model_organisation_env_var.go @@ -0,0 +1,620 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the OrganisationEnvVar type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganisationEnvVar{} + +// OrganisationEnvVar Class OrganisationEnvVar +type OrganisationEnvVar struct { + Organisation NullableString `json:"organisation,omitempty"` + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` + RawValue NullableString `json:"rawValue,omitempty"` +} + +// NewOrganisationEnvVar instantiates a new OrganisationEnvVar object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrganisationEnvVar() *OrganisationEnvVar { + this := OrganisationEnvVar{} + return &this +} + +// NewOrganisationEnvVarWithDefaults instantiates a new OrganisationEnvVar object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrganisationEnvVarWithDefaults() *OrganisationEnvVar { + this := OrganisationEnvVar{} + return &this +} + +// GetOrganisation returns the Organisation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVar) GetOrganisation() string { + if o == nil || IsNil(o.Organisation.Get()) { + var ret string + return ret + } + return *o.Organisation.Get() +} + +// GetOrganisationOk returns a tuple with the Organisation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVar) GetOrganisationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Organisation.Get(), o.Organisation.IsSet() +} + +// HasOrganisation returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasOrganisation() bool { + if o != nil && o.Organisation.IsSet() { + return true + } + + return false +} + +// SetOrganisation gets a reference to the given NullableString and assigns it to the Organisation field. +func (o *OrganisationEnvVar) SetOrganisation(v string) { + o.Organisation.Set(&v) +} + +// SetOrganisationNil sets the value for Organisation to be an explicit nil +func (o *OrganisationEnvVar) SetOrganisationNil() { + o.Organisation.Set(nil) +} + +// UnsetOrganisation ensures that no value is present for Organisation, not even an explicit nil +func (o *OrganisationEnvVar) UnsetOrganisation() { + o.Organisation.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *OrganisationEnvVar) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganisationEnvVar) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *OrganisationEnvVar) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVar) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVar) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *OrganisationEnvVar) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *OrganisationEnvVar) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *OrganisationEnvVar) UnsetUuid() { + o.Uuid.Unset() +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVar) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVar) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *OrganisationEnvVar) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *OrganisationEnvVar) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *OrganisationEnvVar) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVar) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVar) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *OrganisationEnvVar) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *OrganisationEnvVar) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *OrganisationEnvVar) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVar) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVar) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *OrganisationEnvVar) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *OrganisationEnvVar) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *OrganisationEnvVar) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVar) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVar) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *OrganisationEnvVar) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *OrganisationEnvVar) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *OrganisationEnvVar) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVar) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVar) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *OrganisationEnvVar) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *OrganisationEnvVar) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *OrganisationEnvVar) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *OrganisationEnvVar) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganisationEnvVar) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *OrganisationEnvVar) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *OrganisationEnvVar) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganisationEnvVar) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *OrganisationEnvVar) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVar) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVar) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *OrganisationEnvVar) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *OrganisationEnvVar) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *OrganisationEnvVar) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +// GetRawValue returns the RawValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVar) GetRawValue() string { + if o == nil || IsNil(o.RawValue.Get()) { + var ret string + return ret + } + return *o.RawValue.Get() +} + +// GetRawValueOk returns a tuple with the RawValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVar) GetRawValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RawValue.Get(), o.RawValue.IsSet() +} + +// HasRawValue returns a boolean if a field has been set. +func (o *OrganisationEnvVar) HasRawValue() bool { + if o != nil && o.RawValue.IsSet() { + return true + } + + return false +} + +// SetRawValue gets a reference to the given NullableString and assigns it to the RawValue field. +func (o *OrganisationEnvVar) SetRawValue(v string) { + o.RawValue.Set(&v) +} + +// SetRawValueNil sets the value for RawValue to be an explicit nil +func (o *OrganisationEnvVar) SetRawValueNil() { + o.RawValue.Set(nil) +} + +// UnsetRawValue ensures that no value is present for RawValue, not even an explicit nil +func (o *OrganisationEnvVar) UnsetRawValue() { + o.RawValue.Unset() +} + +func (o OrganisationEnvVar) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrganisationEnvVar) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Organisation.IsSet() { + toSerialize["organisation"] = o.Organisation.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + if o.RawValue.IsSet() { + toSerialize["rawValue"] = o.RawValue.Get() + } + return toSerialize, nil +} + +type NullableOrganisationEnvVar struct { + value *OrganisationEnvVar + isSet bool +} + +func (v NullableOrganisationEnvVar) Get() *OrganisationEnvVar { + return v.value +} + +func (v *NullableOrganisationEnvVar) Set(val *OrganisationEnvVar) { + v.value = val + v.isSet = true +} + +func (v NullableOrganisationEnvVar) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganisationEnvVar) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganisationEnvVar(val *OrganisationEnvVar) *NullableOrganisationEnvVar { + return &NullableOrganisationEnvVar{value: val, isSet: true} +} + +func (v NullableOrganisationEnvVar) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganisationEnvVar) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_organisation_env_var_organisation_input.go b/pkg/api/rewardcloud/model_organisation_env_var_organisation_input.go new file mode 100644 index 0000000..17e04dd --- /dev/null +++ b/pkg/api/rewardcloud/model_organisation_env_var_organisation_input.go @@ -0,0 +1,276 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the OrganisationEnvVarOrganisationInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganisationEnvVarOrganisationInput{} + +// OrganisationEnvVarOrganisationInput Class OrganisationEnvVar +type OrganisationEnvVarOrganisationInput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewOrganisationEnvVarOrganisationInput instantiates a new OrganisationEnvVarOrganisationInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrganisationEnvVarOrganisationInput() *OrganisationEnvVarOrganisationInput { + this := OrganisationEnvVarOrganisationInput{} + return &this +} + +// NewOrganisationEnvVarOrganisationInputWithDefaults instantiates a new OrganisationEnvVarOrganisationInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrganisationEnvVarOrganisationInputWithDefaults() *OrganisationEnvVarOrganisationInput { + this := OrganisationEnvVarOrganisationInput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVarOrganisationInput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVarOrganisationInput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *OrganisationEnvVarOrganisationInput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *OrganisationEnvVarOrganisationInput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *OrganisationEnvVarOrganisationInput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *OrganisationEnvVarOrganisationInput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVarOrganisationInput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVarOrganisationInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *OrganisationEnvVarOrganisationInput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *OrganisationEnvVarOrganisationInput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *OrganisationEnvVarOrganisationInput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *OrganisationEnvVarOrganisationInput) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVarOrganisationInput) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVarOrganisationInput) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *OrganisationEnvVarOrganisationInput) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *OrganisationEnvVarOrganisationInput) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *OrganisationEnvVarOrganisationInput) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *OrganisationEnvVarOrganisationInput) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVarOrganisationInput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVarOrganisationInput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *OrganisationEnvVarOrganisationInput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *OrganisationEnvVarOrganisationInput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *OrganisationEnvVarOrganisationInput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *OrganisationEnvVarOrganisationInput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o OrganisationEnvVarOrganisationInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrganisationEnvVarOrganisationInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableOrganisationEnvVarOrganisationInput struct { + value *OrganisationEnvVarOrganisationInput + isSet bool +} + +func (v NullableOrganisationEnvVarOrganisationInput) Get() *OrganisationEnvVarOrganisationInput { + return v.value +} + +func (v *NullableOrganisationEnvVarOrganisationInput) Set(val *OrganisationEnvVarOrganisationInput) { + v.value = val + v.isSet = true +} + +func (v NullableOrganisationEnvVarOrganisationInput) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganisationEnvVarOrganisationInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganisationEnvVarOrganisationInput(val *OrganisationEnvVarOrganisationInput) *NullableOrganisationEnvVarOrganisationInput { + return &NullableOrganisationEnvVarOrganisationInput{value: val, isSet: true} +} + +func (v NullableOrganisationEnvVarOrganisationInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganisationEnvVarOrganisationInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_organisation_env_var_organisation_output.go b/pkg/api/rewardcloud/model_organisation_env_var_organisation_output.go new file mode 100644 index 0000000..c564e21 --- /dev/null +++ b/pkg/api/rewardcloud/model_organisation_env_var_organisation_output.go @@ -0,0 +1,276 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the OrganisationEnvVarOrganisationOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganisationEnvVarOrganisationOutput{} + +// OrganisationEnvVarOrganisationOutput +type OrganisationEnvVarOrganisationOutput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewOrganisationEnvVarOrganisationOutput instantiates a new OrganisationEnvVarOrganisationOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrganisationEnvVarOrganisationOutput() *OrganisationEnvVarOrganisationOutput { + this := OrganisationEnvVarOrganisationOutput{} + return &this +} + +// NewOrganisationEnvVarOrganisationOutputWithDefaults instantiates a new OrganisationEnvVarOrganisationOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrganisationEnvVarOrganisationOutputWithDefaults() *OrganisationEnvVarOrganisationOutput { + this := OrganisationEnvVarOrganisationOutput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVarOrganisationOutput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVarOrganisationOutput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *OrganisationEnvVarOrganisationOutput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *OrganisationEnvVarOrganisationOutput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *OrganisationEnvVarOrganisationOutput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *OrganisationEnvVarOrganisationOutput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVarOrganisationOutput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVarOrganisationOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *OrganisationEnvVarOrganisationOutput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *OrganisationEnvVarOrganisationOutput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *OrganisationEnvVarOrganisationOutput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *OrganisationEnvVarOrganisationOutput) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVarOrganisationOutput) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVarOrganisationOutput) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *OrganisationEnvVarOrganisationOutput) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *OrganisationEnvVarOrganisationOutput) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *OrganisationEnvVarOrganisationOutput) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *OrganisationEnvVarOrganisationOutput) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationEnvVarOrganisationOutput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationEnvVarOrganisationOutput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *OrganisationEnvVarOrganisationOutput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *OrganisationEnvVarOrganisationOutput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *OrganisationEnvVarOrganisationOutput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *OrganisationEnvVarOrganisationOutput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o OrganisationEnvVarOrganisationOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrganisationEnvVarOrganisationOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableOrganisationEnvVarOrganisationOutput struct { + value *OrganisationEnvVarOrganisationOutput + isSet bool +} + +func (v NullableOrganisationEnvVarOrganisationOutput) Get() *OrganisationEnvVarOrganisationOutput { + return v.value +} + +func (v *NullableOrganisationEnvVarOrganisationOutput) Set(val *OrganisationEnvVarOrganisationOutput) { + v.value = val + v.isSet = true +} + +func (v NullableOrganisationEnvVarOrganisationOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganisationEnvVarOrganisationOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganisationEnvVarOrganisationOutput(val *OrganisationEnvVarOrganisationOutput) *NullableOrganisationEnvVarOrganisationOutput { + return &NullableOrganisationEnvVarOrganisationOutput{value: val, isSet: true} +} + +func (v NullableOrganisationEnvVarOrganisationOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganisationEnvVarOrganisationOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_organisation_organisation_input.go b/pkg/api/rewardcloud/model_organisation_organisation_input.go new file mode 100644 index 0000000..3ad2835 --- /dev/null +++ b/pkg/api/rewardcloud/model_organisation_organisation_input.go @@ -0,0 +1,302 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the OrganisationOrganisationInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganisationOrganisationInput{} + +// OrganisationOrganisationInput Class Organisation +type OrganisationOrganisationInput struct { + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + // User related property - One user can only have 1 pcs default Organisation + IsDefault NullableBool `json:"isDefault,omitempty"` + Team []string `json:"team,omitempty"` + OrganisationEnvVar []OrganisationEnvVarOrganisationInput `json:"organisationEnvVar,omitempty"` +} + +// NewOrganisationOrganisationInput instantiates a new OrganisationOrganisationInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrganisationOrganisationInput() *OrganisationOrganisationInput { + this := OrganisationOrganisationInput{} + return &this +} + +// NewOrganisationOrganisationInputWithDefaults instantiates a new OrganisationOrganisationInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrganisationOrganisationInputWithDefaults() *OrganisationOrganisationInput { + this := OrganisationOrganisationInput{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationOrganisationInput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationOrganisationInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *OrganisationOrganisationInput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *OrganisationOrganisationInput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *OrganisationOrganisationInput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *OrganisationOrganisationInput) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationOrganisationInput) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationOrganisationInput) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *OrganisationOrganisationInput) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *OrganisationOrganisationInput) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *OrganisationOrganisationInput) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *OrganisationOrganisationInput) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationOrganisationInput) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationOrganisationInput) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *OrganisationOrganisationInput) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *OrganisationOrganisationInput) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *OrganisationOrganisationInput) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *OrganisationOrganisationInput) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetTeam returns the Team field value if set, zero value otherwise. +func (o *OrganisationOrganisationInput) GetTeam() []string { + if o == nil || IsNil(o.Team) { + var ret []string + return ret + } + return o.Team +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganisationOrganisationInput) GetTeamOk() ([]string, bool) { + if o == nil || IsNil(o.Team) { + return nil, false + } + return o.Team, true +} + +// HasTeam returns a boolean if a field has been set. +func (o *OrganisationOrganisationInput) HasTeam() bool { + if o != nil && !IsNil(o.Team) { + return true + } + + return false +} + +// SetTeam gets a reference to the given []string and assigns it to the Team field. +func (o *OrganisationOrganisationInput) SetTeam(v []string) { + o.Team = v +} + +// GetOrganisationEnvVar returns the OrganisationEnvVar field value if set, zero value otherwise. +func (o *OrganisationOrganisationInput) GetOrganisationEnvVar() []OrganisationEnvVarOrganisationInput { + if o == nil || IsNil(o.OrganisationEnvVar) { + var ret []OrganisationEnvVarOrganisationInput + return ret + } + return o.OrganisationEnvVar +} + +// GetOrganisationEnvVarOk returns a tuple with the OrganisationEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganisationOrganisationInput) GetOrganisationEnvVarOk() ([]OrganisationEnvVarOrganisationInput, bool) { + if o == nil || IsNil(o.OrganisationEnvVar) { + return nil, false + } + return o.OrganisationEnvVar, true +} + +// HasOrganisationEnvVar returns a boolean if a field has been set. +func (o *OrganisationOrganisationInput) HasOrganisationEnvVar() bool { + if o != nil && !IsNil(o.OrganisationEnvVar) { + return true + } + + return false +} + +// SetOrganisationEnvVar gets a reference to the given []OrganisationEnvVarOrganisationInput and assigns it to the OrganisationEnvVar field. +func (o *OrganisationOrganisationInput) SetOrganisationEnvVar(v []OrganisationEnvVarOrganisationInput) { + o.OrganisationEnvVar = v +} + +func (o OrganisationOrganisationInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrganisationOrganisationInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.IsDefault.IsSet() { + toSerialize["isDefault"] = o.IsDefault.Get() + } + if !IsNil(o.Team) { + toSerialize["team"] = o.Team + } + if !IsNil(o.OrganisationEnvVar) { + toSerialize["organisationEnvVar"] = o.OrganisationEnvVar + } + return toSerialize, nil +} + +type NullableOrganisationOrganisationInput struct { + value *OrganisationOrganisationInput + isSet bool +} + +func (v NullableOrganisationOrganisationInput) Get() *OrganisationOrganisationInput { + return v.value +} + +func (v *NullableOrganisationOrganisationInput) Set(val *OrganisationOrganisationInput) { + v.value = val + v.isSet = true +} + +func (v NullableOrganisationOrganisationInput) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganisationOrganisationInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganisationOrganisationInput(val *OrganisationOrganisationInput) *NullableOrganisationOrganisationInput { + return &NullableOrganisationOrganisationInput{value: val, isSet: true} +} + +func (v NullableOrganisationOrganisationInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganisationOrganisationInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_organisation_organisation_output.go b/pkg/api/rewardcloud/model_organisation_organisation_output.go new file mode 100644 index 0000000..675564b --- /dev/null +++ b/pkg/api/rewardcloud/model_organisation_organisation_output.go @@ -0,0 +1,515 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the OrganisationOrganisationOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganisationOrganisationOutput{} + +// OrganisationOrganisationOutput Class Organisation +type OrganisationOrganisationOutput struct { + Id *int32 `json:"id,omitempty"` + Uuid *string `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + // User related property - One user can only have 1 pcs default Organisation + IsDefault NullableBool `json:"isDefault,omitempty"` + Team []string `json:"team,omitempty"` + OrganisationEnvVar []OrganisationEnvVarOrganisationOutput `json:"organisationEnvVar,omitempty"` + StateByInfra NullableString `json:"stateByInfra,omitempty"` + DefaultUser NullableString `json:"defaultUser,omitempty"` + DefaultUserName NullableString `json:"defaultUserName,omitempty"` +} + +// NewOrganisationOrganisationOutput instantiates a new OrganisationOrganisationOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrganisationOrganisationOutput() *OrganisationOrganisationOutput { + this := OrganisationOrganisationOutput{} + return &this +} + +// NewOrganisationOrganisationOutputWithDefaults instantiates a new OrganisationOrganisationOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrganisationOrganisationOutputWithDefaults() *OrganisationOrganisationOutput { + this := OrganisationOrganisationOutput{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *OrganisationOrganisationOutput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganisationOrganisationOutput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *OrganisationOrganisationOutput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *OrganisationOrganisationOutput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *OrganisationOrganisationOutput) GetUuid() string { + if o == nil || IsNil(o.Uuid) { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganisationOrganisationOutput) GetUuidOk() (*string, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *OrganisationOrganisationOutput) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *OrganisationOrganisationOutput) SetUuid(v string) { + o.Uuid = &v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationOrganisationOutput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationOrganisationOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *OrganisationOrganisationOutput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *OrganisationOrganisationOutput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *OrganisationOrganisationOutput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *OrganisationOrganisationOutput) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationOrganisationOutput) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationOrganisationOutput) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *OrganisationOrganisationOutput) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *OrganisationOrganisationOutput) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *OrganisationOrganisationOutput) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *OrganisationOrganisationOutput) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationOrganisationOutput) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationOrganisationOutput) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *OrganisationOrganisationOutput) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *OrganisationOrganisationOutput) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *OrganisationOrganisationOutput) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *OrganisationOrganisationOutput) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetTeam returns the Team field value if set, zero value otherwise. +func (o *OrganisationOrganisationOutput) GetTeam() []string { + if o == nil || IsNil(o.Team) { + var ret []string + return ret + } + return o.Team +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganisationOrganisationOutput) GetTeamOk() ([]string, bool) { + if o == nil || IsNil(o.Team) { + return nil, false + } + return o.Team, true +} + +// HasTeam returns a boolean if a field has been set. +func (o *OrganisationOrganisationOutput) HasTeam() bool { + if o != nil && !IsNil(o.Team) { + return true + } + + return false +} + +// SetTeam gets a reference to the given []string and assigns it to the Team field. +func (o *OrganisationOrganisationOutput) SetTeam(v []string) { + o.Team = v +} + +// GetOrganisationEnvVar returns the OrganisationEnvVar field value if set, zero value otherwise. +func (o *OrganisationOrganisationOutput) GetOrganisationEnvVar() []OrganisationEnvVarOrganisationOutput { + if o == nil || IsNil(o.OrganisationEnvVar) { + var ret []OrganisationEnvVarOrganisationOutput + return ret + } + return o.OrganisationEnvVar +} + +// GetOrganisationEnvVarOk returns a tuple with the OrganisationEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganisationOrganisationOutput) GetOrganisationEnvVarOk() ([]OrganisationEnvVarOrganisationOutput, bool) { + if o == nil || IsNil(o.OrganisationEnvVar) { + return nil, false + } + return o.OrganisationEnvVar, true +} + +// HasOrganisationEnvVar returns a boolean if a field has been set. +func (o *OrganisationOrganisationOutput) HasOrganisationEnvVar() bool { + if o != nil && !IsNil(o.OrganisationEnvVar) { + return true + } + + return false +} + +// SetOrganisationEnvVar gets a reference to the given []OrganisationEnvVarOrganisationOutput and assigns it to the OrganisationEnvVar field. +func (o *OrganisationOrganisationOutput) SetOrganisationEnvVar(v []OrganisationEnvVarOrganisationOutput) { + o.OrganisationEnvVar = v +} + +// GetStateByInfra returns the StateByInfra field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationOrganisationOutput) GetStateByInfra() string { + if o == nil || IsNil(o.StateByInfra.Get()) { + var ret string + return ret + } + return *o.StateByInfra.Get() +} + +// GetStateByInfraOk returns a tuple with the StateByInfra field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationOrganisationOutput) GetStateByInfraOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.StateByInfra.Get(), o.StateByInfra.IsSet() +} + +// HasStateByInfra returns a boolean if a field has been set. +func (o *OrganisationOrganisationOutput) HasStateByInfra() bool { + if o != nil && o.StateByInfra.IsSet() { + return true + } + + return false +} + +// SetStateByInfra gets a reference to the given NullableString and assigns it to the StateByInfra field. +func (o *OrganisationOrganisationOutput) SetStateByInfra(v string) { + o.StateByInfra.Set(&v) +} + +// SetStateByInfraNil sets the value for StateByInfra to be an explicit nil +func (o *OrganisationOrganisationOutput) SetStateByInfraNil() { + o.StateByInfra.Set(nil) +} + +// UnsetStateByInfra ensures that no value is present for StateByInfra, not even an explicit nil +func (o *OrganisationOrganisationOutput) UnsetStateByInfra() { + o.StateByInfra.Unset() +} + +// GetDefaultUser returns the DefaultUser field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationOrganisationOutput) GetDefaultUser() string { + if o == nil || IsNil(o.DefaultUser.Get()) { + var ret string + return ret + } + return *o.DefaultUser.Get() +} + +// GetDefaultUserOk returns a tuple with the DefaultUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationOrganisationOutput) GetDefaultUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DefaultUser.Get(), o.DefaultUser.IsSet() +} + +// HasDefaultUser returns a boolean if a field has been set. +func (o *OrganisationOrganisationOutput) HasDefaultUser() bool { + if o != nil && o.DefaultUser.IsSet() { + return true + } + + return false +} + +// SetDefaultUser gets a reference to the given NullableString and assigns it to the DefaultUser field. +func (o *OrganisationOrganisationOutput) SetDefaultUser(v string) { + o.DefaultUser.Set(&v) +} + +// SetDefaultUserNil sets the value for DefaultUser to be an explicit nil +func (o *OrganisationOrganisationOutput) SetDefaultUserNil() { + o.DefaultUser.Set(nil) +} + +// UnsetDefaultUser ensures that no value is present for DefaultUser, not even an explicit nil +func (o *OrganisationOrganisationOutput) UnsetDefaultUser() { + o.DefaultUser.Unset() +} + +// GetDefaultUserName returns the DefaultUserName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrganisationOrganisationOutput) GetDefaultUserName() string { + if o == nil || IsNil(o.DefaultUserName.Get()) { + var ret string + return ret + } + return *o.DefaultUserName.Get() +} + +// GetDefaultUserNameOk returns a tuple with the DefaultUserName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrganisationOrganisationOutput) GetDefaultUserNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DefaultUserName.Get(), o.DefaultUserName.IsSet() +} + +// HasDefaultUserName returns a boolean if a field has been set. +func (o *OrganisationOrganisationOutput) HasDefaultUserName() bool { + if o != nil && o.DefaultUserName.IsSet() { + return true + } + + return false +} + +// SetDefaultUserName gets a reference to the given NullableString and assigns it to the DefaultUserName field. +func (o *OrganisationOrganisationOutput) SetDefaultUserName(v string) { + o.DefaultUserName.Set(&v) +} + +// SetDefaultUserNameNil sets the value for DefaultUserName to be an explicit nil +func (o *OrganisationOrganisationOutput) SetDefaultUserNameNil() { + o.DefaultUserName.Set(nil) +} + +// UnsetDefaultUserName ensures that no value is present for DefaultUserName, not even an explicit nil +func (o *OrganisationOrganisationOutput) UnsetDefaultUserName() { + o.DefaultUserName.Unset() +} + +func (o OrganisationOrganisationOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrganisationOrganisationOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.IsDefault.IsSet() { + toSerialize["isDefault"] = o.IsDefault.Get() + } + if !IsNil(o.Team) { + toSerialize["team"] = o.Team + } + if !IsNil(o.OrganisationEnvVar) { + toSerialize["organisationEnvVar"] = o.OrganisationEnvVar + } + if o.StateByInfra.IsSet() { + toSerialize["stateByInfra"] = o.StateByInfra.Get() + } + if o.DefaultUser.IsSet() { + toSerialize["defaultUser"] = o.DefaultUser.Get() + } + if o.DefaultUserName.IsSet() { + toSerialize["defaultUserName"] = o.DefaultUserName.Get() + } + return toSerialize, nil +} + +type NullableOrganisationOrganisationOutput struct { + value *OrganisationOrganisationOutput + isSet bool +} + +func (v NullableOrganisationOrganisationOutput) Get() *OrganisationOrganisationOutput { + return v.value +} + +func (v *NullableOrganisationOrganisationOutput) Set(val *OrganisationOrganisationOutput) { + v.value = val + v.isSet = true +} + +func (v NullableOrganisationOrganisationOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganisationOrganisationOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganisationOrganisationOutput(val *OrganisationOrganisationOutput) *NullableOrganisationOrganisationOutput { + return &NullableOrganisationOrganisationOutput{value: val, isSet: true} +} + +func (v NullableOrganisationOrganisationOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganisationOrganisationOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_price.go b/pkg/api/rewardcloud/model_price.go new file mode 100644 index 0000000..5b463dc --- /dev/null +++ b/pkg/api/rewardcloud/model_price.go @@ -0,0 +1,609 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the Price type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Price{} + +// Price Class Price +type Price struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + PaymentId NullableString `json:"paymentId,omitempty"` + Amount NullableFloat32 `json:"amount,omitempty"` + Currency NullableString `json:"currency,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` + Product NullableProduct `json:"product,omitempty"` + Products []string `json:"products,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewPrice instantiates a new Price object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPrice() *Price { + this := Price{} + return &this +} + +// NewPriceWithDefaults instantiates a new Price object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPriceWithDefaults() *Price { + this := Price{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Price) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Price) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Price) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Price) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Price) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Price) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *Price) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *Price) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *Price) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *Price) UnsetUuid() { + o.Uuid.Unset() +} + +// GetPaymentId returns the PaymentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Price) GetPaymentId() string { + if o == nil || IsNil(o.PaymentId.Get()) { + var ret string + return ret + } + return *o.PaymentId.Get() +} + +// GetPaymentIdOk returns a tuple with the PaymentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Price) GetPaymentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PaymentId.Get(), o.PaymentId.IsSet() +} + +// HasPaymentId returns a boolean if a field has been set. +func (o *Price) HasPaymentId() bool { + if o != nil && o.PaymentId.IsSet() { + return true + } + + return false +} + +// SetPaymentId gets a reference to the given NullableString and assigns it to the PaymentId field. +func (o *Price) SetPaymentId(v string) { + o.PaymentId.Set(&v) +} + +// SetPaymentIdNil sets the value for PaymentId to be an explicit nil +func (o *Price) SetPaymentIdNil() { + o.PaymentId.Set(nil) +} + +// UnsetPaymentId ensures that no value is present for PaymentId, not even an explicit nil +func (o *Price) UnsetPaymentId() { + o.PaymentId.Unset() +} + +// GetAmount returns the Amount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Price) GetAmount() float32 { + if o == nil || IsNil(o.Amount.Get()) { + var ret float32 + return ret + } + return *o.Amount.Get() +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Price) GetAmountOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Amount.Get(), o.Amount.IsSet() +} + +// HasAmount returns a boolean if a field has been set. +func (o *Price) HasAmount() bool { + if o != nil && o.Amount.IsSet() { + return true + } + + return false +} + +// SetAmount gets a reference to the given NullableFloat32 and assigns it to the Amount field. +func (o *Price) SetAmount(v float32) { + o.Amount.Set(&v) +} + +// SetAmountNil sets the value for Amount to be an explicit nil +func (o *Price) SetAmountNil() { + o.Amount.Set(nil) +} + +// UnsetAmount ensures that no value is present for Amount, not even an explicit nil +func (o *Price) UnsetAmount() { + o.Amount.Unset() +} + +// GetCurrency returns the Currency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Price) GetCurrency() string { + if o == nil || IsNil(o.Currency.Get()) { + var ret string + return ret + } + return *o.Currency.Get() +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Price) GetCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Currency.Get(), o.Currency.IsSet() +} + +// HasCurrency returns a boolean if a field has been set. +func (o *Price) HasCurrency() bool { + if o != nil && o.Currency.IsSet() { + return true + } + + return false +} + +// SetCurrency gets a reference to the given NullableString and assigns it to the Currency field. +func (o *Price) SetCurrency(v string) { + o.Currency.Set(&v) +} + +// SetCurrencyNil sets the value for Currency to be an explicit nil +func (o *Price) SetCurrencyNil() { + o.Currency.Set(nil) +} + +// UnsetCurrency ensures that no value is present for Currency, not even an explicit nil +func (o *Price) UnsetCurrency() { + o.Currency.Unset() +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Price) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Price) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *Price) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *Price) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *Price) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *Price) UnsetIsActive() { + o.IsActive.Unset() +} + +// GetProduct returns the Product field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Price) GetProduct() Product { + if o == nil || IsNil(o.Product.Get()) { + var ret Product + return ret + } + return *o.Product.Get() +} + +// GetProductOk returns a tuple with the Product field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Price) GetProductOk() (*Product, bool) { + if o == nil { + return nil, false + } + return o.Product.Get(), o.Product.IsSet() +} + +// HasProduct returns a boolean if a field has been set. +func (o *Price) HasProduct() bool { + if o != nil && o.Product.IsSet() { + return true + } + + return false +} + +// SetProduct gets a reference to the given NullableProduct and assigns it to the Product field. +func (o *Price) SetProduct(v Product) { + o.Product.Set(&v) +} + +// SetProductNil sets the value for Product to be an explicit nil +func (o *Price) SetProductNil() { + o.Product.Set(nil) +} + +// UnsetProduct ensures that no value is present for Product, not even an explicit nil +func (o *Price) UnsetProduct() { + o.Product.Unset() +} + +// GetProducts returns the Products field value if set, zero value otherwise. +func (o *Price) GetProducts() []string { + if o == nil || IsNil(o.Products) { + var ret []string + return ret + } + return o.Products +} + +// GetProductsOk returns a tuple with the Products field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Price) GetProductsOk() ([]string, bool) { + if o == nil || IsNil(o.Products) { + return nil, false + } + return o.Products, true +} + +// HasProducts returns a boolean if a field has been set. +func (o *Price) HasProducts() bool { + if o != nil && !IsNil(o.Products) { + return true + } + + return false +} + +// SetProducts gets a reference to the given []string and assigns it to the Products field. +func (o *Price) SetProducts(v []string) { + o.Products = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Price) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Price) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *Price) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *Price) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *Price) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *Price) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Price) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Price) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *Price) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *Price) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *Price) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *Price) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Price) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Price) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Price) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Price) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Price) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Price) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Price) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Price) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o Price) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Price) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.PaymentId.IsSet() { + toSerialize["paymentId"] = o.PaymentId.Get() + } + if o.Amount.IsSet() { + toSerialize["amount"] = o.Amount.Get() + } + if o.Currency.IsSet() { + toSerialize["currency"] = o.Currency.Get() + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + if o.Product.IsSet() { + toSerialize["product"] = o.Product.Get() + } + if !IsNil(o.Products) { + toSerialize["products"] = o.Products + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullablePrice struct { + value *Price + isSet bool +} + +func (v NullablePrice) Get() *Price { + return v.value +} + +func (v *NullablePrice) Set(val *Price) { + v.value = val + v.isSet = true +} + +func (v NullablePrice) IsSet() bool { + return v.isSet +} + +func (v *NullablePrice) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePrice(val *Price) *NullablePrice { + return &NullablePrice{value: val, isSet: true} +} + +func (v NullablePrice) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePrice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_price_product_input.go b/pkg/api/rewardcloud/model_price_product_input.go new file mode 100644 index 0000000..920ca4e --- /dev/null +++ b/pkg/api/rewardcloud/model_price_product_input.go @@ -0,0 +1,359 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the PriceProductInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PriceProductInput{} + +// PriceProductInput Class Price +type PriceProductInput struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + PaymentId NullableString `json:"paymentId,omitempty"` + Amount NullableFloat32 `json:"amount,omitempty"` + Currency NullableString `json:"currency,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` +} + +// NewPriceProductInput instantiates a new PriceProductInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPriceProductInput() *PriceProductInput { + this := PriceProductInput{} + return &this +} + +// NewPriceProductInputWithDefaults instantiates a new PriceProductInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPriceProductInputWithDefaults() *PriceProductInput { + this := PriceProductInput{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PriceProductInput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PriceProductInput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PriceProductInput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *PriceProductInput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PriceProductInput) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PriceProductInput) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *PriceProductInput) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *PriceProductInput) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *PriceProductInput) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *PriceProductInput) UnsetUuid() { + o.Uuid.Unset() +} + +// GetPaymentId returns the PaymentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PriceProductInput) GetPaymentId() string { + if o == nil || IsNil(o.PaymentId.Get()) { + var ret string + return ret + } + return *o.PaymentId.Get() +} + +// GetPaymentIdOk returns a tuple with the PaymentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PriceProductInput) GetPaymentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PaymentId.Get(), o.PaymentId.IsSet() +} + +// HasPaymentId returns a boolean if a field has been set. +func (o *PriceProductInput) HasPaymentId() bool { + if o != nil && o.PaymentId.IsSet() { + return true + } + + return false +} + +// SetPaymentId gets a reference to the given NullableString and assigns it to the PaymentId field. +func (o *PriceProductInput) SetPaymentId(v string) { + o.PaymentId.Set(&v) +} + +// SetPaymentIdNil sets the value for PaymentId to be an explicit nil +func (o *PriceProductInput) SetPaymentIdNil() { + o.PaymentId.Set(nil) +} + +// UnsetPaymentId ensures that no value is present for PaymentId, not even an explicit nil +func (o *PriceProductInput) UnsetPaymentId() { + o.PaymentId.Unset() +} + +// GetAmount returns the Amount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PriceProductInput) GetAmount() float32 { + if o == nil || IsNil(o.Amount.Get()) { + var ret float32 + return ret + } + return *o.Amount.Get() +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PriceProductInput) GetAmountOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Amount.Get(), o.Amount.IsSet() +} + +// HasAmount returns a boolean if a field has been set. +func (o *PriceProductInput) HasAmount() bool { + if o != nil && o.Amount.IsSet() { + return true + } + + return false +} + +// SetAmount gets a reference to the given NullableFloat32 and assigns it to the Amount field. +func (o *PriceProductInput) SetAmount(v float32) { + o.Amount.Set(&v) +} + +// SetAmountNil sets the value for Amount to be an explicit nil +func (o *PriceProductInput) SetAmountNil() { + o.Amount.Set(nil) +} + +// UnsetAmount ensures that no value is present for Amount, not even an explicit nil +func (o *PriceProductInput) UnsetAmount() { + o.Amount.Unset() +} + +// GetCurrency returns the Currency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PriceProductInput) GetCurrency() string { + if o == nil || IsNil(o.Currency.Get()) { + var ret string + return ret + } + return *o.Currency.Get() +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PriceProductInput) GetCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Currency.Get(), o.Currency.IsSet() +} + +// HasCurrency returns a boolean if a field has been set. +func (o *PriceProductInput) HasCurrency() bool { + if o != nil && o.Currency.IsSet() { + return true + } + + return false +} + +// SetCurrency gets a reference to the given NullableString and assigns it to the Currency field. +func (o *PriceProductInput) SetCurrency(v string) { + o.Currency.Set(&v) +} + +// SetCurrencyNil sets the value for Currency to be an explicit nil +func (o *PriceProductInput) SetCurrencyNil() { + o.Currency.Set(nil) +} + +// UnsetCurrency ensures that no value is present for Currency, not even an explicit nil +func (o *PriceProductInput) UnsetCurrency() { + o.Currency.Unset() +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PriceProductInput) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PriceProductInput) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *PriceProductInput) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *PriceProductInput) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *PriceProductInput) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *PriceProductInput) UnsetIsActive() { + o.IsActive.Unset() +} + +func (o PriceProductInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PriceProductInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.PaymentId.IsSet() { + toSerialize["paymentId"] = o.PaymentId.Get() + } + if o.Amount.IsSet() { + toSerialize["amount"] = o.Amount.Get() + } + if o.Currency.IsSet() { + toSerialize["currency"] = o.Currency.Get() + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + return toSerialize, nil +} + +type NullablePriceProductInput struct { + value *PriceProductInput + isSet bool +} + +func (v NullablePriceProductInput) Get() *PriceProductInput { + return v.value +} + +func (v *NullablePriceProductInput) Set(val *PriceProductInput) { + v.value = val + v.isSet = true +} + +func (v NullablePriceProductInput) IsSet() bool { + return v.isSet +} + +func (v *NullablePriceProductInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePriceProductInput(val *PriceProductInput) *NullablePriceProductInput { + return &NullablePriceProductInput{value: val, isSet: true} +} + +func (v NullablePriceProductInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePriceProductInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_price_product_output.go b/pkg/api/rewardcloud/model_price_product_output.go new file mode 100644 index 0000000..de21a7c --- /dev/null +++ b/pkg/api/rewardcloud/model_price_product_output.go @@ -0,0 +1,276 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the PriceProductOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PriceProductOutput{} + +// PriceProductOutput +type PriceProductOutput struct { + PaymentId NullableString `json:"paymentId,omitempty"` + Amount NullableFloat32 `json:"amount,omitempty"` + Currency NullableString `json:"currency,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` +} + +// NewPriceProductOutput instantiates a new PriceProductOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPriceProductOutput() *PriceProductOutput { + this := PriceProductOutput{} + return &this +} + +// NewPriceProductOutputWithDefaults instantiates a new PriceProductOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPriceProductOutputWithDefaults() *PriceProductOutput { + this := PriceProductOutput{} + return &this +} + +// GetPaymentId returns the PaymentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PriceProductOutput) GetPaymentId() string { + if o == nil || IsNil(o.PaymentId.Get()) { + var ret string + return ret + } + return *o.PaymentId.Get() +} + +// GetPaymentIdOk returns a tuple with the PaymentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PriceProductOutput) GetPaymentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PaymentId.Get(), o.PaymentId.IsSet() +} + +// HasPaymentId returns a boolean if a field has been set. +func (o *PriceProductOutput) HasPaymentId() bool { + if o != nil && o.PaymentId.IsSet() { + return true + } + + return false +} + +// SetPaymentId gets a reference to the given NullableString and assigns it to the PaymentId field. +func (o *PriceProductOutput) SetPaymentId(v string) { + o.PaymentId.Set(&v) +} + +// SetPaymentIdNil sets the value for PaymentId to be an explicit nil +func (o *PriceProductOutput) SetPaymentIdNil() { + o.PaymentId.Set(nil) +} + +// UnsetPaymentId ensures that no value is present for PaymentId, not even an explicit nil +func (o *PriceProductOutput) UnsetPaymentId() { + o.PaymentId.Unset() +} + +// GetAmount returns the Amount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PriceProductOutput) GetAmount() float32 { + if o == nil || IsNil(o.Amount.Get()) { + var ret float32 + return ret + } + return *o.Amount.Get() +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PriceProductOutput) GetAmountOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Amount.Get(), o.Amount.IsSet() +} + +// HasAmount returns a boolean if a field has been set. +func (o *PriceProductOutput) HasAmount() bool { + if o != nil && o.Amount.IsSet() { + return true + } + + return false +} + +// SetAmount gets a reference to the given NullableFloat32 and assigns it to the Amount field. +func (o *PriceProductOutput) SetAmount(v float32) { + o.Amount.Set(&v) +} + +// SetAmountNil sets the value for Amount to be an explicit nil +func (o *PriceProductOutput) SetAmountNil() { + o.Amount.Set(nil) +} + +// UnsetAmount ensures that no value is present for Amount, not even an explicit nil +func (o *PriceProductOutput) UnsetAmount() { + o.Amount.Unset() +} + +// GetCurrency returns the Currency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PriceProductOutput) GetCurrency() string { + if o == nil || IsNil(o.Currency.Get()) { + var ret string + return ret + } + return *o.Currency.Get() +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PriceProductOutput) GetCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Currency.Get(), o.Currency.IsSet() +} + +// HasCurrency returns a boolean if a field has been set. +func (o *PriceProductOutput) HasCurrency() bool { + if o != nil && o.Currency.IsSet() { + return true + } + + return false +} + +// SetCurrency gets a reference to the given NullableString and assigns it to the Currency field. +func (o *PriceProductOutput) SetCurrency(v string) { + o.Currency.Set(&v) +} + +// SetCurrencyNil sets the value for Currency to be an explicit nil +func (o *PriceProductOutput) SetCurrencyNil() { + o.Currency.Set(nil) +} + +// UnsetCurrency ensures that no value is present for Currency, not even an explicit nil +func (o *PriceProductOutput) UnsetCurrency() { + o.Currency.Unset() +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PriceProductOutput) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PriceProductOutput) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *PriceProductOutput) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *PriceProductOutput) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *PriceProductOutput) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *PriceProductOutput) UnsetIsActive() { + o.IsActive.Unset() +} + +func (o PriceProductOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PriceProductOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.PaymentId.IsSet() { + toSerialize["paymentId"] = o.PaymentId.Get() + } + if o.Amount.IsSet() { + toSerialize["amount"] = o.Amount.Get() + } + if o.Currency.IsSet() { + toSerialize["currency"] = o.Currency.Get() + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + return toSerialize, nil +} + +type NullablePriceProductOutput struct { + value *PriceProductOutput + isSet bool +} + +func (v NullablePriceProductOutput) Get() *PriceProductOutput { + return v.value +} + +func (v *NullablePriceProductOutput) Set(val *PriceProductOutput) { + v.value = val + v.isSet = true +} + +func (v NullablePriceProductOutput) IsSet() bool { + return v.isSet +} + +func (v *NullablePriceProductOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePriceProductOutput(val *PriceProductOutput) *NullablePriceProductOutput { + return &NullablePriceProductOutput{value: val, isSet: true} +} + +func (v NullablePriceProductOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePriceProductOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_product.go b/pkg/api/rewardcloud/model_product.go new file mode 100644 index 0000000..e69bc49 --- /dev/null +++ b/pkg/api/rewardcloud/model_product.go @@ -0,0 +1,692 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the Product type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Product{} + +// Product +type Product struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + PaymentId NullableString `json:"paymentId,omitempty"` + Name NullableString `json:"name,omitempty"` + Description NullableString `json:"description,omitempty"` + Metadata []string `json:"metadata,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` + Prices []string `json:"prices,omitempty"` + DefaultPrice NullableString `json:"defaultPrice,omitempty"` + Cluster NullableString `json:"cluster,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewProduct instantiates a new Product object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProduct() *Product { + this := Product{} + return &this +} + +// NewProductWithDefaults instantiates a new Product object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProductWithDefaults() *Product { + this := Product{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Product) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Product) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Product) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Product) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Product) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Product) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *Product) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *Product) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *Product) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *Product) UnsetUuid() { + o.Uuid.Unset() +} + +// GetPaymentId returns the PaymentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Product) GetPaymentId() string { + if o == nil || IsNil(o.PaymentId.Get()) { + var ret string + return ret + } + return *o.PaymentId.Get() +} + +// GetPaymentIdOk returns a tuple with the PaymentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Product) GetPaymentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PaymentId.Get(), o.PaymentId.IsSet() +} + +// HasPaymentId returns a boolean if a field has been set. +func (o *Product) HasPaymentId() bool { + if o != nil && o.PaymentId.IsSet() { + return true + } + + return false +} + +// SetPaymentId gets a reference to the given NullableString and assigns it to the PaymentId field. +func (o *Product) SetPaymentId(v string) { + o.PaymentId.Set(&v) +} + +// SetPaymentIdNil sets the value for PaymentId to be an explicit nil +func (o *Product) SetPaymentIdNil() { + o.PaymentId.Set(nil) +} + +// UnsetPaymentId ensures that no value is present for PaymentId, not even an explicit nil +func (o *Product) UnsetPaymentId() { + o.PaymentId.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Product) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Product) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *Product) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *Product) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *Product) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *Product) UnsetName() { + o.Name.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Product) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Product) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *Product) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *Product) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *Product) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *Product) UnsetDescription() { + o.Description.Unset() +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *Product) GetMetadata() []string { + if o == nil || IsNil(o.Metadata) { + var ret []string + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Product) GetMetadataOk() ([]string, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *Product) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given []string and assigns it to the Metadata field. +func (o *Product) SetMetadata(v []string) { + o.Metadata = v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Product) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Product) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *Product) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *Product) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *Product) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *Product) UnsetIsActive() { + o.IsActive.Unset() +} + +// GetPrices returns the Prices field value if set, zero value otherwise. +func (o *Product) GetPrices() []string { + if o == nil || IsNil(o.Prices) { + var ret []string + return ret + } + return o.Prices +} + +// GetPricesOk returns a tuple with the Prices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Product) GetPricesOk() ([]string, bool) { + if o == nil || IsNil(o.Prices) { + return nil, false + } + return o.Prices, true +} + +// HasPrices returns a boolean if a field has been set. +func (o *Product) HasPrices() bool { + if o != nil && !IsNil(o.Prices) { + return true + } + + return false +} + +// SetPrices gets a reference to the given []string and assigns it to the Prices field. +func (o *Product) SetPrices(v []string) { + o.Prices = v +} + +// GetDefaultPrice returns the DefaultPrice field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Product) GetDefaultPrice() string { + if o == nil || IsNil(o.DefaultPrice.Get()) { + var ret string + return ret + } + return *o.DefaultPrice.Get() +} + +// GetDefaultPriceOk returns a tuple with the DefaultPrice field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Product) GetDefaultPriceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DefaultPrice.Get(), o.DefaultPrice.IsSet() +} + +// HasDefaultPrice returns a boolean if a field has been set. +func (o *Product) HasDefaultPrice() bool { + if o != nil && o.DefaultPrice.IsSet() { + return true + } + + return false +} + +// SetDefaultPrice gets a reference to the given NullableString and assigns it to the DefaultPrice field. +func (o *Product) SetDefaultPrice(v string) { + o.DefaultPrice.Set(&v) +} + +// SetDefaultPriceNil sets the value for DefaultPrice to be an explicit nil +func (o *Product) SetDefaultPriceNil() { + o.DefaultPrice.Set(nil) +} + +// UnsetDefaultPrice ensures that no value is present for DefaultPrice, not even an explicit nil +func (o *Product) UnsetDefaultPrice() { + o.DefaultPrice.Unset() +} + +// GetCluster returns the Cluster field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Product) GetCluster() string { + if o == nil || IsNil(o.Cluster.Get()) { + var ret string + return ret + } + return *o.Cluster.Get() +} + +// GetClusterOk returns a tuple with the Cluster field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Product) GetClusterOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Cluster.Get(), o.Cluster.IsSet() +} + +// HasCluster returns a boolean if a field has been set. +func (o *Product) HasCluster() bool { + if o != nil && o.Cluster.IsSet() { + return true + } + + return false +} + +// SetCluster gets a reference to the given NullableString and assigns it to the Cluster field. +func (o *Product) SetCluster(v string) { + o.Cluster.Set(&v) +} + +// SetClusterNil sets the value for Cluster to be an explicit nil +func (o *Product) SetClusterNil() { + o.Cluster.Set(nil) +} + +// UnsetCluster ensures that no value is present for Cluster, not even an explicit nil +func (o *Product) UnsetCluster() { + o.Cluster.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Product) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Product) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *Product) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *Product) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *Product) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *Product) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Product) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Product) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *Product) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *Product) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *Product) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *Product) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Product) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Product) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Product) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Product) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Product) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Product) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Product) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Product) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o Product) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Product) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.PaymentId.IsSet() { + toSerialize["paymentId"] = o.PaymentId.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + if !IsNil(o.Prices) { + toSerialize["prices"] = o.Prices + } + if o.DefaultPrice.IsSet() { + toSerialize["defaultPrice"] = o.DefaultPrice.Get() + } + if o.Cluster.IsSet() { + toSerialize["cluster"] = o.Cluster.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProduct struct { + value *Product + isSet bool +} + +func (v NullableProduct) Get() *Product { + return v.value +} + +func (v *NullableProduct) Set(val *Product) { + v.value = val + v.isSet = true +} + +func (v NullableProduct) IsSet() bool { + return v.isSet +} + +func (v *NullableProduct) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProduct(val *Product) *NullableProduct { + return &NullableProduct{value: val, isSet: true} +} + +func (v NullableProduct) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProduct) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_product_product_input.go b/pkg/api/rewardcloud/model_product_product_input.go new file mode 100644 index 0000000..2d1710c --- /dev/null +++ b/pkg/api/rewardcloud/model_product_product_input.go @@ -0,0 +1,525 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProductProductInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProductProductInput{} + +// ProductProductInput Class Product +type ProductProductInput struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + PaymentId NullableString `json:"paymentId,omitempty"` + Name NullableString `json:"name,omitempty"` + Description NullableString `json:"description,omitempty"` + Metadata []string `json:"metadata,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` + Prices []PriceProductInput `json:"prices,omitempty"` + DefaultPrice NullablePriceProductInput `json:"defaultPrice,omitempty"` + Cluster NullableString `json:"cluster,omitempty"` +} + +// NewProductProductInput instantiates a new ProductProductInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProductProductInput() *ProductProductInput { + this := ProductProductInput{} + return &this +} + +// NewProductProductInputWithDefaults instantiates a new ProductProductInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProductProductInputWithDefaults() *ProductProductInput { + this := ProductProductInput{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProductProductInput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProductProductInput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProductProductInput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProductProductInput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductInput) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductInput) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProductProductInput) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ProductProductInput) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ProductProductInput) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ProductProductInput) UnsetUuid() { + o.Uuid.Unset() +} + +// GetPaymentId returns the PaymentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductInput) GetPaymentId() string { + if o == nil || IsNil(o.PaymentId.Get()) { + var ret string + return ret + } + return *o.PaymentId.Get() +} + +// GetPaymentIdOk returns a tuple with the PaymentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductInput) GetPaymentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PaymentId.Get(), o.PaymentId.IsSet() +} + +// HasPaymentId returns a boolean if a field has been set. +func (o *ProductProductInput) HasPaymentId() bool { + if o != nil && o.PaymentId.IsSet() { + return true + } + + return false +} + +// SetPaymentId gets a reference to the given NullableString and assigns it to the PaymentId field. +func (o *ProductProductInput) SetPaymentId(v string) { + o.PaymentId.Set(&v) +} + +// SetPaymentIdNil sets the value for PaymentId to be an explicit nil +func (o *ProductProductInput) SetPaymentIdNil() { + o.PaymentId.Set(nil) +} + +// UnsetPaymentId ensures that no value is present for PaymentId, not even an explicit nil +func (o *ProductProductInput) UnsetPaymentId() { + o.PaymentId.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductInput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *ProductProductInput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *ProductProductInput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *ProductProductInput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *ProductProductInput) UnsetName() { + o.Name.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductInput) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductInput) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ProductProductInput) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ProductProductInput) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ProductProductInput) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ProductProductInput) UnsetDescription() { + o.Description.Unset() +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *ProductProductInput) GetMetadata() []string { + if o == nil || IsNil(o.Metadata) { + var ret []string + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProductProductInput) GetMetadataOk() ([]string, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *ProductProductInput) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given []string and assigns it to the Metadata field. +func (o *ProductProductInput) SetMetadata(v []string) { + o.Metadata = v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductInput) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductInput) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *ProductProductInput) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *ProductProductInput) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *ProductProductInput) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *ProductProductInput) UnsetIsActive() { + o.IsActive.Unset() +} + +// GetPrices returns the Prices field value if set, zero value otherwise. +func (o *ProductProductInput) GetPrices() []PriceProductInput { + if o == nil || IsNil(o.Prices) { + var ret []PriceProductInput + return ret + } + return o.Prices +} + +// GetPricesOk returns a tuple with the Prices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProductProductInput) GetPricesOk() ([]PriceProductInput, bool) { + if o == nil || IsNil(o.Prices) { + return nil, false + } + return o.Prices, true +} + +// HasPrices returns a boolean if a field has been set. +func (o *ProductProductInput) HasPrices() bool { + if o != nil && !IsNil(o.Prices) { + return true + } + + return false +} + +// SetPrices gets a reference to the given []PriceProductInput and assigns it to the Prices field. +func (o *ProductProductInput) SetPrices(v []PriceProductInput) { + o.Prices = v +} + +// GetDefaultPrice returns the DefaultPrice field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductInput) GetDefaultPrice() PriceProductInput { + if o == nil || IsNil(o.DefaultPrice.Get()) { + var ret PriceProductInput + return ret + } + return *o.DefaultPrice.Get() +} + +// GetDefaultPriceOk returns a tuple with the DefaultPrice field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductInput) GetDefaultPriceOk() (*PriceProductInput, bool) { + if o == nil { + return nil, false + } + return o.DefaultPrice.Get(), o.DefaultPrice.IsSet() +} + +// HasDefaultPrice returns a boolean if a field has been set. +func (o *ProductProductInput) HasDefaultPrice() bool { + if o != nil && o.DefaultPrice.IsSet() { + return true + } + + return false +} + +// SetDefaultPrice gets a reference to the given NullablePriceProductInput and assigns it to the DefaultPrice field. +func (o *ProductProductInput) SetDefaultPrice(v PriceProductInput) { + o.DefaultPrice.Set(&v) +} + +// SetDefaultPriceNil sets the value for DefaultPrice to be an explicit nil +func (o *ProductProductInput) SetDefaultPriceNil() { + o.DefaultPrice.Set(nil) +} + +// UnsetDefaultPrice ensures that no value is present for DefaultPrice, not even an explicit nil +func (o *ProductProductInput) UnsetDefaultPrice() { + o.DefaultPrice.Unset() +} + +// GetCluster returns the Cluster field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductInput) GetCluster() string { + if o == nil || IsNil(o.Cluster.Get()) { + var ret string + return ret + } + return *o.Cluster.Get() +} + +// GetClusterOk returns a tuple with the Cluster field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductInput) GetClusterOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Cluster.Get(), o.Cluster.IsSet() +} + +// HasCluster returns a boolean if a field has been set. +func (o *ProductProductInput) HasCluster() bool { + if o != nil && o.Cluster.IsSet() { + return true + } + + return false +} + +// SetCluster gets a reference to the given NullableString and assigns it to the Cluster field. +func (o *ProductProductInput) SetCluster(v string) { + o.Cluster.Set(&v) +} + +// SetClusterNil sets the value for Cluster to be an explicit nil +func (o *ProductProductInput) SetClusterNil() { + o.Cluster.Set(nil) +} + +// UnsetCluster ensures that no value is present for Cluster, not even an explicit nil +func (o *ProductProductInput) UnsetCluster() { + o.Cluster.Unset() +} + +func (o ProductProductInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProductProductInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.PaymentId.IsSet() { + toSerialize["paymentId"] = o.PaymentId.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + if !IsNil(o.Prices) { + toSerialize["prices"] = o.Prices + } + if o.DefaultPrice.IsSet() { + toSerialize["defaultPrice"] = o.DefaultPrice.Get() + } + if o.Cluster.IsSet() { + toSerialize["cluster"] = o.Cluster.Get() + } + return toSerialize, nil +} + +type NullableProductProductInput struct { + value *ProductProductInput + isSet bool +} + +func (v NullableProductProductInput) Get() *ProductProductInput { + return v.value +} + +func (v *NullableProductProductInput) Set(val *ProductProductInput) { + v.value = val + v.isSet = true +} + +func (v NullableProductProductInput) IsSet() bool { + return v.isSet +} + +func (v *NullableProductProductInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProductProductInput(val *ProductProductInput) *NullableProductProductInput { + return &NullableProductProductInput{value: val, isSet: true} +} + +func (v NullableProductProductInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProductProductInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_product_product_output.go b/pkg/api/rewardcloud/model_product_product_output.go new file mode 100644 index 0000000..f7394d2 --- /dev/null +++ b/pkg/api/rewardcloud/model_product_product_output.go @@ -0,0 +1,442 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProductProductOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProductProductOutput{} + +// ProductProductOutput Class Product +type ProductProductOutput struct { + PaymentId NullableString `json:"paymentId,omitempty"` + Name NullableString `json:"name,omitempty"` + Description NullableString `json:"description,omitempty"` + Metadata []string `json:"metadata,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` + Prices []PriceProductOutput `json:"prices,omitempty"` + DefaultPrice NullablePriceProductOutput `json:"defaultPrice,omitempty"` + Cluster NullableString `json:"cluster,omitempty"` +} + +// NewProductProductOutput instantiates a new ProductProductOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProductProductOutput() *ProductProductOutput { + this := ProductProductOutput{} + return &this +} + +// NewProductProductOutputWithDefaults instantiates a new ProductProductOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProductProductOutputWithDefaults() *ProductProductOutput { + this := ProductProductOutput{} + return &this +} + +// GetPaymentId returns the PaymentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductOutput) GetPaymentId() string { + if o == nil || IsNil(o.PaymentId.Get()) { + var ret string + return ret + } + return *o.PaymentId.Get() +} + +// GetPaymentIdOk returns a tuple with the PaymentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductOutput) GetPaymentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PaymentId.Get(), o.PaymentId.IsSet() +} + +// HasPaymentId returns a boolean if a field has been set. +func (o *ProductProductOutput) HasPaymentId() bool { + if o != nil && o.PaymentId.IsSet() { + return true + } + + return false +} + +// SetPaymentId gets a reference to the given NullableString and assigns it to the PaymentId field. +func (o *ProductProductOutput) SetPaymentId(v string) { + o.PaymentId.Set(&v) +} + +// SetPaymentIdNil sets the value for PaymentId to be an explicit nil +func (o *ProductProductOutput) SetPaymentIdNil() { + o.PaymentId.Set(nil) +} + +// UnsetPaymentId ensures that no value is present for PaymentId, not even an explicit nil +func (o *ProductProductOutput) UnsetPaymentId() { + o.PaymentId.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductOutput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *ProductProductOutput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *ProductProductOutput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *ProductProductOutput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *ProductProductOutput) UnsetName() { + o.Name.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductOutput) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductOutput) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ProductProductOutput) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ProductProductOutput) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ProductProductOutput) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ProductProductOutput) UnsetDescription() { + o.Description.Unset() +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *ProductProductOutput) GetMetadata() []string { + if o == nil || IsNil(o.Metadata) { + var ret []string + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProductProductOutput) GetMetadataOk() ([]string, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *ProductProductOutput) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given []string and assigns it to the Metadata field. +func (o *ProductProductOutput) SetMetadata(v []string) { + o.Metadata = v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductOutput) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductOutput) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *ProductProductOutput) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *ProductProductOutput) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *ProductProductOutput) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *ProductProductOutput) UnsetIsActive() { + o.IsActive.Unset() +} + +// GetPrices returns the Prices field value if set, zero value otherwise. +func (o *ProductProductOutput) GetPrices() []PriceProductOutput { + if o == nil || IsNil(o.Prices) { + var ret []PriceProductOutput + return ret + } + return o.Prices +} + +// GetPricesOk returns a tuple with the Prices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProductProductOutput) GetPricesOk() ([]PriceProductOutput, bool) { + if o == nil || IsNil(o.Prices) { + return nil, false + } + return o.Prices, true +} + +// HasPrices returns a boolean if a field has been set. +func (o *ProductProductOutput) HasPrices() bool { + if o != nil && !IsNil(o.Prices) { + return true + } + + return false +} + +// SetPrices gets a reference to the given []PriceProductOutput and assigns it to the Prices field. +func (o *ProductProductOutput) SetPrices(v []PriceProductOutput) { + o.Prices = v +} + +// GetDefaultPrice returns the DefaultPrice field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductOutput) GetDefaultPrice() PriceProductOutput { + if o == nil || IsNil(o.DefaultPrice.Get()) { + var ret PriceProductOutput + return ret + } + return *o.DefaultPrice.Get() +} + +// GetDefaultPriceOk returns a tuple with the DefaultPrice field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductOutput) GetDefaultPriceOk() (*PriceProductOutput, bool) { + if o == nil { + return nil, false + } + return o.DefaultPrice.Get(), o.DefaultPrice.IsSet() +} + +// HasDefaultPrice returns a boolean if a field has been set. +func (o *ProductProductOutput) HasDefaultPrice() bool { + if o != nil && o.DefaultPrice.IsSet() { + return true + } + + return false +} + +// SetDefaultPrice gets a reference to the given NullablePriceProductOutput and assigns it to the DefaultPrice field. +func (o *ProductProductOutput) SetDefaultPrice(v PriceProductOutput) { + o.DefaultPrice.Set(&v) +} + +// SetDefaultPriceNil sets the value for DefaultPrice to be an explicit nil +func (o *ProductProductOutput) SetDefaultPriceNil() { + o.DefaultPrice.Set(nil) +} + +// UnsetDefaultPrice ensures that no value is present for DefaultPrice, not even an explicit nil +func (o *ProductProductOutput) UnsetDefaultPrice() { + o.DefaultPrice.Unset() +} + +// GetCluster returns the Cluster field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProductProductOutput) GetCluster() string { + if o == nil || IsNil(o.Cluster.Get()) { + var ret string + return ret + } + return *o.Cluster.Get() +} + +// GetClusterOk returns a tuple with the Cluster field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProductProductOutput) GetClusterOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Cluster.Get(), o.Cluster.IsSet() +} + +// HasCluster returns a boolean if a field has been set. +func (o *ProductProductOutput) HasCluster() bool { + if o != nil && o.Cluster.IsSet() { + return true + } + + return false +} + +// SetCluster gets a reference to the given NullableString and assigns it to the Cluster field. +func (o *ProductProductOutput) SetCluster(v string) { + o.Cluster.Set(&v) +} + +// SetClusterNil sets the value for Cluster to be an explicit nil +func (o *ProductProductOutput) SetClusterNil() { + o.Cluster.Set(nil) +} + +// UnsetCluster ensures that no value is present for Cluster, not even an explicit nil +func (o *ProductProductOutput) UnsetCluster() { + o.Cluster.Unset() +} + +func (o ProductProductOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProductProductOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.PaymentId.IsSet() { + toSerialize["paymentId"] = o.PaymentId.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + if !IsNil(o.Prices) { + toSerialize["prices"] = o.Prices + } + if o.DefaultPrice.IsSet() { + toSerialize["defaultPrice"] = o.DefaultPrice.Get() + } + if o.Cluster.IsSet() { + toSerialize["cluster"] = o.Cluster.Get() + } + return toSerialize, nil +} + +type NullableProductProductOutput struct { + value *ProductProductOutput + isSet bool +} + +func (v NullableProductProductOutput) Get() *ProductProductOutput { + return v.value +} + +func (v *NullableProductProductOutput) Set(val *ProductProductOutput) { + v.value = val + v.isSet = true +} + +func (v NullableProductProductOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableProductProductOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProductProductOutput(val *ProductProductOutput) *NullableProductProductOutput { + return &NullableProductProductOutput{value: val, isSet: true} +} + +func (v NullableProductProductOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProductProductOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_access.go b/pkg/api/rewardcloud/model_project_access.go new file mode 100644 index 0000000..741cfd4 --- /dev/null +++ b/pkg/api/rewardcloud/model_project_access.go @@ -0,0 +1,526 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectAccess type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectAccess{} + +// ProjectAccess Class ProjectAccess +type ProjectAccess struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Project NullableString `json:"project,omitempty"` + ProjectAccessGit NullableString `json:"projectAccessGit,omitempty"` + ProjectAccessRegistry NullableString `json:"projectAccessRegistry,omitempty"` + ProjectAccessServiceAccount NullableString `json:"projectAccessServiceAccount,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewProjectAccess instantiates a new ProjectAccess object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectAccess() *ProjectAccess { + this := ProjectAccess{} + return &this +} + +// NewProjectAccessWithDefaults instantiates a new ProjectAccess object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectAccessWithDefaults() *ProjectAccess { + this := ProjectAccess{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectAccess) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccess) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectAccess) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectAccess) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccess) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccess) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectAccess) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ProjectAccess) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ProjectAccess) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ProjectAccess) UnsetUuid() { + o.Uuid.Unset() +} + +// GetProject returns the Project field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccess) GetProject() string { + if o == nil || IsNil(o.Project.Get()) { + var ret string + return ret + } + return *o.Project.Get() +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccess) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Project.Get(), o.Project.IsSet() +} + +// HasProject returns a boolean if a field has been set. +func (o *ProjectAccess) HasProject() bool { + if o != nil && o.Project.IsSet() { + return true + } + + return false +} + +// SetProject gets a reference to the given NullableString and assigns it to the Project field. +func (o *ProjectAccess) SetProject(v string) { + o.Project.Set(&v) +} + +// SetProjectNil sets the value for Project to be an explicit nil +func (o *ProjectAccess) SetProjectNil() { + o.Project.Set(nil) +} + +// UnsetProject ensures that no value is present for Project, not even an explicit nil +func (o *ProjectAccess) UnsetProject() { + o.Project.Unset() +} + +// GetProjectAccessGit returns the ProjectAccessGit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccess) GetProjectAccessGit() string { + if o == nil || IsNil(o.ProjectAccessGit.Get()) { + var ret string + return ret + } + return *o.ProjectAccessGit.Get() +} + +// GetProjectAccessGitOk returns a tuple with the ProjectAccessGit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccess) GetProjectAccessGitOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectAccessGit.Get(), o.ProjectAccessGit.IsSet() +} + +// HasProjectAccessGit returns a boolean if a field has been set. +func (o *ProjectAccess) HasProjectAccessGit() bool { + if o != nil && o.ProjectAccessGit.IsSet() { + return true + } + + return false +} + +// SetProjectAccessGit gets a reference to the given NullableString and assigns it to the ProjectAccessGit field. +func (o *ProjectAccess) SetProjectAccessGit(v string) { + o.ProjectAccessGit.Set(&v) +} + +// SetProjectAccessGitNil sets the value for ProjectAccessGit to be an explicit nil +func (o *ProjectAccess) SetProjectAccessGitNil() { + o.ProjectAccessGit.Set(nil) +} + +// UnsetProjectAccessGit ensures that no value is present for ProjectAccessGit, not even an explicit nil +func (o *ProjectAccess) UnsetProjectAccessGit() { + o.ProjectAccessGit.Unset() +} + +// GetProjectAccessRegistry returns the ProjectAccessRegistry field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccess) GetProjectAccessRegistry() string { + if o == nil || IsNil(o.ProjectAccessRegistry.Get()) { + var ret string + return ret + } + return *o.ProjectAccessRegistry.Get() +} + +// GetProjectAccessRegistryOk returns a tuple with the ProjectAccessRegistry field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccess) GetProjectAccessRegistryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectAccessRegistry.Get(), o.ProjectAccessRegistry.IsSet() +} + +// HasProjectAccessRegistry returns a boolean if a field has been set. +func (o *ProjectAccess) HasProjectAccessRegistry() bool { + if o != nil && o.ProjectAccessRegistry.IsSet() { + return true + } + + return false +} + +// SetProjectAccessRegistry gets a reference to the given NullableString and assigns it to the ProjectAccessRegistry field. +func (o *ProjectAccess) SetProjectAccessRegistry(v string) { + o.ProjectAccessRegistry.Set(&v) +} + +// SetProjectAccessRegistryNil sets the value for ProjectAccessRegistry to be an explicit nil +func (o *ProjectAccess) SetProjectAccessRegistryNil() { + o.ProjectAccessRegistry.Set(nil) +} + +// UnsetProjectAccessRegistry ensures that no value is present for ProjectAccessRegistry, not even an explicit nil +func (o *ProjectAccess) UnsetProjectAccessRegistry() { + o.ProjectAccessRegistry.Unset() +} + +// GetProjectAccessServiceAccount returns the ProjectAccessServiceAccount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccess) GetProjectAccessServiceAccount() string { + if o == nil || IsNil(o.ProjectAccessServiceAccount.Get()) { + var ret string + return ret + } + return *o.ProjectAccessServiceAccount.Get() +} + +// GetProjectAccessServiceAccountOk returns a tuple with the ProjectAccessServiceAccount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccess) GetProjectAccessServiceAccountOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectAccessServiceAccount.Get(), o.ProjectAccessServiceAccount.IsSet() +} + +// HasProjectAccessServiceAccount returns a boolean if a field has been set. +func (o *ProjectAccess) HasProjectAccessServiceAccount() bool { + if o != nil && o.ProjectAccessServiceAccount.IsSet() { + return true + } + + return false +} + +// SetProjectAccessServiceAccount gets a reference to the given NullableString and assigns it to the ProjectAccessServiceAccount field. +func (o *ProjectAccess) SetProjectAccessServiceAccount(v string) { + o.ProjectAccessServiceAccount.Set(&v) +} + +// SetProjectAccessServiceAccountNil sets the value for ProjectAccessServiceAccount to be an explicit nil +func (o *ProjectAccess) SetProjectAccessServiceAccountNil() { + o.ProjectAccessServiceAccount.Set(nil) +} + +// UnsetProjectAccessServiceAccount ensures that no value is present for ProjectAccessServiceAccount, not even an explicit nil +func (o *ProjectAccess) UnsetProjectAccessServiceAccount() { + o.ProjectAccessServiceAccount.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccess) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccess) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ProjectAccess) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ProjectAccess) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ProjectAccess) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ProjectAccess) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccess) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccess) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ProjectAccess) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ProjectAccess) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ProjectAccess) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ProjectAccess) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ProjectAccess) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccess) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ProjectAccess) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ProjectAccess) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ProjectAccess) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccess) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ProjectAccess) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ProjectAccess) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ProjectAccess) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectAccess) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Project.IsSet() { + toSerialize["project"] = o.Project.Get() + } + if o.ProjectAccessGit.IsSet() { + toSerialize["projectAccessGit"] = o.ProjectAccessGit.Get() + } + if o.ProjectAccessRegistry.IsSet() { + toSerialize["projectAccessRegistry"] = o.ProjectAccessRegistry.Get() + } + if o.ProjectAccessServiceAccount.IsSet() { + toSerialize["projectAccessServiceAccount"] = o.ProjectAccessServiceAccount.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProjectAccess struct { + value *ProjectAccess + isSet bool +} + +func (v NullableProjectAccess) Get() *ProjectAccess { + return v.value +} + +func (v *NullableProjectAccess) Set(val *ProjectAccess) { + v.value = val + v.isSet = true +} + +func (v NullableProjectAccess) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectAccess) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectAccess(val *ProjectAccess) *NullableProjectAccess { + return &NullableProjectAccess{value: val, isSet: true} +} + +func (v NullableProjectAccess) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectAccess) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_access_git.go b/pkg/api/rewardcloud/model_project_access_git.go new file mode 100644 index 0000000..75c1dd2 --- /dev/null +++ b/pkg/api/rewardcloud/model_project_access_git.go @@ -0,0 +1,703 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectAccessGit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectAccessGit{} + +// ProjectAccessGit Class ProjectAccessGit +type ProjectAccessGit struct { + Id *int32 `json:"id,omitempty"` + Uuid *string `json:"uuid,omitempty"` + IsExternal NullableBool `json:"isExternal,omitempty"` + Url NullableString `json:"url,omitempty"` + Path NullableString `json:"path,omitempty"` + Username NullableString `json:"username,omitempty"` + Email NullableString `json:"email,omitempty"` + Password NullableString `json:"password,omitempty"` + SshPrivateKey NullableString `json:"sshPrivateKey,omitempty"` + ProjectAccess NullableString `json:"projectAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewProjectAccessGit instantiates a new ProjectAccessGit object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectAccessGit() *ProjectAccessGit { + this := ProjectAccessGit{} + return &this +} + +// NewProjectAccessGitWithDefaults instantiates a new ProjectAccessGit object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectAccessGitWithDefaults() *ProjectAccessGit { + this := ProjectAccessGit{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectAccessGit) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessGit) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectAccessGit) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *ProjectAccessGit) GetUuid() string { + if o == nil || IsNil(o.Uuid) { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessGit) GetUuidOk() (*string, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *ProjectAccessGit) SetUuid(v string) { + o.Uuid = &v +} + +// GetIsExternal returns the IsExternal field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGit) GetIsExternal() bool { + if o == nil || IsNil(o.IsExternal.Get()) { + var ret bool + return ret + } + return *o.IsExternal.Get() +} + +// GetIsExternalOk returns a tuple with the IsExternal field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGit) GetIsExternalOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsExternal.Get(), o.IsExternal.IsSet() +} + +// HasIsExternal returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasIsExternal() bool { + if o != nil && o.IsExternal.IsSet() { + return true + } + + return false +} + +// SetIsExternal gets a reference to the given NullableBool and assigns it to the IsExternal field. +func (o *ProjectAccessGit) SetIsExternal(v bool) { + o.IsExternal.Set(&v) +} + +// SetIsExternalNil sets the value for IsExternal to be an explicit nil +func (o *ProjectAccessGit) SetIsExternalNil() { + o.IsExternal.Set(nil) +} + +// UnsetIsExternal ensures that no value is present for IsExternal, not even an explicit nil +func (o *ProjectAccessGit) UnsetIsExternal() { + o.IsExternal.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGit) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGit) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *ProjectAccessGit) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *ProjectAccessGit) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *ProjectAccessGit) UnsetUrl() { + o.Url.Unset() +} + +// GetPath returns the Path field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGit) GetPath() string { + if o == nil || IsNil(o.Path.Get()) { + var ret string + return ret + } + return *o.Path.Get() +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGit) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Path.Get(), o.Path.IsSet() +} + +// HasPath returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasPath() bool { + if o != nil && o.Path.IsSet() { + return true + } + + return false +} + +// SetPath gets a reference to the given NullableString and assigns it to the Path field. +func (o *ProjectAccessGit) SetPath(v string) { + o.Path.Set(&v) +} + +// SetPathNil sets the value for Path to be an explicit nil +func (o *ProjectAccessGit) SetPathNil() { + o.Path.Set(nil) +} + +// UnsetPath ensures that no value is present for Path, not even an explicit nil +func (o *ProjectAccessGit) UnsetPath() { + o.Path.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGit) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGit) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *ProjectAccessGit) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *ProjectAccessGit) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *ProjectAccessGit) UnsetUsername() { + o.Username.Unset() +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGit) GetEmail() string { + if o == nil || IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGit) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *ProjectAccessGit) SetEmail(v string) { + o.Email.Set(&v) +} + +// SetEmailNil sets the value for Email to be an explicit nil +func (o *ProjectAccessGit) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *ProjectAccessGit) UnsetEmail() { + o.Email.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGit) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGit) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *ProjectAccessGit) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *ProjectAccessGit) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *ProjectAccessGit) UnsetPassword() { + o.Password.Unset() +} + +// GetSshPrivateKey returns the SshPrivateKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGit) GetSshPrivateKey() string { + if o == nil || IsNil(o.SshPrivateKey.Get()) { + var ret string + return ret + } + return *o.SshPrivateKey.Get() +} + +// GetSshPrivateKeyOk returns a tuple with the SshPrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGit) GetSshPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SshPrivateKey.Get(), o.SshPrivateKey.IsSet() +} + +// HasSshPrivateKey returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasSshPrivateKey() bool { + if o != nil && o.SshPrivateKey.IsSet() { + return true + } + + return false +} + +// SetSshPrivateKey gets a reference to the given NullableString and assigns it to the SshPrivateKey field. +func (o *ProjectAccessGit) SetSshPrivateKey(v string) { + o.SshPrivateKey.Set(&v) +} + +// SetSshPrivateKeyNil sets the value for SshPrivateKey to be an explicit nil +func (o *ProjectAccessGit) SetSshPrivateKeyNil() { + o.SshPrivateKey.Set(nil) +} + +// UnsetSshPrivateKey ensures that no value is present for SshPrivateKey, not even an explicit nil +func (o *ProjectAccessGit) UnsetSshPrivateKey() { + o.SshPrivateKey.Unset() +} + +// GetProjectAccess returns the ProjectAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGit) GetProjectAccess() string { + if o == nil || IsNil(o.ProjectAccess.Get()) { + var ret string + return ret + } + return *o.ProjectAccess.Get() +} + +// GetProjectAccessOk returns a tuple with the ProjectAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGit) GetProjectAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectAccess.Get(), o.ProjectAccess.IsSet() +} + +// HasProjectAccess returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasProjectAccess() bool { + if o != nil && o.ProjectAccess.IsSet() { + return true + } + + return false +} + +// SetProjectAccess gets a reference to the given NullableString and assigns it to the ProjectAccess field. +func (o *ProjectAccessGit) SetProjectAccess(v string) { + o.ProjectAccess.Set(&v) +} + +// SetProjectAccessNil sets the value for ProjectAccess to be an explicit nil +func (o *ProjectAccessGit) SetProjectAccessNil() { + o.ProjectAccess.Set(nil) +} + +// UnsetProjectAccess ensures that no value is present for ProjectAccess, not even an explicit nil +func (o *ProjectAccessGit) UnsetProjectAccess() { + o.ProjectAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGit) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGit) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ProjectAccessGit) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ProjectAccessGit) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ProjectAccessGit) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGit) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGit) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ProjectAccessGit) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ProjectAccessGit) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ProjectAccessGit) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ProjectAccessGit) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessGit) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ProjectAccessGit) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ProjectAccessGit) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessGit) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ProjectAccessGit) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ProjectAccessGit) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ProjectAccessGit) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectAccessGit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + if o.IsExternal.IsSet() { + toSerialize["isExternal"] = o.IsExternal.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.Path.IsSet() { + toSerialize["path"] = o.Path.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.SshPrivateKey.IsSet() { + toSerialize["sshPrivateKey"] = o.SshPrivateKey.Get() + } + if o.ProjectAccess.IsSet() { + toSerialize["projectAccess"] = o.ProjectAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProjectAccessGit struct { + value *ProjectAccessGit + isSet bool +} + +func (v NullableProjectAccessGit) Get() *ProjectAccessGit { + return v.value +} + +func (v *NullableProjectAccessGit) Set(val *ProjectAccessGit) { + v.value = val + v.isSet = true +} + +func (v NullableProjectAccessGit) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectAccessGit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectAccessGit(val *ProjectAccessGit) *NullableProjectAccessGit { + return &NullableProjectAccessGit{value: val, isSet: true} +} + +func (v NullableProjectAccessGit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectAccessGit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_access_git_project_output.go b/pkg/api/rewardcloud/model_project_access_git_project_output.go new file mode 100644 index 0000000..88a421c --- /dev/null +++ b/pkg/api/rewardcloud/model_project_access_git_project_output.go @@ -0,0 +1,417 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProjectAccessGitProjectOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectAccessGitProjectOutput{} + +// ProjectAccessGitProjectOutput +type ProjectAccessGitProjectOutput struct { + IsExternal NullableBool `json:"isExternal,omitempty"` + Url NullableString `json:"url,omitempty"` + Path NullableString `json:"path,omitempty"` + Username NullableString `json:"username,omitempty"` + Email NullableString `json:"email,omitempty"` + Password NullableString `json:"password,omitempty"` + SshPrivateKey NullableString `json:"sshPrivateKey,omitempty"` +} + +// NewProjectAccessGitProjectOutput instantiates a new ProjectAccessGitProjectOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectAccessGitProjectOutput() *ProjectAccessGitProjectOutput { + this := ProjectAccessGitProjectOutput{} + return &this +} + +// NewProjectAccessGitProjectOutputWithDefaults instantiates a new ProjectAccessGitProjectOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectAccessGitProjectOutputWithDefaults() *ProjectAccessGitProjectOutput { + this := ProjectAccessGitProjectOutput{} + return &this +} + +// GetIsExternal returns the IsExternal field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGitProjectOutput) GetIsExternal() bool { + if o == nil || IsNil(o.IsExternal.Get()) { + var ret bool + return ret + } + return *o.IsExternal.Get() +} + +// GetIsExternalOk returns a tuple with the IsExternal field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGitProjectOutput) GetIsExternalOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsExternal.Get(), o.IsExternal.IsSet() +} + +// HasIsExternal returns a boolean if a field has been set. +func (o *ProjectAccessGitProjectOutput) HasIsExternal() bool { + if o != nil && o.IsExternal.IsSet() { + return true + } + + return false +} + +// SetIsExternal gets a reference to the given NullableBool and assigns it to the IsExternal field. +func (o *ProjectAccessGitProjectOutput) SetIsExternal(v bool) { + o.IsExternal.Set(&v) +} + +// SetIsExternalNil sets the value for IsExternal to be an explicit nil +func (o *ProjectAccessGitProjectOutput) SetIsExternalNil() { + o.IsExternal.Set(nil) +} + +// UnsetIsExternal ensures that no value is present for IsExternal, not even an explicit nil +func (o *ProjectAccessGitProjectOutput) UnsetIsExternal() { + o.IsExternal.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGitProjectOutput) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGitProjectOutput) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *ProjectAccessGitProjectOutput) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *ProjectAccessGitProjectOutput) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *ProjectAccessGitProjectOutput) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *ProjectAccessGitProjectOutput) UnsetUrl() { + o.Url.Unset() +} + +// GetPath returns the Path field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGitProjectOutput) GetPath() string { + if o == nil || IsNil(o.Path.Get()) { + var ret string + return ret + } + return *o.Path.Get() +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGitProjectOutput) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Path.Get(), o.Path.IsSet() +} + +// HasPath returns a boolean if a field has been set. +func (o *ProjectAccessGitProjectOutput) HasPath() bool { + if o != nil && o.Path.IsSet() { + return true + } + + return false +} + +// SetPath gets a reference to the given NullableString and assigns it to the Path field. +func (o *ProjectAccessGitProjectOutput) SetPath(v string) { + o.Path.Set(&v) +} + +// SetPathNil sets the value for Path to be an explicit nil +func (o *ProjectAccessGitProjectOutput) SetPathNil() { + o.Path.Set(nil) +} + +// UnsetPath ensures that no value is present for Path, not even an explicit nil +func (o *ProjectAccessGitProjectOutput) UnsetPath() { + o.Path.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGitProjectOutput) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGitProjectOutput) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *ProjectAccessGitProjectOutput) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *ProjectAccessGitProjectOutput) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *ProjectAccessGitProjectOutput) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *ProjectAccessGitProjectOutput) UnsetUsername() { + o.Username.Unset() +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGitProjectOutput) GetEmail() string { + if o == nil || IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGitProjectOutput) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *ProjectAccessGitProjectOutput) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *ProjectAccessGitProjectOutput) SetEmail(v string) { + o.Email.Set(&v) +} + +// SetEmailNil sets the value for Email to be an explicit nil +func (o *ProjectAccessGitProjectOutput) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *ProjectAccessGitProjectOutput) UnsetEmail() { + o.Email.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGitProjectOutput) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGitProjectOutput) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *ProjectAccessGitProjectOutput) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *ProjectAccessGitProjectOutput) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *ProjectAccessGitProjectOutput) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *ProjectAccessGitProjectOutput) UnsetPassword() { + o.Password.Unset() +} + +// GetSshPrivateKey returns the SshPrivateKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessGitProjectOutput) GetSshPrivateKey() string { + if o == nil || IsNil(o.SshPrivateKey.Get()) { + var ret string + return ret + } + return *o.SshPrivateKey.Get() +} + +// GetSshPrivateKeyOk returns a tuple with the SshPrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessGitProjectOutput) GetSshPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SshPrivateKey.Get(), o.SshPrivateKey.IsSet() +} + +// HasSshPrivateKey returns a boolean if a field has been set. +func (o *ProjectAccessGitProjectOutput) HasSshPrivateKey() bool { + if o != nil && o.SshPrivateKey.IsSet() { + return true + } + + return false +} + +// SetSshPrivateKey gets a reference to the given NullableString and assigns it to the SshPrivateKey field. +func (o *ProjectAccessGitProjectOutput) SetSshPrivateKey(v string) { + o.SshPrivateKey.Set(&v) +} + +// SetSshPrivateKeyNil sets the value for SshPrivateKey to be an explicit nil +func (o *ProjectAccessGitProjectOutput) SetSshPrivateKeyNil() { + o.SshPrivateKey.Set(nil) +} + +// UnsetSshPrivateKey ensures that no value is present for SshPrivateKey, not even an explicit nil +func (o *ProjectAccessGitProjectOutput) UnsetSshPrivateKey() { + o.SshPrivateKey.Unset() +} + +func (o ProjectAccessGitProjectOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectAccessGitProjectOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.IsExternal.IsSet() { + toSerialize["isExternal"] = o.IsExternal.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.Path.IsSet() { + toSerialize["path"] = o.Path.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.SshPrivateKey.IsSet() { + toSerialize["sshPrivateKey"] = o.SshPrivateKey.Get() + } + return toSerialize, nil +} + +type NullableProjectAccessGitProjectOutput struct { + value *ProjectAccessGitProjectOutput + isSet bool +} + +func (v NullableProjectAccessGitProjectOutput) Get() *ProjectAccessGitProjectOutput { + return v.value +} + +func (v *NullableProjectAccessGitProjectOutput) Set(val *ProjectAccessGitProjectOutput) { + v.value = val + v.isSet = true +} + +func (v NullableProjectAccessGitProjectOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectAccessGitProjectOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectAccessGitProjectOutput(val *ProjectAccessGitProjectOutput) *NullableProjectAccessGitProjectOutput { + return &NullableProjectAccessGitProjectOutput{value: val, isSet: true} +} + +func (v NullableProjectAccessGitProjectOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectAccessGitProjectOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_access_project_output.go b/pkg/api/rewardcloud/model_project_access_project_output.go new file mode 100644 index 0000000..beb676b --- /dev/null +++ b/pkg/api/rewardcloud/model_project_access_project_output.go @@ -0,0 +1,312 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProjectAccessProjectOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectAccessProjectOutput{} + +// ProjectAccessProjectOutput +type ProjectAccessProjectOutput struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + ProjectAccessGit NullableProjectAccessGitProjectOutput `json:"projectAccessGit,omitempty"` + ProjectAccessRegistry NullableProjectAccessRegistryProjectOutput `json:"projectAccessRegistry,omitempty"` + ProjectAccessServiceAccount NullableProjectAccessServiceAccountProjectOutput `json:"projectAccessServiceAccount,omitempty"` +} + +// NewProjectAccessProjectOutput instantiates a new ProjectAccessProjectOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectAccessProjectOutput() *ProjectAccessProjectOutput { + this := ProjectAccessProjectOutput{} + return &this +} + +// NewProjectAccessProjectOutputWithDefaults instantiates a new ProjectAccessProjectOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectAccessProjectOutputWithDefaults() *ProjectAccessProjectOutput { + this := ProjectAccessProjectOutput{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectAccessProjectOutput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessProjectOutput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectAccessProjectOutput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectAccessProjectOutput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessProjectOutput) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessProjectOutput) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectAccessProjectOutput) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ProjectAccessProjectOutput) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ProjectAccessProjectOutput) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ProjectAccessProjectOutput) UnsetUuid() { + o.Uuid.Unset() +} + +// GetProjectAccessGit returns the ProjectAccessGit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessProjectOutput) GetProjectAccessGit() ProjectAccessGitProjectOutput { + if o == nil || IsNil(o.ProjectAccessGit.Get()) { + var ret ProjectAccessGitProjectOutput + return ret + } + return *o.ProjectAccessGit.Get() +} + +// GetProjectAccessGitOk returns a tuple with the ProjectAccessGit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessProjectOutput) GetProjectAccessGitOk() (*ProjectAccessGitProjectOutput, bool) { + if o == nil { + return nil, false + } + return o.ProjectAccessGit.Get(), o.ProjectAccessGit.IsSet() +} + +// HasProjectAccessGit returns a boolean if a field has been set. +func (o *ProjectAccessProjectOutput) HasProjectAccessGit() bool { + if o != nil && o.ProjectAccessGit.IsSet() { + return true + } + + return false +} + +// SetProjectAccessGit gets a reference to the given NullableProjectAccessGitProjectOutput and assigns it to the ProjectAccessGit field. +func (o *ProjectAccessProjectOutput) SetProjectAccessGit(v ProjectAccessGitProjectOutput) { + o.ProjectAccessGit.Set(&v) +} + +// SetProjectAccessGitNil sets the value for ProjectAccessGit to be an explicit nil +func (o *ProjectAccessProjectOutput) SetProjectAccessGitNil() { + o.ProjectAccessGit.Set(nil) +} + +// UnsetProjectAccessGit ensures that no value is present for ProjectAccessGit, not even an explicit nil +func (o *ProjectAccessProjectOutput) UnsetProjectAccessGit() { + o.ProjectAccessGit.Unset() +} + +// GetProjectAccessRegistry returns the ProjectAccessRegistry field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessProjectOutput) GetProjectAccessRegistry() ProjectAccessRegistryProjectOutput { + if o == nil || IsNil(o.ProjectAccessRegistry.Get()) { + var ret ProjectAccessRegistryProjectOutput + return ret + } + return *o.ProjectAccessRegistry.Get() +} + +// GetProjectAccessRegistryOk returns a tuple with the ProjectAccessRegistry field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessProjectOutput) GetProjectAccessRegistryOk() (*ProjectAccessRegistryProjectOutput, bool) { + if o == nil { + return nil, false + } + return o.ProjectAccessRegistry.Get(), o.ProjectAccessRegistry.IsSet() +} + +// HasProjectAccessRegistry returns a boolean if a field has been set. +func (o *ProjectAccessProjectOutput) HasProjectAccessRegistry() bool { + if o != nil && o.ProjectAccessRegistry.IsSet() { + return true + } + + return false +} + +// SetProjectAccessRegistry gets a reference to the given NullableProjectAccessRegistryProjectOutput and assigns it to the ProjectAccessRegistry field. +func (o *ProjectAccessProjectOutput) SetProjectAccessRegistry(v ProjectAccessRegistryProjectOutput) { + o.ProjectAccessRegistry.Set(&v) +} + +// SetProjectAccessRegistryNil sets the value for ProjectAccessRegistry to be an explicit nil +func (o *ProjectAccessProjectOutput) SetProjectAccessRegistryNil() { + o.ProjectAccessRegistry.Set(nil) +} + +// UnsetProjectAccessRegistry ensures that no value is present for ProjectAccessRegistry, not even an explicit nil +func (o *ProjectAccessProjectOutput) UnsetProjectAccessRegistry() { + o.ProjectAccessRegistry.Unset() +} + +// GetProjectAccessServiceAccount returns the ProjectAccessServiceAccount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessProjectOutput) GetProjectAccessServiceAccount() ProjectAccessServiceAccountProjectOutput { + if o == nil || IsNil(o.ProjectAccessServiceAccount.Get()) { + var ret ProjectAccessServiceAccountProjectOutput + return ret + } + return *o.ProjectAccessServiceAccount.Get() +} + +// GetProjectAccessServiceAccountOk returns a tuple with the ProjectAccessServiceAccount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessProjectOutput) GetProjectAccessServiceAccountOk() (*ProjectAccessServiceAccountProjectOutput, bool) { + if o == nil { + return nil, false + } + return o.ProjectAccessServiceAccount.Get(), o.ProjectAccessServiceAccount.IsSet() +} + +// HasProjectAccessServiceAccount returns a boolean if a field has been set. +func (o *ProjectAccessProjectOutput) HasProjectAccessServiceAccount() bool { + if o != nil && o.ProjectAccessServiceAccount.IsSet() { + return true + } + + return false +} + +// SetProjectAccessServiceAccount gets a reference to the given NullableProjectAccessServiceAccountProjectOutput and assigns it to the ProjectAccessServiceAccount field. +func (o *ProjectAccessProjectOutput) SetProjectAccessServiceAccount(v ProjectAccessServiceAccountProjectOutput) { + o.ProjectAccessServiceAccount.Set(&v) +} + +// SetProjectAccessServiceAccountNil sets the value for ProjectAccessServiceAccount to be an explicit nil +func (o *ProjectAccessProjectOutput) SetProjectAccessServiceAccountNil() { + o.ProjectAccessServiceAccount.Set(nil) +} + +// UnsetProjectAccessServiceAccount ensures that no value is present for ProjectAccessServiceAccount, not even an explicit nil +func (o *ProjectAccessProjectOutput) UnsetProjectAccessServiceAccount() { + o.ProjectAccessServiceAccount.Unset() +} + +func (o ProjectAccessProjectOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectAccessProjectOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.ProjectAccessGit.IsSet() { + toSerialize["projectAccessGit"] = o.ProjectAccessGit.Get() + } + if o.ProjectAccessRegistry.IsSet() { + toSerialize["projectAccessRegistry"] = o.ProjectAccessRegistry.Get() + } + if o.ProjectAccessServiceAccount.IsSet() { + toSerialize["projectAccessServiceAccount"] = o.ProjectAccessServiceAccount.Get() + } + return toSerialize, nil +} + +type NullableProjectAccessProjectOutput struct { + value *ProjectAccessProjectOutput + isSet bool +} + +func (v NullableProjectAccessProjectOutput) Get() *ProjectAccessProjectOutput { + return v.value +} + +func (v *NullableProjectAccessProjectOutput) Set(val *ProjectAccessProjectOutput) { + v.value = val + v.isSet = true +} + +func (v NullableProjectAccessProjectOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectAccessProjectOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectAccessProjectOutput(val *ProjectAccessProjectOutput) *NullableProjectAccessProjectOutput { + return &NullableProjectAccessProjectOutput{value: val, isSet: true} +} + +func (v NullableProjectAccessProjectOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectAccessProjectOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_access_registry.go b/pkg/api/rewardcloud/model_project_access_registry.go new file mode 100644 index 0000000..9776a83 --- /dev/null +++ b/pkg/api/rewardcloud/model_project_access_registry.go @@ -0,0 +1,656 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectAccessRegistry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectAccessRegistry{} + +// ProjectAccessRegistry Class ProjectAccessRegistry +type ProjectAccessRegistry struct { + Id *int32 `json:"id,omitempty"` + Uuid *string `json:"uuid,omitempty"` + Quota NullableInt32 `json:"quota,omitempty"` + Instance NullableString `json:"instance,omitempty"` + Url NullableString `json:"url,omitempty"` + Email NullableString `json:"email,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` + ProjectAccess NullableString `json:"projectAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewProjectAccessRegistry instantiates a new ProjectAccessRegistry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectAccessRegistry() *ProjectAccessRegistry { + this := ProjectAccessRegistry{} + return &this +} + +// NewProjectAccessRegistryWithDefaults instantiates a new ProjectAccessRegistry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectAccessRegistryWithDefaults() *ProjectAccessRegistry { + this := ProjectAccessRegistry{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectAccessRegistry) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessRegistry) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectAccessRegistry) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *ProjectAccessRegistry) GetUuid() string { + if o == nil || IsNil(o.Uuid) { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessRegistry) GetUuidOk() (*string, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *ProjectAccessRegistry) SetUuid(v string) { + o.Uuid = &v +} + +// GetQuota returns the Quota field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistry) GetQuota() int32 { + if o == nil || IsNil(o.Quota.Get()) { + var ret int32 + return ret + } + return *o.Quota.Get() +} + +// GetQuotaOk returns a tuple with the Quota field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistry) GetQuotaOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Quota.Get(), o.Quota.IsSet() +} + +// HasQuota returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasQuota() bool { + if o != nil && o.Quota.IsSet() { + return true + } + + return false +} + +// SetQuota gets a reference to the given NullableInt32 and assigns it to the Quota field. +func (o *ProjectAccessRegistry) SetQuota(v int32) { + o.Quota.Set(&v) +} + +// SetQuotaNil sets the value for Quota to be an explicit nil +func (o *ProjectAccessRegistry) SetQuotaNil() { + o.Quota.Set(nil) +} + +// UnsetQuota ensures that no value is present for Quota, not even an explicit nil +func (o *ProjectAccessRegistry) UnsetQuota() { + o.Quota.Unset() +} + +// GetInstance returns the Instance field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistry) GetInstance() string { + if o == nil || IsNil(o.Instance.Get()) { + var ret string + return ret + } + return *o.Instance.Get() +} + +// GetInstanceOk returns a tuple with the Instance field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistry) GetInstanceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Instance.Get(), o.Instance.IsSet() +} + +// HasInstance returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasInstance() bool { + if o != nil && o.Instance.IsSet() { + return true + } + + return false +} + +// SetInstance gets a reference to the given NullableString and assigns it to the Instance field. +func (o *ProjectAccessRegistry) SetInstance(v string) { + o.Instance.Set(&v) +} + +// SetInstanceNil sets the value for Instance to be an explicit nil +func (o *ProjectAccessRegistry) SetInstanceNil() { + o.Instance.Set(nil) +} + +// UnsetInstance ensures that no value is present for Instance, not even an explicit nil +func (o *ProjectAccessRegistry) UnsetInstance() { + o.Instance.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistry) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistry) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *ProjectAccessRegistry) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *ProjectAccessRegistry) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *ProjectAccessRegistry) UnsetUrl() { + o.Url.Unset() +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistry) GetEmail() string { + if o == nil || IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistry) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *ProjectAccessRegistry) SetEmail(v string) { + o.Email.Set(&v) +} + +// SetEmailNil sets the value for Email to be an explicit nil +func (o *ProjectAccessRegistry) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *ProjectAccessRegistry) UnsetEmail() { + o.Email.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistry) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistry) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *ProjectAccessRegistry) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *ProjectAccessRegistry) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *ProjectAccessRegistry) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistry) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistry) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *ProjectAccessRegistry) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *ProjectAccessRegistry) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *ProjectAccessRegistry) UnsetPassword() { + o.Password.Unset() +} + +// GetProjectAccess returns the ProjectAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistry) GetProjectAccess() string { + if o == nil || IsNil(o.ProjectAccess.Get()) { + var ret string + return ret + } + return *o.ProjectAccess.Get() +} + +// GetProjectAccessOk returns a tuple with the ProjectAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistry) GetProjectAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectAccess.Get(), o.ProjectAccess.IsSet() +} + +// HasProjectAccess returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasProjectAccess() bool { + if o != nil && o.ProjectAccess.IsSet() { + return true + } + + return false +} + +// SetProjectAccess gets a reference to the given NullableString and assigns it to the ProjectAccess field. +func (o *ProjectAccessRegistry) SetProjectAccess(v string) { + o.ProjectAccess.Set(&v) +} + +// SetProjectAccessNil sets the value for ProjectAccess to be an explicit nil +func (o *ProjectAccessRegistry) SetProjectAccessNil() { + o.ProjectAccess.Set(nil) +} + +// UnsetProjectAccess ensures that no value is present for ProjectAccess, not even an explicit nil +func (o *ProjectAccessRegistry) UnsetProjectAccess() { + o.ProjectAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistry) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistry) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ProjectAccessRegistry) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ProjectAccessRegistry) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ProjectAccessRegistry) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistry) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistry) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ProjectAccessRegistry) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ProjectAccessRegistry) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ProjectAccessRegistry) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ProjectAccessRegistry) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessRegistry) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ProjectAccessRegistry) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ProjectAccessRegistry) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessRegistry) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ProjectAccessRegistry) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ProjectAccessRegistry) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ProjectAccessRegistry) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectAccessRegistry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + if o.Quota.IsSet() { + toSerialize["quota"] = o.Quota.Get() + } + if o.Instance.IsSet() { + toSerialize["instance"] = o.Instance.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.ProjectAccess.IsSet() { + toSerialize["projectAccess"] = o.ProjectAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProjectAccessRegistry struct { + value *ProjectAccessRegistry + isSet bool +} + +func (v NullableProjectAccessRegistry) Get() *ProjectAccessRegistry { + return v.value +} + +func (v *NullableProjectAccessRegistry) Set(val *ProjectAccessRegistry) { + v.value = val + v.isSet = true +} + +func (v NullableProjectAccessRegistry) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectAccessRegistry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectAccessRegistry(val *ProjectAccessRegistry) *NullableProjectAccessRegistry { + return &NullableProjectAccessRegistry{value: val, isSet: true} +} + +func (v NullableProjectAccessRegistry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectAccessRegistry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_access_registry_project_output.go b/pkg/api/rewardcloud/model_project_access_registry_project_output.go new file mode 100644 index 0000000..3419e99 --- /dev/null +++ b/pkg/api/rewardcloud/model_project_access_registry_project_output.go @@ -0,0 +1,370 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProjectAccessRegistryProjectOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectAccessRegistryProjectOutput{} + +// ProjectAccessRegistryProjectOutput +type ProjectAccessRegistryProjectOutput struct { + Quota NullableInt32 `json:"quota,omitempty"` + Instance NullableString `json:"instance,omitempty"` + Url NullableString `json:"url,omitempty"` + Email NullableString `json:"email,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` +} + +// NewProjectAccessRegistryProjectOutput instantiates a new ProjectAccessRegistryProjectOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectAccessRegistryProjectOutput() *ProjectAccessRegistryProjectOutput { + this := ProjectAccessRegistryProjectOutput{} + return &this +} + +// NewProjectAccessRegistryProjectOutputWithDefaults instantiates a new ProjectAccessRegistryProjectOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectAccessRegistryProjectOutputWithDefaults() *ProjectAccessRegistryProjectOutput { + this := ProjectAccessRegistryProjectOutput{} + return &this +} + +// GetQuota returns the Quota field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistryProjectOutput) GetQuota() int32 { + if o == nil || IsNil(o.Quota.Get()) { + var ret int32 + return ret + } + return *o.Quota.Get() +} + +// GetQuotaOk returns a tuple with the Quota field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistryProjectOutput) GetQuotaOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Quota.Get(), o.Quota.IsSet() +} + +// HasQuota returns a boolean if a field has been set. +func (o *ProjectAccessRegistryProjectOutput) HasQuota() bool { + if o != nil && o.Quota.IsSet() { + return true + } + + return false +} + +// SetQuota gets a reference to the given NullableInt32 and assigns it to the Quota field. +func (o *ProjectAccessRegistryProjectOutput) SetQuota(v int32) { + o.Quota.Set(&v) +} + +// SetQuotaNil sets the value for Quota to be an explicit nil +func (o *ProjectAccessRegistryProjectOutput) SetQuotaNil() { + o.Quota.Set(nil) +} + +// UnsetQuota ensures that no value is present for Quota, not even an explicit nil +func (o *ProjectAccessRegistryProjectOutput) UnsetQuota() { + o.Quota.Unset() +} + +// GetInstance returns the Instance field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistryProjectOutput) GetInstance() string { + if o == nil || IsNil(o.Instance.Get()) { + var ret string + return ret + } + return *o.Instance.Get() +} + +// GetInstanceOk returns a tuple with the Instance field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistryProjectOutput) GetInstanceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Instance.Get(), o.Instance.IsSet() +} + +// HasInstance returns a boolean if a field has been set. +func (o *ProjectAccessRegistryProjectOutput) HasInstance() bool { + if o != nil && o.Instance.IsSet() { + return true + } + + return false +} + +// SetInstance gets a reference to the given NullableString and assigns it to the Instance field. +func (o *ProjectAccessRegistryProjectOutput) SetInstance(v string) { + o.Instance.Set(&v) +} + +// SetInstanceNil sets the value for Instance to be an explicit nil +func (o *ProjectAccessRegistryProjectOutput) SetInstanceNil() { + o.Instance.Set(nil) +} + +// UnsetInstance ensures that no value is present for Instance, not even an explicit nil +func (o *ProjectAccessRegistryProjectOutput) UnsetInstance() { + o.Instance.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistryProjectOutput) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistryProjectOutput) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *ProjectAccessRegistryProjectOutput) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *ProjectAccessRegistryProjectOutput) SetUrl(v string) { + o.Url.Set(&v) +} + +// SetUrlNil sets the value for Url to be an explicit nil +func (o *ProjectAccessRegistryProjectOutput) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *ProjectAccessRegistryProjectOutput) UnsetUrl() { + o.Url.Unset() +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistryProjectOutput) GetEmail() string { + if o == nil || IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistryProjectOutput) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *ProjectAccessRegistryProjectOutput) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *ProjectAccessRegistryProjectOutput) SetEmail(v string) { + o.Email.Set(&v) +} + +// SetEmailNil sets the value for Email to be an explicit nil +func (o *ProjectAccessRegistryProjectOutput) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *ProjectAccessRegistryProjectOutput) UnsetEmail() { + o.Email.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistryProjectOutput) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistryProjectOutput) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *ProjectAccessRegistryProjectOutput) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *ProjectAccessRegistryProjectOutput) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *ProjectAccessRegistryProjectOutput) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *ProjectAccessRegistryProjectOutput) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessRegistryProjectOutput) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessRegistryProjectOutput) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *ProjectAccessRegistryProjectOutput) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *ProjectAccessRegistryProjectOutput) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *ProjectAccessRegistryProjectOutput) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *ProjectAccessRegistryProjectOutput) UnsetPassword() { + o.Password.Unset() +} + +func (o ProjectAccessRegistryProjectOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectAccessRegistryProjectOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Quota.IsSet() { + toSerialize["quota"] = o.Quota.Get() + } + if o.Instance.IsSet() { + toSerialize["instance"] = o.Instance.Get() + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + return toSerialize, nil +} + +type NullableProjectAccessRegistryProjectOutput struct { + value *ProjectAccessRegistryProjectOutput + isSet bool +} + +func (v NullableProjectAccessRegistryProjectOutput) Get() *ProjectAccessRegistryProjectOutput { + return v.value +} + +func (v *NullableProjectAccessRegistryProjectOutput) Set(val *ProjectAccessRegistryProjectOutput) { + v.value = val + v.isSet = true +} + +func (v NullableProjectAccessRegistryProjectOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectAccessRegistryProjectOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectAccessRegistryProjectOutput(val *ProjectAccessRegistryProjectOutput) *NullableProjectAccessRegistryProjectOutput { + return &NullableProjectAccessRegistryProjectOutput{value: val, isSet: true} +} + +func (v NullableProjectAccessRegistryProjectOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectAccessRegistryProjectOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_access_service_account.go b/pkg/api/rewardcloud/model_project_access_service_account.go new file mode 100644 index 0000000..f39501a --- /dev/null +++ b/pkg/api/rewardcloud/model_project_access_service_account.go @@ -0,0 +1,515 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectAccessServiceAccount type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectAccessServiceAccount{} + +// ProjectAccessServiceAccount Class ProjectAccessServiceAccount +type ProjectAccessServiceAccount struct { + Id *int32 `json:"id,omitempty"` + Uuid *string `json:"uuid,omitempty"` + Email NullableString `json:"email,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` + ProjectAccess NullableString `json:"projectAccess,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewProjectAccessServiceAccount instantiates a new ProjectAccessServiceAccount object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectAccessServiceAccount() *ProjectAccessServiceAccount { + this := ProjectAccessServiceAccount{} + return &this +} + +// NewProjectAccessServiceAccountWithDefaults instantiates a new ProjectAccessServiceAccount object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectAccessServiceAccountWithDefaults() *ProjectAccessServiceAccount { + this := ProjectAccessServiceAccount{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectAccessServiceAccount) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessServiceAccount) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccount) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectAccessServiceAccount) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *ProjectAccessServiceAccount) GetUuid() string { + if o == nil || IsNil(o.Uuid) { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessServiceAccount) GetUuidOk() (*string, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccount) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *ProjectAccessServiceAccount) SetUuid(v string) { + o.Uuid = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessServiceAccount) GetEmail() string { + if o == nil || IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessServiceAccount) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccount) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *ProjectAccessServiceAccount) SetEmail(v string) { + o.Email.Set(&v) +} + +// SetEmailNil sets the value for Email to be an explicit nil +func (o *ProjectAccessServiceAccount) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *ProjectAccessServiceAccount) UnsetEmail() { + o.Email.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessServiceAccount) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessServiceAccount) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccount) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *ProjectAccessServiceAccount) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *ProjectAccessServiceAccount) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *ProjectAccessServiceAccount) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessServiceAccount) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessServiceAccount) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccount) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *ProjectAccessServiceAccount) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *ProjectAccessServiceAccount) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *ProjectAccessServiceAccount) UnsetPassword() { + o.Password.Unset() +} + +// GetProjectAccess returns the ProjectAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessServiceAccount) GetProjectAccess() string { + if o == nil || IsNil(o.ProjectAccess.Get()) { + var ret string + return ret + } + return *o.ProjectAccess.Get() +} + +// GetProjectAccessOk returns a tuple with the ProjectAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessServiceAccount) GetProjectAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectAccess.Get(), o.ProjectAccess.IsSet() +} + +// HasProjectAccess returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccount) HasProjectAccess() bool { + if o != nil && o.ProjectAccess.IsSet() { + return true + } + + return false +} + +// SetProjectAccess gets a reference to the given NullableString and assigns it to the ProjectAccess field. +func (o *ProjectAccessServiceAccount) SetProjectAccess(v string) { + o.ProjectAccess.Set(&v) +} + +// SetProjectAccessNil sets the value for ProjectAccess to be an explicit nil +func (o *ProjectAccessServiceAccount) SetProjectAccessNil() { + o.ProjectAccess.Set(nil) +} + +// UnsetProjectAccess ensures that no value is present for ProjectAccess, not even an explicit nil +func (o *ProjectAccessServiceAccount) UnsetProjectAccess() { + o.ProjectAccess.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessServiceAccount) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessServiceAccount) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccount) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ProjectAccessServiceAccount) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ProjectAccessServiceAccount) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ProjectAccessServiceAccount) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessServiceAccount) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessServiceAccount) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccount) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ProjectAccessServiceAccount) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ProjectAccessServiceAccount) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ProjectAccessServiceAccount) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ProjectAccessServiceAccount) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessServiceAccount) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccount) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ProjectAccessServiceAccount) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ProjectAccessServiceAccount) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectAccessServiceAccount) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccount) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ProjectAccessServiceAccount) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ProjectAccessServiceAccount) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectAccessServiceAccount) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.ProjectAccess.IsSet() { + toSerialize["projectAccess"] = o.ProjectAccess.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProjectAccessServiceAccount struct { + value *ProjectAccessServiceAccount + isSet bool +} + +func (v NullableProjectAccessServiceAccount) Get() *ProjectAccessServiceAccount { + return v.value +} + +func (v *NullableProjectAccessServiceAccount) Set(val *ProjectAccessServiceAccount) { + v.value = val + v.isSet = true +} + +func (v NullableProjectAccessServiceAccount) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectAccessServiceAccount) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectAccessServiceAccount(val *ProjectAccessServiceAccount) *NullableProjectAccessServiceAccount { + return &NullableProjectAccessServiceAccount{value: val, isSet: true} +} + +func (v NullableProjectAccessServiceAccount) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectAccessServiceAccount) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_access_service_account_project_output.go b/pkg/api/rewardcloud/model_project_access_service_account_project_output.go new file mode 100644 index 0000000..1c7c045 --- /dev/null +++ b/pkg/api/rewardcloud/model_project_access_service_account_project_output.go @@ -0,0 +1,229 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProjectAccessServiceAccountProjectOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectAccessServiceAccountProjectOutput{} + +// ProjectAccessServiceAccountProjectOutput +type ProjectAccessServiceAccountProjectOutput struct { + Email NullableString `json:"email,omitempty"` + Username NullableString `json:"username,omitempty"` + Password NullableString `json:"password,omitempty"` +} + +// NewProjectAccessServiceAccountProjectOutput instantiates a new ProjectAccessServiceAccountProjectOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectAccessServiceAccountProjectOutput() *ProjectAccessServiceAccountProjectOutput { + this := ProjectAccessServiceAccountProjectOutput{} + return &this +} + +// NewProjectAccessServiceAccountProjectOutputWithDefaults instantiates a new ProjectAccessServiceAccountProjectOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectAccessServiceAccountProjectOutputWithDefaults() *ProjectAccessServiceAccountProjectOutput { + this := ProjectAccessServiceAccountProjectOutput{} + return &this +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessServiceAccountProjectOutput) GetEmail() string { + if o == nil || IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessServiceAccountProjectOutput) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccountProjectOutput) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *ProjectAccessServiceAccountProjectOutput) SetEmail(v string) { + o.Email.Set(&v) +} + +// SetEmailNil sets the value for Email to be an explicit nil +func (o *ProjectAccessServiceAccountProjectOutput) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *ProjectAccessServiceAccountProjectOutput) UnsetEmail() { + o.Email.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessServiceAccountProjectOutput) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessServiceAccountProjectOutput) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccountProjectOutput) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *ProjectAccessServiceAccountProjectOutput) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *ProjectAccessServiceAccountProjectOutput) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *ProjectAccessServiceAccountProjectOutput) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectAccessServiceAccountProjectOutput) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectAccessServiceAccountProjectOutput) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *ProjectAccessServiceAccountProjectOutput) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *ProjectAccessServiceAccountProjectOutput) SetPassword(v string) { + o.Password.Set(&v) +} + +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *ProjectAccessServiceAccountProjectOutput) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *ProjectAccessServiceAccountProjectOutput) UnsetPassword() { + o.Password.Unset() +} + +func (o ProjectAccessServiceAccountProjectOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectAccessServiceAccountProjectOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + return toSerialize, nil +} + +type NullableProjectAccessServiceAccountProjectOutput struct { + value *ProjectAccessServiceAccountProjectOutput + isSet bool +} + +func (v NullableProjectAccessServiceAccountProjectOutput) Get() *ProjectAccessServiceAccountProjectOutput { + return v.value +} + +func (v *NullableProjectAccessServiceAccountProjectOutput) Set(val *ProjectAccessServiceAccountProjectOutput) { + v.value = val + v.isSet = true +} + +func (v NullableProjectAccessServiceAccountProjectOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectAccessServiceAccountProjectOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectAccessServiceAccountProjectOutput(val *ProjectAccessServiceAccountProjectOutput) *NullableProjectAccessServiceAccountProjectOutput { + return &NullableProjectAccessServiceAccountProjectOutput{value: val, isSet: true} +} + +func (v NullableProjectAccessServiceAccountProjectOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectAccessServiceAccountProjectOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_env_var.go b/pkg/api/rewardcloud/model_project_env_var.go new file mode 100644 index 0000000..13f1d19 --- /dev/null +++ b/pkg/api/rewardcloud/model_project_env_var.go @@ -0,0 +1,620 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectEnvVar type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectEnvVar{} + +// ProjectEnvVar +type ProjectEnvVar struct { + Project NullableAbstractProject `json:"project,omitempty"` + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` + RawValue NullableString `json:"rawValue,omitempty"` +} + +// NewProjectEnvVar instantiates a new ProjectEnvVar object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectEnvVar() *ProjectEnvVar { + this := ProjectEnvVar{} + return &this +} + +// NewProjectEnvVarWithDefaults instantiates a new ProjectEnvVar object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectEnvVarWithDefaults() *ProjectEnvVar { + this := ProjectEnvVar{} + return &this +} + +// GetProject returns the Project field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVar) GetProject() AbstractProject { + if o == nil || IsNil(o.Project.Get()) { + var ret AbstractProject + return ret + } + return *o.Project.Get() +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVar) GetProjectOk() (*AbstractProject, bool) { + if o == nil { + return nil, false + } + return o.Project.Get(), o.Project.IsSet() +} + +// HasProject returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasProject() bool { + if o != nil && o.Project.IsSet() { + return true + } + + return false +} + +// SetProject gets a reference to the given NullableAbstractProject and assigns it to the Project field. +func (o *ProjectEnvVar) SetProject(v AbstractProject) { + o.Project.Set(&v) +} + +// SetProjectNil sets the value for Project to be an explicit nil +func (o *ProjectEnvVar) SetProjectNil() { + o.Project.Set(nil) +} + +// UnsetProject ensures that no value is present for Project, not even an explicit nil +func (o *ProjectEnvVar) UnsetProject() { + o.Project.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectEnvVar) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectEnvVar) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectEnvVar) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVar) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVar) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ProjectEnvVar) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ProjectEnvVar) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ProjectEnvVar) UnsetUuid() { + o.Uuid.Unset() +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVar) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVar) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *ProjectEnvVar) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *ProjectEnvVar) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *ProjectEnvVar) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVar) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVar) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *ProjectEnvVar) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *ProjectEnvVar) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *ProjectEnvVar) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVar) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVar) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *ProjectEnvVar) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *ProjectEnvVar) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *ProjectEnvVar) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVar) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVar) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ProjectEnvVar) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ProjectEnvVar) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ProjectEnvVar) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVar) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVar) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ProjectEnvVar) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ProjectEnvVar) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ProjectEnvVar) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ProjectEnvVar) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectEnvVar) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ProjectEnvVar) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ProjectEnvVar) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectEnvVar) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ProjectEnvVar) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVar) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVar) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *ProjectEnvVar) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *ProjectEnvVar) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *ProjectEnvVar) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +// GetRawValue returns the RawValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVar) GetRawValue() string { + if o == nil || IsNil(o.RawValue.Get()) { + var ret string + return ret + } + return *o.RawValue.Get() +} + +// GetRawValueOk returns a tuple with the RawValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVar) GetRawValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RawValue.Get(), o.RawValue.IsSet() +} + +// HasRawValue returns a boolean if a field has been set. +func (o *ProjectEnvVar) HasRawValue() bool { + if o != nil && o.RawValue.IsSet() { + return true + } + + return false +} + +// SetRawValue gets a reference to the given NullableString and assigns it to the RawValue field. +func (o *ProjectEnvVar) SetRawValue(v string) { + o.RawValue.Set(&v) +} + +// SetRawValueNil sets the value for RawValue to be an explicit nil +func (o *ProjectEnvVar) SetRawValueNil() { + o.RawValue.Set(nil) +} + +// UnsetRawValue ensures that no value is present for RawValue, not even an explicit nil +func (o *ProjectEnvVar) UnsetRawValue() { + o.RawValue.Unset() +} + +func (o ProjectEnvVar) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectEnvVar) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Project.IsSet() { + toSerialize["project"] = o.Project.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + if o.RawValue.IsSet() { + toSerialize["rawValue"] = o.RawValue.Get() + } + return toSerialize, nil +} + +type NullableProjectEnvVar struct { + value *ProjectEnvVar + isSet bool +} + +func (v NullableProjectEnvVar) Get() *ProjectEnvVar { + return v.value +} + +func (v *NullableProjectEnvVar) Set(val *ProjectEnvVar) { + v.value = val + v.isSet = true +} + +func (v NullableProjectEnvVar) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectEnvVar) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectEnvVar(val *ProjectEnvVar) *NullableProjectEnvVar { + return &NullableProjectEnvVar{value: val, isSet: true} +} + +func (v NullableProjectEnvVar) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectEnvVar) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_env_var_project_input.go b/pkg/api/rewardcloud/model_project_env_var_project_input.go new file mode 100644 index 0000000..433d1bf --- /dev/null +++ b/pkg/api/rewardcloud/model_project_env_var_project_input.go @@ -0,0 +1,276 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProjectEnvVarProjectInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectEnvVarProjectInput{} + +// ProjectEnvVarProjectInput Class ProjectEnvVar +type ProjectEnvVarProjectInput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewProjectEnvVarProjectInput instantiates a new ProjectEnvVarProjectInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectEnvVarProjectInput() *ProjectEnvVarProjectInput { + this := ProjectEnvVarProjectInput{} + return &this +} + +// NewProjectEnvVarProjectInputWithDefaults instantiates a new ProjectEnvVarProjectInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectEnvVarProjectInputWithDefaults() *ProjectEnvVarProjectInput { + this := ProjectEnvVarProjectInput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarProjectInput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarProjectInput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *ProjectEnvVarProjectInput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *ProjectEnvVarProjectInput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *ProjectEnvVarProjectInput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *ProjectEnvVarProjectInput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarProjectInput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarProjectInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *ProjectEnvVarProjectInput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *ProjectEnvVarProjectInput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *ProjectEnvVarProjectInput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *ProjectEnvVarProjectInput) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarProjectInput) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarProjectInput) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *ProjectEnvVarProjectInput) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *ProjectEnvVarProjectInput) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *ProjectEnvVarProjectInput) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *ProjectEnvVarProjectInput) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarProjectInput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarProjectInput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *ProjectEnvVarProjectInput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *ProjectEnvVarProjectInput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *ProjectEnvVarProjectInput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *ProjectEnvVarProjectInput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o ProjectEnvVarProjectInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectEnvVarProjectInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableProjectEnvVarProjectInput struct { + value *ProjectEnvVarProjectInput + isSet bool +} + +func (v NullableProjectEnvVarProjectInput) Get() *ProjectEnvVarProjectInput { + return v.value +} + +func (v *NullableProjectEnvVarProjectInput) Set(val *ProjectEnvVarProjectInput) { + v.value = val + v.isSet = true +} + +func (v NullableProjectEnvVarProjectInput) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectEnvVarProjectInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectEnvVarProjectInput(val *ProjectEnvVarProjectInput) *NullableProjectEnvVarProjectInput { + return &NullableProjectEnvVarProjectInput{value: val, isSet: true} +} + +func (v NullableProjectEnvVarProjectInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectEnvVarProjectInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_env_var_project_output.go b/pkg/api/rewardcloud/model_project_env_var_project_output.go new file mode 100644 index 0000000..8d271af --- /dev/null +++ b/pkg/api/rewardcloud/model_project_env_var_project_output.go @@ -0,0 +1,276 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProjectEnvVarProjectOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectEnvVarProjectOutput{} + +// ProjectEnvVarProjectOutput +type ProjectEnvVarProjectOutput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewProjectEnvVarProjectOutput instantiates a new ProjectEnvVarProjectOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectEnvVarProjectOutput() *ProjectEnvVarProjectOutput { + this := ProjectEnvVarProjectOutput{} + return &this +} + +// NewProjectEnvVarProjectOutputWithDefaults instantiates a new ProjectEnvVarProjectOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectEnvVarProjectOutputWithDefaults() *ProjectEnvVarProjectOutput { + this := ProjectEnvVarProjectOutput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarProjectOutput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarProjectOutput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *ProjectEnvVarProjectOutput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *ProjectEnvVarProjectOutput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *ProjectEnvVarProjectOutput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *ProjectEnvVarProjectOutput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarProjectOutput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarProjectOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *ProjectEnvVarProjectOutput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *ProjectEnvVarProjectOutput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *ProjectEnvVarProjectOutput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *ProjectEnvVarProjectOutput) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarProjectOutput) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarProjectOutput) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *ProjectEnvVarProjectOutput) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *ProjectEnvVarProjectOutput) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *ProjectEnvVarProjectOutput) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *ProjectEnvVarProjectOutput) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarProjectOutput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarProjectOutput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *ProjectEnvVarProjectOutput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *ProjectEnvVarProjectOutput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *ProjectEnvVarProjectOutput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *ProjectEnvVarProjectOutput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o ProjectEnvVarProjectOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectEnvVarProjectOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableProjectEnvVarProjectOutput struct { + value *ProjectEnvVarProjectOutput + isSet bool +} + +func (v NullableProjectEnvVarProjectOutput) Get() *ProjectEnvVarProjectOutput { + return v.value +} + +func (v *NullableProjectEnvVarProjectOutput) Set(val *ProjectEnvVarProjectOutput) { + v.value = val + v.isSet = true +} + +func (v NullableProjectEnvVarProjectOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectEnvVarProjectOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectEnvVarProjectOutput(val *ProjectEnvVarProjectOutput) *NullableProjectEnvVarProjectOutput { + return &NullableProjectEnvVarProjectOutput{value: val, isSet: true} +} + +func (v NullableProjectEnvVarProjectOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectEnvVarProjectOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_env_var_template_project_input.go b/pkg/api/rewardcloud/model_project_env_var_template_project_input.go new file mode 100644 index 0000000..db4650e --- /dev/null +++ b/pkg/api/rewardcloud/model_project_env_var_template_project_input.go @@ -0,0 +1,229 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProjectEnvVarTemplateProjectInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectEnvVarTemplateProjectInput{} + +// ProjectEnvVarTemplateProjectInput Class ProjectEnvVar +type ProjectEnvVarTemplateProjectInput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewProjectEnvVarTemplateProjectInput instantiates a new ProjectEnvVarTemplateProjectInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectEnvVarTemplateProjectInput() *ProjectEnvVarTemplateProjectInput { + this := ProjectEnvVarTemplateProjectInput{} + return &this +} + +// NewProjectEnvVarTemplateProjectInputWithDefaults instantiates a new ProjectEnvVarTemplateProjectInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectEnvVarTemplateProjectInputWithDefaults() *ProjectEnvVarTemplateProjectInput { + this := ProjectEnvVarTemplateProjectInput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarTemplateProjectInput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarTemplateProjectInput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *ProjectEnvVarTemplateProjectInput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *ProjectEnvVarTemplateProjectInput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *ProjectEnvVarTemplateProjectInput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *ProjectEnvVarTemplateProjectInput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarTemplateProjectInput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarTemplateProjectInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *ProjectEnvVarTemplateProjectInput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *ProjectEnvVarTemplateProjectInput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *ProjectEnvVarTemplateProjectInput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *ProjectEnvVarTemplateProjectInput) UnsetValue() { + o.Value.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarTemplateProjectInput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarTemplateProjectInput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *ProjectEnvVarTemplateProjectInput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *ProjectEnvVarTemplateProjectInput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *ProjectEnvVarTemplateProjectInput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *ProjectEnvVarTemplateProjectInput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o ProjectEnvVarTemplateProjectInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectEnvVarTemplateProjectInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableProjectEnvVarTemplateProjectInput struct { + value *ProjectEnvVarTemplateProjectInput + isSet bool +} + +func (v NullableProjectEnvVarTemplateProjectInput) Get() *ProjectEnvVarTemplateProjectInput { + return v.value +} + +func (v *NullableProjectEnvVarTemplateProjectInput) Set(val *ProjectEnvVarTemplateProjectInput) { + v.value = val + v.isSet = true +} + +func (v NullableProjectEnvVarTemplateProjectInput) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectEnvVarTemplateProjectInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectEnvVarTemplateProjectInput(val *ProjectEnvVarTemplateProjectInput) *NullableProjectEnvVarTemplateProjectInput { + return &NullableProjectEnvVarTemplateProjectInput{value: val, isSet: true} +} + +func (v NullableProjectEnvVarTemplateProjectInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectEnvVarTemplateProjectInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_env_var_template_project_output.go b/pkg/api/rewardcloud/model_project_env_var_template_project_output.go new file mode 100644 index 0000000..c7f49a5 --- /dev/null +++ b/pkg/api/rewardcloud/model_project_env_var_template_project_output.go @@ -0,0 +1,229 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProjectEnvVarTemplateProjectOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectEnvVarTemplateProjectOutput{} + +// ProjectEnvVarTemplateProjectOutput +type ProjectEnvVarTemplateProjectOutput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewProjectEnvVarTemplateProjectOutput instantiates a new ProjectEnvVarTemplateProjectOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectEnvVarTemplateProjectOutput() *ProjectEnvVarTemplateProjectOutput { + this := ProjectEnvVarTemplateProjectOutput{} + return &this +} + +// NewProjectEnvVarTemplateProjectOutputWithDefaults instantiates a new ProjectEnvVarTemplateProjectOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectEnvVarTemplateProjectOutputWithDefaults() *ProjectEnvVarTemplateProjectOutput { + this := ProjectEnvVarTemplateProjectOutput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarTemplateProjectOutput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarTemplateProjectOutput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *ProjectEnvVarTemplateProjectOutput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *ProjectEnvVarTemplateProjectOutput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *ProjectEnvVarTemplateProjectOutput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *ProjectEnvVarTemplateProjectOutput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarTemplateProjectOutput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarTemplateProjectOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *ProjectEnvVarTemplateProjectOutput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *ProjectEnvVarTemplateProjectOutput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *ProjectEnvVarTemplateProjectOutput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *ProjectEnvVarTemplateProjectOutput) UnsetValue() { + o.Value.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectEnvVarTemplateProjectOutput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectEnvVarTemplateProjectOutput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *ProjectEnvVarTemplateProjectOutput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *ProjectEnvVarTemplateProjectOutput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *ProjectEnvVarTemplateProjectOutput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *ProjectEnvVarTemplateProjectOutput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o ProjectEnvVarTemplateProjectOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectEnvVarTemplateProjectOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableProjectEnvVarTemplateProjectOutput struct { + value *ProjectEnvVarTemplateProjectOutput + isSet bool +} + +func (v NullableProjectEnvVarTemplateProjectOutput) Get() *ProjectEnvVarTemplateProjectOutput { + return v.value +} + +func (v *NullableProjectEnvVarTemplateProjectOutput) Set(val *ProjectEnvVarTemplateProjectOutput) { + v.value = val + v.isSet = true +} + +func (v NullableProjectEnvVarTemplateProjectOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectEnvVarTemplateProjectOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectEnvVarTemplateProjectOutput(val *ProjectEnvVarTemplateProjectOutput) *NullableProjectEnvVarTemplateProjectOutput { + return &NullableProjectEnvVarTemplateProjectOutput{value: val, isSet: true} +} + +func (v NullableProjectEnvVarTemplateProjectOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectEnvVarTemplateProjectOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_project_input.go b/pkg/api/rewardcloud/model_project_project_input.go new file mode 100644 index 0000000..38a16eb --- /dev/null +++ b/pkg/api/rewardcloud/model_project_project_input.go @@ -0,0 +1,760 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProjectProjectInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectProjectInput{} + +// ProjectProjectInput Class Project +type ProjectProjectInput struct { + TemplateIri NullableString `json:"templateIri,omitempty"` + Git NullableString `json:"git,omitempty"` + Team NullableString `json:"team,omitempty"` + Environment []string `json:"environment,omitempty"` + Name NullableString `json:"name,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + Code NullableString `json:"code,omitempty"` + Color NullableString `json:"color,omitempty"` + IsInitProjectSkeleton NullableBool `json:"isInitProjectSkeleton,omitempty"` + ComponentVersion []string `json:"componentVersion,omitempty"` + ProjectTypeVersion NullableString `json:"projectTypeVersion,omitempty"` + ProjectEnvVar []ProjectEnvVarProjectInput `json:"projectEnvVar,omitempty"` +} + +// NewProjectProjectInput instantiates a new ProjectProjectInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectProjectInput() *ProjectProjectInput { + this := ProjectProjectInput{} + return &this +} + +// NewProjectProjectInputWithDefaults instantiates a new ProjectProjectInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectProjectInputWithDefaults() *ProjectProjectInput { + this := ProjectProjectInput{} + return &this +} + +// GetTemplateIri returns the TemplateIri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetTemplateIri() string { + if o == nil || IsNil(o.TemplateIri.Get()) { + var ret string + return ret + } + return *o.TemplateIri.Get() +} + +// GetTemplateIriOk returns a tuple with the TemplateIri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetTemplateIriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TemplateIri.Get(), o.TemplateIri.IsSet() +} + +// HasTemplateIri returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasTemplateIri() bool { + if o != nil && o.TemplateIri.IsSet() { + return true + } + + return false +} + +// SetTemplateIri gets a reference to the given NullableString and assigns it to the TemplateIri field. +func (o *ProjectProjectInput) SetTemplateIri(v string) { + o.TemplateIri.Set(&v) +} + +// SetTemplateIriNil sets the value for TemplateIri to be an explicit nil +func (o *ProjectProjectInput) SetTemplateIriNil() { + o.TemplateIri.Set(nil) +} + +// UnsetTemplateIri ensures that no value is present for TemplateIri, not even an explicit nil +func (o *ProjectProjectInput) UnsetTemplateIri() { + o.TemplateIri.Unset() +} + +// GetGit returns the Git field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetGit() string { + if o == nil || IsNil(o.Git.Get()) { + var ret string + return ret + } + return *o.Git.Get() +} + +// GetGitOk returns a tuple with the Git field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetGitOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Git.Get(), o.Git.IsSet() +} + +// HasGit returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasGit() bool { + if o != nil && o.Git.IsSet() { + return true + } + + return false +} + +// SetGit gets a reference to the given NullableString and assigns it to the Git field. +func (o *ProjectProjectInput) SetGit(v string) { + o.Git.Set(&v) +} + +// SetGitNil sets the value for Git to be an explicit nil +func (o *ProjectProjectInput) SetGitNil() { + o.Git.Set(nil) +} + +// UnsetGit ensures that no value is present for Git, not even an explicit nil +func (o *ProjectProjectInput) UnsetGit() { + o.Git.Unset() +} + +// GetTeam returns the Team field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetTeam() string { + if o == nil || IsNil(o.Team.Get()) { + var ret string + return ret + } + return *o.Team.Get() +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetTeamOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Team.Get(), o.Team.IsSet() +} + +// HasTeam returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasTeam() bool { + if o != nil && o.Team.IsSet() { + return true + } + + return false +} + +// SetTeam gets a reference to the given NullableString and assigns it to the Team field. +func (o *ProjectProjectInput) SetTeam(v string) { + o.Team.Set(&v) +} + +// SetTeamNil sets the value for Team to be an explicit nil +func (o *ProjectProjectInput) SetTeamNil() { + o.Team.Set(nil) +} + +// UnsetTeam ensures that no value is present for Team, not even an explicit nil +func (o *ProjectProjectInput) UnsetTeam() { + o.Team.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise. +func (o *ProjectProjectInput) GetEnvironment() []string { + if o == nil || IsNil(o.Environment) { + var ret []string + return ret + } + return o.Environment +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectProjectInput) GetEnvironmentOk() ([]string, bool) { + if o == nil || IsNil(o.Environment) { + return nil, false + } + return o.Environment, true +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasEnvironment() bool { + if o != nil && !IsNil(o.Environment) { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given []string and assigns it to the Environment field. +func (o *ProjectProjectInput) SetEnvironment(v []string) { + o.Environment = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *ProjectProjectInput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *ProjectProjectInput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *ProjectProjectInput) UnsetName() { + o.Name.Unset() +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *ProjectProjectInput) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *ProjectProjectInput) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *ProjectProjectInput) UnsetIsActive() { + o.IsActive.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *ProjectProjectInput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *ProjectProjectInput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *ProjectProjectInput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *ProjectProjectInput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *ProjectProjectInput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *ProjectProjectInput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *ProjectProjectInput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *ProjectProjectInput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *ProjectProjectInput) UnsetStorage() { + o.Storage.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *ProjectProjectInput) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *ProjectProjectInput) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *ProjectProjectInput) UnsetCode() { + o.Code.Unset() +} + +// GetColor returns the Color field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetColor() string { + if o == nil || IsNil(o.Color.Get()) { + var ret string + return ret + } + return *o.Color.Get() +} + +// GetColorOk returns a tuple with the Color field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Color.Get(), o.Color.IsSet() +} + +// HasColor returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasColor() bool { + if o != nil && o.Color.IsSet() { + return true + } + + return false +} + +// SetColor gets a reference to the given NullableString and assigns it to the Color field. +func (o *ProjectProjectInput) SetColor(v string) { + o.Color.Set(&v) +} + +// SetColorNil sets the value for Color to be an explicit nil +func (o *ProjectProjectInput) SetColorNil() { + o.Color.Set(nil) +} + +// UnsetColor ensures that no value is present for Color, not even an explicit nil +func (o *ProjectProjectInput) UnsetColor() { + o.Color.Unset() +} + +// GetIsInitProjectSkeleton returns the IsInitProjectSkeleton field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetIsInitProjectSkeleton() bool { + if o == nil || IsNil(o.IsInitProjectSkeleton.Get()) { + var ret bool + return ret + } + return *o.IsInitProjectSkeleton.Get() +} + +// GetIsInitProjectSkeletonOk returns a tuple with the IsInitProjectSkeleton field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetIsInitProjectSkeletonOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInitProjectSkeleton.Get(), o.IsInitProjectSkeleton.IsSet() +} + +// HasIsInitProjectSkeleton returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasIsInitProjectSkeleton() bool { + if o != nil && o.IsInitProjectSkeleton.IsSet() { + return true + } + + return false +} + +// SetIsInitProjectSkeleton gets a reference to the given NullableBool and assigns it to the IsInitProjectSkeleton field. +func (o *ProjectProjectInput) SetIsInitProjectSkeleton(v bool) { + o.IsInitProjectSkeleton.Set(&v) +} + +// SetIsInitProjectSkeletonNil sets the value for IsInitProjectSkeleton to be an explicit nil +func (o *ProjectProjectInput) SetIsInitProjectSkeletonNil() { + o.IsInitProjectSkeleton.Set(nil) +} + +// UnsetIsInitProjectSkeleton ensures that no value is present for IsInitProjectSkeleton, not even an explicit nil +func (o *ProjectProjectInput) UnsetIsInitProjectSkeleton() { + o.IsInitProjectSkeleton.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise. +func (o *ProjectProjectInput) GetComponentVersion() []string { + if o == nil || IsNil(o.ComponentVersion) { + var ret []string + return ret + } + return o.ComponentVersion +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectProjectInput) GetComponentVersionOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentVersion) { + return nil, false + } + return o.ComponentVersion, true +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasComponentVersion() bool { + if o != nil && !IsNil(o.ComponentVersion) { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given []string and assigns it to the ComponentVersion field. +func (o *ProjectProjectInput) SetComponentVersion(v []string) { + o.ComponentVersion = v +} + +// GetProjectTypeVersion returns the ProjectTypeVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectInput) GetProjectTypeVersion() string { + if o == nil || IsNil(o.ProjectTypeVersion.Get()) { + var ret string + return ret + } + return *o.ProjectTypeVersion.Get() +} + +// GetProjectTypeVersionOk returns a tuple with the ProjectTypeVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectInput) GetProjectTypeVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectTypeVersion.Get(), o.ProjectTypeVersion.IsSet() +} + +// HasProjectTypeVersion returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasProjectTypeVersion() bool { + if o != nil && o.ProjectTypeVersion.IsSet() { + return true + } + + return false +} + +// SetProjectTypeVersion gets a reference to the given NullableString and assigns it to the ProjectTypeVersion field. +func (o *ProjectProjectInput) SetProjectTypeVersion(v string) { + o.ProjectTypeVersion.Set(&v) +} + +// SetProjectTypeVersionNil sets the value for ProjectTypeVersion to be an explicit nil +func (o *ProjectProjectInput) SetProjectTypeVersionNil() { + o.ProjectTypeVersion.Set(nil) +} + +// UnsetProjectTypeVersion ensures that no value is present for ProjectTypeVersion, not even an explicit nil +func (o *ProjectProjectInput) UnsetProjectTypeVersion() { + o.ProjectTypeVersion.Unset() +} + +// GetProjectEnvVar returns the ProjectEnvVar field value if set, zero value otherwise. +func (o *ProjectProjectInput) GetProjectEnvVar() []ProjectEnvVarProjectInput { + if o == nil || IsNil(o.ProjectEnvVar) { + var ret []ProjectEnvVarProjectInput + return ret + } + return o.ProjectEnvVar +} + +// GetProjectEnvVarOk returns a tuple with the ProjectEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectProjectInput) GetProjectEnvVarOk() ([]ProjectEnvVarProjectInput, bool) { + if o == nil || IsNil(o.ProjectEnvVar) { + return nil, false + } + return o.ProjectEnvVar, true +} + +// HasProjectEnvVar returns a boolean if a field has been set. +func (o *ProjectProjectInput) HasProjectEnvVar() bool { + if o != nil && !IsNil(o.ProjectEnvVar) { + return true + } + + return false +} + +// SetProjectEnvVar gets a reference to the given []ProjectEnvVarProjectInput and assigns it to the ProjectEnvVar field. +func (o *ProjectProjectInput) SetProjectEnvVar(v []ProjectEnvVarProjectInput) { + o.ProjectEnvVar = v +} + +func (o ProjectProjectInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectProjectInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.TemplateIri.IsSet() { + toSerialize["templateIri"] = o.TemplateIri.Get() + } + if o.Git.IsSet() { + toSerialize["git"] = o.Git.Get() + } + if o.Team.IsSet() { + toSerialize["team"] = o.Team.Get() + } + if !IsNil(o.Environment) { + toSerialize["environment"] = o.Environment + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Color.IsSet() { + toSerialize["color"] = o.Color.Get() + } + if o.IsInitProjectSkeleton.IsSet() { + toSerialize["isInitProjectSkeleton"] = o.IsInitProjectSkeleton.Get() + } + if !IsNil(o.ComponentVersion) { + toSerialize["componentVersion"] = o.ComponentVersion + } + if o.ProjectTypeVersion.IsSet() { + toSerialize["projectTypeVersion"] = o.ProjectTypeVersion.Get() + } + if !IsNil(o.ProjectEnvVar) { + toSerialize["projectEnvVar"] = o.ProjectEnvVar + } + return toSerialize, nil +} + +type NullableProjectProjectInput struct { + value *ProjectProjectInput + isSet bool +} + +func (v NullableProjectProjectInput) Get() *ProjectProjectInput { + return v.value +} + +func (v *NullableProjectProjectInput) Set(val *ProjectProjectInput) { + v.value = val + v.isSet = true +} + +func (v NullableProjectProjectInput) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectProjectInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectProjectInput(val *ProjectProjectInput) *NullableProjectProjectInput { + return &NullableProjectProjectInput{value: val, isSet: true} +} + +func (v NullableProjectProjectInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectProjectInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_project_output.go b/pkg/api/rewardcloud/model_project_project_output.go new file mode 100644 index 0000000..c9bd85b --- /dev/null +++ b/pkg/api/rewardcloud/model_project_project_output.go @@ -0,0 +1,1093 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectProjectOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectProjectOutput{} + +// ProjectProjectOutput Class Project +type ProjectProjectOutput struct { + TemplateIri NullableString `json:"templateIri,omitempty"` + State NullableString `json:"state,omitempty"` + Git NullableString `json:"git,omitempty"` + Team NullableString `json:"team,omitempty"` + Environment []string `json:"environment,omitempty"` + ProjectAccess NullableProjectAccessProjectOutput `json:"projectAccess,omitempty"` + StateByInfra NullableString `json:"stateByInfra,omitempty"` + Id *int32 `json:"id,omitempty"` + Uuid *string `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + Code NullableString `json:"code,omitempty"` + Color NullableString `json:"color,omitempty"` + IsInitProjectSkeleton NullableBool `json:"isInitProjectSkeleton,omitempty"` + ComponentVersion []string `json:"componentVersion,omitempty"` + ProjectTypeVersion NullableString `json:"projectTypeVersion,omitempty"` + ProjectEnvVar []ProjectEnvVarProjectOutput `json:"projectEnvVar,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewProjectProjectOutput instantiates a new ProjectProjectOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectProjectOutput() *ProjectProjectOutput { + this := ProjectProjectOutput{} + return &this +} + +// NewProjectProjectOutputWithDefaults instantiates a new ProjectProjectOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectProjectOutputWithDefaults() *ProjectProjectOutput { + this := ProjectProjectOutput{} + return &this +} + +// GetTemplateIri returns the TemplateIri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetTemplateIri() string { + if o == nil || IsNil(o.TemplateIri.Get()) { + var ret string + return ret + } + return *o.TemplateIri.Get() +} + +// GetTemplateIriOk returns a tuple with the TemplateIri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetTemplateIriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TemplateIri.Get(), o.TemplateIri.IsSet() +} + +// HasTemplateIri returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasTemplateIri() bool { + if o != nil && o.TemplateIri.IsSet() { + return true + } + + return false +} + +// SetTemplateIri gets a reference to the given NullableString and assigns it to the TemplateIri field. +func (o *ProjectProjectOutput) SetTemplateIri(v string) { + o.TemplateIri.Set(&v) +} + +// SetTemplateIriNil sets the value for TemplateIri to be an explicit nil +func (o *ProjectProjectOutput) SetTemplateIriNil() { + o.TemplateIri.Set(nil) +} + +// UnsetTemplateIri ensures that no value is present for TemplateIri, not even an explicit nil +func (o *ProjectProjectOutput) UnsetTemplateIri() { + o.TemplateIri.Unset() +} + +// GetState returns the State field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetState() string { + if o == nil || IsNil(o.State.Get()) { + var ret string + return ret + } + return *o.State.Get() +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.State.Get(), o.State.IsSet() +} + +// HasState returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasState() bool { + if o != nil && o.State.IsSet() { + return true + } + + return false +} + +// SetState gets a reference to the given NullableString and assigns it to the State field. +func (o *ProjectProjectOutput) SetState(v string) { + o.State.Set(&v) +} + +// SetStateNil sets the value for State to be an explicit nil +func (o *ProjectProjectOutput) SetStateNil() { + o.State.Set(nil) +} + +// UnsetState ensures that no value is present for State, not even an explicit nil +func (o *ProjectProjectOutput) UnsetState() { + o.State.Unset() +} + +// GetGit returns the Git field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetGit() string { + if o == nil || IsNil(o.Git.Get()) { + var ret string + return ret + } + return *o.Git.Get() +} + +// GetGitOk returns a tuple with the Git field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetGitOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Git.Get(), o.Git.IsSet() +} + +// HasGit returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasGit() bool { + if o != nil && o.Git.IsSet() { + return true + } + + return false +} + +// SetGit gets a reference to the given NullableString and assigns it to the Git field. +func (o *ProjectProjectOutput) SetGit(v string) { + o.Git.Set(&v) +} + +// SetGitNil sets the value for Git to be an explicit nil +func (o *ProjectProjectOutput) SetGitNil() { + o.Git.Set(nil) +} + +// UnsetGit ensures that no value is present for Git, not even an explicit nil +func (o *ProjectProjectOutput) UnsetGit() { + o.Git.Unset() +} + +// GetTeam returns the Team field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetTeam() string { + if o == nil || IsNil(o.Team.Get()) { + var ret string + return ret + } + return *o.Team.Get() +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetTeamOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Team.Get(), o.Team.IsSet() +} + +// HasTeam returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasTeam() bool { + if o != nil && o.Team.IsSet() { + return true + } + + return false +} + +// SetTeam gets a reference to the given NullableString and assigns it to the Team field. +func (o *ProjectProjectOutput) SetTeam(v string) { + o.Team.Set(&v) +} + +// SetTeamNil sets the value for Team to be an explicit nil +func (o *ProjectProjectOutput) SetTeamNil() { + o.Team.Set(nil) +} + +// UnsetTeam ensures that no value is present for Team, not even an explicit nil +func (o *ProjectProjectOutput) UnsetTeam() { + o.Team.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise. +func (o *ProjectProjectOutput) GetEnvironment() []string { + if o == nil || IsNil(o.Environment) { + var ret []string + return ret + } + return o.Environment +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectProjectOutput) GetEnvironmentOk() ([]string, bool) { + if o == nil || IsNil(o.Environment) { + return nil, false + } + return o.Environment, true +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasEnvironment() bool { + if o != nil && !IsNil(o.Environment) { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given []string and assigns it to the Environment field. +func (o *ProjectProjectOutput) SetEnvironment(v []string) { + o.Environment = v +} + +// GetProjectAccess returns the ProjectAccess field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetProjectAccess() ProjectAccessProjectOutput { + if o == nil || IsNil(o.ProjectAccess.Get()) { + var ret ProjectAccessProjectOutput + return ret + } + return *o.ProjectAccess.Get() +} + +// GetProjectAccessOk returns a tuple with the ProjectAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetProjectAccessOk() (*ProjectAccessProjectOutput, bool) { + if o == nil { + return nil, false + } + return o.ProjectAccess.Get(), o.ProjectAccess.IsSet() +} + +// HasProjectAccess returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasProjectAccess() bool { + if o != nil && o.ProjectAccess.IsSet() { + return true + } + + return false +} + +// SetProjectAccess gets a reference to the given NullableProjectAccessProjectOutput and assigns it to the ProjectAccess field. +func (o *ProjectProjectOutput) SetProjectAccess(v ProjectAccessProjectOutput) { + o.ProjectAccess.Set(&v) +} + +// SetProjectAccessNil sets the value for ProjectAccess to be an explicit nil +func (o *ProjectProjectOutput) SetProjectAccessNil() { + o.ProjectAccess.Set(nil) +} + +// UnsetProjectAccess ensures that no value is present for ProjectAccess, not even an explicit nil +func (o *ProjectProjectOutput) UnsetProjectAccess() { + o.ProjectAccess.Unset() +} + +// GetStateByInfra returns the StateByInfra field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetStateByInfra() string { + if o == nil || IsNil(o.StateByInfra.Get()) { + var ret string + return ret + } + return *o.StateByInfra.Get() +} + +// GetStateByInfraOk returns a tuple with the StateByInfra field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetStateByInfraOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.StateByInfra.Get(), o.StateByInfra.IsSet() +} + +// HasStateByInfra returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasStateByInfra() bool { + if o != nil && o.StateByInfra.IsSet() { + return true + } + + return false +} + +// SetStateByInfra gets a reference to the given NullableString and assigns it to the StateByInfra field. +func (o *ProjectProjectOutput) SetStateByInfra(v string) { + o.StateByInfra.Set(&v) +} + +// SetStateByInfraNil sets the value for StateByInfra to be an explicit nil +func (o *ProjectProjectOutput) SetStateByInfraNil() { + o.StateByInfra.Set(nil) +} + +// UnsetStateByInfra ensures that no value is present for StateByInfra, not even an explicit nil +func (o *ProjectProjectOutput) UnsetStateByInfra() { + o.StateByInfra.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectProjectOutput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectProjectOutput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectProjectOutput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *ProjectProjectOutput) GetUuid() string { + if o == nil || IsNil(o.Uuid) { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectProjectOutput) GetUuidOk() (*string, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *ProjectProjectOutput) SetUuid(v string) { + o.Uuid = &v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *ProjectProjectOutput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *ProjectProjectOutput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *ProjectProjectOutput) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *ProjectProjectOutput) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *ProjectProjectOutput) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *ProjectProjectOutput) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *ProjectProjectOutput) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *ProjectProjectOutput) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *ProjectProjectOutput) UnsetIsActive() { + o.IsActive.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *ProjectProjectOutput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *ProjectProjectOutput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *ProjectProjectOutput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *ProjectProjectOutput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *ProjectProjectOutput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *ProjectProjectOutput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *ProjectProjectOutput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *ProjectProjectOutput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *ProjectProjectOutput) UnsetStorage() { + o.Storage.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *ProjectProjectOutput) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *ProjectProjectOutput) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *ProjectProjectOutput) UnsetCode() { + o.Code.Unset() +} + +// GetColor returns the Color field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetColor() string { + if o == nil || IsNil(o.Color.Get()) { + var ret string + return ret + } + return *o.Color.Get() +} + +// GetColorOk returns a tuple with the Color field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Color.Get(), o.Color.IsSet() +} + +// HasColor returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasColor() bool { + if o != nil && o.Color.IsSet() { + return true + } + + return false +} + +// SetColor gets a reference to the given NullableString and assigns it to the Color field. +func (o *ProjectProjectOutput) SetColor(v string) { + o.Color.Set(&v) +} + +// SetColorNil sets the value for Color to be an explicit nil +func (o *ProjectProjectOutput) SetColorNil() { + o.Color.Set(nil) +} + +// UnsetColor ensures that no value is present for Color, not even an explicit nil +func (o *ProjectProjectOutput) UnsetColor() { + o.Color.Unset() +} + +// GetIsInitProjectSkeleton returns the IsInitProjectSkeleton field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetIsInitProjectSkeleton() bool { + if o == nil || IsNil(o.IsInitProjectSkeleton.Get()) { + var ret bool + return ret + } + return *o.IsInitProjectSkeleton.Get() +} + +// GetIsInitProjectSkeletonOk returns a tuple with the IsInitProjectSkeleton field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetIsInitProjectSkeletonOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInitProjectSkeleton.Get(), o.IsInitProjectSkeleton.IsSet() +} + +// HasIsInitProjectSkeleton returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasIsInitProjectSkeleton() bool { + if o != nil && o.IsInitProjectSkeleton.IsSet() { + return true + } + + return false +} + +// SetIsInitProjectSkeleton gets a reference to the given NullableBool and assigns it to the IsInitProjectSkeleton field. +func (o *ProjectProjectOutput) SetIsInitProjectSkeleton(v bool) { + o.IsInitProjectSkeleton.Set(&v) +} + +// SetIsInitProjectSkeletonNil sets the value for IsInitProjectSkeleton to be an explicit nil +func (o *ProjectProjectOutput) SetIsInitProjectSkeletonNil() { + o.IsInitProjectSkeleton.Set(nil) +} + +// UnsetIsInitProjectSkeleton ensures that no value is present for IsInitProjectSkeleton, not even an explicit nil +func (o *ProjectProjectOutput) UnsetIsInitProjectSkeleton() { + o.IsInitProjectSkeleton.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise. +func (o *ProjectProjectOutput) GetComponentVersion() []string { + if o == nil || IsNil(o.ComponentVersion) { + var ret []string + return ret + } + return o.ComponentVersion +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectProjectOutput) GetComponentVersionOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentVersion) { + return nil, false + } + return o.ComponentVersion, true +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasComponentVersion() bool { + if o != nil && !IsNil(o.ComponentVersion) { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given []string and assigns it to the ComponentVersion field. +func (o *ProjectProjectOutput) SetComponentVersion(v []string) { + o.ComponentVersion = v +} + +// GetProjectTypeVersion returns the ProjectTypeVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectProjectOutput) GetProjectTypeVersion() string { + if o == nil || IsNil(o.ProjectTypeVersion.Get()) { + var ret string + return ret + } + return *o.ProjectTypeVersion.Get() +} + +// GetProjectTypeVersionOk returns a tuple with the ProjectTypeVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectProjectOutput) GetProjectTypeVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectTypeVersion.Get(), o.ProjectTypeVersion.IsSet() +} + +// HasProjectTypeVersion returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasProjectTypeVersion() bool { + if o != nil && o.ProjectTypeVersion.IsSet() { + return true + } + + return false +} + +// SetProjectTypeVersion gets a reference to the given NullableString and assigns it to the ProjectTypeVersion field. +func (o *ProjectProjectOutput) SetProjectTypeVersion(v string) { + o.ProjectTypeVersion.Set(&v) +} + +// SetProjectTypeVersionNil sets the value for ProjectTypeVersion to be an explicit nil +func (o *ProjectProjectOutput) SetProjectTypeVersionNil() { + o.ProjectTypeVersion.Set(nil) +} + +// UnsetProjectTypeVersion ensures that no value is present for ProjectTypeVersion, not even an explicit nil +func (o *ProjectProjectOutput) UnsetProjectTypeVersion() { + o.ProjectTypeVersion.Unset() +} + +// GetProjectEnvVar returns the ProjectEnvVar field value if set, zero value otherwise. +func (o *ProjectProjectOutput) GetProjectEnvVar() []ProjectEnvVarProjectOutput { + if o == nil || IsNil(o.ProjectEnvVar) { + var ret []ProjectEnvVarProjectOutput + return ret + } + return o.ProjectEnvVar +} + +// GetProjectEnvVarOk returns a tuple with the ProjectEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectProjectOutput) GetProjectEnvVarOk() ([]ProjectEnvVarProjectOutput, bool) { + if o == nil || IsNil(o.ProjectEnvVar) { + return nil, false + } + return o.ProjectEnvVar, true +} + +// HasProjectEnvVar returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasProjectEnvVar() bool { + if o != nil && !IsNil(o.ProjectEnvVar) { + return true + } + + return false +} + +// SetProjectEnvVar gets a reference to the given []ProjectEnvVarProjectOutput and assigns it to the ProjectEnvVar field. +func (o *ProjectProjectOutput) SetProjectEnvVar(v []ProjectEnvVarProjectOutput) { + o.ProjectEnvVar = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ProjectProjectOutput) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectProjectOutput) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ProjectProjectOutput) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ProjectProjectOutput) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectProjectOutput) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ProjectProjectOutput) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ProjectProjectOutput) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ProjectProjectOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectProjectOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.TemplateIri.IsSet() { + toSerialize["templateIri"] = o.TemplateIri.Get() + } + if o.State.IsSet() { + toSerialize["state"] = o.State.Get() + } + if o.Git.IsSet() { + toSerialize["git"] = o.Git.Get() + } + if o.Team.IsSet() { + toSerialize["team"] = o.Team.Get() + } + if !IsNil(o.Environment) { + toSerialize["environment"] = o.Environment + } + if o.ProjectAccess.IsSet() { + toSerialize["projectAccess"] = o.ProjectAccess.Get() + } + if o.StateByInfra.IsSet() { + toSerialize["stateByInfra"] = o.StateByInfra.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Color.IsSet() { + toSerialize["color"] = o.Color.Get() + } + if o.IsInitProjectSkeleton.IsSet() { + toSerialize["isInitProjectSkeleton"] = o.IsInitProjectSkeleton.Get() + } + if !IsNil(o.ComponentVersion) { + toSerialize["componentVersion"] = o.ComponentVersion + } + if o.ProjectTypeVersion.IsSet() { + toSerialize["projectTypeVersion"] = o.ProjectTypeVersion.Get() + } + if !IsNil(o.ProjectEnvVar) { + toSerialize["projectEnvVar"] = o.ProjectEnvVar + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProjectProjectOutput struct { + value *ProjectProjectOutput + isSet bool +} + +func (v NullableProjectProjectOutput) Get() *ProjectProjectOutput { + return v.value +} + +func (v *NullableProjectProjectOutput) Set(val *ProjectProjectOutput) { + v.value = val + v.isSet = true +} + +func (v NullableProjectProjectOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectProjectOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectProjectOutput(val *ProjectProjectOutput) *NullableProjectProjectOutput { + return &NullableProjectProjectOutput{value: val, isSet: true} +} + +func (v NullableProjectProjectOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectProjectOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_type.go b/pkg/api/rewardcloud/model_project_type.go new file mode 100644 index 0000000..8c4914c --- /dev/null +++ b/pkg/api/rewardcloud/model_project_type.go @@ -0,0 +1,515 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectType{} + +// ProjectType Class ProjectType +type ProjectType struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + Logo NullableString `json:"logo,omitempty"` + ProjectTypeVersion []string `json:"projectTypeVersion,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewProjectType instantiates a new ProjectType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectType() *ProjectType { + this := ProjectType{} + return &this +} + +// NewProjectTypeWithDefaults instantiates a new ProjectType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectTypeWithDefaults() *ProjectType { + this := ProjectType{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectType) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectType) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectType) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectType) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectType) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectType) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectType) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ProjectType) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ProjectType) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ProjectType) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectType) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectType) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *ProjectType) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *ProjectType) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *ProjectType) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *ProjectType) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectType) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectType) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *ProjectType) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *ProjectType) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *ProjectType) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *ProjectType) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetLogo returns the Logo field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectType) GetLogo() string { + if o == nil || IsNil(o.Logo.Get()) { + var ret string + return ret + } + return *o.Logo.Get() +} + +// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectType) GetLogoOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Logo.Get(), o.Logo.IsSet() +} + +// HasLogo returns a boolean if a field has been set. +func (o *ProjectType) HasLogo() bool { + if o != nil && o.Logo.IsSet() { + return true + } + + return false +} + +// SetLogo gets a reference to the given NullableString and assigns it to the Logo field. +func (o *ProjectType) SetLogo(v string) { + o.Logo.Set(&v) +} + +// SetLogoNil sets the value for Logo to be an explicit nil +func (o *ProjectType) SetLogoNil() { + o.Logo.Set(nil) +} + +// UnsetLogo ensures that no value is present for Logo, not even an explicit nil +func (o *ProjectType) UnsetLogo() { + o.Logo.Unset() +} + +// GetProjectTypeVersion returns the ProjectTypeVersion field value if set, zero value otherwise. +func (o *ProjectType) GetProjectTypeVersion() []string { + if o == nil || IsNil(o.ProjectTypeVersion) { + var ret []string + return ret + } + return o.ProjectTypeVersion +} + +// GetProjectTypeVersionOk returns a tuple with the ProjectTypeVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectType) GetProjectTypeVersionOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectTypeVersion) { + return nil, false + } + return o.ProjectTypeVersion, true +} + +// HasProjectTypeVersion returns a boolean if a field has been set. +func (o *ProjectType) HasProjectTypeVersion() bool { + if o != nil && !IsNil(o.ProjectTypeVersion) { + return true + } + + return false +} + +// SetProjectTypeVersion gets a reference to the given []string and assigns it to the ProjectTypeVersion field. +func (o *ProjectType) SetProjectTypeVersion(v []string) { + o.ProjectTypeVersion = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectType) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectType) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ProjectType) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ProjectType) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ProjectType) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ProjectType) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectType) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectType) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ProjectType) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ProjectType) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ProjectType) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ProjectType) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ProjectType) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectType) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ProjectType) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ProjectType) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ProjectType) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectType) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ProjectType) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ProjectType) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ProjectType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.Logo.IsSet() { + toSerialize["logo"] = o.Logo.Get() + } + if !IsNil(o.ProjectTypeVersion) { + toSerialize["projectTypeVersion"] = o.ProjectTypeVersion + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProjectType struct { + value *ProjectType + isSet bool +} + +func (v NullableProjectType) Get() *ProjectType { + return v.value +} + +func (v *NullableProjectType) Set(val *ProjectType) { + v.value = val + v.isSet = true +} + +func (v NullableProjectType) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectType(val *ProjectType) *NullableProjectType { + return &NullableProjectType{value: val, isSet: true} +} + +func (v NullableProjectType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_type_version.go b/pkg/api/rewardcloud/model_project_type_version.go new file mode 100644 index 0000000..4d8b3ea --- /dev/null +++ b/pkg/api/rewardcloud/model_project_type_version.go @@ -0,0 +1,576 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectTypeVersion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectTypeVersion{} + +// ProjectTypeVersion Class ProjectTypeVersion +type ProjectTypeVersion struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Version NullableString `json:"version,omitempty"` + ProjectType NullableString `json:"projectType,omitempty"` + ProjectTypeVersionEnvVar []string `json:"projectTypeVersionEnvVar,omitempty"` + ComponentResourceLimit []string `json:"componentResourceLimit,omitempty"` + RequiredComponent []string `json:"requiredComponent,omitempty"` + ComponentVersions []string `json:"componentVersions,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewProjectTypeVersion instantiates a new ProjectTypeVersion object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectTypeVersion() *ProjectTypeVersion { + this := ProjectTypeVersion{} + return &this +} + +// NewProjectTypeVersionWithDefaults instantiates a new ProjectTypeVersion object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectTypeVersionWithDefaults() *ProjectTypeVersion { + this := ProjectTypeVersion{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectTypeVersion) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersion) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectTypeVersion) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersion) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersion) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ProjectTypeVersion) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ProjectTypeVersion) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ProjectTypeVersion) UnsetUuid() { + o.Uuid.Unset() +} + +// GetVersion returns the Version field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersion) GetVersion() string { + if o == nil || IsNil(o.Version.Get()) { + var ret string + return ret + } + return *o.Version.Get() +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersion) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Version.Get(), o.Version.IsSet() +} + +// HasVersion returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasVersion() bool { + if o != nil && o.Version.IsSet() { + return true + } + + return false +} + +// SetVersion gets a reference to the given NullableString and assigns it to the Version field. +func (o *ProjectTypeVersion) SetVersion(v string) { + o.Version.Set(&v) +} + +// SetVersionNil sets the value for Version to be an explicit nil +func (o *ProjectTypeVersion) SetVersionNil() { + o.Version.Set(nil) +} + +// UnsetVersion ensures that no value is present for Version, not even an explicit nil +func (o *ProjectTypeVersion) UnsetVersion() { + o.Version.Unset() +} + +// GetProjectType returns the ProjectType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersion) GetProjectType() string { + if o == nil || IsNil(o.ProjectType.Get()) { + var ret string + return ret + } + return *o.ProjectType.Get() +} + +// GetProjectTypeOk returns a tuple with the ProjectType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersion) GetProjectTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectType.Get(), o.ProjectType.IsSet() +} + +// HasProjectType returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasProjectType() bool { + if o != nil && o.ProjectType.IsSet() { + return true + } + + return false +} + +// SetProjectType gets a reference to the given NullableString and assigns it to the ProjectType field. +func (o *ProjectTypeVersion) SetProjectType(v string) { + o.ProjectType.Set(&v) +} + +// SetProjectTypeNil sets the value for ProjectType to be an explicit nil +func (o *ProjectTypeVersion) SetProjectTypeNil() { + o.ProjectType.Set(nil) +} + +// UnsetProjectType ensures that no value is present for ProjectType, not even an explicit nil +func (o *ProjectTypeVersion) UnsetProjectType() { + o.ProjectType.Unset() +} + +// GetProjectTypeVersionEnvVar returns the ProjectTypeVersionEnvVar field value if set, zero value otherwise. +func (o *ProjectTypeVersion) GetProjectTypeVersionEnvVar() []string { + if o == nil || IsNil(o.ProjectTypeVersionEnvVar) { + var ret []string + return ret + } + return o.ProjectTypeVersionEnvVar +} + +// GetProjectTypeVersionEnvVarOk returns a tuple with the ProjectTypeVersionEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersion) GetProjectTypeVersionEnvVarOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectTypeVersionEnvVar) { + return nil, false + } + return o.ProjectTypeVersionEnvVar, true +} + +// HasProjectTypeVersionEnvVar returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasProjectTypeVersionEnvVar() bool { + if o != nil && !IsNil(o.ProjectTypeVersionEnvVar) { + return true + } + + return false +} + +// SetProjectTypeVersionEnvVar gets a reference to the given []string and assigns it to the ProjectTypeVersionEnvVar field. +func (o *ProjectTypeVersion) SetProjectTypeVersionEnvVar(v []string) { + o.ProjectTypeVersionEnvVar = v +} + +// GetComponentResourceLimit returns the ComponentResourceLimit field value if set, zero value otherwise. +func (o *ProjectTypeVersion) GetComponentResourceLimit() []string { + if o == nil || IsNil(o.ComponentResourceLimit) { + var ret []string + return ret + } + return o.ComponentResourceLimit +} + +// GetComponentResourceLimitOk returns a tuple with the ComponentResourceLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersion) GetComponentResourceLimitOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentResourceLimit) { + return nil, false + } + return o.ComponentResourceLimit, true +} + +// HasComponentResourceLimit returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasComponentResourceLimit() bool { + if o != nil && !IsNil(o.ComponentResourceLimit) { + return true + } + + return false +} + +// SetComponentResourceLimit gets a reference to the given []string and assigns it to the ComponentResourceLimit field. +func (o *ProjectTypeVersion) SetComponentResourceLimit(v []string) { + o.ComponentResourceLimit = v +} + +// GetRequiredComponent returns the RequiredComponent field value if set, zero value otherwise. +func (o *ProjectTypeVersion) GetRequiredComponent() []string { + if o == nil || IsNil(o.RequiredComponent) { + var ret []string + return ret + } + return o.RequiredComponent +} + +// GetRequiredComponentOk returns a tuple with the RequiredComponent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersion) GetRequiredComponentOk() ([]string, bool) { + if o == nil || IsNil(o.RequiredComponent) { + return nil, false + } + return o.RequiredComponent, true +} + +// HasRequiredComponent returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasRequiredComponent() bool { + if o != nil && !IsNil(o.RequiredComponent) { + return true + } + + return false +} + +// SetRequiredComponent gets a reference to the given []string and assigns it to the RequiredComponent field. +func (o *ProjectTypeVersion) SetRequiredComponent(v []string) { + o.RequiredComponent = v +} + +// GetComponentVersions returns the ComponentVersions field value if set, zero value otherwise. +func (o *ProjectTypeVersion) GetComponentVersions() []string { + if o == nil || IsNil(o.ComponentVersions) { + var ret []string + return ret + } + return o.ComponentVersions +} + +// GetComponentVersionsOk returns a tuple with the ComponentVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersion) GetComponentVersionsOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentVersions) { + return nil, false + } + return o.ComponentVersions, true +} + +// HasComponentVersions returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasComponentVersions() bool { + if o != nil && !IsNil(o.ComponentVersions) { + return true + } + + return false +} + +// SetComponentVersions gets a reference to the given []string and assigns it to the ComponentVersions field. +func (o *ProjectTypeVersion) SetComponentVersions(v []string) { + o.ComponentVersions = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersion) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersion) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ProjectTypeVersion) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ProjectTypeVersion) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ProjectTypeVersion) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersion) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersion) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ProjectTypeVersion) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ProjectTypeVersion) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ProjectTypeVersion) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ProjectTypeVersion) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersion) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ProjectTypeVersion) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ProjectTypeVersion) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersion) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ProjectTypeVersion) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ProjectTypeVersion) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ProjectTypeVersion) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectTypeVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Version.IsSet() { + toSerialize["version"] = o.Version.Get() + } + if o.ProjectType.IsSet() { + toSerialize["projectType"] = o.ProjectType.Get() + } + if !IsNil(o.ProjectTypeVersionEnvVar) { + toSerialize["projectTypeVersionEnvVar"] = o.ProjectTypeVersionEnvVar + } + if !IsNil(o.ComponentResourceLimit) { + toSerialize["componentResourceLimit"] = o.ComponentResourceLimit + } + if !IsNil(o.RequiredComponent) { + toSerialize["requiredComponent"] = o.RequiredComponent + } + if !IsNil(o.ComponentVersions) { + toSerialize["componentVersions"] = o.ComponentVersions + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProjectTypeVersion struct { + value *ProjectTypeVersion + isSet bool +} + +func (v NullableProjectTypeVersion) Get() *ProjectTypeVersion { + return v.value +} + +func (v *NullableProjectTypeVersion) Set(val *ProjectTypeVersion) { + v.value = val + v.isSet = true +} + +func (v NullableProjectTypeVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectTypeVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectTypeVersion(val *ProjectTypeVersion) *NullableProjectTypeVersion { + return &NullableProjectTypeVersion{value: val, isSet: true} +} + +func (v NullableProjectTypeVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectTypeVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_type_version_env_var.go b/pkg/api/rewardcloud/model_project_type_version_env_var.go new file mode 100644 index 0000000..88c3f05 --- /dev/null +++ b/pkg/api/rewardcloud/model_project_type_version_env_var.go @@ -0,0 +1,645 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectTypeVersionEnvVar type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectTypeVersionEnvVar{} + +// ProjectTypeVersionEnvVar Class ProjectTypeEnvVar +type ProjectTypeVersionEnvVar struct { + ProjectTypeVersion NullableString `json:"projectTypeVersion,omitempty"` + ProjectTypeVersionEnvVarExample []string `json:"projectTypeVersionEnvVarExample,omitempty"` + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + Key NullableString `json:"key,omitempty"` + Note NullableString `json:"note,omitempty"` + IsRequired NullableBool `json:"isRequired,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarValidations []string `json:"envVarValidations,omitempty"` +} + +// NewProjectTypeVersionEnvVar instantiates a new ProjectTypeVersionEnvVar object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectTypeVersionEnvVar() *ProjectTypeVersionEnvVar { + this := ProjectTypeVersionEnvVar{} + return &this +} + +// NewProjectTypeVersionEnvVarWithDefaults instantiates a new ProjectTypeVersionEnvVar object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectTypeVersionEnvVarWithDefaults() *ProjectTypeVersionEnvVar { + this := ProjectTypeVersionEnvVar{} + return &this +} + +// GetProjectTypeVersion returns the ProjectTypeVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVar) GetProjectTypeVersion() string { + if o == nil || IsNil(o.ProjectTypeVersion.Get()) { + var ret string + return ret + } + return *o.ProjectTypeVersion.Get() +} + +// GetProjectTypeVersionOk returns a tuple with the ProjectTypeVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVar) GetProjectTypeVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectTypeVersion.Get(), o.ProjectTypeVersion.IsSet() +} + +// HasProjectTypeVersion returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasProjectTypeVersion() bool { + if o != nil && o.ProjectTypeVersion.IsSet() { + return true + } + + return false +} + +// SetProjectTypeVersion gets a reference to the given NullableString and assigns it to the ProjectTypeVersion field. +func (o *ProjectTypeVersionEnvVar) SetProjectTypeVersion(v string) { + o.ProjectTypeVersion.Set(&v) +} + +// SetProjectTypeVersionNil sets the value for ProjectTypeVersion to be an explicit nil +func (o *ProjectTypeVersionEnvVar) SetProjectTypeVersionNil() { + o.ProjectTypeVersion.Set(nil) +} + +// UnsetProjectTypeVersion ensures that no value is present for ProjectTypeVersion, not even an explicit nil +func (o *ProjectTypeVersionEnvVar) UnsetProjectTypeVersion() { + o.ProjectTypeVersion.Unset() +} + +// GetProjectTypeVersionEnvVarExample returns the ProjectTypeVersionEnvVarExample field value if set, zero value otherwise. +func (o *ProjectTypeVersionEnvVar) GetProjectTypeVersionEnvVarExample() []string { + if o == nil || IsNil(o.ProjectTypeVersionEnvVarExample) { + var ret []string + return ret + } + return o.ProjectTypeVersionEnvVarExample +} + +// GetProjectTypeVersionEnvVarExampleOk returns a tuple with the ProjectTypeVersionEnvVarExample field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersionEnvVar) GetProjectTypeVersionEnvVarExampleOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectTypeVersionEnvVarExample) { + return nil, false + } + return o.ProjectTypeVersionEnvVarExample, true +} + +// HasProjectTypeVersionEnvVarExample returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasProjectTypeVersionEnvVarExample() bool { + if o != nil && !IsNil(o.ProjectTypeVersionEnvVarExample) { + return true + } + + return false +} + +// SetProjectTypeVersionEnvVarExample gets a reference to the given []string and assigns it to the ProjectTypeVersionEnvVarExample field. +func (o *ProjectTypeVersionEnvVar) SetProjectTypeVersionEnvVarExample(v []string) { + o.ProjectTypeVersionEnvVarExample = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectTypeVersionEnvVar) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersionEnvVar) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectTypeVersionEnvVar) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVar) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVar) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ProjectTypeVersionEnvVar) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ProjectTypeVersionEnvVar) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ProjectTypeVersionEnvVar) UnsetUuid() { + o.Uuid.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVar) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVar) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ProjectTypeVersionEnvVar) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ProjectTypeVersionEnvVar) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ProjectTypeVersionEnvVar) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVar) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVar) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ProjectTypeVersionEnvVar) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ProjectTypeVersionEnvVar) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ProjectTypeVersionEnvVar) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ProjectTypeVersionEnvVar) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersionEnvVar) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ProjectTypeVersionEnvVar) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ProjectTypeVersionEnvVar) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersionEnvVar) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ProjectTypeVersionEnvVar) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVar) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVar) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *ProjectTypeVersionEnvVar) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *ProjectTypeVersionEnvVar) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *ProjectTypeVersionEnvVar) UnsetKey() { + o.Key.Unset() +} + +// GetNote returns the Note field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVar) GetNote() string { + if o == nil || IsNil(o.Note.Get()) { + var ret string + return ret + } + return *o.Note.Get() +} + +// GetNoteOk returns a tuple with the Note field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVar) GetNoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Note.Get(), o.Note.IsSet() +} + +// HasNote returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasNote() bool { + if o != nil && o.Note.IsSet() { + return true + } + + return false +} + +// SetNote gets a reference to the given NullableString and assigns it to the Note field. +func (o *ProjectTypeVersionEnvVar) SetNote(v string) { + o.Note.Set(&v) +} + +// SetNoteNil sets the value for Note to be an explicit nil +func (o *ProjectTypeVersionEnvVar) SetNoteNil() { + o.Note.Set(nil) +} + +// UnsetNote ensures that no value is present for Note, not even an explicit nil +func (o *ProjectTypeVersionEnvVar) UnsetNote() { + o.Note.Unset() +} + +// GetIsRequired returns the IsRequired field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVar) GetIsRequired() bool { + if o == nil || IsNil(o.IsRequired.Get()) { + var ret bool + return ret + } + return *o.IsRequired.Get() +} + +// GetIsRequiredOk returns a tuple with the IsRequired field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVar) GetIsRequiredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsRequired.Get(), o.IsRequired.IsSet() +} + +// HasIsRequired returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasIsRequired() bool { + if o != nil && o.IsRequired.IsSet() { + return true + } + + return false +} + +// SetIsRequired gets a reference to the given NullableBool and assigns it to the IsRequired field. +func (o *ProjectTypeVersionEnvVar) SetIsRequired(v bool) { + o.IsRequired.Set(&v) +} + +// SetIsRequiredNil sets the value for IsRequired to be an explicit nil +func (o *ProjectTypeVersionEnvVar) SetIsRequiredNil() { + o.IsRequired.Set(nil) +} + +// UnsetIsRequired ensures that no value is present for IsRequired, not even an explicit nil +func (o *ProjectTypeVersionEnvVar) UnsetIsRequired() { + o.IsRequired.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVar) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVar) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *ProjectTypeVersionEnvVar) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *ProjectTypeVersionEnvVar) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *ProjectTypeVersionEnvVar) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarValidations returns the EnvVarValidations field value if set, zero value otherwise. +func (o *ProjectTypeVersionEnvVar) GetEnvVarValidations() []string { + if o == nil || IsNil(o.EnvVarValidations) { + var ret []string + return ret + } + return o.EnvVarValidations +} + +// GetEnvVarValidationsOk returns a tuple with the EnvVarValidations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersionEnvVar) GetEnvVarValidationsOk() ([]string, bool) { + if o == nil || IsNil(o.EnvVarValidations) { + return nil, false + } + return o.EnvVarValidations, true +} + +// HasEnvVarValidations returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVar) HasEnvVarValidations() bool { + if o != nil && !IsNil(o.EnvVarValidations) { + return true + } + + return false +} + +// SetEnvVarValidations gets a reference to the given []string and assigns it to the EnvVarValidations field. +func (o *ProjectTypeVersionEnvVar) SetEnvVarValidations(v []string) { + o.EnvVarValidations = v +} + +func (o ProjectTypeVersionEnvVar) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectTypeVersionEnvVar) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ProjectTypeVersion.IsSet() { + toSerialize["projectTypeVersion"] = o.ProjectTypeVersion.Get() + } + if !IsNil(o.ProjectTypeVersionEnvVarExample) { + toSerialize["projectTypeVersionEnvVarExample"] = o.ProjectTypeVersionEnvVarExample + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Note.IsSet() { + toSerialize["note"] = o.Note.Get() + } + if o.IsRequired.IsSet() { + toSerialize["isRequired"] = o.IsRequired.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if !IsNil(o.EnvVarValidations) { + toSerialize["envVarValidations"] = o.EnvVarValidations + } + return toSerialize, nil +} + +type NullableProjectTypeVersionEnvVar struct { + value *ProjectTypeVersionEnvVar + isSet bool +} + +func (v NullableProjectTypeVersionEnvVar) Get() *ProjectTypeVersionEnvVar { + return v.value +} + +func (v *NullableProjectTypeVersionEnvVar) Set(val *ProjectTypeVersionEnvVar) { + v.value = val + v.isSet = true +} + +func (v NullableProjectTypeVersionEnvVar) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectTypeVersionEnvVar) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectTypeVersionEnvVar(val *ProjectTypeVersionEnvVar) *NullableProjectTypeVersionEnvVar { + return &NullableProjectTypeVersionEnvVar{value: val, isSet: true} +} + +func (v NullableProjectTypeVersionEnvVar) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectTypeVersionEnvVar) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_project_type_version_env_var_example.go b/pkg/api/rewardcloud/model_project_type_version_env_var_example.go new file mode 100644 index 0000000..6ab5911 --- /dev/null +++ b/pkg/api/rewardcloud/model_project_type_version_env_var_example.go @@ -0,0 +1,479 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectTypeVersionEnvVarExample type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectTypeVersionEnvVarExample{} + +// ProjectTypeVersionEnvVarExample Class ProjectTypeEnvVarExample +type ProjectTypeVersionEnvVarExample struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Value NullableString `json:"value,omitempty"` + IsDefault NullableBool `json:"isDefault,omitempty"` + ProjectTypeVersionEnvVar NullableString `json:"projectTypeVersionEnvVar,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewProjectTypeVersionEnvVarExample instantiates a new ProjectTypeVersionEnvVarExample object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectTypeVersionEnvVarExample() *ProjectTypeVersionEnvVarExample { + this := ProjectTypeVersionEnvVarExample{} + return &this +} + +// NewProjectTypeVersionEnvVarExampleWithDefaults instantiates a new ProjectTypeVersionEnvVarExample object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectTypeVersionEnvVarExampleWithDefaults() *ProjectTypeVersionEnvVarExample { + this := ProjectTypeVersionEnvVarExample{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ProjectTypeVersionEnvVarExample) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersionEnvVarExample) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVarExample) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ProjectTypeVersionEnvVarExample) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVarExample) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVarExample) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVarExample) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ProjectTypeVersionEnvVarExample) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ProjectTypeVersionEnvVarExample) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ProjectTypeVersionEnvVarExample) UnsetUuid() { + o.Uuid.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVarExample) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVarExample) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVarExample) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *ProjectTypeVersionEnvVarExample) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *ProjectTypeVersionEnvVarExample) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *ProjectTypeVersionEnvVarExample) UnsetValue() { + o.Value.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVarExample) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVarExample) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVarExample) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *ProjectTypeVersionEnvVarExample) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *ProjectTypeVersionEnvVarExample) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *ProjectTypeVersionEnvVarExample) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetProjectTypeVersionEnvVar returns the ProjectTypeVersionEnvVar field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVarExample) GetProjectTypeVersionEnvVar() string { + if o == nil || IsNil(o.ProjectTypeVersionEnvVar.Get()) { + var ret string + return ret + } + return *o.ProjectTypeVersionEnvVar.Get() +} + +// GetProjectTypeVersionEnvVarOk returns a tuple with the ProjectTypeVersionEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVarExample) GetProjectTypeVersionEnvVarOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectTypeVersionEnvVar.Get(), o.ProjectTypeVersionEnvVar.IsSet() +} + +// HasProjectTypeVersionEnvVar returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVarExample) HasProjectTypeVersionEnvVar() bool { + if o != nil && o.ProjectTypeVersionEnvVar.IsSet() { + return true + } + + return false +} + +// SetProjectTypeVersionEnvVar gets a reference to the given NullableString and assigns it to the ProjectTypeVersionEnvVar field. +func (o *ProjectTypeVersionEnvVarExample) SetProjectTypeVersionEnvVar(v string) { + o.ProjectTypeVersionEnvVar.Set(&v) +} + +// SetProjectTypeVersionEnvVarNil sets the value for ProjectTypeVersionEnvVar to be an explicit nil +func (o *ProjectTypeVersionEnvVarExample) SetProjectTypeVersionEnvVarNil() { + o.ProjectTypeVersionEnvVar.Set(nil) +} + +// UnsetProjectTypeVersionEnvVar ensures that no value is present for ProjectTypeVersionEnvVar, not even an explicit nil +func (o *ProjectTypeVersionEnvVarExample) UnsetProjectTypeVersionEnvVar() { + o.ProjectTypeVersionEnvVar.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVarExample) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVarExample) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVarExample) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ProjectTypeVersionEnvVarExample) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ProjectTypeVersionEnvVarExample) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ProjectTypeVersionEnvVarExample) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectTypeVersionEnvVarExample) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectTypeVersionEnvVarExample) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVarExample) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ProjectTypeVersionEnvVarExample) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ProjectTypeVersionEnvVarExample) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ProjectTypeVersionEnvVarExample) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ProjectTypeVersionEnvVarExample) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersionEnvVarExample) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVarExample) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ProjectTypeVersionEnvVarExample) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ProjectTypeVersionEnvVarExample) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectTypeVersionEnvVarExample) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ProjectTypeVersionEnvVarExample) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ProjectTypeVersionEnvVarExample) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ProjectTypeVersionEnvVarExample) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectTypeVersionEnvVarExample) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsDefault.IsSet() { + toSerialize["isDefault"] = o.IsDefault.Get() + } + if o.ProjectTypeVersionEnvVar.IsSet() { + toSerialize["projectTypeVersionEnvVar"] = o.ProjectTypeVersionEnvVar.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProjectTypeVersionEnvVarExample struct { + value *ProjectTypeVersionEnvVarExample + isSet bool +} + +func (v NullableProjectTypeVersionEnvVarExample) Get() *ProjectTypeVersionEnvVarExample { + return v.value +} + +func (v *NullableProjectTypeVersionEnvVarExample) Set(val *ProjectTypeVersionEnvVarExample) { + v.value = val + v.isSet = true +} + +func (v NullableProjectTypeVersionEnvVarExample) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectTypeVersionEnvVarExample) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectTypeVersionEnvVarExample(val *ProjectTypeVersionEnvVarExample) *NullableProjectTypeVersionEnvVarExample { + return &NullableProjectTypeVersionEnvVarExample{value: val, isSet: true} +} + +func (v NullableProjectTypeVersionEnvVarExample) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectTypeVersionEnvVarExample) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_provider.go b/pkg/api/rewardcloud/model_provider.go new file mode 100644 index 0000000..305dcfa --- /dev/null +++ b/pkg/api/rewardcloud/model_provider.go @@ -0,0 +1,551 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the Provider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Provider{} + +// Provider Class Provider +type Provider struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + IsDefault NullableBool `json:"isDefault,omitempty"` + Environment []string `json:"environment,omitempty"` + Cluster []string `json:"cluster,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewProvider instantiates a new Provider object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProvider() *Provider { + this := Provider{} + return &this +} + +// NewProviderWithDefaults instantiates a new Provider object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProviderWithDefaults() *Provider { + this := Provider{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Provider) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Provider) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Provider) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Provider) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Provider) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Provider) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *Provider) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *Provider) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *Provider) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *Provider) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Provider) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Provider) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *Provider) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *Provider) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *Provider) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *Provider) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Provider) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Provider) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *Provider) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *Provider) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *Provider) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *Provider) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Provider) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Provider) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *Provider) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *Provider) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *Provider) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *Provider) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise. +func (o *Provider) GetEnvironment() []string { + if o == nil || IsNil(o.Environment) { + var ret []string + return ret + } + return o.Environment +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Provider) GetEnvironmentOk() ([]string, bool) { + if o == nil || IsNil(o.Environment) { + return nil, false + } + return o.Environment, true +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *Provider) HasEnvironment() bool { + if o != nil && !IsNil(o.Environment) { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given []string and assigns it to the Environment field. +func (o *Provider) SetEnvironment(v []string) { + o.Environment = v +} + +// GetCluster returns the Cluster field value if set, zero value otherwise. +func (o *Provider) GetCluster() []string { + if o == nil || IsNil(o.Cluster) { + var ret []string + return ret + } + return o.Cluster +} + +// GetClusterOk returns a tuple with the Cluster field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Provider) GetClusterOk() ([]string, bool) { + if o == nil || IsNil(o.Cluster) { + return nil, false + } + return o.Cluster, true +} + +// HasCluster returns a boolean if a field has been set. +func (o *Provider) HasCluster() bool { + if o != nil && !IsNil(o.Cluster) { + return true + } + + return false +} + +// SetCluster gets a reference to the given []string and assigns it to the Cluster field. +func (o *Provider) SetCluster(v []string) { + o.Cluster = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Provider) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Provider) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *Provider) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *Provider) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *Provider) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *Provider) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Provider) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Provider) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *Provider) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *Provider) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *Provider) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *Provider) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Provider) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Provider) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Provider) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Provider) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Provider) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Provider) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Provider) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Provider) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o Provider) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Provider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.IsDefault.IsSet() { + toSerialize["isDefault"] = o.IsDefault.Get() + } + if !IsNil(o.Environment) { + toSerialize["environment"] = o.Environment + } + if !IsNil(o.Cluster) { + toSerialize["cluster"] = o.Cluster + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProvider struct { + value *Provider + isSet bool +} + +func (v NullableProvider) Get() *Provider { + return v.value +} + +func (v *NullableProvider) Set(val *Provider) { + v.value = val + v.isSet = true +} + +func (v NullableProvider) IsSet() bool { + return v.isSet +} + +func (v *NullableProvider) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProvider(val *Provider) *NullableProvider { + return &NullableProvider{value: val, isSet: true} +} + +func (v NullableProvider) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProvider) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_provider_cluster_with_provider.go b/pkg/api/rewardcloud/model_provider_cluster_with_provider.go new file mode 100644 index 0000000..16b2ed7 --- /dev/null +++ b/pkg/api/rewardcloud/model_provider_cluster_with_provider.go @@ -0,0 +1,135 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ProviderClusterWithProvider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProviderClusterWithProvider{} + +// ProviderClusterWithProvider +type ProviderClusterWithProvider struct { + Name NullableString `json:"name,omitempty"` +} + +// NewProviderClusterWithProvider instantiates a new ProviderClusterWithProvider object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProviderClusterWithProvider() *ProviderClusterWithProvider { + this := ProviderClusterWithProvider{} + return &this +} + +// NewProviderClusterWithProviderWithDefaults instantiates a new ProviderClusterWithProvider object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProviderClusterWithProviderWithDefaults() *ProviderClusterWithProvider { + this := ProviderClusterWithProvider{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProviderClusterWithProvider) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProviderClusterWithProvider) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *ProviderClusterWithProvider) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *ProviderClusterWithProvider) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *ProviderClusterWithProvider) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *ProviderClusterWithProvider) UnsetName() { + o.Name.Unset() +} + +func (o ProviderClusterWithProvider) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProviderClusterWithProvider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + return toSerialize, nil +} + +type NullableProviderClusterWithProvider struct { + value *ProviderClusterWithProvider + isSet bool +} + +func (v NullableProviderClusterWithProvider) Get() *ProviderClusterWithProvider { + return v.value +} + +func (v *NullableProviderClusterWithProvider) Set(val *ProviderClusterWithProvider) { + v.value = val + v.isSet = true +} + +func (v NullableProviderClusterWithProvider) IsSet() bool { + return v.isSet +} + +func (v *NullableProviderClusterWithProvider) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProviderClusterWithProvider(val *ProviderClusterWithProvider) *NullableProviderClusterWithProvider { + return &NullableProviderClusterWithProvider{value: val, isSet: true} +} + +func (v NullableProviderClusterWithProvider) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProviderClusterWithProvider) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_resource_type_limit.go b/pkg/api/rewardcloud/model_resource_type_limit.go new file mode 100644 index 0000000..0c816ff --- /dev/null +++ b/pkg/api/rewardcloud/model_resource_type_limit.go @@ -0,0 +1,620 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the ResourceTypeLimit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceTypeLimit{} + +// ResourceTypeLimit Class ResourceTypeLimit +type ResourceTypeLimit struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + ProjectMinValue NullableInt32 `json:"projectMinValue,omitempty"` + ProjectMaxValue NullableInt32 `json:"projectMaxValue,omitempty"` + EnvironmentMinValue NullableInt32 `json:"environmentMinValue,omitempty"` + EnvironmentMaxValue NullableInt32 `json:"environmentMaxValue,omitempty"` + ComponentMinValue NullableInt32 `json:"componentMinValue,omitempty"` + ComponentMaxValue NullableInt32 `json:"componentMaxValue,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewResourceTypeLimit instantiates a new ResourceTypeLimit object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceTypeLimit() *ResourceTypeLimit { + this := ResourceTypeLimit{} + return &this +} + +// NewResourceTypeLimitWithDefaults instantiates a new ResourceTypeLimit object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceTypeLimitWithDefaults() *ResourceTypeLimit { + this := ResourceTypeLimit{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ResourceTypeLimit) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceTypeLimit) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ResourceTypeLimit) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimit) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimit) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *ResourceTypeLimit) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *ResourceTypeLimit) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *ResourceTypeLimit) UnsetUuid() { + o.Uuid.Unset() +} + +// GetProjectMinValue returns the ProjectMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimit) GetProjectMinValue() int32 { + if o == nil || IsNil(o.ProjectMinValue.Get()) { + var ret int32 + return ret + } + return *o.ProjectMinValue.Get() +} + +// GetProjectMinValueOk returns a tuple with the ProjectMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimit) GetProjectMinValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ProjectMinValue.Get(), o.ProjectMinValue.IsSet() +} + +// HasProjectMinValue returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasProjectMinValue() bool { + if o != nil && o.ProjectMinValue.IsSet() { + return true + } + + return false +} + +// SetProjectMinValue gets a reference to the given NullableInt32 and assigns it to the ProjectMinValue field. +func (o *ResourceTypeLimit) SetProjectMinValue(v int32) { + o.ProjectMinValue.Set(&v) +} + +// SetProjectMinValueNil sets the value for ProjectMinValue to be an explicit nil +func (o *ResourceTypeLimit) SetProjectMinValueNil() { + o.ProjectMinValue.Set(nil) +} + +// UnsetProjectMinValue ensures that no value is present for ProjectMinValue, not even an explicit nil +func (o *ResourceTypeLimit) UnsetProjectMinValue() { + o.ProjectMinValue.Unset() +} + +// GetProjectMaxValue returns the ProjectMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimit) GetProjectMaxValue() int32 { + if o == nil || IsNil(o.ProjectMaxValue.Get()) { + var ret int32 + return ret + } + return *o.ProjectMaxValue.Get() +} + +// GetProjectMaxValueOk returns a tuple with the ProjectMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimit) GetProjectMaxValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ProjectMaxValue.Get(), o.ProjectMaxValue.IsSet() +} + +// HasProjectMaxValue returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasProjectMaxValue() bool { + if o != nil && o.ProjectMaxValue.IsSet() { + return true + } + + return false +} + +// SetProjectMaxValue gets a reference to the given NullableInt32 and assigns it to the ProjectMaxValue field. +func (o *ResourceTypeLimit) SetProjectMaxValue(v int32) { + o.ProjectMaxValue.Set(&v) +} + +// SetProjectMaxValueNil sets the value for ProjectMaxValue to be an explicit nil +func (o *ResourceTypeLimit) SetProjectMaxValueNil() { + o.ProjectMaxValue.Set(nil) +} + +// UnsetProjectMaxValue ensures that no value is present for ProjectMaxValue, not even an explicit nil +func (o *ResourceTypeLimit) UnsetProjectMaxValue() { + o.ProjectMaxValue.Unset() +} + +// GetEnvironmentMinValue returns the EnvironmentMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimit) GetEnvironmentMinValue() int32 { + if o == nil || IsNil(o.EnvironmentMinValue.Get()) { + var ret int32 + return ret + } + return *o.EnvironmentMinValue.Get() +} + +// GetEnvironmentMinValueOk returns a tuple with the EnvironmentMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimit) GetEnvironmentMinValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentMinValue.Get(), o.EnvironmentMinValue.IsSet() +} + +// HasEnvironmentMinValue returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasEnvironmentMinValue() bool { + if o != nil && o.EnvironmentMinValue.IsSet() { + return true + } + + return false +} + +// SetEnvironmentMinValue gets a reference to the given NullableInt32 and assigns it to the EnvironmentMinValue field. +func (o *ResourceTypeLimit) SetEnvironmentMinValue(v int32) { + o.EnvironmentMinValue.Set(&v) +} + +// SetEnvironmentMinValueNil sets the value for EnvironmentMinValue to be an explicit nil +func (o *ResourceTypeLimit) SetEnvironmentMinValueNil() { + o.EnvironmentMinValue.Set(nil) +} + +// UnsetEnvironmentMinValue ensures that no value is present for EnvironmentMinValue, not even an explicit nil +func (o *ResourceTypeLimit) UnsetEnvironmentMinValue() { + o.EnvironmentMinValue.Unset() +} + +// GetEnvironmentMaxValue returns the EnvironmentMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimit) GetEnvironmentMaxValue() int32 { + if o == nil || IsNil(o.EnvironmentMaxValue.Get()) { + var ret int32 + return ret + } + return *o.EnvironmentMaxValue.Get() +} + +// GetEnvironmentMaxValueOk returns a tuple with the EnvironmentMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimit) GetEnvironmentMaxValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentMaxValue.Get(), o.EnvironmentMaxValue.IsSet() +} + +// HasEnvironmentMaxValue returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasEnvironmentMaxValue() bool { + if o != nil && o.EnvironmentMaxValue.IsSet() { + return true + } + + return false +} + +// SetEnvironmentMaxValue gets a reference to the given NullableInt32 and assigns it to the EnvironmentMaxValue field. +func (o *ResourceTypeLimit) SetEnvironmentMaxValue(v int32) { + o.EnvironmentMaxValue.Set(&v) +} + +// SetEnvironmentMaxValueNil sets the value for EnvironmentMaxValue to be an explicit nil +func (o *ResourceTypeLimit) SetEnvironmentMaxValueNil() { + o.EnvironmentMaxValue.Set(nil) +} + +// UnsetEnvironmentMaxValue ensures that no value is present for EnvironmentMaxValue, not even an explicit nil +func (o *ResourceTypeLimit) UnsetEnvironmentMaxValue() { + o.EnvironmentMaxValue.Unset() +} + +// GetComponentMinValue returns the ComponentMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimit) GetComponentMinValue() int32 { + if o == nil || IsNil(o.ComponentMinValue.Get()) { + var ret int32 + return ret + } + return *o.ComponentMinValue.Get() +} + +// GetComponentMinValueOk returns a tuple with the ComponentMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimit) GetComponentMinValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ComponentMinValue.Get(), o.ComponentMinValue.IsSet() +} + +// HasComponentMinValue returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasComponentMinValue() bool { + if o != nil && o.ComponentMinValue.IsSet() { + return true + } + + return false +} + +// SetComponentMinValue gets a reference to the given NullableInt32 and assigns it to the ComponentMinValue field. +func (o *ResourceTypeLimit) SetComponentMinValue(v int32) { + o.ComponentMinValue.Set(&v) +} + +// SetComponentMinValueNil sets the value for ComponentMinValue to be an explicit nil +func (o *ResourceTypeLimit) SetComponentMinValueNil() { + o.ComponentMinValue.Set(nil) +} + +// UnsetComponentMinValue ensures that no value is present for ComponentMinValue, not even an explicit nil +func (o *ResourceTypeLimit) UnsetComponentMinValue() { + o.ComponentMinValue.Unset() +} + +// GetComponentMaxValue returns the ComponentMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimit) GetComponentMaxValue() int32 { + if o == nil || IsNil(o.ComponentMaxValue.Get()) { + var ret int32 + return ret + } + return *o.ComponentMaxValue.Get() +} + +// GetComponentMaxValueOk returns a tuple with the ComponentMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimit) GetComponentMaxValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ComponentMaxValue.Get(), o.ComponentMaxValue.IsSet() +} + +// HasComponentMaxValue returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasComponentMaxValue() bool { + if o != nil && o.ComponentMaxValue.IsSet() { + return true + } + + return false +} + +// SetComponentMaxValue gets a reference to the given NullableInt32 and assigns it to the ComponentMaxValue field. +func (o *ResourceTypeLimit) SetComponentMaxValue(v int32) { + o.ComponentMaxValue.Set(&v) +} + +// SetComponentMaxValueNil sets the value for ComponentMaxValue to be an explicit nil +func (o *ResourceTypeLimit) SetComponentMaxValueNil() { + o.ComponentMaxValue.Set(nil) +} + +// UnsetComponentMaxValue ensures that no value is present for ComponentMaxValue, not even an explicit nil +func (o *ResourceTypeLimit) UnsetComponentMaxValue() { + o.ComponentMaxValue.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimit) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimit) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *ResourceTypeLimit) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *ResourceTypeLimit) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *ResourceTypeLimit) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimit) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimit) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *ResourceTypeLimit) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *ResourceTypeLimit) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *ResourceTypeLimit) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ResourceTypeLimit) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceTypeLimit) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ResourceTypeLimit) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ResourceTypeLimit) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceTypeLimit) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ResourceTypeLimit) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ResourceTypeLimit) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ResourceTypeLimit) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceTypeLimit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.ProjectMinValue.IsSet() { + toSerialize["projectMinValue"] = o.ProjectMinValue.Get() + } + if o.ProjectMaxValue.IsSet() { + toSerialize["projectMaxValue"] = o.ProjectMaxValue.Get() + } + if o.EnvironmentMinValue.IsSet() { + toSerialize["environmentMinValue"] = o.EnvironmentMinValue.Get() + } + if o.EnvironmentMaxValue.IsSet() { + toSerialize["environmentMaxValue"] = o.EnvironmentMaxValue.Get() + } + if o.ComponentMinValue.IsSet() { + toSerialize["componentMinValue"] = o.ComponentMinValue.Get() + } + if o.ComponentMaxValue.IsSet() { + toSerialize["componentMaxValue"] = o.ComponentMaxValue.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableResourceTypeLimit struct { + value *ResourceTypeLimit + isSet bool +} + +func (v NullableResourceTypeLimit) Get() *ResourceTypeLimit { + return v.value +} + +func (v *NullableResourceTypeLimit) Set(val *ResourceTypeLimit) { + v.value = val + v.isSet = true +} + +func (v NullableResourceTypeLimit) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceTypeLimit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceTypeLimit(val *ResourceTypeLimit) *NullableResourceTypeLimit { + return &NullableResourceTypeLimit{value: val, isSet: true} +} + +func (v NullableResourceTypeLimit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceTypeLimit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_resource_type_limit_resource_type_input.go b/pkg/api/rewardcloud/model_resource_type_limit_resource_type_input.go new file mode 100644 index 0000000..e37d11b --- /dev/null +++ b/pkg/api/rewardcloud/model_resource_type_limit_resource_type_input.go @@ -0,0 +1,370 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ResourceTypeLimitResourceTypeInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceTypeLimitResourceTypeInput{} + +// ResourceTypeLimitResourceTypeInput Class ResourceTypeLimit +type ResourceTypeLimitResourceTypeInput struct { + ProjectMinValue NullableInt32 `json:"projectMinValue,omitempty"` + ProjectMaxValue NullableInt32 `json:"projectMaxValue,omitempty"` + EnvironmentMinValue NullableInt32 `json:"environmentMinValue,omitempty"` + EnvironmentMaxValue NullableInt32 `json:"environmentMaxValue,omitempty"` + ComponentMinValue NullableInt32 `json:"componentMinValue,omitempty"` + ComponentMaxValue NullableInt32 `json:"componentMaxValue,omitempty"` +} + +// NewResourceTypeLimitResourceTypeInput instantiates a new ResourceTypeLimitResourceTypeInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceTypeLimitResourceTypeInput() *ResourceTypeLimitResourceTypeInput { + this := ResourceTypeLimitResourceTypeInput{} + return &this +} + +// NewResourceTypeLimitResourceTypeInputWithDefaults instantiates a new ResourceTypeLimitResourceTypeInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceTypeLimitResourceTypeInputWithDefaults() *ResourceTypeLimitResourceTypeInput { + this := ResourceTypeLimitResourceTypeInput{} + return &this +} + +// GetProjectMinValue returns the ProjectMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeInput) GetProjectMinValue() int32 { + if o == nil || IsNil(o.ProjectMinValue.Get()) { + var ret int32 + return ret + } + return *o.ProjectMinValue.Get() +} + +// GetProjectMinValueOk returns a tuple with the ProjectMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeInput) GetProjectMinValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ProjectMinValue.Get(), o.ProjectMinValue.IsSet() +} + +// HasProjectMinValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeInput) HasProjectMinValue() bool { + if o != nil && o.ProjectMinValue.IsSet() { + return true + } + + return false +} + +// SetProjectMinValue gets a reference to the given NullableInt32 and assigns it to the ProjectMinValue field. +func (o *ResourceTypeLimitResourceTypeInput) SetProjectMinValue(v int32) { + o.ProjectMinValue.Set(&v) +} + +// SetProjectMinValueNil sets the value for ProjectMinValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) SetProjectMinValueNil() { + o.ProjectMinValue.Set(nil) +} + +// UnsetProjectMinValue ensures that no value is present for ProjectMinValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) UnsetProjectMinValue() { + o.ProjectMinValue.Unset() +} + +// GetProjectMaxValue returns the ProjectMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeInput) GetProjectMaxValue() int32 { + if o == nil || IsNil(o.ProjectMaxValue.Get()) { + var ret int32 + return ret + } + return *o.ProjectMaxValue.Get() +} + +// GetProjectMaxValueOk returns a tuple with the ProjectMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeInput) GetProjectMaxValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ProjectMaxValue.Get(), o.ProjectMaxValue.IsSet() +} + +// HasProjectMaxValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeInput) HasProjectMaxValue() bool { + if o != nil && o.ProjectMaxValue.IsSet() { + return true + } + + return false +} + +// SetProjectMaxValue gets a reference to the given NullableInt32 and assigns it to the ProjectMaxValue field. +func (o *ResourceTypeLimitResourceTypeInput) SetProjectMaxValue(v int32) { + o.ProjectMaxValue.Set(&v) +} + +// SetProjectMaxValueNil sets the value for ProjectMaxValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) SetProjectMaxValueNil() { + o.ProjectMaxValue.Set(nil) +} + +// UnsetProjectMaxValue ensures that no value is present for ProjectMaxValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) UnsetProjectMaxValue() { + o.ProjectMaxValue.Unset() +} + +// GetEnvironmentMinValue returns the EnvironmentMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeInput) GetEnvironmentMinValue() int32 { + if o == nil || IsNil(o.EnvironmentMinValue.Get()) { + var ret int32 + return ret + } + return *o.EnvironmentMinValue.Get() +} + +// GetEnvironmentMinValueOk returns a tuple with the EnvironmentMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeInput) GetEnvironmentMinValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentMinValue.Get(), o.EnvironmentMinValue.IsSet() +} + +// HasEnvironmentMinValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeInput) HasEnvironmentMinValue() bool { + if o != nil && o.EnvironmentMinValue.IsSet() { + return true + } + + return false +} + +// SetEnvironmentMinValue gets a reference to the given NullableInt32 and assigns it to the EnvironmentMinValue field. +func (o *ResourceTypeLimitResourceTypeInput) SetEnvironmentMinValue(v int32) { + o.EnvironmentMinValue.Set(&v) +} + +// SetEnvironmentMinValueNil sets the value for EnvironmentMinValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) SetEnvironmentMinValueNil() { + o.EnvironmentMinValue.Set(nil) +} + +// UnsetEnvironmentMinValue ensures that no value is present for EnvironmentMinValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) UnsetEnvironmentMinValue() { + o.EnvironmentMinValue.Unset() +} + +// GetEnvironmentMaxValue returns the EnvironmentMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeInput) GetEnvironmentMaxValue() int32 { + if o == nil || IsNil(o.EnvironmentMaxValue.Get()) { + var ret int32 + return ret + } + return *o.EnvironmentMaxValue.Get() +} + +// GetEnvironmentMaxValueOk returns a tuple with the EnvironmentMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeInput) GetEnvironmentMaxValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentMaxValue.Get(), o.EnvironmentMaxValue.IsSet() +} + +// HasEnvironmentMaxValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeInput) HasEnvironmentMaxValue() bool { + if o != nil && o.EnvironmentMaxValue.IsSet() { + return true + } + + return false +} + +// SetEnvironmentMaxValue gets a reference to the given NullableInt32 and assigns it to the EnvironmentMaxValue field. +func (o *ResourceTypeLimitResourceTypeInput) SetEnvironmentMaxValue(v int32) { + o.EnvironmentMaxValue.Set(&v) +} + +// SetEnvironmentMaxValueNil sets the value for EnvironmentMaxValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) SetEnvironmentMaxValueNil() { + o.EnvironmentMaxValue.Set(nil) +} + +// UnsetEnvironmentMaxValue ensures that no value is present for EnvironmentMaxValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) UnsetEnvironmentMaxValue() { + o.EnvironmentMaxValue.Unset() +} + +// GetComponentMinValue returns the ComponentMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeInput) GetComponentMinValue() int32 { + if o == nil || IsNil(o.ComponentMinValue.Get()) { + var ret int32 + return ret + } + return *o.ComponentMinValue.Get() +} + +// GetComponentMinValueOk returns a tuple with the ComponentMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeInput) GetComponentMinValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ComponentMinValue.Get(), o.ComponentMinValue.IsSet() +} + +// HasComponentMinValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeInput) HasComponentMinValue() bool { + if o != nil && o.ComponentMinValue.IsSet() { + return true + } + + return false +} + +// SetComponentMinValue gets a reference to the given NullableInt32 and assigns it to the ComponentMinValue field. +func (o *ResourceTypeLimitResourceTypeInput) SetComponentMinValue(v int32) { + o.ComponentMinValue.Set(&v) +} + +// SetComponentMinValueNil sets the value for ComponentMinValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) SetComponentMinValueNil() { + o.ComponentMinValue.Set(nil) +} + +// UnsetComponentMinValue ensures that no value is present for ComponentMinValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) UnsetComponentMinValue() { + o.ComponentMinValue.Unset() +} + +// GetComponentMaxValue returns the ComponentMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeInput) GetComponentMaxValue() int32 { + if o == nil || IsNil(o.ComponentMaxValue.Get()) { + var ret int32 + return ret + } + return *o.ComponentMaxValue.Get() +} + +// GetComponentMaxValueOk returns a tuple with the ComponentMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeInput) GetComponentMaxValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ComponentMaxValue.Get(), o.ComponentMaxValue.IsSet() +} + +// HasComponentMaxValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeInput) HasComponentMaxValue() bool { + if o != nil && o.ComponentMaxValue.IsSet() { + return true + } + + return false +} + +// SetComponentMaxValue gets a reference to the given NullableInt32 and assigns it to the ComponentMaxValue field. +func (o *ResourceTypeLimitResourceTypeInput) SetComponentMaxValue(v int32) { + o.ComponentMaxValue.Set(&v) +} + +// SetComponentMaxValueNil sets the value for ComponentMaxValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) SetComponentMaxValueNil() { + o.ComponentMaxValue.Set(nil) +} + +// UnsetComponentMaxValue ensures that no value is present for ComponentMaxValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeInput) UnsetComponentMaxValue() { + o.ComponentMaxValue.Unset() +} + +func (o ResourceTypeLimitResourceTypeInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceTypeLimitResourceTypeInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ProjectMinValue.IsSet() { + toSerialize["projectMinValue"] = o.ProjectMinValue.Get() + } + if o.ProjectMaxValue.IsSet() { + toSerialize["projectMaxValue"] = o.ProjectMaxValue.Get() + } + if o.EnvironmentMinValue.IsSet() { + toSerialize["environmentMinValue"] = o.EnvironmentMinValue.Get() + } + if o.EnvironmentMaxValue.IsSet() { + toSerialize["environmentMaxValue"] = o.EnvironmentMaxValue.Get() + } + if o.ComponentMinValue.IsSet() { + toSerialize["componentMinValue"] = o.ComponentMinValue.Get() + } + if o.ComponentMaxValue.IsSet() { + toSerialize["componentMaxValue"] = o.ComponentMaxValue.Get() + } + return toSerialize, nil +} + +type NullableResourceTypeLimitResourceTypeInput struct { + value *ResourceTypeLimitResourceTypeInput + isSet bool +} + +func (v NullableResourceTypeLimitResourceTypeInput) Get() *ResourceTypeLimitResourceTypeInput { + return v.value +} + +func (v *NullableResourceTypeLimitResourceTypeInput) Set(val *ResourceTypeLimitResourceTypeInput) { + v.value = val + v.isSet = true +} + +func (v NullableResourceTypeLimitResourceTypeInput) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceTypeLimitResourceTypeInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceTypeLimitResourceTypeInput(val *ResourceTypeLimitResourceTypeInput) *NullableResourceTypeLimitResourceTypeInput { + return &NullableResourceTypeLimitResourceTypeInput{value: val, isSet: true} +} + +func (v NullableResourceTypeLimitResourceTypeInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceTypeLimitResourceTypeInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_resource_type_limit_resource_type_output.go b/pkg/api/rewardcloud/model_resource_type_limit_resource_type_output.go new file mode 100644 index 0000000..78b10cc --- /dev/null +++ b/pkg/api/rewardcloud/model_resource_type_limit_resource_type_output.go @@ -0,0 +1,370 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ResourceTypeLimitResourceTypeOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceTypeLimitResourceTypeOutput{} + +// ResourceTypeLimitResourceTypeOutput +type ResourceTypeLimitResourceTypeOutput struct { + ProjectMinValue NullableInt32 `json:"projectMinValue,omitempty"` + ProjectMaxValue NullableInt32 `json:"projectMaxValue,omitempty"` + EnvironmentMinValue NullableInt32 `json:"environmentMinValue,omitempty"` + EnvironmentMaxValue NullableInt32 `json:"environmentMaxValue,omitempty"` + ComponentMinValue NullableInt32 `json:"componentMinValue,omitempty"` + ComponentMaxValue NullableInt32 `json:"componentMaxValue,omitempty"` +} + +// NewResourceTypeLimitResourceTypeOutput instantiates a new ResourceTypeLimitResourceTypeOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceTypeLimitResourceTypeOutput() *ResourceTypeLimitResourceTypeOutput { + this := ResourceTypeLimitResourceTypeOutput{} + return &this +} + +// NewResourceTypeLimitResourceTypeOutputWithDefaults instantiates a new ResourceTypeLimitResourceTypeOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceTypeLimitResourceTypeOutputWithDefaults() *ResourceTypeLimitResourceTypeOutput { + this := ResourceTypeLimitResourceTypeOutput{} + return &this +} + +// GetProjectMinValue returns the ProjectMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeOutput) GetProjectMinValue() int32 { + if o == nil || IsNil(o.ProjectMinValue.Get()) { + var ret int32 + return ret + } + return *o.ProjectMinValue.Get() +} + +// GetProjectMinValueOk returns a tuple with the ProjectMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeOutput) GetProjectMinValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ProjectMinValue.Get(), o.ProjectMinValue.IsSet() +} + +// HasProjectMinValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeOutput) HasProjectMinValue() bool { + if o != nil && o.ProjectMinValue.IsSet() { + return true + } + + return false +} + +// SetProjectMinValue gets a reference to the given NullableInt32 and assigns it to the ProjectMinValue field. +func (o *ResourceTypeLimitResourceTypeOutput) SetProjectMinValue(v int32) { + o.ProjectMinValue.Set(&v) +} + +// SetProjectMinValueNil sets the value for ProjectMinValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) SetProjectMinValueNil() { + o.ProjectMinValue.Set(nil) +} + +// UnsetProjectMinValue ensures that no value is present for ProjectMinValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) UnsetProjectMinValue() { + o.ProjectMinValue.Unset() +} + +// GetProjectMaxValue returns the ProjectMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeOutput) GetProjectMaxValue() int32 { + if o == nil || IsNil(o.ProjectMaxValue.Get()) { + var ret int32 + return ret + } + return *o.ProjectMaxValue.Get() +} + +// GetProjectMaxValueOk returns a tuple with the ProjectMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeOutput) GetProjectMaxValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ProjectMaxValue.Get(), o.ProjectMaxValue.IsSet() +} + +// HasProjectMaxValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeOutput) HasProjectMaxValue() bool { + if o != nil && o.ProjectMaxValue.IsSet() { + return true + } + + return false +} + +// SetProjectMaxValue gets a reference to the given NullableInt32 and assigns it to the ProjectMaxValue field. +func (o *ResourceTypeLimitResourceTypeOutput) SetProjectMaxValue(v int32) { + o.ProjectMaxValue.Set(&v) +} + +// SetProjectMaxValueNil sets the value for ProjectMaxValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) SetProjectMaxValueNil() { + o.ProjectMaxValue.Set(nil) +} + +// UnsetProjectMaxValue ensures that no value is present for ProjectMaxValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) UnsetProjectMaxValue() { + o.ProjectMaxValue.Unset() +} + +// GetEnvironmentMinValue returns the EnvironmentMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeOutput) GetEnvironmentMinValue() int32 { + if o == nil || IsNil(o.EnvironmentMinValue.Get()) { + var ret int32 + return ret + } + return *o.EnvironmentMinValue.Get() +} + +// GetEnvironmentMinValueOk returns a tuple with the EnvironmentMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeOutput) GetEnvironmentMinValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentMinValue.Get(), o.EnvironmentMinValue.IsSet() +} + +// HasEnvironmentMinValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeOutput) HasEnvironmentMinValue() bool { + if o != nil && o.EnvironmentMinValue.IsSet() { + return true + } + + return false +} + +// SetEnvironmentMinValue gets a reference to the given NullableInt32 and assigns it to the EnvironmentMinValue field. +func (o *ResourceTypeLimitResourceTypeOutput) SetEnvironmentMinValue(v int32) { + o.EnvironmentMinValue.Set(&v) +} + +// SetEnvironmentMinValueNil sets the value for EnvironmentMinValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) SetEnvironmentMinValueNil() { + o.EnvironmentMinValue.Set(nil) +} + +// UnsetEnvironmentMinValue ensures that no value is present for EnvironmentMinValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) UnsetEnvironmentMinValue() { + o.EnvironmentMinValue.Unset() +} + +// GetEnvironmentMaxValue returns the EnvironmentMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeOutput) GetEnvironmentMaxValue() int32 { + if o == nil || IsNil(o.EnvironmentMaxValue.Get()) { + var ret int32 + return ret + } + return *o.EnvironmentMaxValue.Get() +} + +// GetEnvironmentMaxValueOk returns a tuple with the EnvironmentMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeOutput) GetEnvironmentMaxValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentMaxValue.Get(), o.EnvironmentMaxValue.IsSet() +} + +// HasEnvironmentMaxValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeOutput) HasEnvironmentMaxValue() bool { + if o != nil && o.EnvironmentMaxValue.IsSet() { + return true + } + + return false +} + +// SetEnvironmentMaxValue gets a reference to the given NullableInt32 and assigns it to the EnvironmentMaxValue field. +func (o *ResourceTypeLimitResourceTypeOutput) SetEnvironmentMaxValue(v int32) { + o.EnvironmentMaxValue.Set(&v) +} + +// SetEnvironmentMaxValueNil sets the value for EnvironmentMaxValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) SetEnvironmentMaxValueNil() { + o.EnvironmentMaxValue.Set(nil) +} + +// UnsetEnvironmentMaxValue ensures that no value is present for EnvironmentMaxValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) UnsetEnvironmentMaxValue() { + o.EnvironmentMaxValue.Unset() +} + +// GetComponentMinValue returns the ComponentMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeOutput) GetComponentMinValue() int32 { + if o == nil || IsNil(o.ComponentMinValue.Get()) { + var ret int32 + return ret + } + return *o.ComponentMinValue.Get() +} + +// GetComponentMinValueOk returns a tuple with the ComponentMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeOutput) GetComponentMinValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ComponentMinValue.Get(), o.ComponentMinValue.IsSet() +} + +// HasComponentMinValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeOutput) HasComponentMinValue() bool { + if o != nil && o.ComponentMinValue.IsSet() { + return true + } + + return false +} + +// SetComponentMinValue gets a reference to the given NullableInt32 and assigns it to the ComponentMinValue field. +func (o *ResourceTypeLimitResourceTypeOutput) SetComponentMinValue(v int32) { + o.ComponentMinValue.Set(&v) +} + +// SetComponentMinValueNil sets the value for ComponentMinValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) SetComponentMinValueNil() { + o.ComponentMinValue.Set(nil) +} + +// UnsetComponentMinValue ensures that no value is present for ComponentMinValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) UnsetComponentMinValue() { + o.ComponentMinValue.Unset() +} + +// GetComponentMaxValue returns the ComponentMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeLimitResourceTypeOutput) GetComponentMaxValue() int32 { + if o == nil || IsNil(o.ComponentMaxValue.Get()) { + var ret int32 + return ret + } + return *o.ComponentMaxValue.Get() +} + +// GetComponentMaxValueOk returns a tuple with the ComponentMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeLimitResourceTypeOutput) GetComponentMaxValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ComponentMaxValue.Get(), o.ComponentMaxValue.IsSet() +} + +// HasComponentMaxValue returns a boolean if a field has been set. +func (o *ResourceTypeLimitResourceTypeOutput) HasComponentMaxValue() bool { + if o != nil && o.ComponentMaxValue.IsSet() { + return true + } + + return false +} + +// SetComponentMaxValue gets a reference to the given NullableInt32 and assigns it to the ComponentMaxValue field. +func (o *ResourceTypeLimitResourceTypeOutput) SetComponentMaxValue(v int32) { + o.ComponentMaxValue.Set(&v) +} + +// SetComponentMaxValueNil sets the value for ComponentMaxValue to be an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) SetComponentMaxValueNil() { + o.ComponentMaxValue.Set(nil) +} + +// UnsetComponentMaxValue ensures that no value is present for ComponentMaxValue, not even an explicit nil +func (o *ResourceTypeLimitResourceTypeOutput) UnsetComponentMaxValue() { + o.ComponentMaxValue.Unset() +} + +func (o ResourceTypeLimitResourceTypeOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceTypeLimitResourceTypeOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ProjectMinValue.IsSet() { + toSerialize["projectMinValue"] = o.ProjectMinValue.Get() + } + if o.ProjectMaxValue.IsSet() { + toSerialize["projectMaxValue"] = o.ProjectMaxValue.Get() + } + if o.EnvironmentMinValue.IsSet() { + toSerialize["environmentMinValue"] = o.EnvironmentMinValue.Get() + } + if o.EnvironmentMaxValue.IsSet() { + toSerialize["environmentMaxValue"] = o.EnvironmentMaxValue.Get() + } + if o.ComponentMinValue.IsSet() { + toSerialize["componentMinValue"] = o.ComponentMinValue.Get() + } + if o.ComponentMaxValue.IsSet() { + toSerialize["componentMaxValue"] = o.ComponentMaxValue.Get() + } + return toSerialize, nil +} + +type NullableResourceTypeLimitResourceTypeOutput struct { + value *ResourceTypeLimitResourceTypeOutput + isSet bool +} + +func (v NullableResourceTypeLimitResourceTypeOutput) Get() *ResourceTypeLimitResourceTypeOutput { + return v.value +} + +func (v *NullableResourceTypeLimitResourceTypeOutput) Set(val *ResourceTypeLimitResourceTypeOutput) { + v.value = val + v.isSet = true +} + +func (v NullableResourceTypeLimitResourceTypeOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceTypeLimitResourceTypeOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceTypeLimitResourceTypeOutput(val *ResourceTypeLimitResourceTypeOutput) *NullableResourceTypeLimitResourceTypeOutput { + return &NullableResourceTypeLimitResourceTypeOutput{value: val, isSet: true} +} + +func (v NullableResourceTypeLimitResourceTypeOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceTypeLimitResourceTypeOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_resource_type_resource_type_input.go b/pkg/api/rewardcloud/model_resource_type_resource_type_input.go new file mode 100644 index 0000000..8daae8d --- /dev/null +++ b/pkg/api/rewardcloud/model_resource_type_resource_type_input.go @@ -0,0 +1,182 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ResourceTypeResourceTypeInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceTypeResourceTypeInput{} + +// ResourceTypeResourceTypeInput Class ResourceType +type ResourceTypeResourceTypeInput struct { + Name NullableString `json:"name,omitempty"` + ResourceTypeLimit NullableResourceTypeLimitResourceTypeInput `json:"resourceTypeLimit,omitempty"` +} + +// NewResourceTypeResourceTypeInput instantiates a new ResourceTypeResourceTypeInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceTypeResourceTypeInput() *ResourceTypeResourceTypeInput { + this := ResourceTypeResourceTypeInput{} + return &this +} + +// NewResourceTypeResourceTypeInputWithDefaults instantiates a new ResourceTypeResourceTypeInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceTypeResourceTypeInputWithDefaults() *ResourceTypeResourceTypeInput { + this := ResourceTypeResourceTypeInput{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeResourceTypeInput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeResourceTypeInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *ResourceTypeResourceTypeInput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *ResourceTypeResourceTypeInput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *ResourceTypeResourceTypeInput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *ResourceTypeResourceTypeInput) UnsetName() { + o.Name.Unset() +} + +// GetResourceTypeLimit returns the ResourceTypeLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeResourceTypeInput) GetResourceTypeLimit() ResourceTypeLimitResourceTypeInput { + if o == nil || IsNil(o.ResourceTypeLimit.Get()) { + var ret ResourceTypeLimitResourceTypeInput + return ret + } + return *o.ResourceTypeLimit.Get() +} + +// GetResourceTypeLimitOk returns a tuple with the ResourceTypeLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeResourceTypeInput) GetResourceTypeLimitOk() (*ResourceTypeLimitResourceTypeInput, bool) { + if o == nil { + return nil, false + } + return o.ResourceTypeLimit.Get(), o.ResourceTypeLimit.IsSet() +} + +// HasResourceTypeLimit returns a boolean if a field has been set. +func (o *ResourceTypeResourceTypeInput) HasResourceTypeLimit() bool { + if o != nil && o.ResourceTypeLimit.IsSet() { + return true + } + + return false +} + +// SetResourceTypeLimit gets a reference to the given NullableResourceTypeLimitResourceTypeInput and assigns it to the ResourceTypeLimit field. +func (o *ResourceTypeResourceTypeInput) SetResourceTypeLimit(v ResourceTypeLimitResourceTypeInput) { + o.ResourceTypeLimit.Set(&v) +} + +// SetResourceTypeLimitNil sets the value for ResourceTypeLimit to be an explicit nil +func (o *ResourceTypeResourceTypeInput) SetResourceTypeLimitNil() { + o.ResourceTypeLimit.Set(nil) +} + +// UnsetResourceTypeLimit ensures that no value is present for ResourceTypeLimit, not even an explicit nil +func (o *ResourceTypeResourceTypeInput) UnsetResourceTypeLimit() { + o.ResourceTypeLimit.Unset() +} + +func (o ResourceTypeResourceTypeInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceTypeResourceTypeInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.ResourceTypeLimit.IsSet() { + toSerialize["resourceTypeLimit"] = o.ResourceTypeLimit.Get() + } + return toSerialize, nil +} + +type NullableResourceTypeResourceTypeInput struct { + value *ResourceTypeResourceTypeInput + isSet bool +} + +func (v NullableResourceTypeResourceTypeInput) Get() *ResourceTypeResourceTypeInput { + return v.value +} + +func (v *NullableResourceTypeResourceTypeInput) Set(val *ResourceTypeResourceTypeInput) { + v.value = val + v.isSet = true +} + +func (v NullableResourceTypeResourceTypeInput) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceTypeResourceTypeInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceTypeResourceTypeInput(val *ResourceTypeResourceTypeInput) *NullableResourceTypeResourceTypeInput { + return &NullableResourceTypeResourceTypeInput{value: val, isSet: true} +} + +func (v NullableResourceTypeResourceTypeInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceTypeResourceTypeInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_resource_type_resource_type_output.go b/pkg/api/rewardcloud/model_resource_type_resource_type_output.go new file mode 100644 index 0000000..4139704 --- /dev/null +++ b/pkg/api/rewardcloud/model_resource_type_resource_type_output.go @@ -0,0 +1,182 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ResourceTypeResourceTypeOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceTypeResourceTypeOutput{} + +// ResourceTypeResourceTypeOutput Class ResourceType +type ResourceTypeResourceTypeOutput struct { + Name NullableString `json:"name,omitempty"` + ResourceTypeLimit NullableResourceTypeLimitResourceTypeOutput `json:"resourceTypeLimit,omitempty"` +} + +// NewResourceTypeResourceTypeOutput instantiates a new ResourceTypeResourceTypeOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceTypeResourceTypeOutput() *ResourceTypeResourceTypeOutput { + this := ResourceTypeResourceTypeOutput{} + return &this +} + +// NewResourceTypeResourceTypeOutputWithDefaults instantiates a new ResourceTypeResourceTypeOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceTypeResourceTypeOutputWithDefaults() *ResourceTypeResourceTypeOutput { + this := ResourceTypeResourceTypeOutput{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeResourceTypeOutput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeResourceTypeOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *ResourceTypeResourceTypeOutput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *ResourceTypeResourceTypeOutput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *ResourceTypeResourceTypeOutput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *ResourceTypeResourceTypeOutput) UnsetName() { + o.Name.Unset() +} + +// GetResourceTypeLimit returns the ResourceTypeLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResourceTypeResourceTypeOutput) GetResourceTypeLimit() ResourceTypeLimitResourceTypeOutput { + if o == nil || IsNil(o.ResourceTypeLimit.Get()) { + var ret ResourceTypeLimitResourceTypeOutput + return ret + } + return *o.ResourceTypeLimit.Get() +} + +// GetResourceTypeLimitOk returns a tuple with the ResourceTypeLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResourceTypeResourceTypeOutput) GetResourceTypeLimitOk() (*ResourceTypeLimitResourceTypeOutput, bool) { + if o == nil { + return nil, false + } + return o.ResourceTypeLimit.Get(), o.ResourceTypeLimit.IsSet() +} + +// HasResourceTypeLimit returns a boolean if a field has been set. +func (o *ResourceTypeResourceTypeOutput) HasResourceTypeLimit() bool { + if o != nil && o.ResourceTypeLimit.IsSet() { + return true + } + + return false +} + +// SetResourceTypeLimit gets a reference to the given NullableResourceTypeLimitResourceTypeOutput and assigns it to the ResourceTypeLimit field. +func (o *ResourceTypeResourceTypeOutput) SetResourceTypeLimit(v ResourceTypeLimitResourceTypeOutput) { + o.ResourceTypeLimit.Set(&v) +} + +// SetResourceTypeLimitNil sets the value for ResourceTypeLimit to be an explicit nil +func (o *ResourceTypeResourceTypeOutput) SetResourceTypeLimitNil() { + o.ResourceTypeLimit.Set(nil) +} + +// UnsetResourceTypeLimit ensures that no value is present for ResourceTypeLimit, not even an explicit nil +func (o *ResourceTypeResourceTypeOutput) UnsetResourceTypeLimit() { + o.ResourceTypeLimit.Unset() +} + +func (o ResourceTypeResourceTypeOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceTypeResourceTypeOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.ResourceTypeLimit.IsSet() { + toSerialize["resourceTypeLimit"] = o.ResourceTypeLimit.Get() + } + return toSerialize, nil +} + +type NullableResourceTypeResourceTypeOutput struct { + value *ResourceTypeResourceTypeOutput + isSet bool +} + +func (v NullableResourceTypeResourceTypeOutput) Get() *ResourceTypeResourceTypeOutput { + return v.value +} + +func (v *NullableResourceTypeResourceTypeOutput) Set(val *ResourceTypeResourceTypeOutput) { + v.value = val + v.isSet = true +} + +func (v NullableResourceTypeResourceTypeOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceTypeResourceTypeOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceTypeResourceTypeOutput(val *ResourceTypeResourceTypeOutput) *NullableResourceTypeResourceTypeOutput { + return &NullableResourceTypeResourceTypeOutput{value: val, isSet: true} +} + +func (v NullableResourceTypeResourceTypeOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceTypeResourceTypeOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_role_group.go b/pkg/api/rewardcloud/model_role_group.go new file mode 100644 index 0000000..b872f80 --- /dev/null +++ b/pkg/api/rewardcloud/model_role_group.go @@ -0,0 +1,446 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the RoleGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RoleGroup{} + +// RoleGroup Class RoleGroup +type RoleGroup struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name *string `json:"name,omitempty"` + Roles []string `json:"roles,omitempty"` + Users []string `json:"users,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewRoleGroup instantiates a new RoleGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRoleGroup() *RoleGroup { + this := RoleGroup{} + return &this +} + +// NewRoleGroupWithDefaults instantiates a new RoleGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRoleGroupWithDefaults() *RoleGroup { + this := RoleGroup{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RoleGroup) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoleGroup) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RoleGroup) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *RoleGroup) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RoleGroup) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RoleGroup) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *RoleGroup) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *RoleGroup) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *RoleGroup) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *RoleGroup) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RoleGroup) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoleGroup) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RoleGroup) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RoleGroup) SetName(v string) { + o.Name = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *RoleGroup) GetRoles() []string { + if o == nil || IsNil(o.Roles) { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoleGroup) GetRolesOk() ([]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *RoleGroup) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *RoleGroup) SetRoles(v []string) { + o.Roles = v +} + +// GetUsers returns the Users field value if set, zero value otherwise. +func (o *RoleGroup) GetUsers() []string { + if o == nil || IsNil(o.Users) { + var ret []string + return ret + } + return o.Users +} + +// GetUsersOk returns a tuple with the Users field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoleGroup) GetUsersOk() ([]string, bool) { + if o == nil || IsNil(o.Users) { + return nil, false + } + return o.Users, true +} + +// HasUsers returns a boolean if a field has been set. +func (o *RoleGroup) HasUsers() bool { + if o != nil && !IsNil(o.Users) { + return true + } + + return false +} + +// SetUsers gets a reference to the given []string and assigns it to the Users field. +func (o *RoleGroup) SetUsers(v []string) { + o.Users = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RoleGroup) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RoleGroup) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *RoleGroup) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *RoleGroup) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *RoleGroup) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *RoleGroup) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RoleGroup) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RoleGroup) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *RoleGroup) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *RoleGroup) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *RoleGroup) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *RoleGroup) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *RoleGroup) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoleGroup) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *RoleGroup) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *RoleGroup) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *RoleGroup) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoleGroup) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *RoleGroup) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *RoleGroup) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o RoleGroup) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RoleGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Users) { + toSerialize["users"] = o.Users + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableRoleGroup struct { + value *RoleGroup + isSet bool +} + +func (v NullableRoleGroup) Get() *RoleGroup { + return v.value +} + +func (v *NullableRoleGroup) Set(val *RoleGroup) { + v.value = val + v.isSet = true +} + +func (v NullableRoleGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableRoleGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRoleGroup(val *RoleGroup) *NullableRoleGroup { + return &NullableRoleGroup{value: val, isSet: true} +} + +func (v NullableRoleGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRoleGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_state.go b/pkg/api/rewardcloud/model_state.go new file mode 100644 index 0000000..1e46960 --- /dev/null +++ b/pkg/api/rewardcloud/model_state.go @@ -0,0 +1,540 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the State type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &State{} + +// State Class State +type State struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + SeqNumber NullableInt32 `json:"seqNumber,omitempty"` + Project []string `json:"project,omitempty"` + Environment []string `json:"environment,omitempty"` + ImportedData []string `json:"importedData,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewState instantiates a new State object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewState() *State { + this := State{} + return &this +} + +// NewStateWithDefaults instantiates a new State object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStateWithDefaults() *State { + this := State{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *State) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *State) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *State) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *State) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *State) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *State) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *State) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *State) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *State) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *State) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *State) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *State) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *State) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *State) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *State) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *State) UnsetName() { + o.Name.Unset() +} + +// GetSeqNumber returns the SeqNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *State) GetSeqNumber() int32 { + if o == nil || IsNil(o.SeqNumber.Get()) { + var ret int32 + return ret + } + return *o.SeqNumber.Get() +} + +// GetSeqNumberOk returns a tuple with the SeqNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *State) GetSeqNumberOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.SeqNumber.Get(), o.SeqNumber.IsSet() +} + +// HasSeqNumber returns a boolean if a field has been set. +func (o *State) HasSeqNumber() bool { + if o != nil && o.SeqNumber.IsSet() { + return true + } + + return false +} + +// SetSeqNumber gets a reference to the given NullableInt32 and assigns it to the SeqNumber field. +func (o *State) SetSeqNumber(v int32) { + o.SeqNumber.Set(&v) +} + +// SetSeqNumberNil sets the value for SeqNumber to be an explicit nil +func (o *State) SetSeqNumberNil() { + o.SeqNumber.Set(nil) +} + +// UnsetSeqNumber ensures that no value is present for SeqNumber, not even an explicit nil +func (o *State) UnsetSeqNumber() { + o.SeqNumber.Unset() +} + +// GetProject returns the Project field value if set, zero value otherwise. +func (o *State) GetProject() []string { + if o == nil || IsNil(o.Project) { + var ret []string + return ret + } + return o.Project +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *State) GetProjectOk() ([]string, bool) { + if o == nil || IsNil(o.Project) { + return nil, false + } + return o.Project, true +} + +// HasProject returns a boolean if a field has been set. +func (o *State) HasProject() bool { + if o != nil && !IsNil(o.Project) { + return true + } + + return false +} + +// SetProject gets a reference to the given []string and assigns it to the Project field. +func (o *State) SetProject(v []string) { + o.Project = v +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise. +func (o *State) GetEnvironment() []string { + if o == nil || IsNil(o.Environment) { + var ret []string + return ret + } + return o.Environment +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *State) GetEnvironmentOk() ([]string, bool) { + if o == nil || IsNil(o.Environment) { + return nil, false + } + return o.Environment, true +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *State) HasEnvironment() bool { + if o != nil && !IsNil(o.Environment) { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given []string and assigns it to the Environment field. +func (o *State) SetEnvironment(v []string) { + o.Environment = v +} + +// GetImportedData returns the ImportedData field value if set, zero value otherwise. +func (o *State) GetImportedData() []string { + if o == nil || IsNil(o.ImportedData) { + var ret []string + return ret + } + return o.ImportedData +} + +// GetImportedDataOk returns a tuple with the ImportedData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *State) GetImportedDataOk() ([]string, bool) { + if o == nil || IsNil(o.ImportedData) { + return nil, false + } + return o.ImportedData, true +} + +// HasImportedData returns a boolean if a field has been set. +func (o *State) HasImportedData() bool { + if o != nil && !IsNil(o.ImportedData) { + return true + } + + return false +} + +// SetImportedData gets a reference to the given []string and assigns it to the ImportedData field. +func (o *State) SetImportedData(v []string) { + o.ImportedData = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *State) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *State) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *State) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *State) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *State) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *State) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *State) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *State) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *State) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *State) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *State) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *State) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *State) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *State) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *State) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *State) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *State) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *State) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *State) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *State) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o State) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o State) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.SeqNumber.IsSet() { + toSerialize["seqNumber"] = o.SeqNumber.Get() + } + if !IsNil(o.Project) { + toSerialize["project"] = o.Project + } + if !IsNil(o.Environment) { + toSerialize["environment"] = o.Environment + } + if !IsNil(o.ImportedData) { + toSerialize["importedData"] = o.ImportedData + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableState struct { + value *State + isSet bool +} + +func (v NullableState) Get() *State { + return v.value +} + +func (v *NullableState) Set(val *State) { + v.value = val + v.isSet = true +} + +func (v NullableState) IsSet() bool { + return v.isSet +} + +func (v *NullableState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableState(val *State) *NullableState { + return &NullableState{value: val, isSet: true} +} + +func (v NullableState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_state_by_infra.go b/pkg/api/rewardcloud/model_state_by_infra.go new file mode 100644 index 0000000..e9ea8a8 --- /dev/null +++ b/pkg/api/rewardcloud/model_state_by_infra.go @@ -0,0 +1,761 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the StateByInfra type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StateByInfra{} + +// StateByInfra Class StateByInfra +type StateByInfra struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Status NullableString `json:"status,omitempty"` + StatusCode NullableInt32 `json:"statusCode,omitempty"` + Message NullableString `json:"message,omitempty"` + MessageInfo NullableString `json:"messageInfo,omitempty"` + LastInfraEventAt NullableString `json:"lastInfraEventAt,omitempty"` + Organisation NullableString `json:"organisation,omitempty"` + Team NullableString `json:"team,omitempty"` + Project NullableString `json:"project,omitempty"` + Environment NullableString `json:"environment,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewStateByInfra instantiates a new StateByInfra object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStateByInfra() *StateByInfra { + this := StateByInfra{} + return &this +} + +// NewStateByInfraWithDefaults instantiates a new StateByInfra object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStateByInfraWithDefaults() *StateByInfra { + this := StateByInfra{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *StateByInfra) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StateByInfra) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *StateByInfra) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *StateByInfra) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *StateByInfra) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *StateByInfra) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *StateByInfra) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *StateByInfra) UnsetUuid() { + o.Uuid.Unset() +} + +// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetStatus() string { + if o == nil || IsNil(o.Status.Get()) { + var ret string + return ret + } + return *o.Status.Get() +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status.Get(), o.Status.IsSet() +} + +// HasStatus returns a boolean if a field has been set. +func (o *StateByInfra) HasStatus() bool { + if o != nil && o.Status.IsSet() { + return true + } + + return false +} + +// SetStatus gets a reference to the given NullableString and assigns it to the Status field. +func (o *StateByInfra) SetStatus(v string) { + o.Status.Set(&v) +} + +// SetStatusNil sets the value for Status to be an explicit nil +func (o *StateByInfra) SetStatusNil() { + o.Status.Set(nil) +} + +// UnsetStatus ensures that no value is present for Status, not even an explicit nil +func (o *StateByInfra) UnsetStatus() { + o.Status.Unset() +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode.Get()) { + var ret int32 + return ret + } + return *o.StatusCode.Get() +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetStatusCodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.StatusCode.Get(), o.StatusCode.IsSet() +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *StateByInfra) HasStatusCode() bool { + if o != nil && o.StatusCode.IsSet() { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given NullableInt32 and assigns it to the StatusCode field. +func (o *StateByInfra) SetStatusCode(v int32) { + o.StatusCode.Set(&v) +} + +// SetStatusCodeNil sets the value for StatusCode to be an explicit nil +func (o *StateByInfra) SetStatusCodeNil() { + o.StatusCode.Set(nil) +} + +// UnsetStatusCode ensures that no value is present for StatusCode, not even an explicit nil +func (o *StateByInfra) UnsetStatusCode() { + o.StatusCode.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *StateByInfra) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *StateByInfra) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *StateByInfra) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *StateByInfra) UnsetMessage() { + o.Message.Unset() +} + +// GetMessageInfo returns the MessageInfo field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetMessageInfo() string { + if o == nil || IsNil(o.MessageInfo.Get()) { + var ret string + return ret + } + return *o.MessageInfo.Get() +} + +// GetMessageInfoOk returns a tuple with the MessageInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetMessageInfoOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MessageInfo.Get(), o.MessageInfo.IsSet() +} + +// HasMessageInfo returns a boolean if a field has been set. +func (o *StateByInfra) HasMessageInfo() bool { + if o != nil && o.MessageInfo.IsSet() { + return true + } + + return false +} + +// SetMessageInfo gets a reference to the given NullableString and assigns it to the MessageInfo field. +func (o *StateByInfra) SetMessageInfo(v string) { + o.MessageInfo.Set(&v) +} + +// SetMessageInfoNil sets the value for MessageInfo to be an explicit nil +func (o *StateByInfra) SetMessageInfoNil() { + o.MessageInfo.Set(nil) +} + +// UnsetMessageInfo ensures that no value is present for MessageInfo, not even an explicit nil +func (o *StateByInfra) UnsetMessageInfo() { + o.MessageInfo.Unset() +} + +// GetLastInfraEventAt returns the LastInfraEventAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetLastInfraEventAt() string { + if o == nil || IsNil(o.LastInfraEventAt.Get()) { + var ret string + return ret + } + return *o.LastInfraEventAt.Get() +} + +// GetLastInfraEventAtOk returns a tuple with the LastInfraEventAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetLastInfraEventAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastInfraEventAt.Get(), o.LastInfraEventAt.IsSet() +} + +// HasLastInfraEventAt returns a boolean if a field has been set. +func (o *StateByInfra) HasLastInfraEventAt() bool { + if o != nil && o.LastInfraEventAt.IsSet() { + return true + } + + return false +} + +// SetLastInfraEventAt gets a reference to the given NullableString and assigns it to the LastInfraEventAt field. +func (o *StateByInfra) SetLastInfraEventAt(v string) { + o.LastInfraEventAt.Set(&v) +} + +// SetLastInfraEventAtNil sets the value for LastInfraEventAt to be an explicit nil +func (o *StateByInfra) SetLastInfraEventAtNil() { + o.LastInfraEventAt.Set(nil) +} + +// UnsetLastInfraEventAt ensures that no value is present for LastInfraEventAt, not even an explicit nil +func (o *StateByInfra) UnsetLastInfraEventAt() { + o.LastInfraEventAt.Unset() +} + +// GetOrganisation returns the Organisation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetOrganisation() string { + if o == nil || IsNil(o.Organisation.Get()) { + var ret string + return ret + } + return *o.Organisation.Get() +} + +// GetOrganisationOk returns a tuple with the Organisation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetOrganisationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Organisation.Get(), o.Organisation.IsSet() +} + +// HasOrganisation returns a boolean if a field has been set. +func (o *StateByInfra) HasOrganisation() bool { + if o != nil && o.Organisation.IsSet() { + return true + } + + return false +} + +// SetOrganisation gets a reference to the given NullableString and assigns it to the Organisation field. +func (o *StateByInfra) SetOrganisation(v string) { + o.Organisation.Set(&v) +} + +// SetOrganisationNil sets the value for Organisation to be an explicit nil +func (o *StateByInfra) SetOrganisationNil() { + o.Organisation.Set(nil) +} + +// UnsetOrganisation ensures that no value is present for Organisation, not even an explicit nil +func (o *StateByInfra) UnsetOrganisation() { + o.Organisation.Unset() +} + +// GetTeam returns the Team field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetTeam() string { + if o == nil || IsNil(o.Team.Get()) { + var ret string + return ret + } + return *o.Team.Get() +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetTeamOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Team.Get(), o.Team.IsSet() +} + +// HasTeam returns a boolean if a field has been set. +func (o *StateByInfra) HasTeam() bool { + if o != nil && o.Team.IsSet() { + return true + } + + return false +} + +// SetTeam gets a reference to the given NullableString and assigns it to the Team field. +func (o *StateByInfra) SetTeam(v string) { + o.Team.Set(&v) +} + +// SetTeamNil sets the value for Team to be an explicit nil +func (o *StateByInfra) SetTeamNil() { + o.Team.Set(nil) +} + +// UnsetTeam ensures that no value is present for Team, not even an explicit nil +func (o *StateByInfra) UnsetTeam() { + o.Team.Unset() +} + +// GetProject returns the Project field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetProject() string { + if o == nil || IsNil(o.Project.Get()) { + var ret string + return ret + } + return *o.Project.Get() +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Project.Get(), o.Project.IsSet() +} + +// HasProject returns a boolean if a field has been set. +func (o *StateByInfra) HasProject() bool { + if o != nil && o.Project.IsSet() { + return true + } + + return false +} + +// SetProject gets a reference to the given NullableString and assigns it to the Project field. +func (o *StateByInfra) SetProject(v string) { + o.Project.Set(&v) +} + +// SetProjectNil sets the value for Project to be an explicit nil +func (o *StateByInfra) SetProjectNil() { + o.Project.Set(nil) +} + +// UnsetProject ensures that no value is present for Project, not even an explicit nil +func (o *StateByInfra) UnsetProject() { + o.Project.Unset() +} + +// GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetEnvironment() string { + if o == nil || IsNil(o.Environment.Get()) { + var ret string + return ret + } + return *o.Environment.Get() +} + +// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Environment.Get(), o.Environment.IsSet() +} + +// HasEnvironment returns a boolean if a field has been set. +func (o *StateByInfra) HasEnvironment() bool { + if o != nil && o.Environment.IsSet() { + return true + } + + return false +} + +// SetEnvironment gets a reference to the given NullableString and assigns it to the Environment field. +func (o *StateByInfra) SetEnvironment(v string) { + o.Environment.Set(&v) +} + +// SetEnvironmentNil sets the value for Environment to be an explicit nil +func (o *StateByInfra) SetEnvironmentNil() { + o.Environment.Set(nil) +} + +// UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil +func (o *StateByInfra) UnsetEnvironment() { + o.Environment.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *StateByInfra) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *StateByInfra) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *StateByInfra) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *StateByInfra) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StateByInfra) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StateByInfra) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *StateByInfra) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *StateByInfra) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *StateByInfra) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *StateByInfra) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *StateByInfra) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StateByInfra) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *StateByInfra) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *StateByInfra) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *StateByInfra) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StateByInfra) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *StateByInfra) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *StateByInfra) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o StateByInfra) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StateByInfra) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Status.IsSet() { + toSerialize["status"] = o.Status.Get() + } + if o.StatusCode.IsSet() { + toSerialize["statusCode"] = o.StatusCode.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.MessageInfo.IsSet() { + toSerialize["messageInfo"] = o.MessageInfo.Get() + } + if o.LastInfraEventAt.IsSet() { + toSerialize["lastInfraEventAt"] = o.LastInfraEventAt.Get() + } + if o.Organisation.IsSet() { + toSerialize["organisation"] = o.Organisation.Get() + } + if o.Team.IsSet() { + toSerialize["team"] = o.Team.Get() + } + if o.Project.IsSet() { + toSerialize["project"] = o.Project.Get() + } + if o.Environment.IsSet() { + toSerialize["environment"] = o.Environment.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableStateByInfra struct { + value *StateByInfra + isSet bool +} + +func (v NullableStateByInfra) Get() *StateByInfra { + return v.value +} + +func (v *NullableStateByInfra) Set(val *StateByInfra) { + v.value = val + v.isSet = true +} + +func (v NullableStateByInfra) IsSet() bool { + return v.isSet +} + +func (v *NullableStateByInfra) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStateByInfra(val *StateByInfra) *NullableStateByInfra { + return &NullableStateByInfra{value: val, isSet: true} +} + +func (v NullableStateByInfra) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStateByInfra) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_team_env_var.go b/pkg/api/rewardcloud/model_team_env_var.go new file mode 100644 index 0000000..f0e9db0 --- /dev/null +++ b/pkg/api/rewardcloud/model_team_env_var.go @@ -0,0 +1,620 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the TeamEnvVar type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TeamEnvVar{} + +// TeamEnvVar Class TeamEnvVar +type TeamEnvVar struct { + Team NullableString `json:"team,omitempty"` + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` + RawValue NullableString `json:"rawValue,omitempty"` +} + +// NewTeamEnvVar instantiates a new TeamEnvVar object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTeamEnvVar() *TeamEnvVar { + this := TeamEnvVar{} + return &this +} + +// NewTeamEnvVarWithDefaults instantiates a new TeamEnvVar object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTeamEnvVarWithDefaults() *TeamEnvVar { + this := TeamEnvVar{} + return &this +} + +// GetTeam returns the Team field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVar) GetTeam() string { + if o == nil || IsNil(o.Team.Get()) { + var ret string + return ret + } + return *o.Team.Get() +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVar) GetTeamOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Team.Get(), o.Team.IsSet() +} + +// HasTeam returns a boolean if a field has been set. +func (o *TeamEnvVar) HasTeam() bool { + if o != nil && o.Team.IsSet() { + return true + } + + return false +} + +// SetTeam gets a reference to the given NullableString and assigns it to the Team field. +func (o *TeamEnvVar) SetTeam(v string) { + o.Team.Set(&v) +} + +// SetTeamNil sets the value for Team to be an explicit nil +func (o *TeamEnvVar) SetTeamNil() { + o.Team.Set(nil) +} + +// UnsetTeam ensures that no value is present for Team, not even an explicit nil +func (o *TeamEnvVar) UnsetTeam() { + o.Team.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TeamEnvVar) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamEnvVar) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TeamEnvVar) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *TeamEnvVar) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVar) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVar) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *TeamEnvVar) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *TeamEnvVar) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *TeamEnvVar) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *TeamEnvVar) UnsetUuid() { + o.Uuid.Unset() +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVar) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVar) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *TeamEnvVar) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *TeamEnvVar) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *TeamEnvVar) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *TeamEnvVar) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVar) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVar) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *TeamEnvVar) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *TeamEnvVar) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *TeamEnvVar) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *TeamEnvVar) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVar) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVar) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *TeamEnvVar) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *TeamEnvVar) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *TeamEnvVar) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *TeamEnvVar) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVar) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVar) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *TeamEnvVar) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *TeamEnvVar) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *TeamEnvVar) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *TeamEnvVar) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVar) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVar) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *TeamEnvVar) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *TeamEnvVar) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *TeamEnvVar) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *TeamEnvVar) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TeamEnvVar) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamEnvVar) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TeamEnvVar) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *TeamEnvVar) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *TeamEnvVar) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamEnvVar) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *TeamEnvVar) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *TeamEnvVar) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVar) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVar) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *TeamEnvVar) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *TeamEnvVar) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *TeamEnvVar) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *TeamEnvVar) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +// GetRawValue returns the RawValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVar) GetRawValue() string { + if o == nil || IsNil(o.RawValue.Get()) { + var ret string + return ret + } + return *o.RawValue.Get() +} + +// GetRawValueOk returns a tuple with the RawValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVar) GetRawValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RawValue.Get(), o.RawValue.IsSet() +} + +// HasRawValue returns a boolean if a field has been set. +func (o *TeamEnvVar) HasRawValue() bool { + if o != nil && o.RawValue.IsSet() { + return true + } + + return false +} + +// SetRawValue gets a reference to the given NullableString and assigns it to the RawValue field. +func (o *TeamEnvVar) SetRawValue(v string) { + o.RawValue.Set(&v) +} + +// SetRawValueNil sets the value for RawValue to be an explicit nil +func (o *TeamEnvVar) SetRawValueNil() { + o.RawValue.Set(nil) +} + +// UnsetRawValue ensures that no value is present for RawValue, not even an explicit nil +func (o *TeamEnvVar) UnsetRawValue() { + o.RawValue.Unset() +} + +func (o TeamEnvVar) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TeamEnvVar) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Team.IsSet() { + toSerialize["team"] = o.Team.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + if o.RawValue.IsSet() { + toSerialize["rawValue"] = o.RawValue.Get() + } + return toSerialize, nil +} + +type NullableTeamEnvVar struct { + value *TeamEnvVar + isSet bool +} + +func (v NullableTeamEnvVar) Get() *TeamEnvVar { + return v.value +} + +func (v *NullableTeamEnvVar) Set(val *TeamEnvVar) { + v.value = val + v.isSet = true +} + +func (v NullableTeamEnvVar) IsSet() bool { + return v.isSet +} + +func (v *NullableTeamEnvVar) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTeamEnvVar(val *TeamEnvVar) *NullableTeamEnvVar { + return &NullableTeamEnvVar{value: val, isSet: true} +} + +func (v NullableTeamEnvVar) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTeamEnvVar) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_team_env_var_team_input.go b/pkg/api/rewardcloud/model_team_env_var_team_input.go new file mode 100644 index 0000000..ec1b791 --- /dev/null +++ b/pkg/api/rewardcloud/model_team_env_var_team_input.go @@ -0,0 +1,276 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the TeamEnvVarTeamInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TeamEnvVarTeamInput{} + +// TeamEnvVarTeamInput Class TeamEnvVar +type TeamEnvVarTeamInput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewTeamEnvVarTeamInput instantiates a new TeamEnvVarTeamInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTeamEnvVarTeamInput() *TeamEnvVarTeamInput { + this := TeamEnvVarTeamInput{} + return &this +} + +// NewTeamEnvVarTeamInputWithDefaults instantiates a new TeamEnvVarTeamInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTeamEnvVarTeamInputWithDefaults() *TeamEnvVarTeamInput { + this := TeamEnvVarTeamInput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVarTeamInput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVarTeamInput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *TeamEnvVarTeamInput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *TeamEnvVarTeamInput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *TeamEnvVarTeamInput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *TeamEnvVarTeamInput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVarTeamInput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVarTeamInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *TeamEnvVarTeamInput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *TeamEnvVarTeamInput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *TeamEnvVarTeamInput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *TeamEnvVarTeamInput) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVarTeamInput) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVarTeamInput) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *TeamEnvVarTeamInput) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *TeamEnvVarTeamInput) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *TeamEnvVarTeamInput) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *TeamEnvVarTeamInput) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVarTeamInput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVarTeamInput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *TeamEnvVarTeamInput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *TeamEnvVarTeamInput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *TeamEnvVarTeamInput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *TeamEnvVarTeamInput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o TeamEnvVarTeamInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TeamEnvVarTeamInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableTeamEnvVarTeamInput struct { + value *TeamEnvVarTeamInput + isSet bool +} + +func (v NullableTeamEnvVarTeamInput) Get() *TeamEnvVarTeamInput { + return v.value +} + +func (v *NullableTeamEnvVarTeamInput) Set(val *TeamEnvVarTeamInput) { + v.value = val + v.isSet = true +} + +func (v NullableTeamEnvVarTeamInput) IsSet() bool { + return v.isSet +} + +func (v *NullableTeamEnvVarTeamInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTeamEnvVarTeamInput(val *TeamEnvVarTeamInput) *NullableTeamEnvVarTeamInput { + return &NullableTeamEnvVarTeamInput{value: val, isSet: true} +} + +func (v NullableTeamEnvVarTeamInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTeamEnvVarTeamInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_team_env_var_team_output.go b/pkg/api/rewardcloud/model_team_env_var_team_output.go new file mode 100644 index 0000000..3f50a2b --- /dev/null +++ b/pkg/api/rewardcloud/model_team_env_var_team_output.go @@ -0,0 +1,276 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the TeamEnvVarTeamOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TeamEnvVarTeamOutput{} + +// TeamEnvVarTeamOutput +type TeamEnvVarTeamOutput struct { + Key NullableString `json:"key,omitempty"` + Value NullableString `json:"value,omitempty"` + IsEncrypted NullableBool `json:"isEncrypted,omitempty"` + EnvVarType NullableString `json:"envVarType,omitempty"` +} + +// NewTeamEnvVarTeamOutput instantiates a new TeamEnvVarTeamOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTeamEnvVarTeamOutput() *TeamEnvVarTeamOutput { + this := TeamEnvVarTeamOutput{} + return &this +} + +// NewTeamEnvVarTeamOutputWithDefaults instantiates a new TeamEnvVarTeamOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTeamEnvVarTeamOutputWithDefaults() *TeamEnvVarTeamOutput { + this := TeamEnvVarTeamOutput{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVarTeamOutput) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVarTeamOutput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *TeamEnvVarTeamOutput) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *TeamEnvVarTeamOutput) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *TeamEnvVarTeamOutput) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *TeamEnvVarTeamOutput) UnsetKey() { + o.Key.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVarTeamOutput) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVarTeamOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *TeamEnvVarTeamOutput) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *TeamEnvVarTeamOutput) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *TeamEnvVarTeamOutput) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *TeamEnvVarTeamOutput) UnsetValue() { + o.Value.Unset() +} + +// GetIsEncrypted returns the IsEncrypted field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVarTeamOutput) GetIsEncrypted() bool { + if o == nil || IsNil(o.IsEncrypted.Get()) { + var ret bool + return ret + } + return *o.IsEncrypted.Get() +} + +// GetIsEncryptedOk returns a tuple with the IsEncrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVarTeamOutput) GetIsEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsEncrypted.Get(), o.IsEncrypted.IsSet() +} + +// HasIsEncrypted returns a boolean if a field has been set. +func (o *TeamEnvVarTeamOutput) HasIsEncrypted() bool { + if o != nil && o.IsEncrypted.IsSet() { + return true + } + + return false +} + +// SetIsEncrypted gets a reference to the given NullableBool and assigns it to the IsEncrypted field. +func (o *TeamEnvVarTeamOutput) SetIsEncrypted(v bool) { + o.IsEncrypted.Set(&v) +} + +// SetIsEncryptedNil sets the value for IsEncrypted to be an explicit nil +func (o *TeamEnvVarTeamOutput) SetIsEncryptedNil() { + o.IsEncrypted.Set(nil) +} + +// UnsetIsEncrypted ensures that no value is present for IsEncrypted, not even an explicit nil +func (o *TeamEnvVarTeamOutput) UnsetIsEncrypted() { + o.IsEncrypted.Unset() +} + +// GetEnvVarType returns the EnvVarType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamEnvVarTeamOutput) GetEnvVarType() string { + if o == nil || IsNil(o.EnvVarType.Get()) { + var ret string + return ret + } + return *o.EnvVarType.Get() +} + +// GetEnvVarTypeOk returns a tuple with the EnvVarType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamEnvVarTeamOutput) GetEnvVarTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvVarType.Get(), o.EnvVarType.IsSet() +} + +// HasEnvVarType returns a boolean if a field has been set. +func (o *TeamEnvVarTeamOutput) HasEnvVarType() bool { + if o != nil && o.EnvVarType.IsSet() { + return true + } + + return false +} + +// SetEnvVarType gets a reference to the given NullableString and assigns it to the EnvVarType field. +func (o *TeamEnvVarTeamOutput) SetEnvVarType(v string) { + o.EnvVarType.Set(&v) +} + +// SetEnvVarTypeNil sets the value for EnvVarType to be an explicit nil +func (o *TeamEnvVarTeamOutput) SetEnvVarTypeNil() { + o.EnvVarType.Set(nil) +} + +// UnsetEnvVarType ensures that no value is present for EnvVarType, not even an explicit nil +func (o *TeamEnvVarTeamOutput) UnsetEnvVarType() { + o.EnvVarType.Unset() +} + +func (o TeamEnvVarTeamOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TeamEnvVarTeamOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if o.IsEncrypted.IsSet() { + toSerialize["isEncrypted"] = o.IsEncrypted.Get() + } + if o.EnvVarType.IsSet() { + toSerialize["envVarType"] = o.EnvVarType.Get() + } + return toSerialize, nil +} + +type NullableTeamEnvVarTeamOutput struct { + value *TeamEnvVarTeamOutput + isSet bool +} + +func (v NullableTeamEnvVarTeamOutput) Get() *TeamEnvVarTeamOutput { + return v.value +} + +func (v *NullableTeamEnvVarTeamOutput) Set(val *TeamEnvVarTeamOutput) { + v.value = val + v.isSet = true +} + +func (v NullableTeamEnvVarTeamOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableTeamEnvVarTeamOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTeamEnvVarTeamOutput(val *TeamEnvVarTeamOutput) *NullableTeamEnvVarTeamOutput { + return &NullableTeamEnvVarTeamOutput{value: val, isSet: true} +} + +func (v NullableTeamEnvVarTeamOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTeamEnvVarTeamOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_team_team_input.go b/pkg/api/rewardcloud/model_team_team_input.go new file mode 100644 index 0000000..be50a9d --- /dev/null +++ b/pkg/api/rewardcloud/model_team_team_input.go @@ -0,0 +1,421 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the TeamTeamInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TeamTeamInput{} + +// TeamTeamInput Class Team +type TeamTeamInput struct { + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + // User related property - One user can only have 1 pcs default Team + IsDefault NullableBool `json:"isDefault,omitempty"` + User []string `json:"user,omitempty"` + TeamUsers []TeamTeamInputTeamUsersInner `json:"teamUsers,omitempty"` + Project []string `json:"project,omitempty"` + Organisation NullableString `json:"organisation,omitempty"` + TeamEnvVar []TeamEnvVarTeamInput `json:"teamEnvVar,omitempty"` +} + +// NewTeamTeamInput instantiates a new TeamTeamInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTeamTeamInput() *TeamTeamInput { + this := TeamTeamInput{} + return &this +} + +// NewTeamTeamInputWithDefaults instantiates a new TeamTeamInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTeamTeamInputWithDefaults() *TeamTeamInput { + this := TeamTeamInput{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamInput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *TeamTeamInput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *TeamTeamInput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *TeamTeamInput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *TeamTeamInput) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamInput) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamInput) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *TeamTeamInput) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *TeamTeamInput) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *TeamTeamInput) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *TeamTeamInput) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamInput) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamInput) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *TeamTeamInput) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *TeamTeamInput) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *TeamTeamInput) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *TeamTeamInput) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetUser returns the User field value if set, zero value otherwise. +func (o *TeamTeamInput) GetUser() []string { + if o == nil || IsNil(o.User) { + var ret []string + return ret + } + return o.User +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamInput) GetUserOk() ([]string, bool) { + if o == nil || IsNil(o.User) { + return nil, false + } + return o.User, true +} + +// HasUser returns a boolean if a field has been set. +func (o *TeamTeamInput) HasUser() bool { + if o != nil && !IsNil(o.User) { + return true + } + + return false +} + +// SetUser gets a reference to the given []string and assigns it to the User field. +func (o *TeamTeamInput) SetUser(v []string) { + o.User = v +} + +// GetTeamUsers returns the TeamUsers field value if set, zero value otherwise. +func (o *TeamTeamInput) GetTeamUsers() []TeamTeamInputTeamUsersInner { + if o == nil || IsNil(o.TeamUsers) { + var ret []TeamTeamInputTeamUsersInner + return ret + } + return o.TeamUsers +} + +// GetTeamUsersOk returns a tuple with the TeamUsers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamInput) GetTeamUsersOk() ([]TeamTeamInputTeamUsersInner, bool) { + if o == nil || IsNil(o.TeamUsers) { + return nil, false + } + return o.TeamUsers, true +} + +// HasTeamUsers returns a boolean if a field has been set. +func (o *TeamTeamInput) HasTeamUsers() bool { + if o != nil && !IsNil(o.TeamUsers) { + return true + } + + return false +} + +// SetTeamUsers gets a reference to the given []TeamTeamInputTeamUsersInner and assigns it to the TeamUsers field. +func (o *TeamTeamInput) SetTeamUsers(v []TeamTeamInputTeamUsersInner) { + o.TeamUsers = v +} + +// GetProject returns the Project field value if set, zero value otherwise. +func (o *TeamTeamInput) GetProject() []string { + if o == nil || IsNil(o.Project) { + var ret []string + return ret + } + return o.Project +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamInput) GetProjectOk() ([]string, bool) { + if o == nil || IsNil(o.Project) { + return nil, false + } + return o.Project, true +} + +// HasProject returns a boolean if a field has been set. +func (o *TeamTeamInput) HasProject() bool { + if o != nil && !IsNil(o.Project) { + return true + } + + return false +} + +// SetProject gets a reference to the given []string and assigns it to the Project field. +func (o *TeamTeamInput) SetProject(v []string) { + o.Project = v +} + +// GetOrganisation returns the Organisation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamInput) GetOrganisation() string { + if o == nil || IsNil(o.Organisation.Get()) { + var ret string + return ret + } + return *o.Organisation.Get() +} + +// GetOrganisationOk returns a tuple with the Organisation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamInput) GetOrganisationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Organisation.Get(), o.Organisation.IsSet() +} + +// HasOrganisation returns a boolean if a field has been set. +func (o *TeamTeamInput) HasOrganisation() bool { + if o != nil && o.Organisation.IsSet() { + return true + } + + return false +} + +// SetOrganisation gets a reference to the given NullableString and assigns it to the Organisation field. +func (o *TeamTeamInput) SetOrganisation(v string) { + o.Organisation.Set(&v) +} + +// SetOrganisationNil sets the value for Organisation to be an explicit nil +func (o *TeamTeamInput) SetOrganisationNil() { + o.Organisation.Set(nil) +} + +// UnsetOrganisation ensures that no value is present for Organisation, not even an explicit nil +func (o *TeamTeamInput) UnsetOrganisation() { + o.Organisation.Unset() +} + +// GetTeamEnvVar returns the TeamEnvVar field value if set, zero value otherwise. +func (o *TeamTeamInput) GetTeamEnvVar() []TeamEnvVarTeamInput { + if o == nil || IsNil(o.TeamEnvVar) { + var ret []TeamEnvVarTeamInput + return ret + } + return o.TeamEnvVar +} + +// GetTeamEnvVarOk returns a tuple with the TeamEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamInput) GetTeamEnvVarOk() ([]TeamEnvVarTeamInput, bool) { + if o == nil || IsNil(o.TeamEnvVar) { + return nil, false + } + return o.TeamEnvVar, true +} + +// HasTeamEnvVar returns a boolean if a field has been set. +func (o *TeamTeamInput) HasTeamEnvVar() bool { + if o != nil && !IsNil(o.TeamEnvVar) { + return true + } + + return false +} + +// SetTeamEnvVar gets a reference to the given []TeamEnvVarTeamInput and assigns it to the TeamEnvVar field. +func (o *TeamTeamInput) SetTeamEnvVar(v []TeamEnvVarTeamInput) { + o.TeamEnvVar = v +} + +func (o TeamTeamInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TeamTeamInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.IsDefault.IsSet() { + toSerialize["isDefault"] = o.IsDefault.Get() + } + if !IsNil(o.User) { + toSerialize["user"] = o.User + } + if !IsNil(o.TeamUsers) { + toSerialize["teamUsers"] = o.TeamUsers + } + if !IsNil(o.Project) { + toSerialize["project"] = o.Project + } + if o.Organisation.IsSet() { + toSerialize["organisation"] = o.Organisation.Get() + } + if !IsNil(o.TeamEnvVar) { + toSerialize["teamEnvVar"] = o.TeamEnvVar + } + return toSerialize, nil +} + +type NullableTeamTeamInput struct { + value *TeamTeamInput + isSet bool +} + +func (v NullableTeamTeamInput) Get() *TeamTeamInput { + return v.value +} + +func (v *NullableTeamTeamInput) Set(val *TeamTeamInput) { + v.value = val + v.isSet = true +} + +func (v NullableTeamTeamInput) IsSet() bool { + return v.isSet +} + +func (v *NullableTeamTeamInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTeamTeamInput(val *TeamTeamInput) *NullableTeamTeamInput { + return &NullableTeamTeamInput{value: val, isSet: true} +} + +func (v NullableTeamTeamInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTeamTeamInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_team_team_input_team_users_inner.go b/pkg/api/rewardcloud/model_team_team_input_team_users_inner.go new file mode 100644 index 0000000..a36d92e --- /dev/null +++ b/pkg/api/rewardcloud/model_team_team_input_team_users_inner.go @@ -0,0 +1,160 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the TeamTeamInputTeamUsersInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TeamTeamInputTeamUsersInner{} + +// TeamTeamInputTeamUsersInner struct for TeamTeamInputTeamUsersInner +type TeamTeamInputTeamUsersInner struct { + User *string `json:"user,omitempty"` + RoleGroup *string `json:"roleGroup,omitempty"` +} + +// NewTeamTeamInputTeamUsersInner instantiates a new TeamTeamInputTeamUsersInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTeamTeamInputTeamUsersInner() *TeamTeamInputTeamUsersInner { + this := TeamTeamInputTeamUsersInner{} + return &this +} + +// NewTeamTeamInputTeamUsersInnerWithDefaults instantiates a new TeamTeamInputTeamUsersInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTeamTeamInputTeamUsersInnerWithDefaults() *TeamTeamInputTeamUsersInner { + this := TeamTeamInputTeamUsersInner{} + return &this +} + +// GetUser returns the User field value if set, zero value otherwise. +func (o *TeamTeamInputTeamUsersInner) GetUser() string { + if o == nil || IsNil(o.User) { + var ret string + return ret + } + return *o.User +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamInputTeamUsersInner) GetUserOk() (*string, bool) { + if o == nil || IsNil(o.User) { + return nil, false + } + return o.User, true +} + +// HasUser returns a boolean if a field has been set. +func (o *TeamTeamInputTeamUsersInner) HasUser() bool { + if o != nil && !IsNil(o.User) { + return true + } + + return false +} + +// SetUser gets a reference to the given string and assigns it to the User field. +func (o *TeamTeamInputTeamUsersInner) SetUser(v string) { + o.User = &v +} + +// GetRoleGroup returns the RoleGroup field value if set, zero value otherwise. +func (o *TeamTeamInputTeamUsersInner) GetRoleGroup() string { + if o == nil || IsNil(o.RoleGroup) { + var ret string + return ret + } + return *o.RoleGroup +} + +// GetRoleGroupOk returns a tuple with the RoleGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamInputTeamUsersInner) GetRoleGroupOk() (*string, bool) { + if o == nil || IsNil(o.RoleGroup) { + return nil, false + } + return o.RoleGroup, true +} + +// HasRoleGroup returns a boolean if a field has been set. +func (o *TeamTeamInputTeamUsersInner) HasRoleGroup() bool { + if o != nil && !IsNil(o.RoleGroup) { + return true + } + + return false +} + +// SetRoleGroup gets a reference to the given string and assigns it to the RoleGroup field. +func (o *TeamTeamInputTeamUsersInner) SetRoleGroup(v string) { + o.RoleGroup = &v +} + +func (o TeamTeamInputTeamUsersInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TeamTeamInputTeamUsersInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.User) { + toSerialize["user"] = o.User + } + if !IsNil(o.RoleGroup) { + toSerialize["roleGroup"] = o.RoleGroup + } + return toSerialize, nil +} + +type NullableTeamTeamInputTeamUsersInner struct { + value *TeamTeamInputTeamUsersInner + isSet bool +} + +func (v NullableTeamTeamInputTeamUsersInner) Get() *TeamTeamInputTeamUsersInner { + return v.value +} + +func (v *NullableTeamTeamInputTeamUsersInner) Set(val *TeamTeamInputTeamUsersInner) { + v.value = val + v.isSet = true +} + +func (v NullableTeamTeamInputTeamUsersInner) IsSet() bool { + return v.isSet +} + +func (v *NullableTeamTeamInputTeamUsersInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTeamTeamInputTeamUsersInner(val *TeamTeamInputTeamUsersInner) *NullableTeamTeamInputTeamUsersInner { + return &NullableTeamTeamInputTeamUsersInner{value: val, isSet: true} +} + +func (v NullableTeamTeamInputTeamUsersInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTeamTeamInputTeamUsersInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_team_team_output.go b/pkg/api/rewardcloud/model_team_team_output.go new file mode 100644 index 0000000..e27a528 --- /dev/null +++ b/pkg/api/rewardcloud/model_team_team_output.go @@ -0,0 +1,634 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the TeamTeamOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TeamTeamOutput{} + +// TeamTeamOutput Class Team +type TeamTeamOutput struct { + Id *int32 `json:"id,omitempty"` + Uuid *string `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + // User related property - One user can only have 1 pcs default Team + IsDefault NullableBool `json:"isDefault,omitempty"` + User []string `json:"user,omitempty"` + TeamUsers []TeamTeamInputTeamUsersInner `json:"teamUsers,omitempty"` + Project []string `json:"project,omitempty"` + Organisation NullableString `json:"organisation,omitempty"` + TeamEnvVar []TeamEnvVarTeamOutput `json:"teamEnvVar,omitempty"` + StateByInfra NullableString `json:"stateByInfra,omitempty"` + DefaultUser NullableString `json:"defaultUser,omitempty"` + DefaultUserName NullableString `json:"defaultUserName,omitempty"` +} + +// NewTeamTeamOutput instantiates a new TeamTeamOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTeamTeamOutput() *TeamTeamOutput { + this := TeamTeamOutput{} + return &this +} + +// NewTeamTeamOutputWithDefaults instantiates a new TeamTeamOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTeamTeamOutputWithDefaults() *TeamTeamOutput { + this := TeamTeamOutput{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TeamTeamOutput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamOutput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *TeamTeamOutput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *TeamTeamOutput) GetUuid() string { + if o == nil || IsNil(o.Uuid) { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamOutput) GetUuidOk() (*string, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *TeamTeamOutput) SetUuid(v string) { + o.Uuid = &v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamOutput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *TeamTeamOutput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *TeamTeamOutput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *TeamTeamOutput) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamOutput) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamOutput) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *TeamTeamOutput) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *TeamTeamOutput) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *TeamTeamOutput) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamOutput) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamOutput) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *TeamTeamOutput) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *TeamTeamOutput) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *TeamTeamOutput) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetUser returns the User field value if set, zero value otherwise. +func (o *TeamTeamOutput) GetUser() []string { + if o == nil || IsNil(o.User) { + var ret []string + return ret + } + return o.User +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamOutput) GetUserOk() ([]string, bool) { + if o == nil || IsNil(o.User) { + return nil, false + } + return o.User, true +} + +// HasUser returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasUser() bool { + if o != nil && !IsNil(o.User) { + return true + } + + return false +} + +// SetUser gets a reference to the given []string and assigns it to the User field. +func (o *TeamTeamOutput) SetUser(v []string) { + o.User = v +} + +// GetTeamUsers returns the TeamUsers field value if set, zero value otherwise. +func (o *TeamTeamOutput) GetTeamUsers() []TeamTeamInputTeamUsersInner { + if o == nil || IsNil(o.TeamUsers) { + var ret []TeamTeamInputTeamUsersInner + return ret + } + return o.TeamUsers +} + +// GetTeamUsersOk returns a tuple with the TeamUsers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamOutput) GetTeamUsersOk() ([]TeamTeamInputTeamUsersInner, bool) { + if o == nil || IsNil(o.TeamUsers) { + return nil, false + } + return o.TeamUsers, true +} + +// HasTeamUsers returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasTeamUsers() bool { + if o != nil && !IsNil(o.TeamUsers) { + return true + } + + return false +} + +// SetTeamUsers gets a reference to the given []TeamTeamInputTeamUsersInner and assigns it to the TeamUsers field. +func (o *TeamTeamOutput) SetTeamUsers(v []TeamTeamInputTeamUsersInner) { + o.TeamUsers = v +} + +// GetProject returns the Project field value if set, zero value otherwise. +func (o *TeamTeamOutput) GetProject() []string { + if o == nil || IsNil(o.Project) { + var ret []string + return ret + } + return o.Project +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamOutput) GetProjectOk() ([]string, bool) { + if o == nil || IsNil(o.Project) { + return nil, false + } + return o.Project, true +} + +// HasProject returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasProject() bool { + if o != nil && !IsNil(o.Project) { + return true + } + + return false +} + +// SetProject gets a reference to the given []string and assigns it to the Project field. +func (o *TeamTeamOutput) SetProject(v []string) { + o.Project = v +} + +// GetOrganisation returns the Organisation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamOutput) GetOrganisation() string { + if o == nil || IsNil(o.Organisation.Get()) { + var ret string + return ret + } + return *o.Organisation.Get() +} + +// GetOrganisationOk returns a tuple with the Organisation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamOutput) GetOrganisationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Organisation.Get(), o.Organisation.IsSet() +} + +// HasOrganisation returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasOrganisation() bool { + if o != nil && o.Organisation.IsSet() { + return true + } + + return false +} + +// SetOrganisation gets a reference to the given NullableString and assigns it to the Organisation field. +func (o *TeamTeamOutput) SetOrganisation(v string) { + o.Organisation.Set(&v) +} + +// SetOrganisationNil sets the value for Organisation to be an explicit nil +func (o *TeamTeamOutput) SetOrganisationNil() { + o.Organisation.Set(nil) +} + +// UnsetOrganisation ensures that no value is present for Organisation, not even an explicit nil +func (o *TeamTeamOutput) UnsetOrganisation() { + o.Organisation.Unset() +} + +// GetTeamEnvVar returns the TeamEnvVar field value if set, zero value otherwise. +func (o *TeamTeamOutput) GetTeamEnvVar() []TeamEnvVarTeamOutput { + if o == nil || IsNil(o.TeamEnvVar) { + var ret []TeamEnvVarTeamOutput + return ret + } + return o.TeamEnvVar +} + +// GetTeamEnvVarOk returns a tuple with the TeamEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TeamTeamOutput) GetTeamEnvVarOk() ([]TeamEnvVarTeamOutput, bool) { + if o == nil || IsNil(o.TeamEnvVar) { + return nil, false + } + return o.TeamEnvVar, true +} + +// HasTeamEnvVar returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasTeamEnvVar() bool { + if o != nil && !IsNil(o.TeamEnvVar) { + return true + } + + return false +} + +// SetTeamEnvVar gets a reference to the given []TeamEnvVarTeamOutput and assigns it to the TeamEnvVar field. +func (o *TeamTeamOutput) SetTeamEnvVar(v []TeamEnvVarTeamOutput) { + o.TeamEnvVar = v +} + +// GetStateByInfra returns the StateByInfra field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamOutput) GetStateByInfra() string { + if o == nil || IsNil(o.StateByInfra.Get()) { + var ret string + return ret + } + return *o.StateByInfra.Get() +} + +// GetStateByInfraOk returns a tuple with the StateByInfra field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamOutput) GetStateByInfraOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.StateByInfra.Get(), o.StateByInfra.IsSet() +} + +// HasStateByInfra returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasStateByInfra() bool { + if o != nil && o.StateByInfra.IsSet() { + return true + } + + return false +} + +// SetStateByInfra gets a reference to the given NullableString and assigns it to the StateByInfra field. +func (o *TeamTeamOutput) SetStateByInfra(v string) { + o.StateByInfra.Set(&v) +} + +// SetStateByInfraNil sets the value for StateByInfra to be an explicit nil +func (o *TeamTeamOutput) SetStateByInfraNil() { + o.StateByInfra.Set(nil) +} + +// UnsetStateByInfra ensures that no value is present for StateByInfra, not even an explicit nil +func (o *TeamTeamOutput) UnsetStateByInfra() { + o.StateByInfra.Unset() +} + +// GetDefaultUser returns the DefaultUser field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamOutput) GetDefaultUser() string { + if o == nil || IsNil(o.DefaultUser.Get()) { + var ret string + return ret + } + return *o.DefaultUser.Get() +} + +// GetDefaultUserOk returns a tuple with the DefaultUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamOutput) GetDefaultUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DefaultUser.Get(), o.DefaultUser.IsSet() +} + +// HasDefaultUser returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasDefaultUser() bool { + if o != nil && o.DefaultUser.IsSet() { + return true + } + + return false +} + +// SetDefaultUser gets a reference to the given NullableString and assigns it to the DefaultUser field. +func (o *TeamTeamOutput) SetDefaultUser(v string) { + o.DefaultUser.Set(&v) +} + +// SetDefaultUserNil sets the value for DefaultUser to be an explicit nil +func (o *TeamTeamOutput) SetDefaultUserNil() { + o.DefaultUser.Set(nil) +} + +// UnsetDefaultUser ensures that no value is present for DefaultUser, not even an explicit nil +func (o *TeamTeamOutput) UnsetDefaultUser() { + o.DefaultUser.Unset() +} + +// GetDefaultUserName returns the DefaultUserName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TeamTeamOutput) GetDefaultUserName() string { + if o == nil || IsNil(o.DefaultUserName.Get()) { + var ret string + return ret + } + return *o.DefaultUserName.Get() +} + +// GetDefaultUserNameOk returns a tuple with the DefaultUserName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TeamTeamOutput) GetDefaultUserNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DefaultUserName.Get(), o.DefaultUserName.IsSet() +} + +// HasDefaultUserName returns a boolean if a field has been set. +func (o *TeamTeamOutput) HasDefaultUserName() bool { + if o != nil && o.DefaultUserName.IsSet() { + return true + } + + return false +} + +// SetDefaultUserName gets a reference to the given NullableString and assigns it to the DefaultUserName field. +func (o *TeamTeamOutput) SetDefaultUserName(v string) { + o.DefaultUserName.Set(&v) +} + +// SetDefaultUserNameNil sets the value for DefaultUserName to be an explicit nil +func (o *TeamTeamOutput) SetDefaultUserNameNil() { + o.DefaultUserName.Set(nil) +} + +// UnsetDefaultUserName ensures that no value is present for DefaultUserName, not even an explicit nil +func (o *TeamTeamOutput) UnsetDefaultUserName() { + o.DefaultUserName.Unset() +} + +func (o TeamTeamOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TeamTeamOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.IsDefault.IsSet() { + toSerialize["isDefault"] = o.IsDefault.Get() + } + if !IsNil(o.User) { + toSerialize["user"] = o.User + } + if !IsNil(o.TeamUsers) { + toSerialize["teamUsers"] = o.TeamUsers + } + if !IsNil(o.Project) { + toSerialize["project"] = o.Project + } + if o.Organisation.IsSet() { + toSerialize["organisation"] = o.Organisation.Get() + } + if !IsNil(o.TeamEnvVar) { + toSerialize["teamEnvVar"] = o.TeamEnvVar + } + if o.StateByInfra.IsSet() { + toSerialize["stateByInfra"] = o.StateByInfra.Get() + } + if o.DefaultUser.IsSet() { + toSerialize["defaultUser"] = o.DefaultUser.Get() + } + if o.DefaultUserName.IsSet() { + toSerialize["defaultUserName"] = o.DefaultUserName.Get() + } + return toSerialize, nil +} + +type NullableTeamTeamOutput struct { + value *TeamTeamOutput + isSet bool +} + +func (v NullableTeamTeamOutput) Get() *TeamTeamOutput { + return v.value +} + +func (v *NullableTeamTeamOutput) Set(val *TeamTeamOutput) { + v.value = val + v.isSet = true +} + +func (v NullableTeamTeamOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableTeamTeamOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTeamTeamOutput(val *TeamTeamOutput) *NullableTeamTeamOutput { + return &NullableTeamTeamOutput{value: val, isSet: true} +} + +func (v NullableTeamTeamOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTeamTeamOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_template_environment_template_environment_input.go b/pkg/api/rewardcloud/model_template_environment_template_environment_input.go new file mode 100644 index 0000000..1abd42f --- /dev/null +++ b/pkg/api/rewardcloud/model_template_environment_template_environment_input.go @@ -0,0 +1,630 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the TemplateEnvironmentTemplateEnvironmentInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TemplateEnvironmentTemplateEnvironmentInput{} + +// TemplateEnvironmentTemplateEnvironmentInput Class TemplateEnvironment +type TemplateEnvironmentTemplateEnvironmentInput struct { + TemplateProject NullableString `json:"templateProject,omitempty"` + Name NullableString `json:"name,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + DataTransferSettings NullableString `json:"dataTransferSettings,omitempty"` + IsStripDatabase NullableBool `json:"isStripDatabase,omitempty"` + IsAllowOutgoingEmails NullableBool `json:"isAllowOutgoingEmails,omitempty"` + IsAllowHtaccessDevtoolsProtection NullableBool `json:"isAllowHtaccessDevtoolsProtection,omitempty"` + IsInitSampleData NullableBool `json:"isInitSampleData,omitempty"` + EnvVar []EnvironmentEnvVarTemplateEnvironmentInput `json:"envVar,omitempty"` + EnvironmentComponent []EnvironmentComponentTemplateEnvironmentInput `json:"environmentComponent,omitempty"` +} + +// NewTemplateEnvironmentTemplateEnvironmentInput instantiates a new TemplateEnvironmentTemplateEnvironmentInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateEnvironmentTemplateEnvironmentInput() *TemplateEnvironmentTemplateEnvironmentInput { + this := TemplateEnvironmentTemplateEnvironmentInput{} + return &this +} + +// NewTemplateEnvironmentTemplateEnvironmentInputWithDefaults instantiates a new TemplateEnvironmentTemplateEnvironmentInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateEnvironmentTemplateEnvironmentInputWithDefaults() *TemplateEnvironmentTemplateEnvironmentInput { + this := TemplateEnvironmentTemplateEnvironmentInput{} + return &this +} + +// GetTemplateProject returns the TemplateProject field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetTemplateProject() string { + if o == nil || IsNil(o.TemplateProject.Get()) { + var ret string + return ret + } + return *o.TemplateProject.Get() +} + +// GetTemplateProjectOk returns a tuple with the TemplateProject field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetTemplateProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TemplateProject.Get(), o.TemplateProject.IsSet() +} + +// HasTemplateProject returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasTemplateProject() bool { + if o != nil && o.TemplateProject.IsSet() { + return true + } + + return false +} + +// SetTemplateProject gets a reference to the given NullableString and assigns it to the TemplateProject field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetTemplateProject(v string) { + o.TemplateProject.Set(&v) +} + +// SetTemplateProjectNil sets the value for TemplateProject to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetTemplateProjectNil() { + o.TemplateProject.Set(nil) +} + +// UnsetTemplateProject ensures that no value is present for TemplateProject, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) UnsetTemplateProject() { + o.TemplateProject.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) UnsetName() { + o.Name.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) UnsetStorage() { + o.Storage.Unset() +} + +// GetDataTransferSettings returns the DataTransferSettings field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetDataTransferSettings() string { + if o == nil || IsNil(o.DataTransferSettings.Get()) { + var ret string + return ret + } + return *o.DataTransferSettings.Get() +} + +// GetDataTransferSettingsOk returns a tuple with the DataTransferSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetDataTransferSettingsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DataTransferSettings.Get(), o.DataTransferSettings.IsSet() +} + +// HasDataTransferSettings returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasDataTransferSettings() bool { + if o != nil && o.DataTransferSettings.IsSet() { + return true + } + + return false +} + +// SetDataTransferSettings gets a reference to the given NullableString and assigns it to the DataTransferSettings field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetDataTransferSettings(v string) { + o.DataTransferSettings.Set(&v) +} + +// SetDataTransferSettingsNil sets the value for DataTransferSettings to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetDataTransferSettingsNil() { + o.DataTransferSettings.Set(nil) +} + +// UnsetDataTransferSettings ensures that no value is present for DataTransferSettings, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) UnsetDataTransferSettings() { + o.DataTransferSettings.Unset() +} + +// GetIsStripDatabase returns the IsStripDatabase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetIsStripDatabase() bool { + if o == nil || IsNil(o.IsStripDatabase.Get()) { + var ret bool + return ret + } + return *o.IsStripDatabase.Get() +} + +// GetIsStripDatabaseOk returns a tuple with the IsStripDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetIsStripDatabaseOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsStripDatabase.Get(), o.IsStripDatabase.IsSet() +} + +// HasIsStripDatabase returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasIsStripDatabase() bool { + if o != nil && o.IsStripDatabase.IsSet() { + return true + } + + return false +} + +// SetIsStripDatabase gets a reference to the given NullableBool and assigns it to the IsStripDatabase field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetIsStripDatabase(v bool) { + o.IsStripDatabase.Set(&v) +} + +// SetIsStripDatabaseNil sets the value for IsStripDatabase to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetIsStripDatabaseNil() { + o.IsStripDatabase.Set(nil) +} + +// UnsetIsStripDatabase ensures that no value is present for IsStripDatabase, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) UnsetIsStripDatabase() { + o.IsStripDatabase.Unset() +} + +// GetIsAllowOutgoingEmails returns the IsAllowOutgoingEmails field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetIsAllowOutgoingEmails() bool { + if o == nil || IsNil(o.IsAllowOutgoingEmails.Get()) { + var ret bool + return ret + } + return *o.IsAllowOutgoingEmails.Get() +} + +// GetIsAllowOutgoingEmailsOk returns a tuple with the IsAllowOutgoingEmails field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetIsAllowOutgoingEmailsOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsAllowOutgoingEmails.Get(), o.IsAllowOutgoingEmails.IsSet() +} + +// HasIsAllowOutgoingEmails returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasIsAllowOutgoingEmails() bool { + if o != nil && o.IsAllowOutgoingEmails.IsSet() { + return true + } + + return false +} + +// SetIsAllowOutgoingEmails gets a reference to the given NullableBool and assigns it to the IsAllowOutgoingEmails field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetIsAllowOutgoingEmails(v bool) { + o.IsAllowOutgoingEmails.Set(&v) +} + +// SetIsAllowOutgoingEmailsNil sets the value for IsAllowOutgoingEmails to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetIsAllowOutgoingEmailsNil() { + o.IsAllowOutgoingEmails.Set(nil) +} + +// UnsetIsAllowOutgoingEmails ensures that no value is present for IsAllowOutgoingEmails, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) UnsetIsAllowOutgoingEmails() { + o.IsAllowOutgoingEmails.Unset() +} + +// GetIsAllowHtaccessDevtoolsProtection returns the IsAllowHtaccessDevtoolsProtection field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetIsAllowHtaccessDevtoolsProtection() bool { + if o == nil || IsNil(o.IsAllowHtaccessDevtoolsProtection.Get()) { + var ret bool + return ret + } + return *o.IsAllowHtaccessDevtoolsProtection.Get() +} + +// GetIsAllowHtaccessDevtoolsProtectionOk returns a tuple with the IsAllowHtaccessDevtoolsProtection field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetIsAllowHtaccessDevtoolsProtectionOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsAllowHtaccessDevtoolsProtection.Get(), o.IsAllowHtaccessDevtoolsProtection.IsSet() +} + +// HasIsAllowHtaccessDevtoolsProtection returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasIsAllowHtaccessDevtoolsProtection() bool { + if o != nil && o.IsAllowHtaccessDevtoolsProtection.IsSet() { + return true + } + + return false +} + +// SetIsAllowHtaccessDevtoolsProtection gets a reference to the given NullableBool and assigns it to the IsAllowHtaccessDevtoolsProtection field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetIsAllowHtaccessDevtoolsProtection(v bool) { + o.IsAllowHtaccessDevtoolsProtection.Set(&v) +} + +// SetIsAllowHtaccessDevtoolsProtectionNil sets the value for IsAllowHtaccessDevtoolsProtection to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetIsAllowHtaccessDevtoolsProtectionNil() { + o.IsAllowHtaccessDevtoolsProtection.Set(nil) +} + +// UnsetIsAllowHtaccessDevtoolsProtection ensures that no value is present for IsAllowHtaccessDevtoolsProtection, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) UnsetIsAllowHtaccessDevtoolsProtection() { + o.IsAllowHtaccessDevtoolsProtection.Unset() +} + +// GetIsInitSampleData returns the IsInitSampleData field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetIsInitSampleData() bool { + if o == nil || IsNil(o.IsInitSampleData.Get()) { + var ret bool + return ret + } + return *o.IsInitSampleData.Get() +} + +// GetIsInitSampleDataOk returns a tuple with the IsInitSampleData field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetIsInitSampleDataOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInitSampleData.Get(), o.IsInitSampleData.IsSet() +} + +// HasIsInitSampleData returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasIsInitSampleData() bool { + if o != nil && o.IsInitSampleData.IsSet() { + return true + } + + return false +} + +// SetIsInitSampleData gets a reference to the given NullableBool and assigns it to the IsInitSampleData field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetIsInitSampleData(v bool) { + o.IsInitSampleData.Set(&v) +} + +// SetIsInitSampleDataNil sets the value for IsInitSampleData to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetIsInitSampleDataNil() { + o.IsInitSampleData.Set(nil) +} + +// UnsetIsInitSampleData ensures that no value is present for IsInitSampleData, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentInput) UnsetIsInitSampleData() { + o.IsInitSampleData.Unset() +} + +// GetEnvVar returns the EnvVar field value if set, zero value otherwise. +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetEnvVar() []EnvironmentEnvVarTemplateEnvironmentInput { + if o == nil || IsNil(o.EnvVar) { + var ret []EnvironmentEnvVarTemplateEnvironmentInput + return ret + } + return o.EnvVar +} + +// GetEnvVarOk returns a tuple with the EnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetEnvVarOk() ([]EnvironmentEnvVarTemplateEnvironmentInput, bool) { + if o == nil || IsNil(o.EnvVar) { + return nil, false + } + return o.EnvVar, true +} + +// HasEnvVar returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasEnvVar() bool { + if o != nil && !IsNil(o.EnvVar) { + return true + } + + return false +} + +// SetEnvVar gets a reference to the given []EnvironmentEnvVarTemplateEnvironmentInput and assigns it to the EnvVar field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetEnvVar(v []EnvironmentEnvVarTemplateEnvironmentInput) { + o.EnvVar = v +} + +// GetEnvironmentComponent returns the EnvironmentComponent field value if set, zero value otherwise. +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetEnvironmentComponent() []EnvironmentComponentTemplateEnvironmentInput { + if o == nil || IsNil(o.EnvironmentComponent) { + var ret []EnvironmentComponentTemplateEnvironmentInput + return ret + } + return o.EnvironmentComponent +} + +// GetEnvironmentComponentOk returns a tuple with the EnvironmentComponent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) GetEnvironmentComponentOk() ([]EnvironmentComponentTemplateEnvironmentInput, bool) { + if o == nil || IsNil(o.EnvironmentComponent) { + return nil, false + } + return o.EnvironmentComponent, true +} + +// HasEnvironmentComponent returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentInput) HasEnvironmentComponent() bool { + if o != nil && !IsNil(o.EnvironmentComponent) { + return true + } + + return false +} + +// SetEnvironmentComponent gets a reference to the given []EnvironmentComponentTemplateEnvironmentInput and assigns it to the EnvironmentComponent field. +func (o *TemplateEnvironmentTemplateEnvironmentInput) SetEnvironmentComponent(v []EnvironmentComponentTemplateEnvironmentInput) { + o.EnvironmentComponent = v +} + +func (o TemplateEnvironmentTemplateEnvironmentInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TemplateEnvironmentTemplateEnvironmentInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.TemplateProject.IsSet() { + toSerialize["templateProject"] = o.TemplateProject.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.DataTransferSettings.IsSet() { + toSerialize["dataTransferSettings"] = o.DataTransferSettings.Get() + } + if o.IsStripDatabase.IsSet() { + toSerialize["isStripDatabase"] = o.IsStripDatabase.Get() + } + if o.IsAllowOutgoingEmails.IsSet() { + toSerialize["isAllowOutgoingEmails"] = o.IsAllowOutgoingEmails.Get() + } + if o.IsAllowHtaccessDevtoolsProtection.IsSet() { + toSerialize["isAllowHtaccessDevtoolsProtection"] = o.IsAllowHtaccessDevtoolsProtection.Get() + } + if o.IsInitSampleData.IsSet() { + toSerialize["isInitSampleData"] = o.IsInitSampleData.Get() + } + if !IsNil(o.EnvVar) { + toSerialize["envVar"] = o.EnvVar + } + if !IsNil(o.EnvironmentComponent) { + toSerialize["environmentComponent"] = o.EnvironmentComponent + } + return toSerialize, nil +} + +type NullableTemplateEnvironmentTemplateEnvironmentInput struct { + value *TemplateEnvironmentTemplateEnvironmentInput + isSet bool +} + +func (v NullableTemplateEnvironmentTemplateEnvironmentInput) Get() *TemplateEnvironmentTemplateEnvironmentInput { + return v.value +} + +func (v *NullableTemplateEnvironmentTemplateEnvironmentInput) Set(val *TemplateEnvironmentTemplateEnvironmentInput) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateEnvironmentTemplateEnvironmentInput) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateEnvironmentTemplateEnvironmentInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateEnvironmentTemplateEnvironmentInput(val *TemplateEnvironmentTemplateEnvironmentInput) *NullableTemplateEnvironmentTemplateEnvironmentInput { + return &NullableTemplateEnvironmentTemplateEnvironmentInput{value: val, isSet: true} +} + +func (v NullableTemplateEnvironmentTemplateEnvironmentInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateEnvironmentTemplateEnvironmentInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_template_environment_template_environment_output.go b/pkg/api/rewardcloud/model_template_environment_template_environment_output.go new file mode 100644 index 0000000..3e6bc9e --- /dev/null +++ b/pkg/api/rewardcloud/model_template_environment_template_environment_output.go @@ -0,0 +1,833 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the TemplateEnvironmentTemplateEnvironmentOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TemplateEnvironmentTemplateEnvironmentOutput{} + +// TemplateEnvironmentTemplateEnvironmentOutput Class TemplateEnvironment +type TemplateEnvironmentTemplateEnvironmentOutput struct { + TemplateProject NullableString `json:"templateProject,omitempty"` + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + DataTransferSettings NullableString `json:"dataTransferSettings,omitempty"` + IsStripDatabase NullableBool `json:"isStripDatabase,omitempty"` + IsAllowOutgoingEmails NullableBool `json:"isAllowOutgoingEmails,omitempty"` + IsAllowHtaccessDevtoolsProtection NullableBool `json:"isAllowHtaccessDevtoolsProtection,omitempty"` + IsInitSampleData NullableBool `json:"isInitSampleData,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + EnvVar []EnvironmentEnvVarTemplateEnvironmentOutput `json:"envVar,omitempty"` + EnvironmentComponent []EnvironmentComponentTemplateEnvironmentOutput `json:"environmentComponent,omitempty"` +} + +// NewTemplateEnvironmentTemplateEnvironmentOutput instantiates a new TemplateEnvironmentTemplateEnvironmentOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateEnvironmentTemplateEnvironmentOutput() *TemplateEnvironmentTemplateEnvironmentOutput { + this := TemplateEnvironmentTemplateEnvironmentOutput{} + return &this +} + +// NewTemplateEnvironmentTemplateEnvironmentOutputWithDefaults instantiates a new TemplateEnvironmentTemplateEnvironmentOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateEnvironmentTemplateEnvironmentOutputWithDefaults() *TemplateEnvironmentTemplateEnvironmentOutput { + this := TemplateEnvironmentTemplateEnvironmentOutput{} + return &this +} + +// GetTemplateProject returns the TemplateProject field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetTemplateProject() string { + if o == nil || IsNil(o.TemplateProject.Get()) { + var ret string + return ret + } + return *o.TemplateProject.Get() +} + +// GetTemplateProjectOk returns a tuple with the TemplateProject field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetTemplateProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TemplateProject.Get(), o.TemplateProject.IsSet() +} + +// HasTemplateProject returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasTemplateProject() bool { + if o != nil && o.TemplateProject.IsSet() { + return true + } + + return false +} + +// SetTemplateProject gets a reference to the given NullableString and assigns it to the TemplateProject field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetTemplateProject(v string) { + o.TemplateProject.Set(&v) +} + +// SetTemplateProjectNil sets the value for TemplateProject to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetTemplateProjectNil() { + o.TemplateProject.Set(nil) +} + +// UnsetTemplateProject ensures that no value is present for TemplateProject, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetTemplateProject() { + o.TemplateProject.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetUuid() { + o.Uuid.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetStorage() { + o.Storage.Unset() +} + +// GetDataTransferSettings returns the DataTransferSettings field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetDataTransferSettings() string { + if o == nil || IsNil(o.DataTransferSettings.Get()) { + var ret string + return ret + } + return *o.DataTransferSettings.Get() +} + +// GetDataTransferSettingsOk returns a tuple with the DataTransferSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetDataTransferSettingsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DataTransferSettings.Get(), o.DataTransferSettings.IsSet() +} + +// HasDataTransferSettings returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasDataTransferSettings() bool { + if o != nil && o.DataTransferSettings.IsSet() { + return true + } + + return false +} + +// SetDataTransferSettings gets a reference to the given NullableString and assigns it to the DataTransferSettings field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetDataTransferSettings(v string) { + o.DataTransferSettings.Set(&v) +} + +// SetDataTransferSettingsNil sets the value for DataTransferSettings to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetDataTransferSettingsNil() { + o.DataTransferSettings.Set(nil) +} + +// UnsetDataTransferSettings ensures that no value is present for DataTransferSettings, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetDataTransferSettings() { + o.DataTransferSettings.Unset() +} + +// GetIsStripDatabase returns the IsStripDatabase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetIsStripDatabase() bool { + if o == nil || IsNil(o.IsStripDatabase.Get()) { + var ret bool + return ret + } + return *o.IsStripDatabase.Get() +} + +// GetIsStripDatabaseOk returns a tuple with the IsStripDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetIsStripDatabaseOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsStripDatabase.Get(), o.IsStripDatabase.IsSet() +} + +// HasIsStripDatabase returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasIsStripDatabase() bool { + if o != nil && o.IsStripDatabase.IsSet() { + return true + } + + return false +} + +// SetIsStripDatabase gets a reference to the given NullableBool and assigns it to the IsStripDatabase field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetIsStripDatabase(v bool) { + o.IsStripDatabase.Set(&v) +} + +// SetIsStripDatabaseNil sets the value for IsStripDatabase to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetIsStripDatabaseNil() { + o.IsStripDatabase.Set(nil) +} + +// UnsetIsStripDatabase ensures that no value is present for IsStripDatabase, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetIsStripDatabase() { + o.IsStripDatabase.Unset() +} + +// GetIsAllowOutgoingEmails returns the IsAllowOutgoingEmails field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetIsAllowOutgoingEmails() bool { + if o == nil || IsNil(o.IsAllowOutgoingEmails.Get()) { + var ret bool + return ret + } + return *o.IsAllowOutgoingEmails.Get() +} + +// GetIsAllowOutgoingEmailsOk returns a tuple with the IsAllowOutgoingEmails field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetIsAllowOutgoingEmailsOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsAllowOutgoingEmails.Get(), o.IsAllowOutgoingEmails.IsSet() +} + +// HasIsAllowOutgoingEmails returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasIsAllowOutgoingEmails() bool { + if o != nil && o.IsAllowOutgoingEmails.IsSet() { + return true + } + + return false +} + +// SetIsAllowOutgoingEmails gets a reference to the given NullableBool and assigns it to the IsAllowOutgoingEmails field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetIsAllowOutgoingEmails(v bool) { + o.IsAllowOutgoingEmails.Set(&v) +} + +// SetIsAllowOutgoingEmailsNil sets the value for IsAllowOutgoingEmails to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetIsAllowOutgoingEmailsNil() { + o.IsAllowOutgoingEmails.Set(nil) +} + +// UnsetIsAllowOutgoingEmails ensures that no value is present for IsAllowOutgoingEmails, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetIsAllowOutgoingEmails() { + o.IsAllowOutgoingEmails.Unset() +} + +// GetIsAllowHtaccessDevtoolsProtection returns the IsAllowHtaccessDevtoolsProtection field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetIsAllowHtaccessDevtoolsProtection() bool { + if o == nil || IsNil(o.IsAllowHtaccessDevtoolsProtection.Get()) { + var ret bool + return ret + } + return *o.IsAllowHtaccessDevtoolsProtection.Get() +} + +// GetIsAllowHtaccessDevtoolsProtectionOk returns a tuple with the IsAllowHtaccessDevtoolsProtection field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetIsAllowHtaccessDevtoolsProtectionOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsAllowHtaccessDevtoolsProtection.Get(), o.IsAllowHtaccessDevtoolsProtection.IsSet() +} + +// HasIsAllowHtaccessDevtoolsProtection returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasIsAllowHtaccessDevtoolsProtection() bool { + if o != nil && o.IsAllowHtaccessDevtoolsProtection.IsSet() { + return true + } + + return false +} + +// SetIsAllowHtaccessDevtoolsProtection gets a reference to the given NullableBool and assigns it to the IsAllowHtaccessDevtoolsProtection field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetIsAllowHtaccessDevtoolsProtection(v bool) { + o.IsAllowHtaccessDevtoolsProtection.Set(&v) +} + +// SetIsAllowHtaccessDevtoolsProtectionNil sets the value for IsAllowHtaccessDevtoolsProtection to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetIsAllowHtaccessDevtoolsProtectionNil() { + o.IsAllowHtaccessDevtoolsProtection.Set(nil) +} + +// UnsetIsAllowHtaccessDevtoolsProtection ensures that no value is present for IsAllowHtaccessDevtoolsProtection, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetIsAllowHtaccessDevtoolsProtection() { + o.IsAllowHtaccessDevtoolsProtection.Unset() +} + +// GetIsInitSampleData returns the IsInitSampleData field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetIsInitSampleData() bool { + if o == nil || IsNil(o.IsInitSampleData.Get()) { + var ret bool + return ret + } + return *o.IsInitSampleData.Get() +} + +// GetIsInitSampleDataOk returns a tuple with the IsInitSampleData field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetIsInitSampleDataOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInitSampleData.Get(), o.IsInitSampleData.IsSet() +} + +// HasIsInitSampleData returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasIsInitSampleData() bool { + if o != nil && o.IsInitSampleData.IsSet() { + return true + } + + return false +} + +// SetIsInitSampleData gets a reference to the given NullableBool and assigns it to the IsInitSampleData field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetIsInitSampleData(v bool) { + o.IsInitSampleData.Set(&v) +} + +// SetIsInitSampleDataNil sets the value for IsInitSampleData to be an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetIsInitSampleDataNil() { + o.IsInitSampleData.Set(nil) +} + +// UnsetIsInitSampleData ensures that no value is present for IsInitSampleData, not even an explicit nil +func (o *TemplateEnvironmentTemplateEnvironmentOutput) UnsetIsInitSampleData() { + o.IsInitSampleData.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetEnvVar returns the EnvVar field value if set, zero value otherwise. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetEnvVar() []EnvironmentEnvVarTemplateEnvironmentOutput { + if o == nil || IsNil(o.EnvVar) { + var ret []EnvironmentEnvVarTemplateEnvironmentOutput + return ret + } + return o.EnvVar +} + +// GetEnvVarOk returns a tuple with the EnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetEnvVarOk() ([]EnvironmentEnvVarTemplateEnvironmentOutput, bool) { + if o == nil || IsNil(o.EnvVar) { + return nil, false + } + return o.EnvVar, true +} + +// HasEnvVar returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasEnvVar() bool { + if o != nil && !IsNil(o.EnvVar) { + return true + } + + return false +} + +// SetEnvVar gets a reference to the given []EnvironmentEnvVarTemplateEnvironmentOutput and assigns it to the EnvVar field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetEnvVar(v []EnvironmentEnvVarTemplateEnvironmentOutput) { + o.EnvVar = v +} + +// GetEnvironmentComponent returns the EnvironmentComponent field value if set, zero value otherwise. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetEnvironmentComponent() []EnvironmentComponentTemplateEnvironmentOutput { + if o == nil || IsNil(o.EnvironmentComponent) { + var ret []EnvironmentComponentTemplateEnvironmentOutput + return ret + } + return o.EnvironmentComponent +} + +// GetEnvironmentComponentOk returns a tuple with the EnvironmentComponent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) GetEnvironmentComponentOk() ([]EnvironmentComponentTemplateEnvironmentOutput, bool) { + if o == nil || IsNil(o.EnvironmentComponent) { + return nil, false + } + return o.EnvironmentComponent, true +} + +// HasEnvironmentComponent returns a boolean if a field has been set. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) HasEnvironmentComponent() bool { + if o != nil && !IsNil(o.EnvironmentComponent) { + return true + } + + return false +} + +// SetEnvironmentComponent gets a reference to the given []EnvironmentComponentTemplateEnvironmentOutput and assigns it to the EnvironmentComponent field. +func (o *TemplateEnvironmentTemplateEnvironmentOutput) SetEnvironmentComponent(v []EnvironmentComponentTemplateEnvironmentOutput) { + o.EnvironmentComponent = v +} + +func (o TemplateEnvironmentTemplateEnvironmentOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TemplateEnvironmentTemplateEnvironmentOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.TemplateProject.IsSet() { + toSerialize["templateProject"] = o.TemplateProject.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.DataTransferSettings.IsSet() { + toSerialize["dataTransferSettings"] = o.DataTransferSettings.Get() + } + if o.IsStripDatabase.IsSet() { + toSerialize["isStripDatabase"] = o.IsStripDatabase.Get() + } + if o.IsAllowOutgoingEmails.IsSet() { + toSerialize["isAllowOutgoingEmails"] = o.IsAllowOutgoingEmails.Get() + } + if o.IsAllowHtaccessDevtoolsProtection.IsSet() { + toSerialize["isAllowHtaccessDevtoolsProtection"] = o.IsAllowHtaccessDevtoolsProtection.Get() + } + if o.IsInitSampleData.IsSet() { + toSerialize["isInitSampleData"] = o.IsInitSampleData.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if !IsNil(o.EnvVar) { + toSerialize["envVar"] = o.EnvVar + } + if !IsNil(o.EnvironmentComponent) { + toSerialize["environmentComponent"] = o.EnvironmentComponent + } + return toSerialize, nil +} + +type NullableTemplateEnvironmentTemplateEnvironmentOutput struct { + value *TemplateEnvironmentTemplateEnvironmentOutput + isSet bool +} + +func (v NullableTemplateEnvironmentTemplateEnvironmentOutput) Get() *TemplateEnvironmentTemplateEnvironmentOutput { + return v.value +} + +func (v *NullableTemplateEnvironmentTemplateEnvironmentOutput) Set(val *TemplateEnvironmentTemplateEnvironmentOutput) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateEnvironmentTemplateEnvironmentOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateEnvironmentTemplateEnvironmentOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateEnvironmentTemplateEnvironmentOutput(val *TemplateEnvironmentTemplateEnvironmentOutput) *NullableTemplateEnvironmentTemplateEnvironmentOutput { + return &NullableTemplateEnvironmentTemplateEnvironmentOutput{value: val, isSet: true} +} + +func (v NullableTemplateEnvironmentTemplateEnvironmentOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateEnvironmentTemplateEnvironmentOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_template_project_template_project_input.go b/pkg/api/rewardcloud/model_template_project_template_project_input.go new file mode 100644 index 0000000..c029d13 --- /dev/null +++ b/pkg/api/rewardcloud/model_template_project_template_project_input.go @@ -0,0 +1,666 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the TemplateProjectTemplateProjectInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TemplateProjectTemplateProjectInput{} + +// TemplateProjectTemplateProjectInput Class ProjectTemplate +type TemplateProjectTemplateProjectInput struct { + Description NullableString `json:"description,omitempty"` + TemplateEnvironment []string `json:"templateEnvironment,omitempty"` + Name NullableString `json:"name,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + Code NullableString `json:"code,omitempty"` + Color NullableString `json:"color,omitempty"` + IsInitProjectSkeleton NullableBool `json:"isInitProjectSkeleton,omitempty"` + ComponentVersion []string `json:"componentVersion,omitempty"` + ProjectTypeVersion NullableString `json:"projectTypeVersion,omitempty"` + ProjectEnvVar []ProjectEnvVarTemplateProjectInput `json:"projectEnvVar,omitempty"` +} + +// NewTemplateProjectTemplateProjectInput instantiates a new TemplateProjectTemplateProjectInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateProjectTemplateProjectInput() *TemplateProjectTemplateProjectInput { + this := TemplateProjectTemplateProjectInput{} + return &this +} + +// NewTemplateProjectTemplateProjectInputWithDefaults instantiates a new TemplateProjectTemplateProjectInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateProjectTemplateProjectInputWithDefaults() *TemplateProjectTemplateProjectInput { + this := TemplateProjectTemplateProjectInput{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectInput) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectInput) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *TemplateProjectTemplateProjectInput) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *TemplateProjectTemplateProjectInput) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *TemplateProjectTemplateProjectInput) UnsetDescription() { + o.Description.Unset() +} + +// GetTemplateEnvironment returns the TemplateEnvironment field value if set, zero value otherwise. +func (o *TemplateProjectTemplateProjectInput) GetTemplateEnvironment() []string { + if o == nil || IsNil(o.TemplateEnvironment) { + var ret []string + return ret + } + return o.TemplateEnvironment +} + +// GetTemplateEnvironmentOk returns a tuple with the TemplateEnvironment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateProjectTemplateProjectInput) GetTemplateEnvironmentOk() ([]string, bool) { + if o == nil || IsNil(o.TemplateEnvironment) { + return nil, false + } + return o.TemplateEnvironment, true +} + +// HasTemplateEnvironment returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasTemplateEnvironment() bool { + if o != nil && !IsNil(o.TemplateEnvironment) { + return true + } + + return false +} + +// SetTemplateEnvironment gets a reference to the given []string and assigns it to the TemplateEnvironment field. +func (o *TemplateProjectTemplateProjectInput) SetTemplateEnvironment(v []string) { + o.TemplateEnvironment = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectInput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *TemplateProjectTemplateProjectInput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *TemplateProjectTemplateProjectInput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *TemplateProjectTemplateProjectInput) UnsetName() { + o.Name.Unset() +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectInput) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectInput) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *TemplateProjectTemplateProjectInput) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *TemplateProjectTemplateProjectInput) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *TemplateProjectTemplateProjectInput) UnsetIsActive() { + o.IsActive.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectInput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectInput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *TemplateProjectTemplateProjectInput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *TemplateProjectTemplateProjectInput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *TemplateProjectTemplateProjectInput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectInput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectInput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *TemplateProjectTemplateProjectInput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *TemplateProjectTemplateProjectInput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *TemplateProjectTemplateProjectInput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectInput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectInput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *TemplateProjectTemplateProjectInput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *TemplateProjectTemplateProjectInput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *TemplateProjectTemplateProjectInput) UnsetStorage() { + o.Storage.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectInput) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectInput) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *TemplateProjectTemplateProjectInput) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *TemplateProjectTemplateProjectInput) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *TemplateProjectTemplateProjectInput) UnsetCode() { + o.Code.Unset() +} + +// GetColor returns the Color field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectInput) GetColor() string { + if o == nil || IsNil(o.Color.Get()) { + var ret string + return ret + } + return *o.Color.Get() +} + +// GetColorOk returns a tuple with the Color field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectInput) GetColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Color.Get(), o.Color.IsSet() +} + +// HasColor returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasColor() bool { + if o != nil && o.Color.IsSet() { + return true + } + + return false +} + +// SetColor gets a reference to the given NullableString and assigns it to the Color field. +func (o *TemplateProjectTemplateProjectInput) SetColor(v string) { + o.Color.Set(&v) +} + +// SetColorNil sets the value for Color to be an explicit nil +func (o *TemplateProjectTemplateProjectInput) SetColorNil() { + o.Color.Set(nil) +} + +// UnsetColor ensures that no value is present for Color, not even an explicit nil +func (o *TemplateProjectTemplateProjectInput) UnsetColor() { + o.Color.Unset() +} + +// GetIsInitProjectSkeleton returns the IsInitProjectSkeleton field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectInput) GetIsInitProjectSkeleton() bool { + if o == nil || IsNil(o.IsInitProjectSkeleton.Get()) { + var ret bool + return ret + } + return *o.IsInitProjectSkeleton.Get() +} + +// GetIsInitProjectSkeletonOk returns a tuple with the IsInitProjectSkeleton field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectInput) GetIsInitProjectSkeletonOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInitProjectSkeleton.Get(), o.IsInitProjectSkeleton.IsSet() +} + +// HasIsInitProjectSkeleton returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasIsInitProjectSkeleton() bool { + if o != nil && o.IsInitProjectSkeleton.IsSet() { + return true + } + + return false +} + +// SetIsInitProjectSkeleton gets a reference to the given NullableBool and assigns it to the IsInitProjectSkeleton field. +func (o *TemplateProjectTemplateProjectInput) SetIsInitProjectSkeleton(v bool) { + o.IsInitProjectSkeleton.Set(&v) +} + +// SetIsInitProjectSkeletonNil sets the value for IsInitProjectSkeleton to be an explicit nil +func (o *TemplateProjectTemplateProjectInput) SetIsInitProjectSkeletonNil() { + o.IsInitProjectSkeleton.Set(nil) +} + +// UnsetIsInitProjectSkeleton ensures that no value is present for IsInitProjectSkeleton, not even an explicit nil +func (o *TemplateProjectTemplateProjectInput) UnsetIsInitProjectSkeleton() { + o.IsInitProjectSkeleton.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise. +func (o *TemplateProjectTemplateProjectInput) GetComponentVersion() []string { + if o == nil || IsNil(o.ComponentVersion) { + var ret []string + return ret + } + return o.ComponentVersion +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateProjectTemplateProjectInput) GetComponentVersionOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentVersion) { + return nil, false + } + return o.ComponentVersion, true +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasComponentVersion() bool { + if o != nil && !IsNil(o.ComponentVersion) { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given []string and assigns it to the ComponentVersion field. +func (o *TemplateProjectTemplateProjectInput) SetComponentVersion(v []string) { + o.ComponentVersion = v +} + +// GetProjectTypeVersion returns the ProjectTypeVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectInput) GetProjectTypeVersion() string { + if o == nil || IsNil(o.ProjectTypeVersion.Get()) { + var ret string + return ret + } + return *o.ProjectTypeVersion.Get() +} + +// GetProjectTypeVersionOk returns a tuple with the ProjectTypeVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectInput) GetProjectTypeVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectTypeVersion.Get(), o.ProjectTypeVersion.IsSet() +} + +// HasProjectTypeVersion returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasProjectTypeVersion() bool { + if o != nil && o.ProjectTypeVersion.IsSet() { + return true + } + + return false +} + +// SetProjectTypeVersion gets a reference to the given NullableString and assigns it to the ProjectTypeVersion field. +func (o *TemplateProjectTemplateProjectInput) SetProjectTypeVersion(v string) { + o.ProjectTypeVersion.Set(&v) +} + +// SetProjectTypeVersionNil sets the value for ProjectTypeVersion to be an explicit nil +func (o *TemplateProjectTemplateProjectInput) SetProjectTypeVersionNil() { + o.ProjectTypeVersion.Set(nil) +} + +// UnsetProjectTypeVersion ensures that no value is present for ProjectTypeVersion, not even an explicit nil +func (o *TemplateProjectTemplateProjectInput) UnsetProjectTypeVersion() { + o.ProjectTypeVersion.Unset() +} + +// GetProjectEnvVar returns the ProjectEnvVar field value if set, zero value otherwise. +func (o *TemplateProjectTemplateProjectInput) GetProjectEnvVar() []ProjectEnvVarTemplateProjectInput { + if o == nil || IsNil(o.ProjectEnvVar) { + var ret []ProjectEnvVarTemplateProjectInput + return ret + } + return o.ProjectEnvVar +} + +// GetProjectEnvVarOk returns a tuple with the ProjectEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateProjectTemplateProjectInput) GetProjectEnvVarOk() ([]ProjectEnvVarTemplateProjectInput, bool) { + if o == nil || IsNil(o.ProjectEnvVar) { + return nil, false + } + return o.ProjectEnvVar, true +} + +// HasProjectEnvVar returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectInput) HasProjectEnvVar() bool { + if o != nil && !IsNil(o.ProjectEnvVar) { + return true + } + + return false +} + +// SetProjectEnvVar gets a reference to the given []ProjectEnvVarTemplateProjectInput and assigns it to the ProjectEnvVar field. +func (o *TemplateProjectTemplateProjectInput) SetProjectEnvVar(v []ProjectEnvVarTemplateProjectInput) { + o.ProjectEnvVar = v +} + +func (o TemplateProjectTemplateProjectInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TemplateProjectTemplateProjectInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.TemplateEnvironment) { + toSerialize["templateEnvironment"] = o.TemplateEnvironment + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Color.IsSet() { + toSerialize["color"] = o.Color.Get() + } + if o.IsInitProjectSkeleton.IsSet() { + toSerialize["isInitProjectSkeleton"] = o.IsInitProjectSkeleton.Get() + } + if !IsNil(o.ComponentVersion) { + toSerialize["componentVersion"] = o.ComponentVersion + } + if o.ProjectTypeVersion.IsSet() { + toSerialize["projectTypeVersion"] = o.ProjectTypeVersion.Get() + } + if !IsNil(o.ProjectEnvVar) { + toSerialize["projectEnvVar"] = o.ProjectEnvVar + } + return toSerialize, nil +} + +type NullableTemplateProjectTemplateProjectInput struct { + value *TemplateProjectTemplateProjectInput + isSet bool +} + +func (v NullableTemplateProjectTemplateProjectInput) Get() *TemplateProjectTemplateProjectInput { + return v.value +} + +func (v *NullableTemplateProjectTemplateProjectInput) Set(val *TemplateProjectTemplateProjectInput) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateProjectTemplateProjectInput) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateProjectTemplateProjectInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateProjectTemplateProjectInput(val *TemplateProjectTemplateProjectInput) *NullableTemplateProjectTemplateProjectInput { + return &NullableTemplateProjectTemplateProjectInput{value: val, isSet: true} +} + +func (v NullableTemplateProjectTemplateProjectInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateProjectTemplateProjectInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_template_project_template_project_output.go b/pkg/api/rewardcloud/model_template_project_template_project_output.go new file mode 100644 index 0000000..aac7865 --- /dev/null +++ b/pkg/api/rewardcloud/model_template_project_template_project_output.go @@ -0,0 +1,858 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the TemplateProjectTemplateProjectOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TemplateProjectTemplateProjectOutput{} + +// TemplateProjectTemplateProjectOutput Class ProjectTemplate +type TemplateProjectTemplateProjectOutput struct { + Description NullableString `json:"description,omitempty"` + TemplateEnvironment []string `json:"templateEnvironment,omitempty"` + Id *int32 `json:"id,omitempty"` + Uuid *string `json:"uuid,omitempty"` + Name NullableString `json:"name,omitempty"` + CodeName NullableString `json:"codeName,omitempty"` + IsActive NullableBool `json:"isActive,omitempty"` + Cpu NullableInt32 `json:"cpu,omitempty"` + Memory NullableInt32 `json:"memory,omitempty"` + Storage NullableInt32 `json:"storage,omitempty"` + Code NullableString `json:"code,omitempty"` + Color NullableString `json:"color,omitempty"` + IsInitProjectSkeleton NullableBool `json:"isInitProjectSkeleton,omitempty"` + ComponentVersion []string `json:"componentVersion,omitempty"` + ProjectTypeVersion NullableString `json:"projectTypeVersion,omitempty"` + ProjectEnvVar []ProjectEnvVarTemplateProjectOutput `json:"projectEnvVar,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// NewTemplateProjectTemplateProjectOutput instantiates a new TemplateProjectTemplateProjectOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateProjectTemplateProjectOutput() *TemplateProjectTemplateProjectOutput { + this := TemplateProjectTemplateProjectOutput{} + return &this +} + +// NewTemplateProjectTemplateProjectOutputWithDefaults instantiates a new TemplateProjectTemplateProjectOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateProjectTemplateProjectOutputWithDefaults() *TemplateProjectTemplateProjectOutput { + this := TemplateProjectTemplateProjectOutput{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *TemplateProjectTemplateProjectOutput) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetDescription() { + o.Description.Unset() +} + +// GetTemplateEnvironment returns the TemplateEnvironment field value if set, zero value otherwise. +func (o *TemplateProjectTemplateProjectOutput) GetTemplateEnvironment() []string { + if o == nil || IsNil(o.TemplateEnvironment) { + var ret []string + return ret + } + return o.TemplateEnvironment +} + +// GetTemplateEnvironmentOk returns a tuple with the TemplateEnvironment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateProjectTemplateProjectOutput) GetTemplateEnvironmentOk() ([]string, bool) { + if o == nil || IsNil(o.TemplateEnvironment) { + return nil, false + } + return o.TemplateEnvironment, true +} + +// HasTemplateEnvironment returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasTemplateEnvironment() bool { + if o != nil && !IsNil(o.TemplateEnvironment) { + return true + } + + return false +} + +// SetTemplateEnvironment gets a reference to the given []string and assigns it to the TemplateEnvironment field. +func (o *TemplateProjectTemplateProjectOutput) SetTemplateEnvironment(v []string) { + o.TemplateEnvironment = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TemplateProjectTemplateProjectOutput) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateProjectTemplateProjectOutput) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *TemplateProjectTemplateProjectOutput) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *TemplateProjectTemplateProjectOutput) GetUuid() string { + if o == nil || IsNil(o.Uuid) { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateProjectTemplateProjectOutput) GetUuidOk() (*string, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *TemplateProjectTemplateProjectOutput) SetUuid(v string) { + o.Uuid = &v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *TemplateProjectTemplateProjectOutput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetName() { + o.Name.Unset() +} + +// GetCodeName returns the CodeName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetCodeName() string { + if o == nil || IsNil(o.CodeName.Get()) { + var ret string + return ret + } + return *o.CodeName.Get() +} + +// GetCodeNameOk returns a tuple with the CodeName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetCodeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeName.Get(), o.CodeName.IsSet() +} + +// HasCodeName returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasCodeName() bool { + if o != nil && o.CodeName.IsSet() { + return true + } + + return false +} + +// SetCodeName gets a reference to the given NullableString and assigns it to the CodeName field. +func (o *TemplateProjectTemplateProjectOutput) SetCodeName(v string) { + o.CodeName.Set(&v) +} + +// SetCodeNameNil sets the value for CodeName to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetCodeNameNil() { + o.CodeName.Set(nil) +} + +// UnsetCodeName ensures that no value is present for CodeName, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetCodeName() { + o.CodeName.Unset() +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetIsActive() bool { + if o == nil || IsNil(o.IsActive.Get()) { + var ret bool + return ret + } + return *o.IsActive.Get() +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsActive.Get(), o.IsActive.IsSet() +} + +// HasIsActive returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasIsActive() bool { + if o != nil && o.IsActive.IsSet() { + return true + } + + return false +} + +// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field. +func (o *TemplateProjectTemplateProjectOutput) SetIsActive(v bool) { + o.IsActive.Set(&v) +} + +// SetIsActiveNil sets the value for IsActive to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetIsActiveNil() { + o.IsActive.Set(nil) +} + +// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetIsActive() { + o.IsActive.Unset() +} + +// GetCpu returns the Cpu field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetCpu() int32 { + if o == nil || IsNil(o.Cpu.Get()) { + var ret int32 + return ret + } + return *o.Cpu.Get() +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetCpuOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Cpu.Get(), o.Cpu.IsSet() +} + +// HasCpu returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasCpu() bool { + if o != nil && o.Cpu.IsSet() { + return true + } + + return false +} + +// SetCpu gets a reference to the given NullableInt32 and assigns it to the Cpu field. +func (o *TemplateProjectTemplateProjectOutput) SetCpu(v int32) { + o.Cpu.Set(&v) +} + +// SetCpuNil sets the value for Cpu to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetCpuNil() { + o.Cpu.Set(nil) +} + +// UnsetCpu ensures that no value is present for Cpu, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetCpu() { + o.Cpu.Unset() +} + +// GetMemory returns the Memory field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetMemory() int32 { + if o == nil || IsNil(o.Memory.Get()) { + var ret int32 + return ret + } + return *o.Memory.Get() +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetMemoryOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Memory.Get(), o.Memory.IsSet() +} + +// HasMemory returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasMemory() bool { + if o != nil && o.Memory.IsSet() { + return true + } + + return false +} + +// SetMemory gets a reference to the given NullableInt32 and assigns it to the Memory field. +func (o *TemplateProjectTemplateProjectOutput) SetMemory(v int32) { + o.Memory.Set(&v) +} + +// SetMemoryNil sets the value for Memory to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetMemoryNil() { + o.Memory.Set(nil) +} + +// UnsetMemory ensures that no value is present for Memory, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetMemory() { + o.Memory.Unset() +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetStorage() int32 { + if o == nil || IsNil(o.Storage.Get()) { + var ret int32 + return ret + } + return *o.Storage.Get() +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetStorageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Storage.Get(), o.Storage.IsSet() +} + +// HasStorage returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasStorage() bool { + if o != nil && o.Storage.IsSet() { + return true + } + + return false +} + +// SetStorage gets a reference to the given NullableInt32 and assigns it to the Storage field. +func (o *TemplateProjectTemplateProjectOutput) SetStorage(v int32) { + o.Storage.Set(&v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetStorageNil() { + o.Storage.Set(nil) +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetStorage() { + o.Storage.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *TemplateProjectTemplateProjectOutput) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetCode() { + o.Code.Unset() +} + +// GetColor returns the Color field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetColor() string { + if o == nil || IsNil(o.Color.Get()) { + var ret string + return ret + } + return *o.Color.Get() +} + +// GetColorOk returns a tuple with the Color field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Color.Get(), o.Color.IsSet() +} + +// HasColor returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasColor() bool { + if o != nil && o.Color.IsSet() { + return true + } + + return false +} + +// SetColor gets a reference to the given NullableString and assigns it to the Color field. +func (o *TemplateProjectTemplateProjectOutput) SetColor(v string) { + o.Color.Set(&v) +} + +// SetColorNil sets the value for Color to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetColorNil() { + o.Color.Set(nil) +} + +// UnsetColor ensures that no value is present for Color, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetColor() { + o.Color.Unset() +} + +// GetIsInitProjectSkeleton returns the IsInitProjectSkeleton field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetIsInitProjectSkeleton() bool { + if o == nil || IsNil(o.IsInitProjectSkeleton.Get()) { + var ret bool + return ret + } + return *o.IsInitProjectSkeleton.Get() +} + +// GetIsInitProjectSkeletonOk returns a tuple with the IsInitProjectSkeleton field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetIsInitProjectSkeletonOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInitProjectSkeleton.Get(), o.IsInitProjectSkeleton.IsSet() +} + +// HasIsInitProjectSkeleton returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasIsInitProjectSkeleton() bool { + if o != nil && o.IsInitProjectSkeleton.IsSet() { + return true + } + + return false +} + +// SetIsInitProjectSkeleton gets a reference to the given NullableBool and assigns it to the IsInitProjectSkeleton field. +func (o *TemplateProjectTemplateProjectOutput) SetIsInitProjectSkeleton(v bool) { + o.IsInitProjectSkeleton.Set(&v) +} + +// SetIsInitProjectSkeletonNil sets the value for IsInitProjectSkeleton to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetIsInitProjectSkeletonNil() { + o.IsInitProjectSkeleton.Set(nil) +} + +// UnsetIsInitProjectSkeleton ensures that no value is present for IsInitProjectSkeleton, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetIsInitProjectSkeleton() { + o.IsInitProjectSkeleton.Unset() +} + +// GetComponentVersion returns the ComponentVersion field value if set, zero value otherwise. +func (o *TemplateProjectTemplateProjectOutput) GetComponentVersion() []string { + if o == nil || IsNil(o.ComponentVersion) { + var ret []string + return ret + } + return o.ComponentVersion +} + +// GetComponentVersionOk returns a tuple with the ComponentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateProjectTemplateProjectOutput) GetComponentVersionOk() ([]string, bool) { + if o == nil || IsNil(o.ComponentVersion) { + return nil, false + } + return o.ComponentVersion, true +} + +// HasComponentVersion returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasComponentVersion() bool { + if o != nil && !IsNil(o.ComponentVersion) { + return true + } + + return false +} + +// SetComponentVersion gets a reference to the given []string and assigns it to the ComponentVersion field. +func (o *TemplateProjectTemplateProjectOutput) SetComponentVersion(v []string) { + o.ComponentVersion = v +} + +// GetProjectTypeVersion returns the ProjectTypeVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateProjectTemplateProjectOutput) GetProjectTypeVersion() string { + if o == nil || IsNil(o.ProjectTypeVersion.Get()) { + var ret string + return ret + } + return *o.ProjectTypeVersion.Get() +} + +// GetProjectTypeVersionOk returns a tuple with the ProjectTypeVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateProjectTemplateProjectOutput) GetProjectTypeVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectTypeVersion.Get(), o.ProjectTypeVersion.IsSet() +} + +// HasProjectTypeVersion returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasProjectTypeVersion() bool { + if o != nil && o.ProjectTypeVersion.IsSet() { + return true + } + + return false +} + +// SetProjectTypeVersion gets a reference to the given NullableString and assigns it to the ProjectTypeVersion field. +func (o *TemplateProjectTemplateProjectOutput) SetProjectTypeVersion(v string) { + o.ProjectTypeVersion.Set(&v) +} + +// SetProjectTypeVersionNil sets the value for ProjectTypeVersion to be an explicit nil +func (o *TemplateProjectTemplateProjectOutput) SetProjectTypeVersionNil() { + o.ProjectTypeVersion.Set(nil) +} + +// UnsetProjectTypeVersion ensures that no value is present for ProjectTypeVersion, not even an explicit nil +func (o *TemplateProjectTemplateProjectOutput) UnsetProjectTypeVersion() { + o.ProjectTypeVersion.Unset() +} + +// GetProjectEnvVar returns the ProjectEnvVar field value if set, zero value otherwise. +func (o *TemplateProjectTemplateProjectOutput) GetProjectEnvVar() []ProjectEnvVarTemplateProjectOutput { + if o == nil || IsNil(o.ProjectEnvVar) { + var ret []ProjectEnvVarTemplateProjectOutput + return ret + } + return o.ProjectEnvVar +} + +// GetProjectEnvVarOk returns a tuple with the ProjectEnvVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateProjectTemplateProjectOutput) GetProjectEnvVarOk() ([]ProjectEnvVarTemplateProjectOutput, bool) { + if o == nil || IsNil(o.ProjectEnvVar) { + return nil, false + } + return o.ProjectEnvVar, true +} + +// HasProjectEnvVar returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasProjectEnvVar() bool { + if o != nil && !IsNil(o.ProjectEnvVar) { + return true + } + + return false +} + +// SetProjectEnvVar gets a reference to the given []ProjectEnvVarTemplateProjectOutput and assigns it to the ProjectEnvVar field. +func (o *TemplateProjectTemplateProjectOutput) SetProjectEnvVar(v []ProjectEnvVarTemplateProjectOutput) { + o.ProjectEnvVar = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TemplateProjectTemplateProjectOutput) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateProjectTemplateProjectOutput) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *TemplateProjectTemplateProjectOutput) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *TemplateProjectTemplateProjectOutput) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateProjectTemplateProjectOutput) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *TemplateProjectTemplateProjectOutput) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *TemplateProjectTemplateProjectOutput) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o TemplateProjectTemplateProjectOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TemplateProjectTemplateProjectOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.TemplateEnvironment) { + toSerialize["templateEnvironment"] = o.TemplateEnvironment + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.CodeName.IsSet() { + toSerialize["codeName"] = o.CodeName.Get() + } + if o.IsActive.IsSet() { + toSerialize["isActive"] = o.IsActive.Get() + } + if o.Cpu.IsSet() { + toSerialize["cpu"] = o.Cpu.Get() + } + if o.Memory.IsSet() { + toSerialize["memory"] = o.Memory.Get() + } + if o.Storage.IsSet() { + toSerialize["storage"] = o.Storage.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Color.IsSet() { + toSerialize["color"] = o.Color.Get() + } + if o.IsInitProjectSkeleton.IsSet() { + toSerialize["isInitProjectSkeleton"] = o.IsInitProjectSkeleton.Get() + } + if !IsNil(o.ComponentVersion) { + toSerialize["componentVersion"] = o.ComponentVersion + } + if o.ProjectTypeVersion.IsSet() { + toSerialize["projectTypeVersion"] = o.ProjectTypeVersion.Get() + } + if !IsNil(o.ProjectEnvVar) { + toSerialize["projectEnvVar"] = o.ProjectEnvVar + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableTemplateProjectTemplateProjectOutput struct { + value *TemplateProjectTemplateProjectOutput + isSet bool +} + +func (v NullableTemplateProjectTemplateProjectOutput) Get() *TemplateProjectTemplateProjectOutput { + return v.value +} + +func (v *NullableTemplateProjectTemplateProjectOutput) Set(val *TemplateProjectTemplateProjectOutput) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateProjectTemplateProjectOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateProjectTemplateProjectOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateProjectTemplateProjectOutput(val *TemplateProjectTemplateProjectOutput) *NullableTemplateProjectTemplateProjectOutput { + return &NullableTemplateProjectTemplateProjectOutput{value: val, isSet: true} +} + +func (v NullableTemplateProjectTemplateProjectOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateProjectTemplateProjectOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_user.go b/pkg/api/rewardcloud/model_user.go new file mode 100644 index 0000000..bf1ddbd --- /dev/null +++ b/pkg/api/rewardcloud/model_user.go @@ -0,0 +1,1119 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "time" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + +// User Class User +type User struct { + Id *int32 `json:"id,omitempty"` + Uuid NullableString `json:"uuid,omitempty"` + PaymentId NullableString `json:"paymentId,omitempty"` + AuthenticatorId NullableInt32 `json:"authenticatorId,omitempty"` + Fullname NullableString `json:"fullname,omitempty"` + Email NullableString `json:"email,omitempty"` + Username NullableString `json:"username,omitempty"` + Roles []string `json:"roles,omitempty"` + Currency NullableString `json:"currency,omitempty"` + Password *string `json:"password,omitempty"` + ChangePassword NullableString `json:"changePassword,omitempty"` + CurrentPassword NullableString `json:"currentPassword,omitempty"` + IsEnabled *bool `json:"isEnabled,omitempty"` + PasswordHash NullableString `json:"passwordHash,omitempty"` + ActivationHash NullableString `json:"activationHash,omitempty"` + RoleGroup NullableString `json:"roleGroup,omitempty"` + Team []string `json:"team,omitempty"` + TeamRoles []UserTeamRolesInner `json:"teamRoles,omitempty"` + CreatedBy NullableString `json:"createdBy,omitempty"` + UpdatedBy NullableString `json:"updatedBy,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + UserIdentifier *string `json:"userIdentifier,omitempty"` + // not needed when using the \"bcrypt\" algorithm in security.yaml + Salt NullableString `json:"salt,omitempty"` +} + +// NewUser instantiates a new User object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUser() *User { + this := User{} + return &this +} + +// NewUserWithDefaults instantiates a new User object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserWithDefaults() *User { + this := User{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *User) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *User) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *User) SetId(v int32) { + o.Id = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *User) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *User) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *User) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *User) UnsetUuid() { + o.Uuid.Unset() +} + +// GetPaymentId returns the PaymentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetPaymentId() string { + if o == nil || IsNil(o.PaymentId.Get()) { + var ret string + return ret + } + return *o.PaymentId.Get() +} + +// GetPaymentIdOk returns a tuple with the PaymentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetPaymentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PaymentId.Get(), o.PaymentId.IsSet() +} + +// HasPaymentId returns a boolean if a field has been set. +func (o *User) HasPaymentId() bool { + if o != nil && o.PaymentId.IsSet() { + return true + } + + return false +} + +// SetPaymentId gets a reference to the given NullableString and assigns it to the PaymentId field. +func (o *User) SetPaymentId(v string) { + o.PaymentId.Set(&v) +} + +// SetPaymentIdNil sets the value for PaymentId to be an explicit nil +func (o *User) SetPaymentIdNil() { + o.PaymentId.Set(nil) +} + +// UnsetPaymentId ensures that no value is present for PaymentId, not even an explicit nil +func (o *User) UnsetPaymentId() { + o.PaymentId.Unset() +} + +// GetAuthenticatorId returns the AuthenticatorId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetAuthenticatorId() int32 { + if o == nil || IsNil(o.AuthenticatorId.Get()) { + var ret int32 + return ret + } + return *o.AuthenticatorId.Get() +} + +// GetAuthenticatorIdOk returns a tuple with the AuthenticatorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetAuthenticatorIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.AuthenticatorId.Get(), o.AuthenticatorId.IsSet() +} + +// HasAuthenticatorId returns a boolean if a field has been set. +func (o *User) HasAuthenticatorId() bool { + if o != nil && o.AuthenticatorId.IsSet() { + return true + } + + return false +} + +// SetAuthenticatorId gets a reference to the given NullableInt32 and assigns it to the AuthenticatorId field. +func (o *User) SetAuthenticatorId(v int32) { + o.AuthenticatorId.Set(&v) +} + +// SetAuthenticatorIdNil sets the value for AuthenticatorId to be an explicit nil +func (o *User) SetAuthenticatorIdNil() { + o.AuthenticatorId.Set(nil) +} + +// UnsetAuthenticatorId ensures that no value is present for AuthenticatorId, not even an explicit nil +func (o *User) UnsetAuthenticatorId() { + o.AuthenticatorId.Unset() +} + +// GetFullname returns the Fullname field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetFullname() string { + if o == nil || IsNil(o.Fullname.Get()) { + var ret string + return ret + } + return *o.Fullname.Get() +} + +// GetFullnameOk returns a tuple with the Fullname field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetFullnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Fullname.Get(), o.Fullname.IsSet() +} + +// HasFullname returns a boolean if a field has been set. +func (o *User) HasFullname() bool { + if o != nil && o.Fullname.IsSet() { + return true + } + + return false +} + +// SetFullname gets a reference to the given NullableString and assigns it to the Fullname field. +func (o *User) SetFullname(v string) { + o.Fullname.Set(&v) +} + +// SetFullnameNil sets the value for Fullname to be an explicit nil +func (o *User) SetFullnameNil() { + o.Fullname.Set(nil) +} + +// UnsetFullname ensures that no value is present for Fullname, not even an explicit nil +func (o *User) UnsetFullname() { + o.Fullname.Unset() +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetEmail() string { + if o == nil || IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *User) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *User) SetEmail(v string) { + o.Email.Set(&v) +} + +// SetEmailNil sets the value for Email to be an explicit nil +func (o *User) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *User) UnsetEmail() { + o.Email.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *User) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *User) SetUsername(v string) { + o.Username.Set(&v) +} + +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *User) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *User) UnsetUsername() { + o.Username.Unset() +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *User) GetRoles() []string { + if o == nil || IsNil(o.Roles) { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetRolesOk() ([]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *User) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *User) SetRoles(v []string) { + o.Roles = v +} + +// GetCurrency returns the Currency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetCurrency() string { + if o == nil || IsNil(o.Currency.Get()) { + var ret string + return ret + } + return *o.Currency.Get() +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Currency.Get(), o.Currency.IsSet() +} + +// HasCurrency returns a boolean if a field has been set. +func (o *User) HasCurrency() bool { + if o != nil && o.Currency.IsSet() { + return true + } + + return false +} + +// SetCurrency gets a reference to the given NullableString and assigns it to the Currency field. +func (o *User) SetCurrency(v string) { + o.Currency.Set(&v) +} + +// SetCurrencyNil sets the value for Currency to be an explicit nil +func (o *User) SetCurrencyNil() { + o.Currency.Set(nil) +} + +// UnsetCurrency ensures that no value is present for Currency, not even an explicit nil +func (o *User) UnsetCurrency() { + o.Currency.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *User) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *User) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *User) SetPassword(v string) { + o.Password = &v +} + +// GetChangePassword returns the ChangePassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetChangePassword() string { + if o == nil || IsNil(o.ChangePassword.Get()) { + var ret string + return ret + } + return *o.ChangePassword.Get() +} + +// GetChangePasswordOk returns a tuple with the ChangePassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetChangePasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ChangePassword.Get(), o.ChangePassword.IsSet() +} + +// HasChangePassword returns a boolean if a field has been set. +func (o *User) HasChangePassword() bool { + if o != nil && o.ChangePassword.IsSet() { + return true + } + + return false +} + +// SetChangePassword gets a reference to the given NullableString and assigns it to the ChangePassword field. +func (o *User) SetChangePassword(v string) { + o.ChangePassword.Set(&v) +} + +// SetChangePasswordNil sets the value for ChangePassword to be an explicit nil +func (o *User) SetChangePasswordNil() { + o.ChangePassword.Set(nil) +} + +// UnsetChangePassword ensures that no value is present for ChangePassword, not even an explicit nil +func (o *User) UnsetChangePassword() { + o.ChangePassword.Unset() +} + +// GetCurrentPassword returns the CurrentPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetCurrentPassword() string { + if o == nil || IsNil(o.CurrentPassword.Get()) { + var ret string + return ret + } + return *o.CurrentPassword.Get() +} + +// GetCurrentPasswordOk returns a tuple with the CurrentPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetCurrentPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CurrentPassword.Get(), o.CurrentPassword.IsSet() +} + +// HasCurrentPassword returns a boolean if a field has been set. +func (o *User) HasCurrentPassword() bool { + if o != nil && o.CurrentPassword.IsSet() { + return true + } + + return false +} + +// SetCurrentPassword gets a reference to the given NullableString and assigns it to the CurrentPassword field. +func (o *User) SetCurrentPassword(v string) { + o.CurrentPassword.Set(&v) +} + +// SetCurrentPasswordNil sets the value for CurrentPassword to be an explicit nil +func (o *User) SetCurrentPasswordNil() { + o.CurrentPassword.Set(nil) +} + +// UnsetCurrentPassword ensures that no value is present for CurrentPassword, not even an explicit nil +func (o *User) UnsetCurrentPassword() { + o.CurrentPassword.Unset() +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *User) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *User) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *User) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetPasswordHash returns the PasswordHash field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetPasswordHash() string { + if o == nil || IsNil(o.PasswordHash.Get()) { + var ret string + return ret + } + return *o.PasswordHash.Get() +} + +// GetPasswordHashOk returns a tuple with the PasswordHash field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetPasswordHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PasswordHash.Get(), o.PasswordHash.IsSet() +} + +// HasPasswordHash returns a boolean if a field has been set. +func (o *User) HasPasswordHash() bool { + if o != nil && o.PasswordHash.IsSet() { + return true + } + + return false +} + +// SetPasswordHash gets a reference to the given NullableString and assigns it to the PasswordHash field. +func (o *User) SetPasswordHash(v string) { + o.PasswordHash.Set(&v) +} + +// SetPasswordHashNil sets the value for PasswordHash to be an explicit nil +func (o *User) SetPasswordHashNil() { + o.PasswordHash.Set(nil) +} + +// UnsetPasswordHash ensures that no value is present for PasswordHash, not even an explicit nil +func (o *User) UnsetPasswordHash() { + o.PasswordHash.Unset() +} + +// GetActivationHash returns the ActivationHash field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetActivationHash() string { + if o == nil || IsNil(o.ActivationHash.Get()) { + var ret string + return ret + } + return *o.ActivationHash.Get() +} + +// GetActivationHashOk returns a tuple with the ActivationHash field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetActivationHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ActivationHash.Get(), o.ActivationHash.IsSet() +} + +// HasActivationHash returns a boolean if a field has been set. +func (o *User) HasActivationHash() bool { + if o != nil && o.ActivationHash.IsSet() { + return true + } + + return false +} + +// SetActivationHash gets a reference to the given NullableString and assigns it to the ActivationHash field. +func (o *User) SetActivationHash(v string) { + o.ActivationHash.Set(&v) +} + +// SetActivationHashNil sets the value for ActivationHash to be an explicit nil +func (o *User) SetActivationHashNil() { + o.ActivationHash.Set(nil) +} + +// UnsetActivationHash ensures that no value is present for ActivationHash, not even an explicit nil +func (o *User) UnsetActivationHash() { + o.ActivationHash.Unset() +} + +// GetRoleGroup returns the RoleGroup field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetRoleGroup() string { + if o == nil || IsNil(o.RoleGroup.Get()) { + var ret string + return ret + } + return *o.RoleGroup.Get() +} + +// GetRoleGroupOk returns a tuple with the RoleGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetRoleGroupOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RoleGroup.Get(), o.RoleGroup.IsSet() +} + +// HasRoleGroup returns a boolean if a field has been set. +func (o *User) HasRoleGroup() bool { + if o != nil && o.RoleGroup.IsSet() { + return true + } + + return false +} + +// SetRoleGroup gets a reference to the given NullableString and assigns it to the RoleGroup field. +func (o *User) SetRoleGroup(v string) { + o.RoleGroup.Set(&v) +} + +// SetRoleGroupNil sets the value for RoleGroup to be an explicit nil +func (o *User) SetRoleGroupNil() { + o.RoleGroup.Set(nil) +} + +// UnsetRoleGroup ensures that no value is present for RoleGroup, not even an explicit nil +func (o *User) UnsetRoleGroup() { + o.RoleGroup.Unset() +} + +// GetTeam returns the Team field value if set, zero value otherwise. +func (o *User) GetTeam() []string { + if o == nil || IsNil(o.Team) { + var ret []string + return ret + } + return o.Team +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetTeamOk() ([]string, bool) { + if o == nil || IsNil(o.Team) { + return nil, false + } + return o.Team, true +} + +// HasTeam returns a boolean if a field has been set. +func (o *User) HasTeam() bool { + if o != nil && !IsNil(o.Team) { + return true + } + + return false +} + +// SetTeam gets a reference to the given []string and assigns it to the Team field. +func (o *User) SetTeam(v []string) { + o.Team = v +} + +// GetTeamRoles returns the TeamRoles field value if set, zero value otherwise. +func (o *User) GetTeamRoles() []UserTeamRolesInner { + if o == nil || IsNil(o.TeamRoles) { + var ret []UserTeamRolesInner + return ret + } + return o.TeamRoles +} + +// GetTeamRolesOk returns a tuple with the TeamRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetTeamRolesOk() ([]UserTeamRolesInner, bool) { + if o == nil || IsNil(o.TeamRoles) { + return nil, false + } + return o.TeamRoles, true +} + +// HasTeamRoles returns a boolean if a field has been set. +func (o *User) HasTeamRoles() bool { + if o != nil && !IsNil(o.TeamRoles) { + return true + } + + return false +} + +// SetTeamRoles gets a reference to the given []UserTeamRolesInner and assigns it to the TeamRoles field. +func (o *User) SetTeamRoles(v []UserTeamRolesInner) { + o.TeamRoles = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *User) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *User) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *User) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *User) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *User) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *User) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *User) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *User) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *User) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *User) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *User) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *User) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *User) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *User) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetUserIdentifier returns the UserIdentifier field value if set, zero value otherwise. +func (o *User) GetUserIdentifier() string { + if o == nil || IsNil(o.UserIdentifier) { + var ret string + return ret + } + return *o.UserIdentifier +} + +// GetUserIdentifierOk returns a tuple with the UserIdentifier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUserIdentifierOk() (*string, bool) { + if o == nil || IsNil(o.UserIdentifier) { + return nil, false + } + return o.UserIdentifier, true +} + +// HasUserIdentifier returns a boolean if a field has been set. +func (o *User) HasUserIdentifier() bool { + if o != nil && !IsNil(o.UserIdentifier) { + return true + } + + return false +} + +// SetUserIdentifier gets a reference to the given string and assigns it to the UserIdentifier field. +func (o *User) SetUserIdentifier(v string) { + o.UserIdentifier = &v +} + +// GetSalt returns the Salt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetSalt() string { + if o == nil || IsNil(o.Salt.Get()) { + var ret string + return ret + } + return *o.Salt.Get() +} + +// GetSaltOk returns a tuple with the Salt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetSaltOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Salt.Get(), o.Salt.IsSet() +} + +// HasSalt returns a boolean if a field has been set. +func (o *User) HasSalt() bool { + if o != nil && o.Salt.IsSet() { + return true + } + + return false +} + +// SetSalt gets a reference to the given NullableString and assigns it to the Salt field. +func (o *User) SetSalt(v string) { + o.Salt.Set(&v) +} + +// SetSaltNil sets the value for Salt to be an explicit nil +func (o *User) SetSaltNil() { + o.Salt.Set(nil) +} + +// UnsetSalt ensures that no value is present for Salt, not even an explicit nil +func (o *User) UnsetSalt() { + o.Salt.Unset() +} + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.PaymentId.IsSet() { + toSerialize["paymentId"] = o.PaymentId.Get() + } + if o.AuthenticatorId.IsSet() { + toSerialize["authenticatorId"] = o.AuthenticatorId.Get() + } + if o.Fullname.IsSet() { + toSerialize["fullname"] = o.Fullname.Get() + } + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if o.Currency.IsSet() { + toSerialize["currency"] = o.Currency.Get() + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if o.ChangePassword.IsSet() { + toSerialize["changePassword"] = o.ChangePassword.Get() + } + if o.CurrentPassword.IsSet() { + toSerialize["currentPassword"] = o.CurrentPassword.Get() + } + if !IsNil(o.IsEnabled) { + toSerialize["isEnabled"] = o.IsEnabled + } + if o.PasswordHash.IsSet() { + toSerialize["passwordHash"] = o.PasswordHash.Get() + } + if o.ActivationHash.IsSet() { + toSerialize["activationHash"] = o.ActivationHash.Get() + } + if o.RoleGroup.IsSet() { + toSerialize["roleGroup"] = o.RoleGroup.Get() + } + if !IsNil(o.Team) { + toSerialize["team"] = o.Team + } + if !IsNil(o.TeamRoles) { + toSerialize["teamRoles"] = o.TeamRoles + } + if o.CreatedBy.IsSet() { + toSerialize["createdBy"] = o.CreatedBy.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updatedBy"] = o.UpdatedBy.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if !IsNil(o.UserIdentifier) { + toSerialize["userIdentifier"] = o.UserIdentifier + } + if o.Salt.IsSet() { + toSerialize["salt"] = o.Salt.Get() + } + return toSerialize, nil +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_user_team_roles_inner.go b/pkg/api/rewardcloud/model_user_team_roles_inner.go new file mode 100644 index 0000000..09c1a31 --- /dev/null +++ b/pkg/api/rewardcloud/model_user_team_roles_inner.go @@ -0,0 +1,160 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the UserTeamRolesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserTeamRolesInner{} + +// UserTeamRolesInner struct for UserTeamRolesInner +type UserTeamRolesInner struct { + Team *string `json:"team,omitempty"` + RoleGroup *string `json:"roleGroup,omitempty"` +} + +// NewUserTeamRolesInner instantiates a new UserTeamRolesInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserTeamRolesInner() *UserTeamRolesInner { + this := UserTeamRolesInner{} + return &this +} + +// NewUserTeamRolesInnerWithDefaults instantiates a new UserTeamRolesInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserTeamRolesInnerWithDefaults() *UserTeamRolesInner { + this := UserTeamRolesInner{} + return &this +} + +// GetTeam returns the Team field value if set, zero value otherwise. +func (o *UserTeamRolesInner) GetTeam() string { + if o == nil || IsNil(o.Team) { + var ret string + return ret + } + return *o.Team +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserTeamRolesInner) GetTeamOk() (*string, bool) { + if o == nil || IsNil(o.Team) { + return nil, false + } + return o.Team, true +} + +// HasTeam returns a boolean if a field has been set. +func (o *UserTeamRolesInner) HasTeam() bool { + if o != nil && !IsNil(o.Team) { + return true + } + + return false +} + +// SetTeam gets a reference to the given string and assigns it to the Team field. +func (o *UserTeamRolesInner) SetTeam(v string) { + o.Team = &v +} + +// GetRoleGroup returns the RoleGroup field value if set, zero value otherwise. +func (o *UserTeamRolesInner) GetRoleGroup() string { + if o == nil || IsNil(o.RoleGroup) { + var ret string + return ret + } + return *o.RoleGroup +} + +// GetRoleGroupOk returns a tuple with the RoleGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserTeamRolesInner) GetRoleGroupOk() (*string, bool) { + if o == nil || IsNil(o.RoleGroup) { + return nil, false + } + return o.RoleGroup, true +} + +// HasRoleGroup returns a boolean if a field has been set. +func (o *UserTeamRolesInner) HasRoleGroup() bool { + if o != nil && !IsNil(o.RoleGroup) { + return true + } + + return false +} + +// SetRoleGroup gets a reference to the given string and assigns it to the RoleGroup field. +func (o *UserTeamRolesInner) SetRoleGroup(v string) { + o.RoleGroup = &v +} + +func (o UserTeamRolesInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserTeamRolesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Team) { + toSerialize["team"] = o.Team + } + if !IsNil(o.RoleGroup) { + toSerialize["roleGroup"] = o.RoleGroup + } + return toSerialize, nil +} + +type NullableUserTeamRolesInner struct { + value *UserTeamRolesInner + isSet bool +} + +func (v NullableUserTeamRolesInner) Get() *UserTeamRolesInner { + return v.value +} + +func (v *NullableUserTeamRolesInner) Set(val *UserTeamRolesInner) { + v.value = val + v.isSet = true +} + +func (v NullableUserTeamRolesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableUserTeamRolesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserTeamRolesInner(val *UserTeamRolesInner) *NullableUserTeamRolesInner { + return &NullableUserTeamRolesInner{value: val, isSet: true} +} + +func (v NullableUserTeamRolesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserTeamRolesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_validate_env_var_request.go b/pkg/api/rewardcloud/model_validate_env_var_request.go new file mode 100644 index 0000000..e3016dd --- /dev/null +++ b/pkg/api/rewardcloud/model_validate_env_var_request.go @@ -0,0 +1,160 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ValidateEnvVarRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidateEnvVarRequest{} + +// ValidateEnvVarRequest struct for ValidateEnvVarRequest +type ValidateEnvVarRequest struct { + Word *string `json:"word,omitempty"` + Iri *string `json:"iri,omitempty"` +} + +// NewValidateEnvVarRequest instantiates a new ValidateEnvVarRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValidateEnvVarRequest() *ValidateEnvVarRequest { + this := ValidateEnvVarRequest{} + return &this +} + +// NewValidateEnvVarRequestWithDefaults instantiates a new ValidateEnvVarRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValidateEnvVarRequestWithDefaults() *ValidateEnvVarRequest { + this := ValidateEnvVarRequest{} + return &this +} + +// GetWord returns the Word field value if set, zero value otherwise. +func (o *ValidateEnvVarRequest) GetWord() string { + if o == nil || IsNil(o.Word) { + var ret string + return ret + } + return *o.Word +} + +// GetWordOk returns a tuple with the Word field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidateEnvVarRequest) GetWordOk() (*string, bool) { + if o == nil || IsNil(o.Word) { + return nil, false + } + return o.Word, true +} + +// HasWord returns a boolean if a field has been set. +func (o *ValidateEnvVarRequest) HasWord() bool { + if o != nil && !IsNil(o.Word) { + return true + } + + return false +} + +// SetWord gets a reference to the given string and assigns it to the Word field. +func (o *ValidateEnvVarRequest) SetWord(v string) { + o.Word = &v +} + +// GetIri returns the Iri field value if set, zero value otherwise. +func (o *ValidateEnvVarRequest) GetIri() string { + if o == nil || IsNil(o.Iri) { + var ret string + return ret + } + return *o.Iri +} + +// GetIriOk returns a tuple with the Iri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidateEnvVarRequest) GetIriOk() (*string, bool) { + if o == nil || IsNil(o.Iri) { + return nil, false + } + return o.Iri, true +} + +// HasIri returns a boolean if a field has been set. +func (o *ValidateEnvVarRequest) HasIri() bool { + if o != nil && !IsNil(o.Iri) { + return true + } + + return false +} + +// SetIri gets a reference to the given string and assigns it to the Iri field. +func (o *ValidateEnvVarRequest) SetIri(v string) { + o.Iri = &v +} + +func (o ValidateEnvVarRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidateEnvVarRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Word) { + toSerialize["word"] = o.Word + } + if !IsNil(o.Iri) { + toSerialize["iri"] = o.Iri + } + return toSerialize, nil +} + +type NullableValidateEnvVarRequest struct { + value *ValidateEnvVarRequest + isSet bool +} + +func (v NullableValidateEnvVarRequest) Get() *ValidateEnvVarRequest { + return v.value +} + +func (v *NullableValidateEnvVarRequest) Set(val *ValidateEnvVarRequest) { + v.value = val + v.isSet = true +} + +func (v NullableValidateEnvVarRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableValidateEnvVarRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidateEnvVarRequest(val *ValidateEnvVarRequest) *NullableValidateEnvVarRequest { + return &NullableValidateEnvVarRequest{value: val, isSet: true} +} + +func (v NullableValidateEnvVarRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidateEnvVarRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/model_validate_env_var_response.go b/pkg/api/rewardcloud/model_validate_env_var_response.go new file mode 100644 index 0000000..1bc2819 --- /dev/null +++ b/pkg/api/rewardcloud/model_validate_env_var_response.go @@ -0,0 +1,160 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" +) + +// checks if the ValidateEnvVarResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidateEnvVarResponse{} + +// ValidateEnvVarResponse struct for ValidateEnvVarResponse +type ValidateEnvVarResponse struct { + IsValid *bool `json:"isValid,omitempty"` + Messages []string `json:"messages,omitempty"` +} + +// NewValidateEnvVarResponse instantiates a new ValidateEnvVarResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValidateEnvVarResponse() *ValidateEnvVarResponse { + this := ValidateEnvVarResponse{} + return &this +} + +// NewValidateEnvVarResponseWithDefaults instantiates a new ValidateEnvVarResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValidateEnvVarResponseWithDefaults() *ValidateEnvVarResponse { + this := ValidateEnvVarResponse{} + return &this +} + +// GetIsValid returns the IsValid field value if set, zero value otherwise. +func (o *ValidateEnvVarResponse) GetIsValid() bool { + if o == nil || IsNil(o.IsValid) { + var ret bool + return ret + } + return *o.IsValid +} + +// GetIsValidOk returns a tuple with the IsValid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidateEnvVarResponse) GetIsValidOk() (*bool, bool) { + if o == nil || IsNil(o.IsValid) { + return nil, false + } + return o.IsValid, true +} + +// HasIsValid returns a boolean if a field has been set. +func (o *ValidateEnvVarResponse) HasIsValid() bool { + if o != nil && !IsNil(o.IsValid) { + return true + } + + return false +} + +// SetIsValid gets a reference to the given bool and assigns it to the IsValid field. +func (o *ValidateEnvVarResponse) SetIsValid(v bool) { + o.IsValid = &v +} + +// GetMessages returns the Messages field value if set, zero value otherwise. +func (o *ValidateEnvVarResponse) GetMessages() []string { + if o == nil || IsNil(o.Messages) { + var ret []string + return ret + } + return o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidateEnvVarResponse) GetMessagesOk() ([]string, bool) { + if o == nil || IsNil(o.Messages) { + return nil, false + } + return o.Messages, true +} + +// HasMessages returns a boolean if a field has been set. +func (o *ValidateEnvVarResponse) HasMessages() bool { + if o != nil && !IsNil(o.Messages) { + return true + } + + return false +} + +// SetMessages gets a reference to the given []string and assigns it to the Messages field. +func (o *ValidateEnvVarResponse) SetMessages(v []string) { + o.Messages = v +} + +func (o ValidateEnvVarResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidateEnvVarResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IsValid) { + toSerialize["isValid"] = o.IsValid + } + if !IsNil(o.Messages) { + toSerialize["messages"] = o.Messages + } + return toSerialize, nil +} + +type NullableValidateEnvVarResponse struct { + value *ValidateEnvVarResponse + isSet bool +} + +func (v NullableValidateEnvVarResponse) Get() *ValidateEnvVarResponse { + return v.value +} + +func (v *NullableValidateEnvVarResponse) Set(val *ValidateEnvVarResponse) { + v.value = val + v.isSet = true +} + +func (v NullableValidateEnvVarResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableValidateEnvVarResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidateEnvVarResponse(val *ValidateEnvVarResponse) *NullableValidateEnvVarResponse { + return &NullableValidateEnvVarResponse{value: val, isSet: true} +} + +func (v NullableValidateEnvVarResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidateEnvVarResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/api/rewardcloud/response.go b/pkg/api/rewardcloud/response.go new file mode 100644 index 0000000..0345ad1 --- /dev/null +++ b/pkg/api/rewardcloud/response.go @@ -0,0 +1,47 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/pkg/api/rewardcloud/utils.go b/pkg/api/rewardcloud/utils.go new file mode 100644 index 0000000..7de47a0 --- /dev/null +++ b/pkg/api/rewardcloud/utils.go @@ -0,0 +1,347 @@ +/* +Reward Cloud + +It is an API for Reward Cloud project in ITG Commerce + +API version: v0.7.0-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package rewardcloud + +import ( + "encoding/json" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +}