volcano-sdk 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +203 -0
- data/README.md +758 -0
- data/lib/volcano/auth.rb +113 -0
- data/lib/volcano/auth_anonymous.rb +51 -0
- data/lib/volcano/auth_confirm_email.rb +19 -0
- data/lib/volcano/auth_email_change.rb +75 -0
- data/lib/volcano/auth_get_user.rb +110 -0
- data/lib/volcano/auth_hosted.rb +43 -0
- data/lib/volcano/auth_oauth.rb +102 -0
- data/lib/volcano/auth_oauth_api.rb +51 -0
- data/lib/volcano/auth_oauth_sign_in.rb +61 -0
- data/lib/volcano/auth_oauth_token.rb +51 -0
- data/lib/volcano/auth_refresh.rb +117 -0
- data/lib/volcano/auth_resend_confirmation.rb +19 -0
- data/lib/volcano/auth_reset_password.rb +23 -0
- data/lib/volcano/auth_reset_password_for_email.rb +19 -0
- data/lib/volcano/auth_sessions.rb +139 -0
- data/lib/volcano/auth_sign_up.rb +40 -0
- data/lib/volcano/auth_state.rb +148 -0
- data/lib/volcano/auth_update_user.rb +32 -0
- data/lib/volcano/client.rb +121 -0
- data/lib/volcano/connection_string.rb +85 -0
- data/lib/volcano/database.rb +243 -0
- data/lib/volcano/errors.rb +38 -0
- data/lib/volcano/function_resolution.rb +120 -0
- data/lib/volcano/function_response.rb +26 -0
- data/lib/volcano/functions.rb +136 -0
- data/lib/volcano/generated/lib/volcano-generated/api/anon_keys_api.rb +471 -0
- data/lib/volcano/generated/lib/volcano-generated/api/auth_admin_api.rb +739 -0
- data/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb +1798 -0
- data/lib/volcano/generated/lib/volcano-generated/api/authentication_api.rb +1523 -0
- data/lib/volcano/generated/lib/volcano-generated/api/database_backups_api.rb +791 -0
- data/lib/volcano/generated/lib/volcano-generated/api/database_branches_api.rb +665 -0
- data/lib/volcano/generated/lib/volcano-generated/api/database_queries_api.rb +905 -0
- data/lib/volcano/generated/lib/volcano-generated/api/databases_api.rb +819 -0
- data/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +913 -0
- data/lib/volcano/generated/lib/volcano-generated/api/functions_api.rb +1355 -0
- data/lib/volcano/generated/lib/volcano-generated/api/git_connections_api.rb +1012 -0
- data/lib/volcano/generated/lib/volcano-generated/api/locks_api.rb +480 -0
- data/lib/volcano/generated/lib/volcano-generated/api/logs_api.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/api/o_auth_authentication_api.rb +962 -0
- data/lib/volcano/generated/lib/volcano-generated/api/o_auth_configuration_api.rb +452 -0
- data/lib/volcano/generated/lib/volcano-generated/api/project_imports_api.rb +599 -0
- data/lib/volcano/generated/lib/volcano-generated/api/projects_api.rb +1862 -0
- data/lib/volcano/generated/lib/volcano-generated/api/realtime_api.rb +222 -0
- data/lib/volcano/generated/lib/volcano-generated/api/service_keys_api.rb +402 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_admin_api.rb +189 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_buckets_api.rb +437 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_objects_api.rb +857 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_policies_api.rb +277 -0
- data/lib/volcano/generated/lib/volcano-generated/api/system_api.rb +79 -0
- data/lib/volcano/generated/lib/volcano-generated/api/variables_api.rb +454 -0
- data/lib/volcano/generated/lib/volcano-generated/api_client.rb +393 -0
- data/lib/volcano/generated/lib/volcano-generated/api_error.rb +58 -0
- data/lib/volcano/generated/lib/volcano-generated/api_model_base.rb +88 -0
- data/lib/volcano/generated/lib/volcano-generated/configuration.rb +337 -0
- data/lib/volcano/generated/lib/volcano-generated/models/anon_key.rb +257 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb +728 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email200_response.rb +181 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change200_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_convert_anonymous200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_authorize_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_token_request.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify200_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify_request.rb +209 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_get_my_sessions200_response.rb +231 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page.rb +225 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_defaults.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_response.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_runtime.rb +220 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_identities_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_identity.rb +273 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_interval.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_response.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_series_point.rb +263 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_summary.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_window.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_link_o_auth_provider200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response_providers_inner.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_method_summary.rb +370 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_methods_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_o_auth_exchange_request.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_defaults.rb +212 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_options.rb +306 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_response.rb +299 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_density.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_font.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_layout.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_radius.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_scale.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme.rb +318 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme_colors.rb +323 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_password_policy.rb +409 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_platform_exchange_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_refresh_request.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change200_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password_request.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_session.rb +393 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signin_request.rb +233 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signup_anonymous_request.rb +150 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signup_request.rb +202 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signup_response.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_token_response.rb +254 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_update_user_request.rb +160 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_user.rb +330 -0
- data/lib/volcano/generated/lib/volcano-generated/models/ban_auth_user_request.rb +148 -0
- data/lib/volcano/generated/lib/volcano-generated/models/ban_user_response.rb +278 -0
- data/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_failure.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_response.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api200_response.rb +272 -0
- data/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api_request.rb +223 -0
- data/lib/volcano/generated/lib/volcano-generated/models/complete_upload_session_response.rb +148 -0
- data/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request_oauth_providers_inner.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/connect_project_git_request.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_anon_key_request.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_backup_request.rb +185 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_branch_request.rb +223 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_request.rb +290 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_restore_request.rb +187 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_email_template_request.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_frontend_custom_domain_request.rb +191 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_function_scheduler_request.rb +252 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_o_auth_config_request.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_project_request.rb +219 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_service_key_request.rb +206 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_storage_bucket_request.rb +216 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_storage_policy_request.rb +243 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_request.rb +276 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_response.rb +179 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_variable_request.rb +219 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database.rb +442 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup.rb +283 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup_list.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule_entry.rb +301 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_branch.rb +480 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_branch_list.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_branch_storage.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_delete_request.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_insert_request.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_filter.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value.rb +106 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value_one_of_inner.rb +105 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_order.rb +187 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_database.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_item.rb +411 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_result.rb +161 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_restore.rb +388 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_restore_list.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_restore_window.rb +159 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_select_request.rb +268 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_stats.rb +447 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_update_request.rb +232 -0
- data/lib/volcano/generated/lib/volcano-generated/models/delete_database202_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/delete_database_backup200_response.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/delete_database_branch202_response.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/deployment_phase.rb +263 -0
- data/lib/volcano/generated/lib/volcano-generated/models/deployment_progress.rb +324 -0
- data/lib/volcano/generated/lib/volcano-generated/models/deployment_reference.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/device_authorization_response.rb +296 -0
- data/lib/volcano/generated/lib/volcano-generated/models/email_template.rb +305 -0
- data/lib/volcano/generated/lib/volcano-generated/models/error.rb +174 -0
- data/lib/volcano/generated/lib/volcano-generated/models/export_project_source_request.rb +174 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend.rb +504 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_response.rb +370 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config.rb +253 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_deployment.rb +487 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_routing_record.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_verification_record.rb +216 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_daily_entry.rb +247 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_data.rb +204 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_history_response.rb +298 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function.rb +565 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_deployment.rb +477 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_http_auth_mode.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_invocation_mode.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_invocation_request.rb +150 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_region.rb +219 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_runtime_deployment.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_runtime_option.rb +245 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_runtimes_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_scheduler.rb +330 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_scheduler_list_response.rb +290 -0
- data/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response.rb +178 -0
- data/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_email_password.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_oauth_providers_inner.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_connect_start_response.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_connection.rb +346 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_connections_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_installation.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_installations_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_repositories_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_repository.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_auth_page_type.rb +44 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_login_options_response.rb +185 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_renderable_page_type.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_connect_start_response.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_connection.rb +432 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_connections_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_provider.rb +39 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_source.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_sources_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_anon_keys200_response.rb +189 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response_providers_inner.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_database_regions200_response_inner.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_email_templates200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_o_auth_configs200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_postgres_versions200_response_inner.rb +178 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_storage_buckets200_response.rb +104 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_storage_objects_admin200_response.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/live_log_level.rb +44 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket.rb +246 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket_counts.rb +226 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_request.rb +252 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_response.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_database_request_resource.rb +221 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_deployment.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_deployment_request_selector.rb +170 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_event.rb +257 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_event_body.rb +108 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_frontend_request_resource.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_function_request_resource.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_request_resource.rb +58 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_resource.rb +227 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_search_event.rb +297 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_search_request.rb +264 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_search_response.rb +232 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_stream_request.rb +244 -0
- data/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb +278 -0
- data/lib/volcano/generated/lib/volcano-generated/models/o_auth_config.rb +256 -0
- data/lib/volcano/generated/lib/volcano-generated/models/o_auth_error_response.rb +173 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_auth_users.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_databases.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_frontend_deployments.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_frontends.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_function_deployments.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_functions.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_project_custom_domains.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_project_deployments.rb +306 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_projects.rb +368 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_service_keys.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_storage_buckets.rb +251 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_variables.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/platform_exchange_response.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_request.rb +221 -0
- data/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_response.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project.rb +419 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config.rb +273 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result.rb +261 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result_entry.rb +245 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_summary.rb +320 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_cors.rb +176 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_from.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_password_provider.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_smtp.rb +184 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_verification.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_managed_pages.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_appearance.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_layouts.rb +214 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password.rb +211 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password_reset.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_providers.rb +159 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_rate_limits.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_redirects.rb +180 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_sessions.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_signup.rb +232 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_tokens.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket.rb +226 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket_policy.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_database.rb +274 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_email_template.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_email_templates.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend.rb +183 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_function.rb +248 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_page.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_pages.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_missing_resource.rb +214 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_o_auth_provider.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_project.rb +209 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_realtime.rb +174 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_scheduler.rb +229 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_skipped_resource.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error.rb +201 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error_response.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_variable.rb +199 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_deployment.rb +412 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_deployment_resource.rb +241 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_deployment_summary.rb +312 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain.rb +403 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain_all_of_frontend.rb +191 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_git_connection.rb +296 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_git_connection_summary.rb +294 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_git_deploy_settings.rb +239 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_category.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_check.rb +316 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_data_status.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_evidence.rb +251 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_resource.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_response.rb +356 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_scope.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_status.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_summary.rb +186 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_action.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_action_code.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_destination.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_destination_mode.rb +39 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_disposition.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_finding.rb +327 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_impact.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_preflight_request.rb +305 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_readiness.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_report.rb +476 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_resource.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_resource_kind.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_run.rb +412 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_run_status.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_start_request.rb +365 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_summary.rb +348 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_target.rb +39 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease_request.rb +183 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_lock_state.rb +185 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_data_status.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_dimensions.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_group_by.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_metric.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_request.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_response.rb +227 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_time_range.rb +188 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_result.rb +292 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_unit.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_value.rb +199 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_window.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export.rb +302 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export_omission.rb +218 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export_skip.rb +217 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export_state.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_usage_response.rb +234 -0
- data/lib/volcano/generated/lib/volcano-generated/models/realtime_config.rb +217 -0
- data/lib/volcano/generated/lib/volcano-generated/models/realtime_plan_limits.rb +189 -0
- data/lib/volcano/generated/lib/volcano-generated/models/realtime_stats.rb +178 -0
- data/lib/volcano/generated/lib/volcano-generated/models/refresh_o_auth_provider_token200_response.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/reset_database_password200_response.rb +177 -0
- data/lib/volcano/generated/lib/volcano-generated/models/resolve_function_response.rb +248 -0
- data/lib/volcano/generated/lib/volcano-generated/models/resource_reference.rb +241 -0
- data/lib/volcano/generated/lib/volcano-generated/models/schedule_request.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/service_key.rb +294 -0
- data/lib/volcano/generated/lib/volcano-generated/models/set_project_git_production_branch_request.rb +183 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_bucket.rb +282 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_copy_request.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_list_response.rb +159 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_move_request.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_object.rb +359 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_object_with_bucket.rb +383 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_policy.rb +313 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_stats.rb +220 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_visibility_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/test_email_request.rb +234 -0
- data/lib/volcano/generated/lib/volcano-generated/models/test_email_response.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/unban_user_response.rb +267 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb +626 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_hosted_page_request.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_layout_request.rb +186 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_theme_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_database_branch_request.rb +184 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_database_type_request.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_email_template_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_function_request.rb +201 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_function_scheduler_request.rb +225 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_o_auth_config_request.rb +187 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_project_git_deploy_settings_request.rb +211 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_project_request.rb +198 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_realtime_config_request.rb +179 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_storage_bucket_request.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_variable_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/upload_session_part.rb +169 -0
- data/lib/volcano/generated/lib/volcano-generated/models/upload_session_status_response.rb +295 -0
- data/lib/volcano/generated/lib/volcano-generated/models/upload_storage_object201_response.rb +104 -0
- data/lib/volcano/generated/lib/volcano-generated/models/usage_data_point.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/variable.rb +389 -0
- data/lib/volcano/generated/lib/volcano-generated/version.rb +15 -0
- data/lib/volcano/generated/lib/volcano-generated.rb +405 -0
- data/lib/volcano/generated_transport.rb +131 -0
- data/lib/volcano/generated_transport_anonymous.rb +34 -0
- data/lib/volcano/generated_transport_auth.rb +108 -0
- data/lib/volcano/generated_transport_confirmation.rb +30 -0
- data/lib/volcano/generated_transport_database.rb +54 -0
- data/lib/volcano/generated_transport_email_change.rb +44 -0
- data/lib/volcano/generated_transport_functions.rb +108 -0
- data/lib/volcano/generated_transport_logs.rb +31 -0
- data/lib/volcano/generated_transport_oauth.rb +64 -0
- data/lib/volcano/generated_transport_sessions.rb +27 -0
- data/lib/volcano/generated_transport_storage.rb +86 -0
- data/lib/volcano/generated_transport_support.rb +221 -0
- data/lib/volcano/generated_transport_upload_session_api.rb +69 -0
- data/lib/volcano/generated_transport_upload_sessions.rb +67 -0
- data/lib/volcano/lock_auto_renewal.rb +51 -0
- data/lib/volcano/lock_guard.rb +135 -0
- data/lib/volcano/lock_lease_clock.rb +39 -0
- data/lib/volcano/lock_renewer.rb +73 -0
- data/lib/volcano/lock_session.rb +70 -0
- data/lib/volcano/locks.rb +109 -0
- data/lib/volcano/log_responses.rb +39 -0
- data/lib/volcano/logs.rb +82 -0
- data/lib/volcano/models.rb +115 -0
- data/lib/volcano/realtime/blocking_call.rb +32 -0
- data/lib/volcano/realtime/broadcast_delivery.rb +63 -0
- data/lib/volcano/realtime/channel_callbacks.rb +127 -0
- data/lib/volcano/realtime/channel_lifecycle.rb +133 -0
- data/lib/volcano/realtime/connection.rb +114 -0
- data/lib/volcano/realtime/connection_callbacks.rb +126 -0
- data/lib/volcano/realtime/lifecycle.rb +46 -0
- data/lib/volcano/realtime/postgres_batch.rb +89 -0
- data/lib/volcano/realtime/postgres_changes.rb +107 -0
- data/lib/volcano/realtime/postgres_database.rb +63 -0
- data/lib/volcano/realtime/postgres_delivery.rb +113 -0
- data/lib/volcano/realtime/postgres_expansion.rb +66 -0
- data/lib/volcano/realtime/presence.rb +122 -0
- data/lib/volcano/realtime/presence_state.rb +61 -0
- data/lib/volcano/realtime/protocol.rb +150 -0
- data/lib/volcano/realtime/protocol_dispatch.rb +114 -0
- data/lib/volcano/realtime/protocol_io.rb +96 -0
- data/lib/volcano/realtime/protocol_lifecycle.rb +122 -0
- data/lib/volcano/realtime/protocol_publication_dispatch.rb +121 -0
- data/lib/volcano/realtime/protocol_recovery.rb +117 -0
- data/lib/volcano/realtime/protocol_recovery_dispatch.rb +106 -0
- data/lib/volcano/realtime/protocol_recovery_position.rb +95 -0
- data/lib/volcano/realtime/reconnect.rb +88 -0
- data/lib/volcano/realtime.rb +260 -0
- data/lib/volcano/redaction.rb +60 -0
- data/lib/volcano/sign_up_result.rb +9 -0
- data/lib/volcano/storage.rb +120 -0
- data/lib/volcano/storage_models.rb +121 -0
- data/lib/volcano/storage_mutations.rb +81 -0
- data/lib/volcano/storage_public_url.rb +64 -0
- data/lib/volcano/storage_resumable_upload.rb +90 -0
- data/lib/volcano/storage_upload_sessions.rb +116 -0
- data/lib/volcano/transport.rb +60 -0
- data/lib/volcano/version.rb +5 -0
- data/lib/volcano.rb +58 -0
- metadata +580 -0
|
@@ -0,0 +1,1862 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Volcano Hosting API
|
|
3
|
+
|
|
4
|
+
#Public API for Volcano Hosting clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
|
7
|
+
Contact: support@volcano.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Volcano::Generated
|
|
16
|
+
class ProjectsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Apply project configuration
|
|
23
|
+
# Validates and applies a declarative configuration manifest to the project, reconciling each declared section and returning a per-resource report. Omitted sections are untouched. Declared collection keys (`variables`, `buckets[].policies`, `auth.providers.oauth`, `auth.email.templates`, `functions[].schedulers`) are fully synced: resources absent from the manifest are deleted. Functions, frontends, databases, and buckets are never created or deleted; manifest entries for resources that do not exist are skipped and reported in `skipped`, and existing resources missing from a declared section are reported in `missing`. Validation failures (including plan-gate violations) return 422 and nothing is applied. Set `dry_run=true` to get the projected report without applying changes. Applies are serialized per project; a concurrent apply returns 409.
|
|
24
|
+
# @param id [String] Project ID
|
|
25
|
+
# @param project_config [ProjectConfig]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [Boolean] :dry_run Validate and report projected actions without applying changes. (default to false)
|
|
28
|
+
# @return [ProjectConfigApplyResult]
|
|
29
|
+
def apply_project_config(id, project_config, opts = {})
|
|
30
|
+
data, _status_code, _headers = apply_project_config_with_http_info(id, project_config, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Apply project configuration
|
|
35
|
+
# Validates and applies a declarative configuration manifest to the project, reconciling each declared section and returning a per-resource report. Omitted sections are untouched. Declared collection keys (`variables`, `buckets[].policies`, `auth.providers.oauth`, `auth.email.templates`, `functions[].schedulers`) are fully synced: resources absent from the manifest are deleted. Functions, frontends, databases, and buckets are never created or deleted; manifest entries for resources that do not exist are skipped and reported in `skipped`, and existing resources missing from a declared section are reported in `missing`. Validation failures (including plan-gate violations) return 422 and nothing is applied. Set `dry_run=true` to get the projected report without applying changes. Applies are serialized per project; a concurrent apply returns 409.
|
|
36
|
+
# @param id [String] Project ID
|
|
37
|
+
# @param project_config [ProjectConfig]
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [Boolean] :dry_run Validate and report projected actions without applying changes. (default to false)
|
|
40
|
+
# @return [Array<(ProjectConfigApplyResult, Integer, Hash)>] ProjectConfigApplyResult data, response status code and response headers
|
|
41
|
+
def apply_project_config_with_http_info(id, project_config, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.apply_project_config ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'id' is set
|
|
46
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.apply_project_config"
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'project_config' is set
|
|
50
|
+
if @api_client.config.client_side_validation && project_config.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'project_config' when calling ProjectsApi.apply_project_config"
|
|
52
|
+
end
|
|
53
|
+
# resource path
|
|
54
|
+
local_var_path = '/projects/{id}/config'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
55
|
+
|
|
56
|
+
# query parameters
|
|
57
|
+
query_params = opts[:query_params] || {}
|
|
58
|
+
query_params[:'dry_run'] = opts[:'dry_run'] if !opts[:'dry_run'].nil?
|
|
59
|
+
|
|
60
|
+
# header parameters
|
|
61
|
+
header_params = opts[:header_params] || {}
|
|
62
|
+
# HTTP header 'Accept' (if needed)
|
|
63
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
64
|
+
# HTTP header 'Content-Type'
|
|
65
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
66
|
+
if !content_type.nil?
|
|
67
|
+
header_params['Content-Type'] = content_type
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# form parameters
|
|
71
|
+
form_params = opts[:form_params] || {}
|
|
72
|
+
|
|
73
|
+
# http body (model)
|
|
74
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(project_config)
|
|
75
|
+
|
|
76
|
+
# return_type
|
|
77
|
+
return_type = opts[:debug_return_type] || 'ProjectConfigApplyResult'
|
|
78
|
+
|
|
79
|
+
# auth_names
|
|
80
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
81
|
+
|
|
82
|
+
new_options = opts.merge(
|
|
83
|
+
:operation => :"ProjectsApi.apply_project_config",
|
|
84
|
+
:header_params => header_params,
|
|
85
|
+
:query_params => query_params,
|
|
86
|
+
:form_params => form_params,
|
|
87
|
+
:body => post_body,
|
|
88
|
+
:auth_names => auth_names,
|
|
89
|
+
:return_type => return_type
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug "API called: ProjectsApi#apply_project_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Cancel an incomplete source export
|
|
100
|
+
# Restores platform source writes while the project is in `git_exporting` or `git_pending`. If Volcano reserved or deployed the root commit, export remains consumed and cannot be run again. The connected repository and any commit already pushed to it are unchanged.
|
|
101
|
+
# @param id [String] Project ID
|
|
102
|
+
# @param [Hash] opts the optional parameters
|
|
103
|
+
# @return [nil]
|
|
104
|
+
def cancel_project_source_export(id, opts = {})
|
|
105
|
+
cancel_project_source_export_with_http_info(id, opts)
|
|
106
|
+
nil
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Cancel an incomplete source export
|
|
110
|
+
# Restores platform source writes while the project is in `git_exporting` or `git_pending`. If Volcano reserved or deployed the root commit, export remains consumed and cannot be run again. The connected repository and any commit already pushed to it are unchanged.
|
|
111
|
+
# @param id [String] Project ID
|
|
112
|
+
# @param [Hash] opts the optional parameters
|
|
113
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
114
|
+
def cancel_project_source_export_with_http_info(id, opts = {})
|
|
115
|
+
if @api_client.config.debugging
|
|
116
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.cancel_project_source_export ...'
|
|
117
|
+
end
|
|
118
|
+
# verify the required parameter 'id' is set
|
|
119
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
120
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.cancel_project_source_export"
|
|
121
|
+
end
|
|
122
|
+
# resource path
|
|
123
|
+
local_var_path = '/projects/{id}/source-export'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
124
|
+
|
|
125
|
+
# query parameters
|
|
126
|
+
query_params = opts[:query_params] || {}
|
|
127
|
+
|
|
128
|
+
# header parameters
|
|
129
|
+
header_params = opts[:header_params] || {}
|
|
130
|
+
# HTTP header 'Accept' (if needed)
|
|
131
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
132
|
+
|
|
133
|
+
# form parameters
|
|
134
|
+
form_params = opts[:form_params] || {}
|
|
135
|
+
|
|
136
|
+
# http body (model)
|
|
137
|
+
post_body = opts[:debug_body]
|
|
138
|
+
|
|
139
|
+
# return_type
|
|
140
|
+
return_type = opts[:debug_return_type]
|
|
141
|
+
|
|
142
|
+
# auth_names
|
|
143
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
144
|
+
|
|
145
|
+
new_options = opts.merge(
|
|
146
|
+
:operation => :"ProjectsApi.cancel_project_source_export",
|
|
147
|
+
:header_params => header_params,
|
|
148
|
+
:query_params => query_params,
|
|
149
|
+
:form_params => form_params,
|
|
150
|
+
:body => post_body,
|
|
151
|
+
:auth_names => auth_names,
|
|
152
|
+
:return_type => return_type
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
156
|
+
if @api_client.config.debugging
|
|
157
|
+
@api_client.config.logger.debug "API called: ProjectsApi#cancel_project_source_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
158
|
+
end
|
|
159
|
+
return data, status_code, headers
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Connect or update a project's repo connection
|
|
163
|
+
# Full replace, following Vercel's model: many projects may point at the same repo, so this only binds the project — it never creates or deletes git-provider state. Used for both the initial connect and later edits (repo change, root directory, production branch). Resolves the repository_id or repo_full_name selector against the repos accessible through installation_id via connection_id's stored GitHub user token, then persists repository metadata only from that validated GitHub response.
|
|
164
|
+
# @param id [String] Project ID
|
|
165
|
+
# @param connect_project_git_request [ConnectProjectGitRequest]
|
|
166
|
+
# @param [Hash] opts the optional parameters
|
|
167
|
+
# @return [ProjectGitConnection]
|
|
168
|
+
def connect_project_git(id, connect_project_git_request, opts = {})
|
|
169
|
+
data, _status_code, _headers = connect_project_git_with_http_info(id, connect_project_git_request, opts)
|
|
170
|
+
data
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Connect or update a project's repo connection
|
|
174
|
+
# Full replace, following Vercel's model: many projects may point at the same repo, so this only binds the project — it never creates or deletes git-provider state. Used for both the initial connect and later edits (repo change, root directory, production branch). Resolves the repository_id or repo_full_name selector against the repos accessible through installation_id via connection_id's stored GitHub user token, then persists repository metadata only from that validated GitHub response.
|
|
175
|
+
# @param id [String] Project ID
|
|
176
|
+
# @param connect_project_git_request [ConnectProjectGitRequest]
|
|
177
|
+
# @param [Hash] opts the optional parameters
|
|
178
|
+
# @return [Array<(ProjectGitConnection, Integer, Hash)>] ProjectGitConnection data, response status code and response headers
|
|
179
|
+
def connect_project_git_with_http_info(id, connect_project_git_request, opts = {})
|
|
180
|
+
if @api_client.config.debugging
|
|
181
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.connect_project_git ...'
|
|
182
|
+
end
|
|
183
|
+
# verify the required parameter 'id' is set
|
|
184
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
185
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.connect_project_git"
|
|
186
|
+
end
|
|
187
|
+
# verify the required parameter 'connect_project_git_request' is set
|
|
188
|
+
if @api_client.config.client_side_validation && connect_project_git_request.nil?
|
|
189
|
+
fail ArgumentError, "Missing the required parameter 'connect_project_git_request' when calling ProjectsApi.connect_project_git"
|
|
190
|
+
end
|
|
191
|
+
# resource path
|
|
192
|
+
local_var_path = '/projects/{id}/git-connection'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
193
|
+
|
|
194
|
+
# query parameters
|
|
195
|
+
query_params = opts[:query_params] || {}
|
|
196
|
+
|
|
197
|
+
# header parameters
|
|
198
|
+
header_params = opts[:header_params] || {}
|
|
199
|
+
# HTTP header 'Accept' (if needed)
|
|
200
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
201
|
+
# HTTP header 'Content-Type'
|
|
202
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
203
|
+
if !content_type.nil?
|
|
204
|
+
header_params['Content-Type'] = content_type
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# form parameters
|
|
208
|
+
form_params = opts[:form_params] || {}
|
|
209
|
+
|
|
210
|
+
# http body (model)
|
|
211
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_project_git_request)
|
|
212
|
+
|
|
213
|
+
# return_type
|
|
214
|
+
return_type = opts[:debug_return_type] || 'ProjectGitConnection'
|
|
215
|
+
|
|
216
|
+
# auth_names
|
|
217
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
218
|
+
|
|
219
|
+
new_options = opts.merge(
|
|
220
|
+
:operation => :"ProjectsApi.connect_project_git",
|
|
221
|
+
:header_params => header_params,
|
|
222
|
+
:query_params => query_params,
|
|
223
|
+
:form_params => form_params,
|
|
224
|
+
:body => post_body,
|
|
225
|
+
:auth_names => auth_names,
|
|
226
|
+
:return_type => return_type
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
230
|
+
if @api_client.config.debugging
|
|
231
|
+
@api_client.config.logger.debug "API called: ProjectsApi#connect_project_git\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
232
|
+
end
|
|
233
|
+
return data, status_code, headers
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Create a new project
|
|
237
|
+
# Creates a project for the authenticated user. Each user can create up to 1,000 projects. Requests over this cap return 403.
|
|
238
|
+
# @param create_project_request [CreateProjectRequest]
|
|
239
|
+
# @param [Hash] opts the optional parameters
|
|
240
|
+
# @return [Project]
|
|
241
|
+
def create_project(create_project_request, opts = {})
|
|
242
|
+
data, _status_code, _headers = create_project_with_http_info(create_project_request, opts)
|
|
243
|
+
data
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Create a new project
|
|
247
|
+
# Creates a project for the authenticated user. Each user can create up to 1,000 projects. Requests over this cap return 403.
|
|
248
|
+
# @param create_project_request [CreateProjectRequest]
|
|
249
|
+
# @param [Hash] opts the optional parameters
|
|
250
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
251
|
+
def create_project_with_http_info(create_project_request, opts = {})
|
|
252
|
+
if @api_client.config.debugging
|
|
253
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.create_project ...'
|
|
254
|
+
end
|
|
255
|
+
# verify the required parameter 'create_project_request' is set
|
|
256
|
+
if @api_client.config.client_side_validation && create_project_request.nil?
|
|
257
|
+
fail ArgumentError, "Missing the required parameter 'create_project_request' when calling ProjectsApi.create_project"
|
|
258
|
+
end
|
|
259
|
+
# resource path
|
|
260
|
+
local_var_path = '/projects'
|
|
261
|
+
|
|
262
|
+
# query parameters
|
|
263
|
+
query_params = opts[:query_params] || {}
|
|
264
|
+
|
|
265
|
+
# header parameters
|
|
266
|
+
header_params = opts[:header_params] || {}
|
|
267
|
+
# HTTP header 'Accept' (if needed)
|
|
268
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
269
|
+
# HTTP header 'Content-Type'
|
|
270
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
271
|
+
if !content_type.nil?
|
|
272
|
+
header_params['Content-Type'] = content_type
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# form parameters
|
|
276
|
+
form_params = opts[:form_params] || {}
|
|
277
|
+
|
|
278
|
+
# http body (model)
|
|
279
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_project_request)
|
|
280
|
+
|
|
281
|
+
# return_type
|
|
282
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
283
|
+
|
|
284
|
+
# auth_names
|
|
285
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
286
|
+
|
|
287
|
+
new_options = opts.merge(
|
|
288
|
+
:operation => :"ProjectsApi.create_project",
|
|
289
|
+
:header_params => header_params,
|
|
290
|
+
:query_params => query_params,
|
|
291
|
+
:form_params => form_params,
|
|
292
|
+
:body => post_body,
|
|
293
|
+
:auth_names => auth_names,
|
|
294
|
+
:return_type => return_type
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
298
|
+
if @api_client.config.debugging
|
|
299
|
+
@api_client.config.logger.debug "API called: ProjectsApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
300
|
+
end
|
|
301
|
+
return data, status_code, headers
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Delete a project
|
|
305
|
+
# Starts asynchronous project deletion. The project remains available from `GET /projects/{id}` with `status: deleting` until cleanup finishes, but is removed from project lists as soon as deletion starts. After cleanup it returns 404.
|
|
306
|
+
# @param id [String] Project ID
|
|
307
|
+
# @param [Hash] opts the optional parameters
|
|
308
|
+
# @return [nil]
|
|
309
|
+
def delete_project(id, opts = {})
|
|
310
|
+
delete_project_with_http_info(id, opts)
|
|
311
|
+
nil
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Delete a project
|
|
315
|
+
# Starts asynchronous project deletion. The project remains available from `GET /projects/{id}` with `status: deleting` until cleanup finishes, but is removed from project lists as soon as deletion starts. After cleanup it returns 404.
|
|
316
|
+
# @param id [String] Project ID
|
|
317
|
+
# @param [Hash] opts the optional parameters
|
|
318
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
319
|
+
def delete_project_with_http_info(id, opts = {})
|
|
320
|
+
if @api_client.config.debugging
|
|
321
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.delete_project ...'
|
|
322
|
+
end
|
|
323
|
+
# verify the required parameter 'id' is set
|
|
324
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
325
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.delete_project"
|
|
326
|
+
end
|
|
327
|
+
# resource path
|
|
328
|
+
local_var_path = '/projects/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
329
|
+
|
|
330
|
+
# query parameters
|
|
331
|
+
query_params = opts[:query_params] || {}
|
|
332
|
+
|
|
333
|
+
# header parameters
|
|
334
|
+
header_params = opts[:header_params] || {}
|
|
335
|
+
# HTTP header 'Accept' (if needed)
|
|
336
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
337
|
+
|
|
338
|
+
# form parameters
|
|
339
|
+
form_params = opts[:form_params] || {}
|
|
340
|
+
|
|
341
|
+
# http body (model)
|
|
342
|
+
post_body = opts[:debug_body]
|
|
343
|
+
|
|
344
|
+
# return_type
|
|
345
|
+
return_type = opts[:debug_return_type]
|
|
346
|
+
|
|
347
|
+
# auth_names
|
|
348
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
349
|
+
|
|
350
|
+
new_options = opts.merge(
|
|
351
|
+
:operation => :"ProjectsApi.delete_project",
|
|
352
|
+
:header_params => header_params,
|
|
353
|
+
:query_params => query_params,
|
|
354
|
+
:form_params => form_params,
|
|
355
|
+
:body => post_body,
|
|
356
|
+
:auth_names => auth_names,
|
|
357
|
+
:return_type => return_type
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
361
|
+
if @api_client.config.debugging
|
|
362
|
+
@api_client.config.logger.debug "API called: ProjectsApi#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
363
|
+
end
|
|
364
|
+
return data, status_code, headers
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# Remove the project logo
|
|
368
|
+
# Deletes the project logo from the project's storage folder and clears its record. Returns the updated project with no `logo_url`.
|
|
369
|
+
# @param id [String] Project ID
|
|
370
|
+
# @param [Hash] opts the optional parameters
|
|
371
|
+
# @return [Project]
|
|
372
|
+
def delete_project_logo(id, opts = {})
|
|
373
|
+
data, _status_code, _headers = delete_project_logo_with_http_info(id, opts)
|
|
374
|
+
data
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# Remove the project logo
|
|
378
|
+
# Deletes the project logo from the project's storage folder and clears its record. Returns the updated project with no `logo_url`.
|
|
379
|
+
# @param id [String] Project ID
|
|
380
|
+
# @param [Hash] opts the optional parameters
|
|
381
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
382
|
+
def delete_project_logo_with_http_info(id, opts = {})
|
|
383
|
+
if @api_client.config.debugging
|
|
384
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.delete_project_logo ...'
|
|
385
|
+
end
|
|
386
|
+
# verify the required parameter 'id' is set
|
|
387
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
388
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.delete_project_logo"
|
|
389
|
+
end
|
|
390
|
+
# resource path
|
|
391
|
+
local_var_path = '/projects/{id}/logo'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
392
|
+
|
|
393
|
+
# query parameters
|
|
394
|
+
query_params = opts[:query_params] || {}
|
|
395
|
+
|
|
396
|
+
# header parameters
|
|
397
|
+
header_params = opts[:header_params] || {}
|
|
398
|
+
# HTTP header 'Accept' (if needed)
|
|
399
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
400
|
+
|
|
401
|
+
# form parameters
|
|
402
|
+
form_params = opts[:form_params] || {}
|
|
403
|
+
|
|
404
|
+
# http body (model)
|
|
405
|
+
post_body = opts[:debug_body]
|
|
406
|
+
|
|
407
|
+
# return_type
|
|
408
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
409
|
+
|
|
410
|
+
# auth_names
|
|
411
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
412
|
+
|
|
413
|
+
new_options = opts.merge(
|
|
414
|
+
:operation => :"ProjectsApi.delete_project_logo",
|
|
415
|
+
:header_params => header_params,
|
|
416
|
+
:query_params => query_params,
|
|
417
|
+
:form_params => form_params,
|
|
418
|
+
:body => post_body,
|
|
419
|
+
:auth_names => auth_names,
|
|
420
|
+
:return_type => return_type
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
424
|
+
if @api_client.config.debugging
|
|
425
|
+
@api_client.config.logger.debug "API called: ProjectsApi#delete_project_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
426
|
+
end
|
|
427
|
+
return data, status_code, headers
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# Disconnect a project's repo connection
|
|
431
|
+
# @param id [String] Project ID
|
|
432
|
+
# @param [Hash] opts the optional parameters
|
|
433
|
+
# @return [nil]
|
|
434
|
+
def disconnect_project_git(id, opts = {})
|
|
435
|
+
disconnect_project_git_with_http_info(id, opts)
|
|
436
|
+
nil
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
# Disconnect a project's repo connection
|
|
440
|
+
# @param id [String] Project ID
|
|
441
|
+
# @param [Hash] opts the optional parameters
|
|
442
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
443
|
+
def disconnect_project_git_with_http_info(id, opts = {})
|
|
444
|
+
if @api_client.config.debugging
|
|
445
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.disconnect_project_git ...'
|
|
446
|
+
end
|
|
447
|
+
# verify the required parameter 'id' is set
|
|
448
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
449
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.disconnect_project_git"
|
|
450
|
+
end
|
|
451
|
+
# resource path
|
|
452
|
+
local_var_path = '/projects/{id}/git-connection'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
453
|
+
|
|
454
|
+
# query parameters
|
|
455
|
+
query_params = opts[:query_params] || {}
|
|
456
|
+
|
|
457
|
+
# header parameters
|
|
458
|
+
header_params = opts[:header_params] || {}
|
|
459
|
+
# HTTP header 'Accept' (if needed)
|
|
460
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
461
|
+
|
|
462
|
+
# form parameters
|
|
463
|
+
form_params = opts[:form_params] || {}
|
|
464
|
+
|
|
465
|
+
# http body (model)
|
|
466
|
+
post_body = opts[:debug_body]
|
|
467
|
+
|
|
468
|
+
# return_type
|
|
469
|
+
return_type = opts[:debug_return_type]
|
|
470
|
+
|
|
471
|
+
# auth_names
|
|
472
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
473
|
+
|
|
474
|
+
new_options = opts.merge(
|
|
475
|
+
:operation => :"ProjectsApi.disconnect_project_git",
|
|
476
|
+
:header_params => header_params,
|
|
477
|
+
:query_params => query_params,
|
|
478
|
+
:form_params => form_params,
|
|
479
|
+
:body => post_body,
|
|
480
|
+
:auth_names => auth_names,
|
|
481
|
+
:return_type => return_type
|
|
482
|
+
)
|
|
483
|
+
|
|
484
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
485
|
+
if @api_client.config.debugging
|
|
486
|
+
@api_client.config.logger.debug "API called: ProjectsApi#disconnect_project_git\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
487
|
+
end
|
|
488
|
+
return data, status_code, headers
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
# Initialize an empty repository with a project's stored source
|
|
492
|
+
# Creates the first commit in the connected repository and pushes it directly to the configured production branch. The push enters the ordinary Git auto-deploy flow. Direct source writes remain frozen until that deployment succeeds and the repository becomes the source of truth. The caller confirms the production branch shown before export. Starting export pins that branch: later GitHub default-branch changes do not repoint the project. If the configured branch changed after the caller read it, the request fails without exporting so the caller can show and confirm the new value. The response lists what the export could not carry: resources with no successful deployment to take source from (`skipped`), and things no export can hand back (`omitted`) — migrations, which Volcano stores no copy of, and credential-shaped files, which are left for their owner to add. Requires a connected repository with no commits or branches, and runs once. Volcano never creates the repository. If GitHub did not confirm the push, retrying creates the same commit and adopts it when it already reached the repository.
|
|
493
|
+
# @param id [String] Project ID
|
|
494
|
+
# @param export_project_source_request [ExportProjectSourceRequest]
|
|
495
|
+
# @param [Hash] opts the optional parameters
|
|
496
|
+
# @return [ProjectSourceExport]
|
|
497
|
+
def export_project_source(id, export_project_source_request, opts = {})
|
|
498
|
+
data, _status_code, _headers = export_project_source_with_http_info(id, export_project_source_request, opts)
|
|
499
|
+
data
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
# Initialize an empty repository with a project's stored source
|
|
503
|
+
# Creates the first commit in the connected repository and pushes it directly to the configured production branch. The push enters the ordinary Git auto-deploy flow. Direct source writes remain frozen until that deployment succeeds and the repository becomes the source of truth. The caller confirms the production branch shown before export. Starting export pins that branch: later GitHub default-branch changes do not repoint the project. If the configured branch changed after the caller read it, the request fails without exporting so the caller can show and confirm the new value. The response lists what the export could not carry: resources with no successful deployment to take source from (`skipped`), and things no export can hand back (`omitted`) — migrations, which Volcano stores no copy of, and credential-shaped files, which are left for their owner to add. Requires a connected repository with no commits or branches, and runs once. Volcano never creates the repository. If GitHub did not confirm the push, retrying creates the same commit and adopts it when it already reached the repository.
|
|
504
|
+
# @param id [String] Project ID
|
|
505
|
+
# @param export_project_source_request [ExportProjectSourceRequest]
|
|
506
|
+
# @param [Hash] opts the optional parameters
|
|
507
|
+
# @return [Array<(ProjectSourceExport, Integer, Hash)>] ProjectSourceExport data, response status code and response headers
|
|
508
|
+
def export_project_source_with_http_info(id, export_project_source_request, opts = {})
|
|
509
|
+
if @api_client.config.debugging
|
|
510
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.export_project_source ...'
|
|
511
|
+
end
|
|
512
|
+
# verify the required parameter 'id' is set
|
|
513
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
514
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.export_project_source"
|
|
515
|
+
end
|
|
516
|
+
# verify the required parameter 'export_project_source_request' is set
|
|
517
|
+
if @api_client.config.client_side_validation && export_project_source_request.nil?
|
|
518
|
+
fail ArgumentError, "Missing the required parameter 'export_project_source_request' when calling ProjectsApi.export_project_source"
|
|
519
|
+
end
|
|
520
|
+
# resource path
|
|
521
|
+
local_var_path = '/projects/{id}/source-export'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
522
|
+
|
|
523
|
+
# query parameters
|
|
524
|
+
query_params = opts[:query_params] || {}
|
|
525
|
+
|
|
526
|
+
# header parameters
|
|
527
|
+
header_params = opts[:header_params] || {}
|
|
528
|
+
# HTTP header 'Accept' (if needed)
|
|
529
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
530
|
+
# HTTP header 'Content-Type'
|
|
531
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
532
|
+
if !content_type.nil?
|
|
533
|
+
header_params['Content-Type'] = content_type
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
# form parameters
|
|
537
|
+
form_params = opts[:form_params] || {}
|
|
538
|
+
|
|
539
|
+
# http body (model)
|
|
540
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(export_project_source_request)
|
|
541
|
+
|
|
542
|
+
# return_type
|
|
543
|
+
return_type = opts[:debug_return_type] || 'ProjectSourceExport'
|
|
544
|
+
|
|
545
|
+
# auth_names
|
|
546
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
547
|
+
|
|
548
|
+
new_options = opts.merge(
|
|
549
|
+
:operation => :"ProjectsApi.export_project_source",
|
|
550
|
+
:header_params => header_params,
|
|
551
|
+
:query_params => query_params,
|
|
552
|
+
:form_params => form_params,
|
|
553
|
+
:body => post_body,
|
|
554
|
+
:auth_names => auth_names,
|
|
555
|
+
:return_type => return_type
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
559
|
+
if @api_client.config.debugging
|
|
560
|
+
@api_client.config.logger.debug "API called: ProjectsApi#export_project_source\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
561
|
+
end
|
|
562
|
+
return data, status_code, headers
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
# Get project by ID
|
|
566
|
+
# @param id [String] Project ID
|
|
567
|
+
# @param [Hash] opts the optional parameters
|
|
568
|
+
# @return [Project]
|
|
569
|
+
def get_project(id, opts = {})
|
|
570
|
+
data, _status_code, _headers = get_project_with_http_info(id, opts)
|
|
571
|
+
data
|
|
572
|
+
end
|
|
573
|
+
|
|
574
|
+
# Get project by ID
|
|
575
|
+
# @param id [String] Project ID
|
|
576
|
+
# @param [Hash] opts the optional parameters
|
|
577
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
578
|
+
def get_project_with_http_info(id, opts = {})
|
|
579
|
+
if @api_client.config.debugging
|
|
580
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.get_project ...'
|
|
581
|
+
end
|
|
582
|
+
# verify the required parameter 'id' is set
|
|
583
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
584
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_project"
|
|
585
|
+
end
|
|
586
|
+
# resource path
|
|
587
|
+
local_var_path = '/projects/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
588
|
+
|
|
589
|
+
# query parameters
|
|
590
|
+
query_params = opts[:query_params] || {}
|
|
591
|
+
|
|
592
|
+
# header parameters
|
|
593
|
+
header_params = opts[:header_params] || {}
|
|
594
|
+
# HTTP header 'Accept' (if needed)
|
|
595
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
596
|
+
|
|
597
|
+
# form parameters
|
|
598
|
+
form_params = opts[:form_params] || {}
|
|
599
|
+
|
|
600
|
+
# http body (model)
|
|
601
|
+
post_body = opts[:debug_body]
|
|
602
|
+
|
|
603
|
+
# return_type
|
|
604
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
605
|
+
|
|
606
|
+
# auth_names
|
|
607
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
608
|
+
|
|
609
|
+
new_options = opts.merge(
|
|
610
|
+
:operation => :"ProjectsApi.get_project",
|
|
611
|
+
:header_params => header_params,
|
|
612
|
+
:query_params => query_params,
|
|
613
|
+
:form_params => form_params,
|
|
614
|
+
:body => post_body,
|
|
615
|
+
:auth_names => auth_names,
|
|
616
|
+
:return_type => return_type
|
|
617
|
+
)
|
|
618
|
+
|
|
619
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
620
|
+
if @api_client.config.debugging
|
|
621
|
+
@api_client.config.logger.debug "API called: ProjectsApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
622
|
+
end
|
|
623
|
+
return data, status_code, headers
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
# Export project configuration
|
|
627
|
+
# Exports the project's current user-facing configuration as a declarative manifest. Returns JSON by default. Request the canonical volcano-config.yaml rendering with `Accept: application/yaml` or `?format=yaml`; the YAML is returned verbatim as the raw response body (`Content-Type: application/yaml`) and is meant to be saved as-is. Write-only secrets (SMTP password, OAuth client secrets, TLS material) are omitted from the export; the YAML rendering adds a header comment describing how to set them via CLI environment interpolation.
|
|
628
|
+
# @param id [String] Project ID
|
|
629
|
+
# @param [Hash] opts the optional parameters
|
|
630
|
+
# @option opts [String] :format Response format override. Takes precedence over the Accept header.
|
|
631
|
+
# @return [ProjectConfig]
|
|
632
|
+
def get_project_config(id, opts = {})
|
|
633
|
+
data, _status_code, _headers = get_project_config_with_http_info(id, opts)
|
|
634
|
+
data
|
|
635
|
+
end
|
|
636
|
+
|
|
637
|
+
# Export project configuration
|
|
638
|
+
# Exports the project's current user-facing configuration as a declarative manifest. Returns JSON by default. Request the canonical volcano-config.yaml rendering with `Accept: application/yaml` or `?format=yaml`; the YAML is returned verbatim as the raw response body (`Content-Type: application/yaml`) and is meant to be saved as-is. Write-only secrets (SMTP password, OAuth client secrets, TLS material) are omitted from the export; the YAML rendering adds a header comment describing how to set them via CLI environment interpolation.
|
|
639
|
+
# @param id [String] Project ID
|
|
640
|
+
# @param [Hash] opts the optional parameters
|
|
641
|
+
# @option opts [String] :format Response format override. Takes precedence over the Accept header.
|
|
642
|
+
# @return [Array<(ProjectConfig, Integer, Hash)>] ProjectConfig data, response status code and response headers
|
|
643
|
+
def get_project_config_with_http_info(id, opts = {})
|
|
644
|
+
if @api_client.config.debugging
|
|
645
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.get_project_config ...'
|
|
646
|
+
end
|
|
647
|
+
# verify the required parameter 'id' is set
|
|
648
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
649
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_project_config"
|
|
650
|
+
end
|
|
651
|
+
allowable_values = ["json", "yaml"]
|
|
652
|
+
if @api_client.config.client_side_validation && opts[:'format'] && !allowable_values.include?(opts[:'format'])
|
|
653
|
+
fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
|
|
654
|
+
end
|
|
655
|
+
# resource path
|
|
656
|
+
local_var_path = '/projects/{id}/config'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
657
|
+
|
|
658
|
+
# query parameters
|
|
659
|
+
query_params = opts[:query_params] || {}
|
|
660
|
+
query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
|
|
661
|
+
|
|
662
|
+
# header parameters
|
|
663
|
+
header_params = opts[:header_params] || {}
|
|
664
|
+
# HTTP header 'Accept' (if needed)
|
|
665
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/yaml']) unless header_params['Accept']
|
|
666
|
+
|
|
667
|
+
# form parameters
|
|
668
|
+
form_params = opts[:form_params] || {}
|
|
669
|
+
|
|
670
|
+
# http body (model)
|
|
671
|
+
post_body = opts[:debug_body]
|
|
672
|
+
|
|
673
|
+
# return_type
|
|
674
|
+
return_type = opts[:debug_return_type] || 'ProjectConfig'
|
|
675
|
+
|
|
676
|
+
# auth_names
|
|
677
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
678
|
+
|
|
679
|
+
new_options = opts.merge(
|
|
680
|
+
:operation => :"ProjectsApi.get_project_config",
|
|
681
|
+
:header_params => header_params,
|
|
682
|
+
:query_params => query_params,
|
|
683
|
+
:form_params => form_params,
|
|
684
|
+
:body => post_body,
|
|
685
|
+
:auth_names => auth_names,
|
|
686
|
+
:return_type => return_type
|
|
687
|
+
)
|
|
688
|
+
|
|
689
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
690
|
+
if @api_client.config.debugging
|
|
691
|
+
@api_client.config.logger.debug "API called: ProjectsApi#get_project_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
692
|
+
end
|
|
693
|
+
return data, status_code, headers
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
# Get a project's repo connection
|
|
697
|
+
# @param id [String] Project ID
|
|
698
|
+
# @param [Hash] opts the optional parameters
|
|
699
|
+
# @return [ProjectGitConnection]
|
|
700
|
+
def get_project_git_connection(id, opts = {})
|
|
701
|
+
data, _status_code, _headers = get_project_git_connection_with_http_info(id, opts)
|
|
702
|
+
data
|
|
703
|
+
end
|
|
704
|
+
|
|
705
|
+
# Get a project's repo connection
|
|
706
|
+
# @param id [String] Project ID
|
|
707
|
+
# @param [Hash] opts the optional parameters
|
|
708
|
+
# @return [Array<(ProjectGitConnection, Integer, Hash)>] ProjectGitConnection data, response status code and response headers
|
|
709
|
+
def get_project_git_connection_with_http_info(id, opts = {})
|
|
710
|
+
if @api_client.config.debugging
|
|
711
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.get_project_git_connection ...'
|
|
712
|
+
end
|
|
713
|
+
# verify the required parameter 'id' is set
|
|
714
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
715
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_project_git_connection"
|
|
716
|
+
end
|
|
717
|
+
# resource path
|
|
718
|
+
local_var_path = '/projects/{id}/git-connection'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
719
|
+
|
|
720
|
+
# query parameters
|
|
721
|
+
query_params = opts[:query_params] || {}
|
|
722
|
+
|
|
723
|
+
# header parameters
|
|
724
|
+
header_params = opts[:header_params] || {}
|
|
725
|
+
# HTTP header 'Accept' (if needed)
|
|
726
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
727
|
+
|
|
728
|
+
# form parameters
|
|
729
|
+
form_params = opts[:form_params] || {}
|
|
730
|
+
|
|
731
|
+
# http body (model)
|
|
732
|
+
post_body = opts[:debug_body]
|
|
733
|
+
|
|
734
|
+
# return_type
|
|
735
|
+
return_type = opts[:debug_return_type] || 'ProjectGitConnection'
|
|
736
|
+
|
|
737
|
+
# auth_names
|
|
738
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
739
|
+
|
|
740
|
+
new_options = opts.merge(
|
|
741
|
+
:operation => :"ProjectsApi.get_project_git_connection",
|
|
742
|
+
:header_params => header_params,
|
|
743
|
+
:query_params => query_params,
|
|
744
|
+
:form_params => form_params,
|
|
745
|
+
:body => post_body,
|
|
746
|
+
:auth_names => auth_names,
|
|
747
|
+
:return_type => return_type
|
|
748
|
+
)
|
|
749
|
+
|
|
750
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
751
|
+
if @api_client.config.debugging
|
|
752
|
+
@api_client.config.logger.debug "API called: ProjectsApi#get_project_git_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
753
|
+
end
|
|
754
|
+
return data, status_code, headers
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
# Get a project's Git auto-deploy settings
|
|
758
|
+
# @param id [String] Project ID
|
|
759
|
+
# @param [Hash] opts the optional parameters
|
|
760
|
+
# @return [ProjectGitDeploySettings]
|
|
761
|
+
def get_project_git_deploy_settings(id, opts = {})
|
|
762
|
+
data, _status_code, _headers = get_project_git_deploy_settings_with_http_info(id, opts)
|
|
763
|
+
data
|
|
764
|
+
end
|
|
765
|
+
|
|
766
|
+
# Get a project's Git auto-deploy settings
|
|
767
|
+
# @param id [String] Project ID
|
|
768
|
+
# @param [Hash] opts the optional parameters
|
|
769
|
+
# @return [Array<(ProjectGitDeploySettings, Integer, Hash)>] ProjectGitDeploySettings data, response status code and response headers
|
|
770
|
+
def get_project_git_deploy_settings_with_http_info(id, opts = {})
|
|
771
|
+
if @api_client.config.debugging
|
|
772
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.get_project_git_deploy_settings ...'
|
|
773
|
+
end
|
|
774
|
+
# verify the required parameter 'id' is set
|
|
775
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
776
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_project_git_deploy_settings"
|
|
777
|
+
end
|
|
778
|
+
# resource path
|
|
779
|
+
local_var_path = '/projects/{id}/git-deploy-settings'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
780
|
+
|
|
781
|
+
# query parameters
|
|
782
|
+
query_params = opts[:query_params] || {}
|
|
783
|
+
|
|
784
|
+
# header parameters
|
|
785
|
+
header_params = opts[:header_params] || {}
|
|
786
|
+
# HTTP header 'Accept' (if needed)
|
|
787
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
788
|
+
|
|
789
|
+
# form parameters
|
|
790
|
+
form_params = opts[:form_params] || {}
|
|
791
|
+
|
|
792
|
+
# http body (model)
|
|
793
|
+
post_body = opts[:debug_body]
|
|
794
|
+
|
|
795
|
+
# return_type
|
|
796
|
+
return_type = opts[:debug_return_type] || 'ProjectGitDeploySettings'
|
|
797
|
+
|
|
798
|
+
# auth_names
|
|
799
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
800
|
+
|
|
801
|
+
new_options = opts.merge(
|
|
802
|
+
:operation => :"ProjectsApi.get_project_git_deploy_settings",
|
|
803
|
+
:header_params => header_params,
|
|
804
|
+
:query_params => query_params,
|
|
805
|
+
:form_params => form_params,
|
|
806
|
+
:body => post_body,
|
|
807
|
+
:auth_names => auth_names,
|
|
808
|
+
:return_type => return_type
|
|
809
|
+
)
|
|
810
|
+
|
|
811
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
812
|
+
if @api_client.config.debugging
|
|
813
|
+
@api_client.config.logger.debug "API called: ProjectsApi#get_project_git_deploy_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
814
|
+
end
|
|
815
|
+
return data, status_code, headers
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
# Get project health
|
|
819
|
+
# Returns a fast control-plane health snapshot for the project and its deployed resources. The endpoint does not run live provider probes. A successful request returns 200 even when the project status is `unhealthy`; transport and authorization failures use HTTP errors.
|
|
820
|
+
# @param id [String] Project ID
|
|
821
|
+
# @param [Hash] opts the optional parameters
|
|
822
|
+
# @return [ProjectHealthResponse]
|
|
823
|
+
def get_project_health(id, opts = {})
|
|
824
|
+
data, _status_code, _headers = get_project_health_with_http_info(id, opts)
|
|
825
|
+
data
|
|
826
|
+
end
|
|
827
|
+
|
|
828
|
+
# Get project health
|
|
829
|
+
# Returns a fast control-plane health snapshot for the project and its deployed resources. The endpoint does not run live provider probes. A successful request returns 200 even when the project status is `unhealthy`; transport and authorization failures use HTTP errors.
|
|
830
|
+
# @param id [String] Project ID
|
|
831
|
+
# @param [Hash] opts the optional parameters
|
|
832
|
+
# @return [Array<(ProjectHealthResponse, Integer, Hash)>] ProjectHealthResponse data, response status code and response headers
|
|
833
|
+
def get_project_health_with_http_info(id, opts = {})
|
|
834
|
+
if @api_client.config.debugging
|
|
835
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.get_project_health ...'
|
|
836
|
+
end
|
|
837
|
+
# verify the required parameter 'id' is set
|
|
838
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
839
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_project_health"
|
|
840
|
+
end
|
|
841
|
+
# resource path
|
|
842
|
+
local_var_path = '/projects/{id}/health'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
843
|
+
|
|
844
|
+
# query parameters
|
|
845
|
+
query_params = opts[:query_params] || {}
|
|
846
|
+
|
|
847
|
+
# header parameters
|
|
848
|
+
header_params = opts[:header_params] || {}
|
|
849
|
+
# HTTP header 'Accept' (if needed)
|
|
850
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
851
|
+
|
|
852
|
+
# form parameters
|
|
853
|
+
form_params = opts[:form_params] || {}
|
|
854
|
+
|
|
855
|
+
# http body (model)
|
|
856
|
+
post_body = opts[:debug_body]
|
|
857
|
+
|
|
858
|
+
# return_type
|
|
859
|
+
return_type = opts[:debug_return_type] || 'ProjectHealthResponse'
|
|
860
|
+
|
|
861
|
+
# auth_names
|
|
862
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
863
|
+
|
|
864
|
+
new_options = opts.merge(
|
|
865
|
+
:operation => :"ProjectsApi.get_project_health",
|
|
866
|
+
:header_params => header_params,
|
|
867
|
+
:query_params => query_params,
|
|
868
|
+
:form_params => form_params,
|
|
869
|
+
:body => post_body,
|
|
870
|
+
:auth_names => auth_names,
|
|
871
|
+
:return_type => return_type
|
|
872
|
+
)
|
|
873
|
+
|
|
874
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
875
|
+
if @api_client.config.debugging
|
|
876
|
+
@api_client.config.logger.debug "API called: ProjectsApi#get_project_health\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
877
|
+
end
|
|
878
|
+
return data, status_code, headers
|
|
879
|
+
end
|
|
880
|
+
|
|
881
|
+
# Get the project logo image
|
|
882
|
+
# Returns the raw logo image stored in the project's storage folder. This endpoint is unauthenticated so the asset can be rendered directly in an `<img>` tag; project IDs are unguessable UUIDs and logos are non-sensitive branding. The `Project.logo_url` field exposes a versioned path to this endpoint.
|
|
883
|
+
# @param id [String] Project ID
|
|
884
|
+
# @param [Hash] opts the optional parameters
|
|
885
|
+
# @return [File]
|
|
886
|
+
def get_project_logo(id, opts = {})
|
|
887
|
+
data, _status_code, _headers = get_project_logo_with_http_info(id, opts)
|
|
888
|
+
data
|
|
889
|
+
end
|
|
890
|
+
|
|
891
|
+
# Get the project logo image
|
|
892
|
+
# Returns the raw logo image stored in the project's storage folder. This endpoint is unauthenticated so the asset can be rendered directly in an `<img>` tag; project IDs are unguessable UUIDs and logos are non-sensitive branding. The `Project.logo_url` field exposes a versioned path to this endpoint.
|
|
893
|
+
# @param id [String] Project ID
|
|
894
|
+
# @param [Hash] opts the optional parameters
|
|
895
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
896
|
+
def get_project_logo_with_http_info(id, opts = {})
|
|
897
|
+
if @api_client.config.debugging
|
|
898
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.get_project_logo ...'
|
|
899
|
+
end
|
|
900
|
+
# verify the required parameter 'id' is set
|
|
901
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
902
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_project_logo"
|
|
903
|
+
end
|
|
904
|
+
# resource path
|
|
905
|
+
local_var_path = '/projects/{id}/logo'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
906
|
+
|
|
907
|
+
# query parameters
|
|
908
|
+
query_params = opts[:query_params] || {}
|
|
909
|
+
|
|
910
|
+
# header parameters
|
|
911
|
+
header_params = opts[:header_params] || {}
|
|
912
|
+
# HTTP header 'Accept' (if needed)
|
|
913
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/svg+xml', 'application/json']) unless header_params['Accept']
|
|
914
|
+
|
|
915
|
+
# form parameters
|
|
916
|
+
form_params = opts[:form_params] || {}
|
|
917
|
+
|
|
918
|
+
# http body (model)
|
|
919
|
+
post_body = opts[:debug_body]
|
|
920
|
+
|
|
921
|
+
# return_type
|
|
922
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
923
|
+
|
|
924
|
+
# auth_names
|
|
925
|
+
auth_names = opts[:debug_auth_names] || []
|
|
926
|
+
|
|
927
|
+
new_options = opts.merge(
|
|
928
|
+
:operation => :"ProjectsApi.get_project_logo",
|
|
929
|
+
:header_params => header_params,
|
|
930
|
+
:query_params => query_params,
|
|
931
|
+
:form_params => form_params,
|
|
932
|
+
:body => post_body,
|
|
933
|
+
:auth_names => auth_names,
|
|
934
|
+
:return_type => return_type
|
|
935
|
+
)
|
|
936
|
+
|
|
937
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
938
|
+
if @api_client.config.debugging
|
|
939
|
+
@api_client.config.logger.debug "API called: ProjectsApi#get_project_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
940
|
+
end
|
|
941
|
+
return data, status_code, headers
|
|
942
|
+
end
|
|
943
|
+
|
|
944
|
+
# Report the project's source-of-truth state
|
|
945
|
+
# Volcano stores the source of the functions and frontend it runs for a project. This reports whether that source has been written to the connected repository, and whether the repository has taken over as the project's source of truth. `mode` is `platform`, `git_exporting`, `git_pending`, or `git`. Export enters `git_exporting` before reading stored source. GitHub's signed push event confirms that the initial commit reached the production branch. That push or a newer production push changes the mode to `git_pending` when it starts a deployment. `exported_at` records that transition. A successful Git run completes the transition when it matches the recorded repository, production branch, and root directory and actually dispatches every recorded resource. Ordinary production-branch pushes deploy without changing a platform-managed project's source ownership.
|
|
946
|
+
# @param id [String] Project ID
|
|
947
|
+
# @param [Hash] opts the optional parameters
|
|
948
|
+
# @return [ProjectSourceExportState]
|
|
949
|
+
def get_project_source_export(id, opts = {})
|
|
950
|
+
data, _status_code, _headers = get_project_source_export_with_http_info(id, opts)
|
|
951
|
+
data
|
|
952
|
+
end
|
|
953
|
+
|
|
954
|
+
# Report the project's source-of-truth state
|
|
955
|
+
# Volcano stores the source of the functions and frontend it runs for a project. This reports whether that source has been written to the connected repository, and whether the repository has taken over as the project's source of truth. `mode` is `platform`, `git_exporting`, `git_pending`, or `git`. Export enters `git_exporting` before reading stored source. GitHub's signed push event confirms that the initial commit reached the production branch. That push or a newer production push changes the mode to `git_pending` when it starts a deployment. `exported_at` records that transition. A successful Git run completes the transition when it matches the recorded repository, production branch, and root directory and actually dispatches every recorded resource. Ordinary production-branch pushes deploy without changing a platform-managed project's source ownership.
|
|
956
|
+
# @param id [String] Project ID
|
|
957
|
+
# @param [Hash] opts the optional parameters
|
|
958
|
+
# @return [Array<(ProjectSourceExportState, Integer, Hash)>] ProjectSourceExportState data, response status code and response headers
|
|
959
|
+
def get_project_source_export_with_http_info(id, opts = {})
|
|
960
|
+
if @api_client.config.debugging
|
|
961
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.get_project_source_export ...'
|
|
962
|
+
end
|
|
963
|
+
# verify the required parameter 'id' is set
|
|
964
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
965
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_project_source_export"
|
|
966
|
+
end
|
|
967
|
+
# resource path
|
|
968
|
+
local_var_path = '/projects/{id}/source-export'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
969
|
+
|
|
970
|
+
# query parameters
|
|
971
|
+
query_params = opts[:query_params] || {}
|
|
972
|
+
|
|
973
|
+
# header parameters
|
|
974
|
+
header_params = opts[:header_params] || {}
|
|
975
|
+
# HTTP header 'Accept' (if needed)
|
|
976
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
977
|
+
|
|
978
|
+
# form parameters
|
|
979
|
+
form_params = opts[:form_params] || {}
|
|
980
|
+
|
|
981
|
+
# http body (model)
|
|
982
|
+
post_body = opts[:debug_body]
|
|
983
|
+
|
|
984
|
+
# return_type
|
|
985
|
+
return_type = opts[:debug_return_type] || 'ProjectSourceExportState'
|
|
986
|
+
|
|
987
|
+
# auth_names
|
|
988
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
989
|
+
|
|
990
|
+
new_options = opts.merge(
|
|
991
|
+
:operation => :"ProjectsApi.get_project_source_export",
|
|
992
|
+
:header_params => header_params,
|
|
993
|
+
:query_params => query_params,
|
|
994
|
+
:form_params => form_params,
|
|
995
|
+
:body => post_body,
|
|
996
|
+
:auth_names => auth_names,
|
|
997
|
+
:return_type => return_type
|
|
998
|
+
)
|
|
999
|
+
|
|
1000
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1001
|
+
if @api_client.config.debugging
|
|
1002
|
+
@api_client.config.logger.debug "API called: ProjectsApi#get_project_source_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1003
|
+
end
|
|
1004
|
+
return data, status_code, headers
|
|
1005
|
+
end
|
|
1006
|
+
|
|
1007
|
+
# Get usage metrics for a project
|
|
1008
|
+
# Returns project usage totals for the current usage month plus recent hourly and daily time series for each tracked metric.
|
|
1009
|
+
# @param id [String] Project ID
|
|
1010
|
+
# @param [Hash] opts the optional parameters
|
|
1011
|
+
# @return [ProjectUsageResponse]
|
|
1012
|
+
def get_project_usage(id, opts = {})
|
|
1013
|
+
data, _status_code, _headers = get_project_usage_with_http_info(id, opts)
|
|
1014
|
+
data
|
|
1015
|
+
end
|
|
1016
|
+
|
|
1017
|
+
# Get usage metrics for a project
|
|
1018
|
+
# Returns project usage totals for the current usage month plus recent hourly and daily time series for each tracked metric.
|
|
1019
|
+
# @param id [String] Project ID
|
|
1020
|
+
# @param [Hash] opts the optional parameters
|
|
1021
|
+
# @return [Array<(ProjectUsageResponse, Integer, Hash)>] ProjectUsageResponse data, response status code and response headers
|
|
1022
|
+
def get_project_usage_with_http_info(id, opts = {})
|
|
1023
|
+
if @api_client.config.debugging
|
|
1024
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.get_project_usage ...'
|
|
1025
|
+
end
|
|
1026
|
+
# verify the required parameter 'id' is set
|
|
1027
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1028
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_project_usage"
|
|
1029
|
+
end
|
|
1030
|
+
# resource path
|
|
1031
|
+
local_var_path = '/projects/{id}/usage'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1032
|
+
|
|
1033
|
+
# query parameters
|
|
1034
|
+
query_params = opts[:query_params] || {}
|
|
1035
|
+
|
|
1036
|
+
# header parameters
|
|
1037
|
+
header_params = opts[:header_params] || {}
|
|
1038
|
+
# HTTP header 'Accept' (if needed)
|
|
1039
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1040
|
+
|
|
1041
|
+
# form parameters
|
|
1042
|
+
form_params = opts[:form_params] || {}
|
|
1043
|
+
|
|
1044
|
+
# http body (model)
|
|
1045
|
+
post_body = opts[:debug_body]
|
|
1046
|
+
|
|
1047
|
+
# return_type
|
|
1048
|
+
return_type = opts[:debug_return_type] || 'ProjectUsageResponse'
|
|
1049
|
+
|
|
1050
|
+
# auth_names
|
|
1051
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
1052
|
+
|
|
1053
|
+
new_options = opts.merge(
|
|
1054
|
+
:operation => :"ProjectsApi.get_project_usage",
|
|
1055
|
+
:header_params => header_params,
|
|
1056
|
+
:query_params => query_params,
|
|
1057
|
+
:form_params => form_params,
|
|
1058
|
+
:body => post_body,
|
|
1059
|
+
:auth_names => auth_names,
|
|
1060
|
+
:return_type => return_type
|
|
1061
|
+
)
|
|
1062
|
+
|
|
1063
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1064
|
+
if @api_client.config.debugging
|
|
1065
|
+
@api_client.config.logger.debug "API called: ProjectsApi#get_project_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1066
|
+
end
|
|
1067
|
+
return data, status_code, headers
|
|
1068
|
+
end
|
|
1069
|
+
|
|
1070
|
+
# List deployments across a user's projects
|
|
1071
|
+
# Lists Function and Frontend deployment attempts across every project the user owns, newest first. Pass `project_id` to narrow the feed to a single project. Scope is project **ownership** (`projects.user_id`). `owner_id` names whose deployments to return, not who started them — the actor is `initiated_by_user_id`, which this endpoint does not filter on. With a user token the scope is always the authenticated user: `owner_id` may be omitted, or set to that same user, but naming anyone else is refused with 403. Service callers on the management API must pass it, since they have no authenticated user. The owner is not checked for existence: an id with no projects returns an empty page rather than `404`. Unlike `/users/{id}/usage`, this endpoint is polled to detect an event, so a caller needs `404` to keep meaning \"this route is not served here\" — which is how a consumer notices it is running against an older release. A mistyped owner therefore reads as \"nothing deployed\"; callers that need to tell those apart should verify the user through `GET /users/{id}` first. Ordering is selectable. The default is the feed order — most recent attempt first. `completed_at.asc` orders by completion, oldest first, and considers only attempts that finished; combined with `limit=1` and a `status` filter it answers \"when did this user first succeed\" in one bounded query. Both pagination modes are supported, selected exactly as `/projects/{id}/deployments` selects them: `cursor`/`ending_before` (or a `limit` with no `page`) uses keyset pagination; otherwise `page`/`limit` offset pagination. `page` with a cursor, and `cursor` with `ending_before`, are rejected. A cursor is bound to every filter *and* to `order`, so changing any of them mid-pagination rejects the cursor rather than silently skipping or repeating rows. The keyset position is `(created_at, id)` for `created_at.desc` and `(completed_at, id)` for `completed_at.asc`.
|
|
1072
|
+
# @param [Hash] opts the optional parameters
|
|
1073
|
+
# @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination.
|
|
1074
|
+
# @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
|
|
1075
|
+
# @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1076
|
+
# @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1077
|
+
# @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0)
|
|
1078
|
+
# @option opts [String] :owner_id The user who owns the projects whose deployments to return (`projects.user_id`). This is ownership, not the actor that started the deployment — see `initiated_by_user_id` for that. Not a UUID: platform user ids are opaque strings.
|
|
1079
|
+
# @option opts [String] :project_id Restrict the feed to a single project owned by the user.
|
|
1080
|
+
# @option opts [Time] :created_after Restrict results to attempts created at or after this timestamp.
|
|
1081
|
+
# @option opts [String] :resource_type Restrict a deployment feed to a single resource type. Omit to return both Function and Frontend deployments.
|
|
1082
|
+
# @option opts [String] :status Restrict a deployment feed to attempts in one status.
|
|
1083
|
+
# @option opts [String] :operation Restrict a deployment feed to one kind of operation.
|
|
1084
|
+
# @option opts [String] :order Sort key and direction. `created_at.desc` (default) is the feed order. `completed_at.asc` orders finished attempts by completion, oldest first, and excludes attempts that never completed. (default to 'created_at.desc')
|
|
1085
|
+
# @return [PaginatedProjectDeployments]
|
|
1086
|
+
def list_deployments(opts = {})
|
|
1087
|
+
data, _status_code, _headers = list_deployments_with_http_info(opts)
|
|
1088
|
+
data
|
|
1089
|
+
end
|
|
1090
|
+
|
|
1091
|
+
# List deployments across a user's projects
|
|
1092
|
+
# Lists Function and Frontend deployment attempts across every project the user owns, newest first. Pass `project_id` to narrow the feed to a single project. Scope is project **ownership** (`projects.user_id`). `owner_id` names whose deployments to return, not who started them — the actor is `initiated_by_user_id`, which this endpoint does not filter on. With a user token the scope is always the authenticated user: `owner_id` may be omitted, or set to that same user, but naming anyone else is refused with 403. Service callers on the management API must pass it, since they have no authenticated user. The owner is not checked for existence: an id with no projects returns an empty page rather than `404`. Unlike `/users/{id}/usage`, this endpoint is polled to detect an event, so a caller needs `404` to keep meaning \"this route is not served here\" — which is how a consumer notices it is running against an older release. A mistyped owner therefore reads as \"nothing deployed\"; callers that need to tell those apart should verify the user through `GET /users/{id}` first. Ordering is selectable. The default is the feed order — most recent attempt first. `completed_at.asc` orders by completion, oldest first, and considers only attempts that finished; combined with `limit=1` and a `status` filter it answers \"when did this user first succeed\" in one bounded query. Both pagination modes are supported, selected exactly as `/projects/{id}/deployments` selects them: `cursor`/`ending_before` (or a `limit` with no `page`) uses keyset pagination; otherwise `page`/`limit` offset pagination. `page` with a cursor, and `cursor` with `ending_before`, are rejected. A cursor is bound to every filter *and* to `order`, so changing any of them mid-pagination rejects the cursor rather than silently skipping or repeating rows. The keyset position is `(created_at, id)` for `created_at.desc` and `(completed_at, id)` for `completed_at.asc`.
|
|
1093
|
+
# @param [Hash] opts the optional parameters
|
|
1094
|
+
# @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination.
|
|
1095
|
+
# @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
|
|
1096
|
+
# @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1097
|
+
# @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1098
|
+
# @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0)
|
|
1099
|
+
# @option opts [String] :owner_id The user who owns the projects whose deployments to return (`projects.user_id`). This is ownership, not the actor that started the deployment — see `initiated_by_user_id` for that. Not a UUID: platform user ids are opaque strings.
|
|
1100
|
+
# @option opts [String] :project_id Restrict the feed to a single project owned by the user.
|
|
1101
|
+
# @option opts [Time] :created_after Restrict results to attempts created at or after this timestamp.
|
|
1102
|
+
# @option opts [String] :resource_type Restrict a deployment feed to a single resource type. Omit to return both Function and Frontend deployments.
|
|
1103
|
+
# @option opts [String] :status Restrict a deployment feed to attempts in one status.
|
|
1104
|
+
# @option opts [String] :operation Restrict a deployment feed to one kind of operation.
|
|
1105
|
+
# @option opts [String] :order Sort key and direction. `created_at.desc` (default) is the feed order. `completed_at.asc` orders finished attempts by completion, oldest first, and excludes attempts that never completed. (default to 'created_at.desc')
|
|
1106
|
+
# @return [Array<(PaginatedProjectDeployments, Integer, Hash)>] PaginatedProjectDeployments data, response status code and response headers
|
|
1107
|
+
def list_deployments_with_http_info(opts = {})
|
|
1108
|
+
if @api_client.config.debugging
|
|
1109
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.list_deployments ...'
|
|
1110
|
+
end
|
|
1111
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1112
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ProjectsApi.list_deployments, must be greater than or equal to 1.'
|
|
1113
|
+
end
|
|
1114
|
+
|
|
1115
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
1116
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProjectsApi.list_deployments, must be smaller than or equal to 100.'
|
|
1117
|
+
end
|
|
1118
|
+
|
|
1119
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1120
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProjectsApi.list_deployments, must be greater than or equal to 1.'
|
|
1121
|
+
end
|
|
1122
|
+
|
|
1123
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
1124
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ProjectsApi.list_deployments, must be greater than or equal to 0.'
|
|
1125
|
+
end
|
|
1126
|
+
|
|
1127
|
+
if @api_client.config.client_side_validation && !opts[:'owner_id'].nil? && opts[:'owner_id'].to_s.length > 255
|
|
1128
|
+
fail ArgumentError, 'invalid value for "opts[:"owner_id"]" when calling ProjectsApi.list_deployments, the character length must be smaller than or equal to 255.'
|
|
1129
|
+
end
|
|
1130
|
+
|
|
1131
|
+
allowable_values = ["function", "frontend"]
|
|
1132
|
+
if @api_client.config.client_side_validation && opts[:'resource_type'] && !allowable_values.include?(opts[:'resource_type'])
|
|
1133
|
+
fail ArgumentError, "invalid value for \"resource_type\", must be one of #{allowable_values}"
|
|
1134
|
+
end
|
|
1135
|
+
allowable_values = ["queued", "provisioning", "active", "degraded", "failed", "superseded", "deleting", "deleted"]
|
|
1136
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
1137
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
1138
|
+
end
|
|
1139
|
+
allowable_values = ["deploy", "redeploy", "update", "delete"]
|
|
1140
|
+
if @api_client.config.client_side_validation && opts[:'operation'] && !allowable_values.include?(opts[:'operation'])
|
|
1141
|
+
fail ArgumentError, "invalid value for \"operation\", must be one of #{allowable_values}"
|
|
1142
|
+
end
|
|
1143
|
+
allowable_values = ["created_at.desc", "completed_at.asc"]
|
|
1144
|
+
if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
|
|
1145
|
+
fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
1146
|
+
end
|
|
1147
|
+
# resource path
|
|
1148
|
+
local_var_path = '/deployments'
|
|
1149
|
+
|
|
1150
|
+
# query parameters
|
|
1151
|
+
query_params = opts[:query_params] || {}
|
|
1152
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1153
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1154
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1155
|
+
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
1156
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
1157
|
+
query_params[:'owner_id'] = opts[:'owner_id'] if !opts[:'owner_id'].nil?
|
|
1158
|
+
query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil?
|
|
1159
|
+
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
|
1160
|
+
query_params[:'resource_type'] = opts[:'resource_type'] if !opts[:'resource_type'].nil?
|
|
1161
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
1162
|
+
query_params[:'operation'] = opts[:'operation'] if !opts[:'operation'].nil?
|
|
1163
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
1164
|
+
|
|
1165
|
+
# header parameters
|
|
1166
|
+
header_params = opts[:header_params] || {}
|
|
1167
|
+
# HTTP header 'Accept' (if needed)
|
|
1168
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1169
|
+
|
|
1170
|
+
# form parameters
|
|
1171
|
+
form_params = opts[:form_params] || {}
|
|
1172
|
+
|
|
1173
|
+
# http body (model)
|
|
1174
|
+
post_body = opts[:debug_body]
|
|
1175
|
+
|
|
1176
|
+
# return_type
|
|
1177
|
+
return_type = opts[:debug_return_type] || 'PaginatedProjectDeployments'
|
|
1178
|
+
|
|
1179
|
+
# auth_names
|
|
1180
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
1181
|
+
|
|
1182
|
+
new_options = opts.merge(
|
|
1183
|
+
:operation => :"ProjectsApi.list_deployments",
|
|
1184
|
+
:header_params => header_params,
|
|
1185
|
+
:query_params => query_params,
|
|
1186
|
+
:form_params => form_params,
|
|
1187
|
+
:body => post_body,
|
|
1188
|
+
:auth_names => auth_names,
|
|
1189
|
+
:return_type => return_type
|
|
1190
|
+
)
|
|
1191
|
+
|
|
1192
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1193
|
+
if @api_client.config.debugging
|
|
1194
|
+
@api_client.config.logger.debug "API called: ProjectsApi#list_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1195
|
+
end
|
|
1196
|
+
return data, status_code, headers
|
|
1197
|
+
end
|
|
1198
|
+
|
|
1199
|
+
# List deployments in a project
|
|
1200
|
+
# Lists Function and Frontend deployment attempts across the project, ordered most-recent first. Each item includes a normalized resource reference so clients can render both resource types without extra fetches.
|
|
1201
|
+
# @param id [String] Project ID
|
|
1202
|
+
# @param [Hash] opts the optional parameters
|
|
1203
|
+
# @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination.
|
|
1204
|
+
# @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
|
|
1205
|
+
# @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1206
|
+
# @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1207
|
+
# @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0)
|
|
1208
|
+
# @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes.
|
|
1209
|
+
# @option opts [Time] :created_after Restrict results to attempts created at or after this timestamp.
|
|
1210
|
+
# @option opts [String] :resource_type Restrict the feed to a single resource type. Omit to return both Function and Frontend deployments.
|
|
1211
|
+
# @return [PaginatedProjectDeployments]
|
|
1212
|
+
def list_project_deployments(id, opts = {})
|
|
1213
|
+
data, _status_code, _headers = list_project_deployments_with_http_info(id, opts)
|
|
1214
|
+
data
|
|
1215
|
+
end
|
|
1216
|
+
|
|
1217
|
+
# List deployments in a project
|
|
1218
|
+
# Lists Function and Frontend deployment attempts across the project, ordered most-recent first. Each item includes a normalized resource reference so clients can render both resource types without extra fetches.
|
|
1219
|
+
# @param id [String] Project ID
|
|
1220
|
+
# @param [Hash] opts the optional parameters
|
|
1221
|
+
# @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination.
|
|
1222
|
+
# @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
|
|
1223
|
+
# @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1224
|
+
# @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1225
|
+
# @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0)
|
|
1226
|
+
# @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes.
|
|
1227
|
+
# @option opts [Time] :created_after Restrict results to attempts created at or after this timestamp.
|
|
1228
|
+
# @option opts [String] :resource_type Restrict the feed to a single resource type. Omit to return both Function and Frontend deployments.
|
|
1229
|
+
# @return [Array<(PaginatedProjectDeployments, Integer, Hash)>] PaginatedProjectDeployments data, response status code and response headers
|
|
1230
|
+
def list_project_deployments_with_http_info(id, opts = {})
|
|
1231
|
+
if @api_client.config.debugging
|
|
1232
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.list_project_deployments ...'
|
|
1233
|
+
end
|
|
1234
|
+
# verify the required parameter 'id' is set
|
|
1235
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1236
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.list_project_deployments"
|
|
1237
|
+
end
|
|
1238
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1239
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ProjectsApi.list_project_deployments, must be greater than or equal to 1.'
|
|
1240
|
+
end
|
|
1241
|
+
|
|
1242
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
1243
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProjectsApi.list_project_deployments, must be smaller than or equal to 100.'
|
|
1244
|
+
end
|
|
1245
|
+
|
|
1246
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1247
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProjectsApi.list_project_deployments, must be greater than or equal to 1.'
|
|
1248
|
+
end
|
|
1249
|
+
|
|
1250
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
1251
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ProjectsApi.list_project_deployments, must be greater than or equal to 0.'
|
|
1252
|
+
end
|
|
1253
|
+
|
|
1254
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 256
|
|
1255
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling ProjectsApi.list_project_deployments, the character length must be smaller than or equal to 256.'
|
|
1256
|
+
end
|
|
1257
|
+
|
|
1258
|
+
allowable_values = ["function", "frontend"]
|
|
1259
|
+
if @api_client.config.client_side_validation && opts[:'resource_type'] && !allowable_values.include?(opts[:'resource_type'])
|
|
1260
|
+
fail ArgumentError, "invalid value for \"resource_type\", must be one of #{allowable_values}"
|
|
1261
|
+
end
|
|
1262
|
+
# resource path
|
|
1263
|
+
local_var_path = '/projects/{id}/deployments'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1264
|
+
|
|
1265
|
+
# query parameters
|
|
1266
|
+
query_params = opts[:query_params] || {}
|
|
1267
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1268
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1269
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1270
|
+
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
1271
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
1272
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
1273
|
+
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
|
1274
|
+
query_params[:'resource_type'] = opts[:'resource_type'] if !opts[:'resource_type'].nil?
|
|
1275
|
+
|
|
1276
|
+
# header parameters
|
|
1277
|
+
header_params = opts[:header_params] || {}
|
|
1278
|
+
# HTTP header 'Accept' (if needed)
|
|
1279
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1280
|
+
|
|
1281
|
+
# form parameters
|
|
1282
|
+
form_params = opts[:form_params] || {}
|
|
1283
|
+
|
|
1284
|
+
# http body (model)
|
|
1285
|
+
post_body = opts[:debug_body]
|
|
1286
|
+
|
|
1287
|
+
# return_type
|
|
1288
|
+
return_type = opts[:debug_return_type] || 'PaginatedProjectDeployments'
|
|
1289
|
+
|
|
1290
|
+
# auth_names
|
|
1291
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
1292
|
+
|
|
1293
|
+
new_options = opts.merge(
|
|
1294
|
+
:operation => :"ProjectsApi.list_project_deployments",
|
|
1295
|
+
:header_params => header_params,
|
|
1296
|
+
:query_params => query_params,
|
|
1297
|
+
:form_params => form_params,
|
|
1298
|
+
:body => post_body,
|
|
1299
|
+
:auth_names => auth_names,
|
|
1300
|
+
:return_type => return_type
|
|
1301
|
+
)
|
|
1302
|
+
|
|
1303
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1304
|
+
if @api_client.config.debugging
|
|
1305
|
+
@api_client.config.logger.debug "API called: ProjectsApi#list_project_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1306
|
+
end
|
|
1307
|
+
return data, status_code, headers
|
|
1308
|
+
end
|
|
1309
|
+
|
|
1310
|
+
# List all projects for authenticated user
|
|
1311
|
+
# Returns projects that are not deleting or deleted, newest first. Supports two mutually exclusive pagination modes. Offset mode uses `page` and `limit`. Cursor mode uses `cursor` or `ending_before` with `limit`, returns `next_cursor`/`prev_cursor`, and supports a bounded `offset` past the cursor anchor. Supplying `limit` without `page` selects cursor mode. `search` applies a case-insensitive project-name filter in either mode. `include` optionally expands each returned project with its Git connection and/or aggregate health summary using `git_connection` and `health`. Sending `page` with `cursor` or `ending_before`, or sending both cursor directions, returns 400.
|
|
1312
|
+
# @param [Hash] opts the optional parameters
|
|
1313
|
+
# @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination.
|
|
1314
|
+
# @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
|
|
1315
|
+
# @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1316
|
+
# @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1317
|
+
# @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0)
|
|
1318
|
+
# @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes.
|
|
1319
|
+
# @option opts [Array<String>] :include Optional comma-separated project metadata expansions.
|
|
1320
|
+
# @return [PaginatedProjects]
|
|
1321
|
+
def list_projects(opts = {})
|
|
1322
|
+
data, _status_code, _headers = list_projects_with_http_info(opts)
|
|
1323
|
+
data
|
|
1324
|
+
end
|
|
1325
|
+
|
|
1326
|
+
# List all projects for authenticated user
|
|
1327
|
+
# Returns projects that are not deleting or deleted, newest first. Supports two mutually exclusive pagination modes. Offset mode uses `page` and `limit`. Cursor mode uses `cursor` or `ending_before` with `limit`, returns `next_cursor`/`prev_cursor`, and supports a bounded `offset` past the cursor anchor. Supplying `limit` without `page` selects cursor mode. `search` applies a case-insensitive project-name filter in either mode. `include` optionally expands each returned project with its Git connection and/or aggregate health summary using `git_connection` and `health`. Sending `page` with `cursor` or `ending_before`, or sending both cursor directions, returns 400.
|
|
1328
|
+
# @param [Hash] opts the optional parameters
|
|
1329
|
+
# @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination.
|
|
1330
|
+
# @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
|
|
1331
|
+
# @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1332
|
+
# @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400.
|
|
1333
|
+
# @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0)
|
|
1334
|
+
# @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes.
|
|
1335
|
+
# @option opts [Array<String>] :include Optional comma-separated project metadata expansions.
|
|
1336
|
+
# @return [Array<(PaginatedProjects, Integer, Hash)>] PaginatedProjects data, response status code and response headers
|
|
1337
|
+
def list_projects_with_http_info(opts = {})
|
|
1338
|
+
if @api_client.config.debugging
|
|
1339
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.list_projects ...'
|
|
1340
|
+
end
|
|
1341
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1342
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ProjectsApi.list_projects, must be greater than or equal to 1.'
|
|
1343
|
+
end
|
|
1344
|
+
|
|
1345
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
1346
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProjectsApi.list_projects, must be smaller than or equal to 100.'
|
|
1347
|
+
end
|
|
1348
|
+
|
|
1349
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1350
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProjectsApi.list_projects, must be greater than or equal to 1.'
|
|
1351
|
+
end
|
|
1352
|
+
|
|
1353
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
1354
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ProjectsApi.list_projects, must be greater than or equal to 0.'
|
|
1355
|
+
end
|
|
1356
|
+
|
|
1357
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 256
|
|
1358
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling ProjectsApi.list_projects, the character length must be smaller than or equal to 256.'
|
|
1359
|
+
end
|
|
1360
|
+
|
|
1361
|
+
allowable_values = ["git_connection", "health"]
|
|
1362
|
+
if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
|
|
1363
|
+
fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
|
|
1364
|
+
end
|
|
1365
|
+
# resource path
|
|
1366
|
+
local_var_path = '/projects'
|
|
1367
|
+
|
|
1368
|
+
# query parameters
|
|
1369
|
+
query_params = opts[:query_params] || {}
|
|
1370
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1371
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1372
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1373
|
+
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
1374
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
1375
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
1376
|
+
query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
|
|
1377
|
+
|
|
1378
|
+
# header parameters
|
|
1379
|
+
header_params = opts[:header_params] || {}
|
|
1380
|
+
# HTTP header 'Accept' (if needed)
|
|
1381
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1382
|
+
|
|
1383
|
+
# form parameters
|
|
1384
|
+
form_params = opts[:form_params] || {}
|
|
1385
|
+
|
|
1386
|
+
# http body (model)
|
|
1387
|
+
post_body = opts[:debug_body]
|
|
1388
|
+
|
|
1389
|
+
# return_type
|
|
1390
|
+
return_type = opts[:debug_return_type] || 'PaginatedProjects'
|
|
1391
|
+
|
|
1392
|
+
# auth_names
|
|
1393
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
1394
|
+
|
|
1395
|
+
new_options = opts.merge(
|
|
1396
|
+
:operation => :"ProjectsApi.list_projects",
|
|
1397
|
+
:header_params => header_params,
|
|
1398
|
+
:query_params => query_params,
|
|
1399
|
+
:form_params => form_params,
|
|
1400
|
+
:body => post_body,
|
|
1401
|
+
:auth_names => auth_names,
|
|
1402
|
+
:return_type => return_type
|
|
1403
|
+
)
|
|
1404
|
+
|
|
1405
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1406
|
+
if @api_client.config.debugging
|
|
1407
|
+
@api_client.config.logger.debug "API called: ProjectsApi#list_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1408
|
+
end
|
|
1409
|
+
return data, status_code, headers
|
|
1410
|
+
end
|
|
1411
|
+
|
|
1412
|
+
# Query project runtime metrics
|
|
1413
|
+
# Evaluates a batch of named, curated runtime metric queries over one trailing time range. Query IDs correlate each request with its result; raw backend query languages are intentionally not exposed.
|
|
1414
|
+
# @param id [String] Project ID
|
|
1415
|
+
# @param project_metrics_query_request [ProjectMetricsQueryRequest]
|
|
1416
|
+
# @param [Hash] opts the optional parameters
|
|
1417
|
+
# @return [ProjectMetricsQueryResponse]
|
|
1418
|
+
def query_project_metrics(id, project_metrics_query_request, opts = {})
|
|
1419
|
+
data, _status_code, _headers = query_project_metrics_with_http_info(id, project_metrics_query_request, opts)
|
|
1420
|
+
data
|
|
1421
|
+
end
|
|
1422
|
+
|
|
1423
|
+
# Query project runtime metrics
|
|
1424
|
+
# Evaluates a batch of named, curated runtime metric queries over one trailing time range. Query IDs correlate each request with its result; raw backend query languages are intentionally not exposed.
|
|
1425
|
+
# @param id [String] Project ID
|
|
1426
|
+
# @param project_metrics_query_request [ProjectMetricsQueryRequest]
|
|
1427
|
+
# @param [Hash] opts the optional parameters
|
|
1428
|
+
# @return [Array<(ProjectMetricsQueryResponse, Integer, Hash)>] ProjectMetricsQueryResponse data, response status code and response headers
|
|
1429
|
+
def query_project_metrics_with_http_info(id, project_metrics_query_request, opts = {})
|
|
1430
|
+
if @api_client.config.debugging
|
|
1431
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.query_project_metrics ...'
|
|
1432
|
+
end
|
|
1433
|
+
# verify the required parameter 'id' is set
|
|
1434
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1435
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.query_project_metrics"
|
|
1436
|
+
end
|
|
1437
|
+
# verify the required parameter 'project_metrics_query_request' is set
|
|
1438
|
+
if @api_client.config.client_side_validation && project_metrics_query_request.nil?
|
|
1439
|
+
fail ArgumentError, "Missing the required parameter 'project_metrics_query_request' when calling ProjectsApi.query_project_metrics"
|
|
1440
|
+
end
|
|
1441
|
+
# resource path
|
|
1442
|
+
local_var_path = '/projects/{id}/metrics/query'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1443
|
+
|
|
1444
|
+
# query parameters
|
|
1445
|
+
query_params = opts[:query_params] || {}
|
|
1446
|
+
|
|
1447
|
+
# header parameters
|
|
1448
|
+
header_params = opts[:header_params] || {}
|
|
1449
|
+
# HTTP header 'Accept' (if needed)
|
|
1450
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1451
|
+
# HTTP header 'Content-Type'
|
|
1452
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1453
|
+
if !content_type.nil?
|
|
1454
|
+
header_params['Content-Type'] = content_type
|
|
1455
|
+
end
|
|
1456
|
+
|
|
1457
|
+
# form parameters
|
|
1458
|
+
form_params = opts[:form_params] || {}
|
|
1459
|
+
|
|
1460
|
+
# http body (model)
|
|
1461
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(project_metrics_query_request)
|
|
1462
|
+
|
|
1463
|
+
# return_type
|
|
1464
|
+
return_type = opts[:debug_return_type] || 'ProjectMetricsQueryResponse'
|
|
1465
|
+
|
|
1466
|
+
# auth_names
|
|
1467
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
1468
|
+
|
|
1469
|
+
new_options = opts.merge(
|
|
1470
|
+
:operation => :"ProjectsApi.query_project_metrics",
|
|
1471
|
+
:header_params => header_params,
|
|
1472
|
+
:query_params => query_params,
|
|
1473
|
+
:form_params => form_params,
|
|
1474
|
+
:body => post_body,
|
|
1475
|
+
:auth_names => auth_names,
|
|
1476
|
+
:return_type => return_type
|
|
1477
|
+
)
|
|
1478
|
+
|
|
1479
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1480
|
+
if @api_client.config.debugging
|
|
1481
|
+
@api_client.config.logger.debug "API called: ProjectsApi#query_project_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1482
|
+
end
|
|
1483
|
+
return data, status_code, headers
|
|
1484
|
+
end
|
|
1485
|
+
|
|
1486
|
+
# Set the branch a project deploys from
|
|
1487
|
+
# Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it. The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on. Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it. Projects that never set one keep following the repository's default branch.
|
|
1488
|
+
# @param id [String] Project ID
|
|
1489
|
+
# @param set_project_git_production_branch_request [SetProjectGitProductionBranchRequest]
|
|
1490
|
+
# @param [Hash] opts the optional parameters
|
|
1491
|
+
# @return [ProjectGitConnection]
|
|
1492
|
+
def set_project_git_production_branch(id, set_project_git_production_branch_request, opts = {})
|
|
1493
|
+
data, _status_code, _headers = set_project_git_production_branch_with_http_info(id, set_project_git_production_branch_request, opts)
|
|
1494
|
+
data
|
|
1495
|
+
end
|
|
1496
|
+
|
|
1497
|
+
# Set the branch a project deploys from
|
|
1498
|
+
# Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it. The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on. Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it. Projects that never set one keep following the repository's default branch.
|
|
1499
|
+
# @param id [String] Project ID
|
|
1500
|
+
# @param set_project_git_production_branch_request [SetProjectGitProductionBranchRequest]
|
|
1501
|
+
# @param [Hash] opts the optional parameters
|
|
1502
|
+
# @return [Array<(ProjectGitConnection, Integer, Hash)>] ProjectGitConnection data, response status code and response headers
|
|
1503
|
+
def set_project_git_production_branch_with_http_info(id, set_project_git_production_branch_request, opts = {})
|
|
1504
|
+
if @api_client.config.debugging
|
|
1505
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.set_project_git_production_branch ...'
|
|
1506
|
+
end
|
|
1507
|
+
# verify the required parameter 'id' is set
|
|
1508
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1509
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.set_project_git_production_branch"
|
|
1510
|
+
end
|
|
1511
|
+
# verify the required parameter 'set_project_git_production_branch_request' is set
|
|
1512
|
+
if @api_client.config.client_side_validation && set_project_git_production_branch_request.nil?
|
|
1513
|
+
fail ArgumentError, "Missing the required parameter 'set_project_git_production_branch_request' when calling ProjectsApi.set_project_git_production_branch"
|
|
1514
|
+
end
|
|
1515
|
+
# resource path
|
|
1516
|
+
local_var_path = '/projects/{id}/git-connection/production-branch'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1517
|
+
|
|
1518
|
+
# query parameters
|
|
1519
|
+
query_params = opts[:query_params] || {}
|
|
1520
|
+
|
|
1521
|
+
# header parameters
|
|
1522
|
+
header_params = opts[:header_params] || {}
|
|
1523
|
+
# HTTP header 'Accept' (if needed)
|
|
1524
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1525
|
+
# HTTP header 'Content-Type'
|
|
1526
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1527
|
+
if !content_type.nil?
|
|
1528
|
+
header_params['Content-Type'] = content_type
|
|
1529
|
+
end
|
|
1530
|
+
|
|
1531
|
+
# form parameters
|
|
1532
|
+
form_params = opts[:form_params] || {}
|
|
1533
|
+
|
|
1534
|
+
# http body (model)
|
|
1535
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_project_git_production_branch_request)
|
|
1536
|
+
|
|
1537
|
+
# return_type
|
|
1538
|
+
return_type = opts[:debug_return_type] || 'ProjectGitConnection'
|
|
1539
|
+
|
|
1540
|
+
# auth_names
|
|
1541
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
1542
|
+
|
|
1543
|
+
new_options = opts.merge(
|
|
1544
|
+
:operation => :"ProjectsApi.set_project_git_production_branch",
|
|
1545
|
+
:header_params => header_params,
|
|
1546
|
+
:query_params => query_params,
|
|
1547
|
+
:form_params => form_params,
|
|
1548
|
+
:body => post_body,
|
|
1549
|
+
:auth_names => auth_names,
|
|
1550
|
+
:return_type => return_type
|
|
1551
|
+
)
|
|
1552
|
+
|
|
1553
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1554
|
+
if @api_client.config.debugging
|
|
1555
|
+
@api_client.config.logger.debug "API called: ProjectsApi#set_project_git_production_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1556
|
+
end
|
|
1557
|
+
return data, status_code, headers
|
|
1558
|
+
end
|
|
1559
|
+
|
|
1560
|
+
# Summarize deployments in a project
|
|
1561
|
+
# Summarizes deployment attempts for one comparable resource pipeline. Success rate uses conclusive outcomes only: active and deleted attempts are successful; failed and degraded attempts are failures; in-progress and superseded attempts are excluded. Median build duration includes completed, non-superseded attempts with recorded build work, including failed builds.
|
|
1562
|
+
# @param id [String] Project ID
|
|
1563
|
+
# @param resource_type [String] Restrict the summary to one comparable deployment pipeline.
|
|
1564
|
+
# @param [Hash] opts the optional parameters
|
|
1565
|
+
# @option opts [String] :search Restrict the summary to resource names containing this value.
|
|
1566
|
+
# @option opts [Time] :created_after Restrict results to attempts created at or after this timestamp.
|
|
1567
|
+
# @return [ProjectDeploymentSummary]
|
|
1568
|
+
def summarize_project_deployments(id, resource_type, opts = {})
|
|
1569
|
+
data, _status_code, _headers = summarize_project_deployments_with_http_info(id, resource_type, opts)
|
|
1570
|
+
data
|
|
1571
|
+
end
|
|
1572
|
+
|
|
1573
|
+
# Summarize deployments in a project
|
|
1574
|
+
# Summarizes deployment attempts for one comparable resource pipeline. Success rate uses conclusive outcomes only: active and deleted attempts are successful; failed and degraded attempts are failures; in-progress and superseded attempts are excluded. Median build duration includes completed, non-superseded attempts with recorded build work, including failed builds.
|
|
1575
|
+
# @param id [String] Project ID
|
|
1576
|
+
# @param resource_type [String] Restrict the summary to one comparable deployment pipeline.
|
|
1577
|
+
# @param [Hash] opts the optional parameters
|
|
1578
|
+
# @option opts [String] :search Restrict the summary to resource names containing this value.
|
|
1579
|
+
# @option opts [Time] :created_after Restrict results to attempts created at or after this timestamp.
|
|
1580
|
+
# @return [Array<(ProjectDeploymentSummary, Integer, Hash)>] ProjectDeploymentSummary data, response status code and response headers
|
|
1581
|
+
def summarize_project_deployments_with_http_info(id, resource_type, opts = {})
|
|
1582
|
+
if @api_client.config.debugging
|
|
1583
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.summarize_project_deployments ...'
|
|
1584
|
+
end
|
|
1585
|
+
# verify the required parameter 'id' is set
|
|
1586
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1587
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.summarize_project_deployments"
|
|
1588
|
+
end
|
|
1589
|
+
# verify the required parameter 'resource_type' is set
|
|
1590
|
+
if @api_client.config.client_side_validation && resource_type.nil?
|
|
1591
|
+
fail ArgumentError, "Missing the required parameter 'resource_type' when calling ProjectsApi.summarize_project_deployments"
|
|
1592
|
+
end
|
|
1593
|
+
# verify enum value
|
|
1594
|
+
allowable_values = ["function", "frontend"]
|
|
1595
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(resource_type)
|
|
1596
|
+
fail ArgumentError, "invalid value for \"resource_type\", must be one of #{allowable_values}"
|
|
1597
|
+
end
|
|
1598
|
+
# resource path
|
|
1599
|
+
local_var_path = '/projects/{id}/deployments/summary'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1600
|
+
|
|
1601
|
+
# query parameters
|
|
1602
|
+
query_params = opts[:query_params] || {}
|
|
1603
|
+
query_params[:'resource_type'] = resource_type
|
|
1604
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
1605
|
+
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
|
1606
|
+
|
|
1607
|
+
# header parameters
|
|
1608
|
+
header_params = opts[:header_params] || {}
|
|
1609
|
+
# HTTP header 'Accept' (if needed)
|
|
1610
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1611
|
+
|
|
1612
|
+
# form parameters
|
|
1613
|
+
form_params = opts[:form_params] || {}
|
|
1614
|
+
|
|
1615
|
+
# http body (model)
|
|
1616
|
+
post_body = opts[:debug_body]
|
|
1617
|
+
|
|
1618
|
+
# return_type
|
|
1619
|
+
return_type = opts[:debug_return_type] || 'ProjectDeploymentSummary'
|
|
1620
|
+
|
|
1621
|
+
# auth_names
|
|
1622
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
1623
|
+
|
|
1624
|
+
new_options = opts.merge(
|
|
1625
|
+
:operation => :"ProjectsApi.summarize_project_deployments",
|
|
1626
|
+
:header_params => header_params,
|
|
1627
|
+
:query_params => query_params,
|
|
1628
|
+
:form_params => form_params,
|
|
1629
|
+
:body => post_body,
|
|
1630
|
+
:auth_names => auth_names,
|
|
1631
|
+
:return_type => return_type
|
|
1632
|
+
)
|
|
1633
|
+
|
|
1634
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1635
|
+
if @api_client.config.debugging
|
|
1636
|
+
@api_client.config.logger.debug "API called: ProjectsApi#summarize_project_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1637
|
+
end
|
|
1638
|
+
return data, status_code, headers
|
|
1639
|
+
end
|
|
1640
|
+
|
|
1641
|
+
# Update project metadata and region policy
|
|
1642
|
+
# @param id [String] Project ID
|
|
1643
|
+
# @param update_project_request [UpdateProjectRequest]
|
|
1644
|
+
# @param [Hash] opts the optional parameters
|
|
1645
|
+
# @return [Project]
|
|
1646
|
+
def update_project(id, update_project_request, opts = {})
|
|
1647
|
+
data, _status_code, _headers = update_project_with_http_info(id, update_project_request, opts)
|
|
1648
|
+
data
|
|
1649
|
+
end
|
|
1650
|
+
|
|
1651
|
+
# Update project metadata and region policy
|
|
1652
|
+
# @param id [String] Project ID
|
|
1653
|
+
# @param update_project_request [UpdateProjectRequest]
|
|
1654
|
+
# @param [Hash] opts the optional parameters
|
|
1655
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
1656
|
+
def update_project_with_http_info(id, update_project_request, opts = {})
|
|
1657
|
+
if @api_client.config.debugging
|
|
1658
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.update_project ...'
|
|
1659
|
+
end
|
|
1660
|
+
# verify the required parameter 'id' is set
|
|
1661
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1662
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.update_project"
|
|
1663
|
+
end
|
|
1664
|
+
# verify the required parameter 'update_project_request' is set
|
|
1665
|
+
if @api_client.config.client_side_validation && update_project_request.nil?
|
|
1666
|
+
fail ArgumentError, "Missing the required parameter 'update_project_request' when calling ProjectsApi.update_project"
|
|
1667
|
+
end
|
|
1668
|
+
# resource path
|
|
1669
|
+
local_var_path = '/projects/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1670
|
+
|
|
1671
|
+
# query parameters
|
|
1672
|
+
query_params = opts[:query_params] || {}
|
|
1673
|
+
|
|
1674
|
+
# header parameters
|
|
1675
|
+
header_params = opts[:header_params] || {}
|
|
1676
|
+
# HTTP header 'Accept' (if needed)
|
|
1677
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1678
|
+
# HTTP header 'Content-Type'
|
|
1679
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1680
|
+
if !content_type.nil?
|
|
1681
|
+
header_params['Content-Type'] = content_type
|
|
1682
|
+
end
|
|
1683
|
+
|
|
1684
|
+
# form parameters
|
|
1685
|
+
form_params = opts[:form_params] || {}
|
|
1686
|
+
|
|
1687
|
+
# http body (model)
|
|
1688
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_project_request)
|
|
1689
|
+
|
|
1690
|
+
# return_type
|
|
1691
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
1692
|
+
|
|
1693
|
+
# auth_names
|
|
1694
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
1695
|
+
|
|
1696
|
+
new_options = opts.merge(
|
|
1697
|
+
:operation => :"ProjectsApi.update_project",
|
|
1698
|
+
:header_params => header_params,
|
|
1699
|
+
:query_params => query_params,
|
|
1700
|
+
:form_params => form_params,
|
|
1701
|
+
:body => post_body,
|
|
1702
|
+
:auth_names => auth_names,
|
|
1703
|
+
:return_type => return_type
|
|
1704
|
+
)
|
|
1705
|
+
|
|
1706
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
1707
|
+
if @api_client.config.debugging
|
|
1708
|
+
@api_client.config.logger.debug "API called: ProjectsApi#update_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1709
|
+
end
|
|
1710
|
+
return data, status_code, headers
|
|
1711
|
+
end
|
|
1712
|
+
|
|
1713
|
+
# Update a project's Git auto-deploy settings
|
|
1714
|
+
# Full replace of the project's Git auto-deploy settings: what a push to the connected repo's production branch deploys. Connecting a repository sets auto_deploy_enabled and deploy_functions to true for a project that has never called this endpoint, so a push deploys without any further setup. Once these settings have been saved here they are the project's own: connecting, rebinding, disconnecting and reconnecting all leave them untouched, including when they were saved before any repository was connected. Frontend settings are off until set here; the frontend need not exist when they are saved, since frontend_name is resolved at deploy time.
|
|
1715
|
+
# @param id [String] Project ID
|
|
1716
|
+
# @param update_project_git_deploy_settings_request [UpdateProjectGitDeploySettingsRequest]
|
|
1717
|
+
# @param [Hash] opts the optional parameters
|
|
1718
|
+
# @return [ProjectGitDeploySettings]
|
|
1719
|
+
def update_project_git_deploy_settings(id, update_project_git_deploy_settings_request, opts = {})
|
|
1720
|
+
data, _status_code, _headers = update_project_git_deploy_settings_with_http_info(id, update_project_git_deploy_settings_request, opts)
|
|
1721
|
+
data
|
|
1722
|
+
end
|
|
1723
|
+
|
|
1724
|
+
# Update a project's Git auto-deploy settings
|
|
1725
|
+
# Full replace of the project's Git auto-deploy settings: what a push to the connected repo's production branch deploys. Connecting a repository sets auto_deploy_enabled and deploy_functions to true for a project that has never called this endpoint, so a push deploys without any further setup. Once these settings have been saved here they are the project's own: connecting, rebinding, disconnecting and reconnecting all leave them untouched, including when they were saved before any repository was connected. Frontend settings are off until set here; the frontend need not exist when they are saved, since frontend_name is resolved at deploy time.
|
|
1726
|
+
# @param id [String] Project ID
|
|
1727
|
+
# @param update_project_git_deploy_settings_request [UpdateProjectGitDeploySettingsRequest]
|
|
1728
|
+
# @param [Hash] opts the optional parameters
|
|
1729
|
+
# @return [Array<(ProjectGitDeploySettings, Integer, Hash)>] ProjectGitDeploySettings data, response status code and response headers
|
|
1730
|
+
def update_project_git_deploy_settings_with_http_info(id, update_project_git_deploy_settings_request, opts = {})
|
|
1731
|
+
if @api_client.config.debugging
|
|
1732
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.update_project_git_deploy_settings ...'
|
|
1733
|
+
end
|
|
1734
|
+
# verify the required parameter 'id' is set
|
|
1735
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1736
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.update_project_git_deploy_settings"
|
|
1737
|
+
end
|
|
1738
|
+
# verify the required parameter 'update_project_git_deploy_settings_request' is set
|
|
1739
|
+
if @api_client.config.client_side_validation && update_project_git_deploy_settings_request.nil?
|
|
1740
|
+
fail ArgumentError, "Missing the required parameter 'update_project_git_deploy_settings_request' when calling ProjectsApi.update_project_git_deploy_settings"
|
|
1741
|
+
end
|
|
1742
|
+
# resource path
|
|
1743
|
+
local_var_path = '/projects/{id}/git-deploy-settings'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1744
|
+
|
|
1745
|
+
# query parameters
|
|
1746
|
+
query_params = opts[:query_params] || {}
|
|
1747
|
+
|
|
1748
|
+
# header parameters
|
|
1749
|
+
header_params = opts[:header_params] || {}
|
|
1750
|
+
# HTTP header 'Accept' (if needed)
|
|
1751
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1752
|
+
# HTTP header 'Content-Type'
|
|
1753
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1754
|
+
if !content_type.nil?
|
|
1755
|
+
header_params['Content-Type'] = content_type
|
|
1756
|
+
end
|
|
1757
|
+
|
|
1758
|
+
# form parameters
|
|
1759
|
+
form_params = opts[:form_params] || {}
|
|
1760
|
+
|
|
1761
|
+
# http body (model)
|
|
1762
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_project_git_deploy_settings_request)
|
|
1763
|
+
|
|
1764
|
+
# return_type
|
|
1765
|
+
return_type = opts[:debug_return_type] || 'ProjectGitDeploySettings'
|
|
1766
|
+
|
|
1767
|
+
# auth_names
|
|
1768
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
1769
|
+
|
|
1770
|
+
new_options = opts.merge(
|
|
1771
|
+
:operation => :"ProjectsApi.update_project_git_deploy_settings",
|
|
1772
|
+
:header_params => header_params,
|
|
1773
|
+
:query_params => query_params,
|
|
1774
|
+
:form_params => form_params,
|
|
1775
|
+
:body => post_body,
|
|
1776
|
+
:auth_names => auth_names,
|
|
1777
|
+
:return_type => return_type
|
|
1778
|
+
)
|
|
1779
|
+
|
|
1780
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1781
|
+
if @api_client.config.debugging
|
|
1782
|
+
@api_client.config.logger.debug "API called: ProjectsApi#update_project_git_deploy_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1783
|
+
end
|
|
1784
|
+
return data, status_code, headers
|
|
1785
|
+
end
|
|
1786
|
+
|
|
1787
|
+
# Upload or replace the project logo
|
|
1788
|
+
# Uploads an image as the project's logo, storing it in the project's storage folder. Accepts PNG, JPEG, GIF, WebP, or SVG up to 2 MB. Replaces any existing logo. Returns the updated project, whose `logo_url` reflects the new logo.
|
|
1789
|
+
# @param id [String] Project ID
|
|
1790
|
+
# @param logo [File] Logo image (PNG, JPEG, GIF, WebP, or SVG; max 2 MB)
|
|
1791
|
+
# @param [Hash] opts the optional parameters
|
|
1792
|
+
# @return [Project]
|
|
1793
|
+
def upload_project_logo(id, logo, opts = {})
|
|
1794
|
+
data, _status_code, _headers = upload_project_logo_with_http_info(id, logo, opts)
|
|
1795
|
+
data
|
|
1796
|
+
end
|
|
1797
|
+
|
|
1798
|
+
# Upload or replace the project logo
|
|
1799
|
+
# Uploads an image as the project's logo, storing it in the project's storage folder. Accepts PNG, JPEG, GIF, WebP, or SVG up to 2 MB. Replaces any existing logo. Returns the updated project, whose `logo_url` reflects the new logo.
|
|
1800
|
+
# @param id [String] Project ID
|
|
1801
|
+
# @param logo [File] Logo image (PNG, JPEG, GIF, WebP, or SVG; max 2 MB)
|
|
1802
|
+
# @param [Hash] opts the optional parameters
|
|
1803
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
1804
|
+
def upload_project_logo_with_http_info(id, logo, opts = {})
|
|
1805
|
+
if @api_client.config.debugging
|
|
1806
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.upload_project_logo ...'
|
|
1807
|
+
end
|
|
1808
|
+
# verify the required parameter 'id' is set
|
|
1809
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1810
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.upload_project_logo"
|
|
1811
|
+
end
|
|
1812
|
+
# verify the required parameter 'logo' is set
|
|
1813
|
+
if @api_client.config.client_side_validation && logo.nil?
|
|
1814
|
+
fail ArgumentError, "Missing the required parameter 'logo' when calling ProjectsApi.upload_project_logo"
|
|
1815
|
+
end
|
|
1816
|
+
# resource path
|
|
1817
|
+
local_var_path = '/projects/{id}/logo'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1818
|
+
|
|
1819
|
+
# query parameters
|
|
1820
|
+
query_params = opts[:query_params] || {}
|
|
1821
|
+
|
|
1822
|
+
# header parameters
|
|
1823
|
+
header_params = opts[:header_params] || {}
|
|
1824
|
+
# HTTP header 'Accept' (if needed)
|
|
1825
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1826
|
+
# HTTP header 'Content-Type'
|
|
1827
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
|
1828
|
+
if !content_type.nil?
|
|
1829
|
+
header_params['Content-Type'] = content_type
|
|
1830
|
+
end
|
|
1831
|
+
|
|
1832
|
+
# form parameters
|
|
1833
|
+
form_params = opts[:form_params] || {}
|
|
1834
|
+
form_params['logo'] = logo
|
|
1835
|
+
|
|
1836
|
+
# http body (model)
|
|
1837
|
+
post_body = opts[:debug_body]
|
|
1838
|
+
|
|
1839
|
+
# return_type
|
|
1840
|
+
return_type = opts[:debug_return_type] || 'Project'
|
|
1841
|
+
|
|
1842
|
+
# auth_names
|
|
1843
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
1844
|
+
|
|
1845
|
+
new_options = opts.merge(
|
|
1846
|
+
:operation => :"ProjectsApi.upload_project_logo",
|
|
1847
|
+
:header_params => header_params,
|
|
1848
|
+
:query_params => query_params,
|
|
1849
|
+
:form_params => form_params,
|
|
1850
|
+
:body => post_body,
|
|
1851
|
+
:auth_names => auth_names,
|
|
1852
|
+
:return_type => return_type
|
|
1853
|
+
)
|
|
1854
|
+
|
|
1855
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1856
|
+
if @api_client.config.debugging
|
|
1857
|
+
@api_client.config.logger.debug "API called: ProjectsApi#upload_project_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1858
|
+
end
|
|
1859
|
+
return data, status_code, headers
|
|
1860
|
+
end
|
|
1861
|
+
end
|
|
1862
|
+
end
|