From 7efd25ac228b77aa10e09e9308f6fa2cc565b5bc Mon Sep 17 00:00:00 2001 From: cstaud Date: Fri, 26 Mar 2021 10:02:28 +0100 Subject: [PATCH] Initial commit --- .gitignore | 20 + Makefile | 31 + README.md | 1 + generate.go | 6 + go.mod | 13 + go.sum | 1047 +++ go/client/bitrise_api_client.go | 111 + .../operations/activity_list_parameters.go | 196 + .../operations/activity_list_responses.go | 219 + .../addon_list_by_app_parameters.go | 149 + .../operations/addon_list_by_app_responses.go | 219 + .../addon_list_by_organization_parameters.go | 149 + .../addon_list_by_organization_responses.go | 219 + .../addon_list_by_user_parameters.go | 149 + .../addon_list_by_user_responses.go | 219 + .../operations/addons_list_parameters.go | 126 + go/client/operations/addons_list_responses.go | 219 + .../operations/addons_show_parameters.go | 149 + go/client/operations/addons_show_responses.go | 219 + ...android_keystore_file_create_parameters.go | 173 + .../android_keystore_file_create_responses.go | 219 + .../android_keystore_file_list_parameters.go | 218 + .../android_keystore_file_list_responses.go | 219 + .../app_config_create_parameters.go | 173 + .../operations/app_config_create_responses.go | 217 + .../app_config_datastore_show_parameters.go | 149 + .../app_config_datastore_show_responses.go | 217 + go/client/operations/app_create_parameters.go | 151 + go/client/operations/app_create_responses.go | 219 + go/client/operations/app_finish_parameters.go | 173 + go/client/operations/app_finish_responses.go | 219 + .../app_list_by_organization_parameters.go | 252 + .../app_list_by_organization_responses.go | 219 + .../operations/app_list_by_user_parameters.go | 252 + .../operations/app_list_by_user_responses.go | 219 + go/client/operations/app_list_parameters.go | 230 + go/client/operations/app_list_responses.go | 219 + go/client/operations/app_show_parameters.go | 149 + go/client/operations/app_show_responses.go | 219 + .../app_webhook_create_parameters.go | 149 + .../app_webhook_create_responses.go | 219 + .../apple_api_credential_list_parameters.go | 149 + .../apple_api_credential_list_responses.go | 219 + .../operations/artifact_delete_parameters.go | 193 + .../operations/artifact_delete_responses.go | 219 + .../operations/artifact_list_parameters.go | 240 + .../operations/artifact_list_responses.go | 219 + .../operations/artifact_show_parameters.go | 228 + .../operations/artifact_show_responses.go | 219 + .../operations/artifact_update_parameters.go | 217 + .../operations/artifact_update_responses.go | 219 + .../avatar_candidate_create_parameters.go | 173 + .../avatar_candidate_create_responses.go | 217 + .../avatar_candidate_list_parameters.go | 149 + .../avatar_candidate_list_responses.go | 219 + .../avatar_candidate_promote_parameters.go | 195 + .../avatar_candidate_promote_responses.go | 219 + .../operations/branch_list_parameters.go | 149 + go/client/operations/branch_list_responses.go | 219 + .../operations/build_abort_parameters.go | 195 + go/client/operations/build_abort_responses.go | 257 + .../build_bitrise_yml_show_parameters.go | 171 + .../build_bitrise_yml_show_responses.go | 217 + .../build_certificate_confirm_parameters.go | 171 + .../build_certificate_confirm_responses.go | 219 + .../build_certificate_create_parameters.go | 173 + .../build_certificate_create_responses.go | 219 + .../build_certificate_delete_parameters.go | 171 + .../build_certificate_delete_responses.go | 219 + .../build_certificate_list_parameters.go | 218 + .../build_certificate_list_responses.go | 219 + .../build_certificate_show_parameters.go | 171 + .../build_certificate_show_responses.go | 219 + .../build_certificate_update_parameters.go | 195 + .../build_certificate_update_responses.go | 219 + .../operations/build_list_all_parameters.go | 298 + .../operations/build_list_all_responses.go | 219 + go/client/operations/build_list_parameters.go | 558 ++ go/client/operations/build_list_responses.go | 219 + go/client/operations/build_log_parameters.go | 171 + go/client/operations/build_log_responses.go | 219 + .../build_request_list_parameters.go | 149 + .../build_request_list_responses.go | 219 + .../build_request_update_parameters.go | 195 + .../build_request_update_responses.go | 219 + go/client/operations/build_show_parameters.go | 171 + go/client/operations/build_show_responses.go | 219 + .../operations/build_trigger_parameters.go | 173 + .../operations/build_trigger_responses.go | 219 + .../build_workflow_list_parameters.go | 149 + .../build_workflow_list_responses.go | 219 + ...generic_project_file_confirm_parameters.go | 171 + .../generic_project_file_confirm_responses.go | 219 + .../generic_project_file_delete_parameters.go | 171 + .../generic_project_file_delete_responses.go | 219 + .../generic_project_file_list_parameters.go | 218 + .../generic_project_file_list_responses.go | 219 + .../generic_project_file_show_parameters.go | 171 + .../generic_project_file_show_responses.go | 219 + .../generic_project_file_update_parameters.go | 195 + .../generic_project_file_update_responses.go | 219 + ...generic_project_files_create_parameters.go | 173 + .../generic_project_files_create_responses.go | 219 + go/client/operations/operations_client.go | 2963 ++++++++ go/client/operations/org_list_parameters.go | 126 + go/client/operations/org_list_responses.go | 219 + go/client/operations/org_show_parameters.go | 149 + go/client/operations/org_show_responses.go | 219 + .../outgoing_webhook_create_parameters.go | 173 + .../outgoing_webhook_create_responses.go | 219 + .../outgoing_webhook_delete_parameters.go | 171 + .../outgoing_webhook_delete_responses.go | 219 + .../outgoing_webhook_list_parameters.go | 218 + .../outgoing_webhook_list_responses.go | 181 + .../outgoing_webhook_update_parameters.go | 195 + .../outgoing_webhook_update_responses.go | 219 + ...provisioning_profile_confirm_parameters.go | 171 + .../provisioning_profile_confirm_responses.go | 219 + .../provisioning_profile_create_parameters.go | 173 + .../provisioning_profile_create_responses.go | 219 + .../provisioning_profile_delete_parameters.go | 171 + .../provisioning_profile_delete_responses.go | 219 + .../provisioning_profile_list_parameters.go | 218 + .../provisioning_profile_list_responses.go | 219 + .../provisioning_profile_show_parameters.go | 171 + .../provisioning_profile_show_responses.go | 219 + .../provisioning_profile_update_parameters.go | 195 + .../provisioning_profile_update_responses.go | 219 + .../operations/ssh_key_create_parameters.go | 173 + .../operations/ssh_key_create_responses.go | 219 + .../operations/test_device_list_parameters.go | 149 + .../operations/test_device_list_responses.go | 219 + go/client/operations/user_plan_parameters.go | 126 + go/client/operations/user_plan_responses.go | 219 + .../operations/user_profile_parameters.go | 126 + .../operations/user_profile_responses.go | 181 + go/client/operations/user_show_parameters.go | 149 + go/client/operations/user_show_responses.go | 219 + .../webhook_delivery_item_list_parameters.go | 240 + .../webhook_delivery_item_list_responses.go | 181 + ...hook_delivery_item_redeliver_parameters.go | 193 + ...bhook_delivery_item_redeliver_responses.go | 181 + .../webhook_delivery_item_show_parameters.go | 193 + .../webhook_delivery_item_show_responses.go | 181 + go/models/addons_addon.go | 249 + go/models/addons_developer_link.go | 53 + go/models/addons_feature.go | 56 + go/models/addons_plan.go | 121 + go/models/addons_setup_guide.go | 115 + go/models/addons_setup_instruction.go | 56 + go/models/custom_bitrise_yml_model.go | 100 + go/models/custom_bitrise_yml_model_app.go | 50 + go/models/nulls_int64.go | 11 + go/models/nulls_string.go | 53 + .../service_standard_error_resp_model.go | 50 + .../v0_activity_event_list_response_model.go | 154 + .../v0_activity_event_response_item_model.go | 280 + .../v0_add_on_app_response_item_model.go | 151 + go/models/v0_addons_list_response_model.go | 112 + go/models/v0_addons_show_response_model.go | 100 + .../v0_android_keystore_file_upload_params.go | 139 + .../v0_app_add_on_response_item_model.go | 166 + .../v0_app_add_ons_list_response_model.go | 112 + go/models/v0_app_config_request_param.go | 71 + go/models/v0_app_config_resp_model.go | 27 + go/models/v0_app_finish_params.go | 100 + go/models/v0_app_finish_resp_model.go | 59 + go/models/v0_app_list_response_model.go | 154 + go/models/v0_app_resp_model.go | 53 + go/models/v0_app_response_item_model.go | 367 + go/models/v0_app_show_response_model.go | 100 + go/models/v0_app_upload_params.go | 159 + go/models/v0_app_webhook_create_params.go | 108 + .../v0_app_webhook_created_response_model.go | 100 + .../v0_app_webhook_deleted_response_model.go | 100 + .../v0_app_webhook_list_response_model.go | 154 + .../v0_app_webhook_response_item_model.go | 68 + go/models/v0_app_webhook_response_model.go | 100 + go/models/v0_app_webhook_update_params.go | 91 + .../v0_apple_api_credential_response_item.go | 65 + .../v0_apple_api_credentials_list_response.go | 112 + .../v0_artifact_delete_response_model.go | 100 + ...v0_artifact_list_element_response_model.go | 154 + go/models/v0_artifact_list_response_model.go | 154 + go/models/v0_artifact_response_item_model.go | 160 + go/models/v0_artifact_show_response_model.go | 100 + go/models/v0_artifact_update_params.go | 71 + .../v0_avatar_candidate_create_bulk_params.go | 69 + .../v0_avatar_candidate_create_params.go | 88 + ...0_avatar_candidate_create_response_item.go | 59 + ..._avatar_candidate_create_response_items.go | 69 + go/models/v0_avatar_promote_params.go | 71 + .../v0_avatar_promote_response_item_model.go | 59 + go/models/v0_avatar_promote_response_model.go | 100 + go/models/v0_branch_list_response_model.go | 50 + go/models/v0_build_abort_params.go | 105 + go/models/v0_build_abort_response_model.go | 50 + ...0_build_certificate_list_response_model.go | 154 + ...0_build_certificate_response_item_model.go | 74 + .../v0_build_certificate_response_model.go | 100 + .../v0_build_certificate_update_params.go | 59 + .../v0_build_certificate_upload_params.go | 88 + .../v0_build_list_all_response_item_model.go | 598 ++ go/models/v0_build_list_all_response_model.go | 154 + go/models/v0_build_list_response_model.go | 154 + .../v0_build_log_chunk_item_response_model.go | 53 + go/models/v0_build_log_info_response_model.go | 163 + go/models/v0_build_params_environment.go | 56 + .../v0_build_request_list_response_model.go | 112 + .../v0_build_request_response_item_model.go | 59 + go/models/v0_build_request_update_params.go | 71 + .../v0_build_request_update_response_model.go | 100 + go/models/v0_build_response_item_model.go | 556 ++ go/models/v0_build_show_response_model.go | 100 + go/models/v0_build_trigger_params.go | 142 + .../v0_build_trigger_params_build_params.go | 213 + .../v0_build_trigger_params_hook_info.go | 51 + go/models/v0_build_trigger_resp_model.go | 71 + .../v0_build_workflow_list_response_model.go | 50 + go/models/v0_commit_paths.go | 56 + .../v0_find_avatar_candidate_response.go | 112 + .../v0_find_avatar_candidate_response_item.go | 56 + go/models/v0_organization_data_model.go | 163 + go/models/v0_organization_list_resp_model.go | 112 + go/models/v0_organization_owner.go | 56 + go/models/v0_organization_resp_model.go | 100 + go/models/v0_owner_account_response_model.go | 56 + .../v0_owner_add_on_response_item_model.go | 133 + .../v0_owner_add_ons_list_response_model.go | 112 + go/models/v0_paging_response_model.go | 59 + go/models/v0_plan_data_model.go | 62 + ...ect_file_storage_document_update_params.go | 62 + ...roject_file_storage_list_response_model.go | 154 + ...roject_file_storage_response_item_model.go | 77 + .../v0_project_file_storage_response_model.go | 100 + .../v0_project_file_storage_upload_params.go | 105 + .../v0_prov_profile_document_update_params.go | 56 + ...0_provision_profile_list_response_model.go | 154 + ...0_provision_profile_response_item_model.go | 71 + .../v0_provision_profile_response_model.go | 100 + .../v0_provision_profile_upload_params.go | 88 + go/models/v0_proxy_error_resp_model.go | 50 + go/models/v0_ssh_key_resp_model.go | 50 + go/models/v0_ssh_key_upload_params.go | 91 + .../v0_test_device_list_response_model.go | 112 + .../v0_test_device_response_item_model.go | 56 + go/models/v0_user_plan_data_model.go | 145 + go/models/v0_user_plan_resp_model.go | 100 + go/models/v0_user_profile_data_model.go | 74 + go/models/v0_user_profile_resp_model.go | 100 + ...v0_webhook_delivery_item_response_model.go | 166 + ...bhook_delivery_item_show_response_model.go | 100 + go/models/v0_webhook_resp_model.go | 50 + staffbase.patch | 22 + swagger.json | 6688 ++++++++++++++++ swagger_patched.json | 6692 +++++++++++++++++ tools.go | 12 + 257 files changed, 56817 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.md create mode 100644 generate.go create mode 100644 go.mod create mode 100644 go.sum create mode 100644 go/client/bitrise_api_client.go create mode 100644 go/client/operations/activity_list_parameters.go create mode 100644 go/client/operations/activity_list_responses.go create mode 100644 go/client/operations/addon_list_by_app_parameters.go create mode 100644 go/client/operations/addon_list_by_app_responses.go create mode 100644 go/client/operations/addon_list_by_organization_parameters.go create mode 100644 go/client/operations/addon_list_by_organization_responses.go create mode 100644 go/client/operations/addon_list_by_user_parameters.go create mode 100644 go/client/operations/addon_list_by_user_responses.go create mode 100644 go/client/operations/addons_list_parameters.go create mode 100644 go/client/operations/addons_list_responses.go create mode 100644 go/client/operations/addons_show_parameters.go create mode 100644 go/client/operations/addons_show_responses.go create mode 100644 go/client/operations/android_keystore_file_create_parameters.go create mode 100644 go/client/operations/android_keystore_file_create_responses.go create mode 100644 go/client/operations/android_keystore_file_list_parameters.go create mode 100644 go/client/operations/android_keystore_file_list_responses.go create mode 100644 go/client/operations/app_config_create_parameters.go create mode 100644 go/client/operations/app_config_create_responses.go create mode 100644 go/client/operations/app_config_datastore_show_parameters.go create mode 100644 go/client/operations/app_config_datastore_show_responses.go create mode 100644 go/client/operations/app_create_parameters.go create mode 100644 go/client/operations/app_create_responses.go create mode 100644 go/client/operations/app_finish_parameters.go create mode 100644 go/client/operations/app_finish_responses.go create mode 100644 go/client/operations/app_list_by_organization_parameters.go create mode 100644 go/client/operations/app_list_by_organization_responses.go create mode 100644 go/client/operations/app_list_by_user_parameters.go create mode 100644 go/client/operations/app_list_by_user_responses.go create mode 100644 go/client/operations/app_list_parameters.go create mode 100644 go/client/operations/app_list_responses.go create mode 100644 go/client/operations/app_show_parameters.go create mode 100644 go/client/operations/app_show_responses.go create mode 100644 go/client/operations/app_webhook_create_parameters.go create mode 100644 go/client/operations/app_webhook_create_responses.go create mode 100644 go/client/operations/apple_api_credential_list_parameters.go create mode 100644 go/client/operations/apple_api_credential_list_responses.go create mode 100644 go/client/operations/artifact_delete_parameters.go create mode 100644 go/client/operations/artifact_delete_responses.go create mode 100644 go/client/operations/artifact_list_parameters.go create mode 100644 go/client/operations/artifact_list_responses.go create mode 100644 go/client/operations/artifact_show_parameters.go create mode 100644 go/client/operations/artifact_show_responses.go create mode 100644 go/client/operations/artifact_update_parameters.go create mode 100644 go/client/operations/artifact_update_responses.go create mode 100644 go/client/operations/avatar_candidate_create_parameters.go create mode 100644 go/client/operations/avatar_candidate_create_responses.go create mode 100644 go/client/operations/avatar_candidate_list_parameters.go create mode 100644 go/client/operations/avatar_candidate_list_responses.go create mode 100644 go/client/operations/avatar_candidate_promote_parameters.go create mode 100644 go/client/operations/avatar_candidate_promote_responses.go create mode 100644 go/client/operations/branch_list_parameters.go create mode 100644 go/client/operations/branch_list_responses.go create mode 100644 go/client/operations/build_abort_parameters.go create mode 100644 go/client/operations/build_abort_responses.go create mode 100644 go/client/operations/build_bitrise_yml_show_parameters.go create mode 100644 go/client/operations/build_bitrise_yml_show_responses.go create mode 100644 go/client/operations/build_certificate_confirm_parameters.go create mode 100644 go/client/operations/build_certificate_confirm_responses.go create mode 100644 go/client/operations/build_certificate_create_parameters.go create mode 100644 go/client/operations/build_certificate_create_responses.go create mode 100644 go/client/operations/build_certificate_delete_parameters.go create mode 100644 go/client/operations/build_certificate_delete_responses.go create mode 100644 go/client/operations/build_certificate_list_parameters.go create mode 100644 go/client/operations/build_certificate_list_responses.go create mode 100644 go/client/operations/build_certificate_show_parameters.go create mode 100644 go/client/operations/build_certificate_show_responses.go create mode 100644 go/client/operations/build_certificate_update_parameters.go create mode 100644 go/client/operations/build_certificate_update_responses.go create mode 100644 go/client/operations/build_list_all_parameters.go create mode 100644 go/client/operations/build_list_all_responses.go create mode 100644 go/client/operations/build_list_parameters.go create mode 100644 go/client/operations/build_list_responses.go create mode 100644 go/client/operations/build_log_parameters.go create mode 100644 go/client/operations/build_log_responses.go create mode 100644 go/client/operations/build_request_list_parameters.go create mode 100644 go/client/operations/build_request_list_responses.go create mode 100644 go/client/operations/build_request_update_parameters.go create mode 100644 go/client/operations/build_request_update_responses.go create mode 100644 go/client/operations/build_show_parameters.go create mode 100644 go/client/operations/build_show_responses.go create mode 100644 go/client/operations/build_trigger_parameters.go create mode 100644 go/client/operations/build_trigger_responses.go create mode 100644 go/client/operations/build_workflow_list_parameters.go create mode 100644 go/client/operations/build_workflow_list_responses.go create mode 100644 go/client/operations/generic_project_file_confirm_parameters.go create mode 100644 go/client/operations/generic_project_file_confirm_responses.go create mode 100644 go/client/operations/generic_project_file_delete_parameters.go create mode 100644 go/client/operations/generic_project_file_delete_responses.go create mode 100644 go/client/operations/generic_project_file_list_parameters.go create mode 100644 go/client/operations/generic_project_file_list_responses.go create mode 100644 go/client/operations/generic_project_file_show_parameters.go create mode 100644 go/client/operations/generic_project_file_show_responses.go create mode 100644 go/client/operations/generic_project_file_update_parameters.go create mode 100644 go/client/operations/generic_project_file_update_responses.go create mode 100644 go/client/operations/generic_project_files_create_parameters.go create mode 100644 go/client/operations/generic_project_files_create_responses.go create mode 100644 go/client/operations/operations_client.go create mode 100644 go/client/operations/org_list_parameters.go create mode 100644 go/client/operations/org_list_responses.go create mode 100644 go/client/operations/org_show_parameters.go create mode 100644 go/client/operations/org_show_responses.go create mode 100644 go/client/operations/outgoing_webhook_create_parameters.go create mode 100644 go/client/operations/outgoing_webhook_create_responses.go create mode 100644 go/client/operations/outgoing_webhook_delete_parameters.go create mode 100644 go/client/operations/outgoing_webhook_delete_responses.go create mode 100644 go/client/operations/outgoing_webhook_list_parameters.go create mode 100644 go/client/operations/outgoing_webhook_list_responses.go create mode 100644 go/client/operations/outgoing_webhook_update_parameters.go create mode 100644 go/client/operations/outgoing_webhook_update_responses.go create mode 100644 go/client/operations/provisioning_profile_confirm_parameters.go create mode 100644 go/client/operations/provisioning_profile_confirm_responses.go create mode 100644 go/client/operations/provisioning_profile_create_parameters.go create mode 100644 go/client/operations/provisioning_profile_create_responses.go create mode 100644 go/client/operations/provisioning_profile_delete_parameters.go create mode 100644 go/client/operations/provisioning_profile_delete_responses.go create mode 100644 go/client/operations/provisioning_profile_list_parameters.go create mode 100644 go/client/operations/provisioning_profile_list_responses.go create mode 100644 go/client/operations/provisioning_profile_show_parameters.go create mode 100644 go/client/operations/provisioning_profile_show_responses.go create mode 100644 go/client/operations/provisioning_profile_update_parameters.go create mode 100644 go/client/operations/provisioning_profile_update_responses.go create mode 100644 go/client/operations/ssh_key_create_parameters.go create mode 100644 go/client/operations/ssh_key_create_responses.go create mode 100644 go/client/operations/test_device_list_parameters.go create mode 100644 go/client/operations/test_device_list_responses.go create mode 100644 go/client/operations/user_plan_parameters.go create mode 100644 go/client/operations/user_plan_responses.go create mode 100644 go/client/operations/user_profile_parameters.go create mode 100644 go/client/operations/user_profile_responses.go create mode 100644 go/client/operations/user_show_parameters.go create mode 100644 go/client/operations/user_show_responses.go create mode 100644 go/client/operations/webhook_delivery_item_list_parameters.go create mode 100644 go/client/operations/webhook_delivery_item_list_responses.go create mode 100644 go/client/operations/webhook_delivery_item_redeliver_parameters.go create mode 100644 go/client/operations/webhook_delivery_item_redeliver_responses.go create mode 100644 go/client/operations/webhook_delivery_item_show_parameters.go create mode 100644 go/client/operations/webhook_delivery_item_show_responses.go create mode 100644 go/models/addons_addon.go create mode 100644 go/models/addons_developer_link.go create mode 100644 go/models/addons_feature.go create mode 100644 go/models/addons_plan.go create mode 100644 go/models/addons_setup_guide.go create mode 100644 go/models/addons_setup_instruction.go create mode 100644 go/models/custom_bitrise_yml_model.go create mode 100644 go/models/custom_bitrise_yml_model_app.go create mode 100644 go/models/nulls_int64.go create mode 100644 go/models/nulls_string.go create mode 100644 go/models/service_standard_error_resp_model.go create mode 100644 go/models/v0_activity_event_list_response_model.go create mode 100644 go/models/v0_activity_event_response_item_model.go create mode 100644 go/models/v0_add_on_app_response_item_model.go create mode 100644 go/models/v0_addons_list_response_model.go create mode 100644 go/models/v0_addons_show_response_model.go create mode 100644 go/models/v0_android_keystore_file_upload_params.go create mode 100644 go/models/v0_app_add_on_response_item_model.go create mode 100644 go/models/v0_app_add_ons_list_response_model.go create mode 100644 go/models/v0_app_config_request_param.go create mode 100644 go/models/v0_app_config_resp_model.go create mode 100644 go/models/v0_app_finish_params.go create mode 100644 go/models/v0_app_finish_resp_model.go create mode 100644 go/models/v0_app_list_response_model.go create mode 100644 go/models/v0_app_resp_model.go create mode 100644 go/models/v0_app_response_item_model.go create mode 100644 go/models/v0_app_show_response_model.go create mode 100644 go/models/v0_app_upload_params.go create mode 100644 go/models/v0_app_webhook_create_params.go create mode 100644 go/models/v0_app_webhook_created_response_model.go create mode 100644 go/models/v0_app_webhook_deleted_response_model.go create mode 100644 go/models/v0_app_webhook_list_response_model.go create mode 100644 go/models/v0_app_webhook_response_item_model.go create mode 100644 go/models/v0_app_webhook_response_model.go create mode 100644 go/models/v0_app_webhook_update_params.go create mode 100644 go/models/v0_apple_api_credential_response_item.go create mode 100644 go/models/v0_apple_api_credentials_list_response.go create mode 100644 go/models/v0_artifact_delete_response_model.go create mode 100644 go/models/v0_artifact_list_element_response_model.go create mode 100644 go/models/v0_artifact_list_response_model.go create mode 100644 go/models/v0_artifact_response_item_model.go create mode 100644 go/models/v0_artifact_show_response_model.go create mode 100644 go/models/v0_artifact_update_params.go create mode 100644 go/models/v0_avatar_candidate_create_bulk_params.go create mode 100644 go/models/v0_avatar_candidate_create_params.go create mode 100644 go/models/v0_avatar_candidate_create_response_item.go create mode 100644 go/models/v0_avatar_candidate_create_response_items.go create mode 100644 go/models/v0_avatar_promote_params.go create mode 100644 go/models/v0_avatar_promote_response_item_model.go create mode 100644 go/models/v0_avatar_promote_response_model.go create mode 100644 go/models/v0_branch_list_response_model.go create mode 100644 go/models/v0_build_abort_params.go create mode 100644 go/models/v0_build_abort_response_model.go create mode 100644 go/models/v0_build_certificate_list_response_model.go create mode 100644 go/models/v0_build_certificate_response_item_model.go create mode 100644 go/models/v0_build_certificate_response_model.go create mode 100644 go/models/v0_build_certificate_update_params.go create mode 100644 go/models/v0_build_certificate_upload_params.go create mode 100644 go/models/v0_build_list_all_response_item_model.go create mode 100644 go/models/v0_build_list_all_response_model.go create mode 100644 go/models/v0_build_list_response_model.go create mode 100644 go/models/v0_build_log_chunk_item_response_model.go create mode 100644 go/models/v0_build_log_info_response_model.go create mode 100644 go/models/v0_build_params_environment.go create mode 100644 go/models/v0_build_request_list_response_model.go create mode 100644 go/models/v0_build_request_response_item_model.go create mode 100644 go/models/v0_build_request_update_params.go create mode 100644 go/models/v0_build_request_update_response_model.go create mode 100644 go/models/v0_build_response_item_model.go create mode 100644 go/models/v0_build_show_response_model.go create mode 100644 go/models/v0_build_trigger_params.go create mode 100644 go/models/v0_build_trigger_params_build_params.go create mode 100644 go/models/v0_build_trigger_params_hook_info.go create mode 100644 go/models/v0_build_trigger_resp_model.go create mode 100644 go/models/v0_build_workflow_list_response_model.go create mode 100644 go/models/v0_commit_paths.go create mode 100644 go/models/v0_find_avatar_candidate_response.go create mode 100644 go/models/v0_find_avatar_candidate_response_item.go create mode 100644 go/models/v0_organization_data_model.go create mode 100644 go/models/v0_organization_list_resp_model.go create mode 100644 go/models/v0_organization_owner.go create mode 100644 go/models/v0_organization_resp_model.go create mode 100644 go/models/v0_owner_account_response_model.go create mode 100644 go/models/v0_owner_add_on_response_item_model.go create mode 100644 go/models/v0_owner_add_ons_list_response_model.go create mode 100644 go/models/v0_paging_response_model.go create mode 100644 go/models/v0_plan_data_model.go create mode 100644 go/models/v0_project_file_storage_document_update_params.go create mode 100644 go/models/v0_project_file_storage_list_response_model.go create mode 100644 go/models/v0_project_file_storage_response_item_model.go create mode 100644 go/models/v0_project_file_storage_response_model.go create mode 100644 go/models/v0_project_file_storage_upload_params.go create mode 100644 go/models/v0_prov_profile_document_update_params.go create mode 100644 go/models/v0_provision_profile_list_response_model.go create mode 100644 go/models/v0_provision_profile_response_item_model.go create mode 100644 go/models/v0_provision_profile_response_model.go create mode 100644 go/models/v0_provision_profile_upload_params.go create mode 100644 go/models/v0_proxy_error_resp_model.go create mode 100644 go/models/v0_ssh_key_resp_model.go create mode 100644 go/models/v0_ssh_key_upload_params.go create mode 100644 go/models/v0_test_device_list_response_model.go create mode 100644 go/models/v0_test_device_response_item_model.go create mode 100644 go/models/v0_user_plan_data_model.go create mode 100644 go/models/v0_user_plan_resp_model.go create mode 100644 go/models/v0_user_profile_data_model.go create mode 100644 go/models/v0_user_profile_resp_model.go create mode 100644 go/models/v0_webhook_delivery_item_response_model.go create mode 100644 go/models/v0_webhook_delivery_item_show_response_model.go create mode 100644 go/models/v0_webhook_resp_model.go create mode 100644 staffbase.patch create mode 100644 swagger.json create mode 100644 swagger_patched.json create mode 100644 tools.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..555252d --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +.idea +# Dependency directories (remove the comment below to include it) +# vendor/ +/.gobincache/ + +/swagger_patched_flat.json +/swagger_patched_go.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..36e0eb0 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +.PHONY: all build deps download generate help test validate +CHECK_FILES?=$$(go list ./... | grep -v /vendor/) +SWAGGER_SPEC=swagger.json +PATCH_FILE=staffbase.patch +PATCHED_SWAGGER_SPEC=swagger_patched.json + +help: ## Show this help. + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +all: download patch deps generate build test ## Validate the swagger spec, generate the code and build it. + +build: ## Build the API Go client. + go build ./go/... + +deps: ## Download dependencies. + GO111MODULE=off go get -u github.com/myitcv/gobin && go mod download + +download: ## Download bitrise swagger specification + wget -q -O $(SWAGGER_SPEC) https://api-docs.bitrise.io/docs/swagger.json + +patch: ## Apply swagger.json patches + patch -u $(SWAGGER_SPEC) -i $(PATCH_FILE) -o $(PATCHED_SWAGGER_SPEC) + +generate: validate ## Generate the API Go client and the JSON document for the UI. + go generate + +test: ## Test the go code. + gobin -m -run github.com/kyoh86/richgo test -v $(CHECK_FILES) + +validate: deps ## Check that the swagger spec is valid. + gobin -m -run github.com/go-swagger/go-swagger/cmd/swagger@v0.26.1 validate $(PATCHED_SWAGGER_SPEC) \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..d01bd9c --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# bitrise-api \ No newline at end of file diff --git a/generate.go b/generate.go new file mode 100644 index 0000000..8ed9dba --- /dev/null +++ b/generate.go @@ -0,0 +1,6 @@ +package tools + +// todo: Find a better way to ignore tags or make a breaking release +//go:generate gobin -m -run github.com/go-swagger/go-swagger/cmd/swagger flatten swagger_patched.json -o swagger_patched_flat.json +//go:generate sh -c "cat swagger_patched_flat.json | jq '[., (.paths | map_values(.[] |= del(.tags?)) | {paths: .})] | add' > swagger_patched_go.json" +//go:generate gobin -m -run github.com/go-swagger/go-swagger/cmd/swagger generate client -A bitrise-api -f swagger_patched_go.json -t go --default-scheme=https --with-flatten=full diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e8637c7 --- /dev/null +++ b/go.mod @@ -0,0 +1,13 @@ +module github.com/Staffbase/bitrise-api + +go 1.15 + +require ( + github.com/go-openapi/errors v0.19.9 + github.com/go-openapi/runtime v0.19.26 + github.com/go-openapi/strfmt v0.20.0 + github.com/go-openapi/swag v0.19.13 + github.com/go-openapi/validate v0.20.1 + github.com/go-swagger/go-swagger v0.26.1 // indirect + github.com/kyoh86/richgo v0.3.6 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..968fb02 --- /dev/null +++ b/go.sum @@ -0,0 +1,1047 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0 h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0 h1:9x7Bx0A9R5/M9jibeJeZWqjeVEIxYW9fZYqB9a70/bY= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1 h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1 h1:3oJU7J3FGFmyhn8KHjmVaZCN5hxTr7GxgRue+sxIXdQ= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGLmAjMPwCCCo7Jf0W6f9slllCkkv7vyc1yOSg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-sdk-go v1.34.28 h1:sscPpn/Ns3i0F4HPEWAVcwdIRaZZCuL7llJ2/60yPIk= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f h1:WBZRG4aNOuI15bLRrCgN8fCq8E5Xuty6jGbmSNEvSsU= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/corbym/gocrest v1.0.3/go.mod h1:maVFL5lbdS2PgfOQgGRWDYTeunSWQeiEgoNdTABShCs= +github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= +github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4 h1:rEvIZUSZ3fx39WIi3JkQqQBitGwpELBIYWeBVh6wn+E= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16 h1:Ub9e++M8sDwtHD+S587TYi+6ANBG1NRYGZDihqk0SaY= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.4 h1:fSGwO1tSYHFu70NKaWJt5Qh0qoBRtCm/mXS1yhf+0W0= +github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9 h1:9SnKdGhiPZHF3ttwFMiCBEb8jQ4IDdrK+5+a0oTygA4= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= +github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/loads v0.19.5 h1:jZVYWawIQiA1NBnHla28ktg6hrcfTHsCE+3QLVRBIls= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.1 h1:LX55ObGRfG+53/1KRKTvCfqC1U2Htf7KgkPBpIVhuUM= +github.com/go-openapi/loads v0.20.1/go.mod h1:/6LfFL8fDvTSX8ypmYXIq3U9Q7nfniSOStW22m864WM= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.12 h1:5lQlCr1HL0ZVRPL+0PHKhRpMCSPMV2qF842rhQx8CYY= +github.com/go-openapi/runtime v0.19.12/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/runtime v0.19.26 h1:K/6PoVNj5WJXUnMk+VEbELeXjtBkCS1UxTDa04tdXE0= +github.com/go-openapi/runtime v0.19.26/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.7 h1:0xWSeMd35y5avQAThZR2PkEuqSosoS5t6gDH4L8n11M= +github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= +github.com/go-openapi/spec v0.20.2 h1:pFPUZsiIbZ20kLUcuCGeuQWG735fPMxW7wHF9BWlnQU= +github.com/go-openapi/spec v0.20.2/go.mod h1:RW6Xcbs6LOyWLU/mXGdzn2Qc+3aj+ASfI7rvSZh1Vls= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.0 h1:l2omNtmNbMc39IGptl9BuXBEKcZfS8zjrTsPKTiJiDM= +github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.8 h1:vfK6jLhs7OI4tAXkvkooviaE1JEPcw3mutyegLHHjmk= +github.com/go-openapi/swag v0.19.8/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/swag v0.19.13 h1:233UVgMy1DlmCYYfOiFpta6e2urloh+sEs5id6lyzog= +github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.7 h1:fR4tP2xc+25pdo5Qvv4v6g+5QKFgNg8nrifTE7V8ibA= +github.com/go-openapi/validate v0.19.7/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.1 h1:QGQ5CvK74E28t3DkegGweKR+auemUi5IdpMc4x3UW6s= +github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-swagger/go-swagger v0.23.0 h1:WrzNj+tp0pK8B5K5Sf4Rab0xvrIINiX0rrgqvW0fY0k= +github.com/go-swagger/go-swagger v0.23.0/go.mod h1:5AaV4Dx69cUjpFRTZnSHPr1Y7dKBVk6SvfIvkTEqwJs= +github.com/go-swagger/go-swagger v0.26.1 h1:1XUWLnH6hKxHzeKjJfA2gHkSqcT1Zgi4q/PZp2hDdN8= +github.com/go-swagger/go-swagger v0.26.1/go.mod h1:zlf/LHplZpdtU2mYXg9Ajd3+9TgHYltv5f/pEM6LjnI= +github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013 h1:l9rI6sNaZgNC0LnF3MiE+qTmyBA/tZAg1rtyrGbUMK0= +github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013/go.mod h1:b65mBPzqzZWxOZGxSWrqs4GInLIn+u99Q9q7p+GKni0= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd h1:hSkbZ9XSyjyBirMeqSqUrK+9HboWrweVlzRNqoBi2d4= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0 h1:31atYa/UW9V5q8vMJ+W6wd64OaaTHUrCUXER358zLM4= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0 h1:GlXgaiBkmrYMHco6t4j7SacKO4XUjvh5pwXh0f4uxXU= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3 h1:3GQ53z7E3o00C/yy7Ko8VXqQXoJGLkrTQCLTF1EjoXU= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1 h1:iQ0D6SpNXIxu52WESsD+KoQ7af2e3nCfnSBoSF/hKe0= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211 h1:mSVZ4vj4khv+oThUfS+SQU3UuFIZ5Zo6UNcvK8E8Mz8= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1 h1:dLg+zb+uOyd/mKeQUYIbwbNmfRsr9hd/WtYWepmayhI= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2 h1:8thhT+kUJMTMy3HlX4+y9Da+BNJck+p109tqqKp7WDs= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2 h1:fq9WcL1BYrm36SzK6+aAnZ8hcp+SrmnDyAxhNx8dvJk= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0 h1:4sGKOD8yaYJ+dek1FDkwcxCHA40M4kfKgFHx8N2kwbU= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0 h1:Ir9W9XIm9j7bhhkKE9cokvtTl1vBm62A/fene/ZCj6A= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754 h1:tpom+2CJmpzAWj5/VEHync2rJGi+epHNIeRSWjzGA+4= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0 h1:pMen7vLs8nvgEYhywH3KDWJIJTeEr2ULsVWHWYHQyBs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99 h1:Ak8CrdlwwXwAZxzS66vgPt4U8yUZX7JwLvVR58FN5jM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= +github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0 h1:BNQPM9ytxj6jbjjdRPioQ94T6YXriSopn0i8COv6SRA= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1 h1:LnuDWGNsoajlhGyHJvuWW6FVqRl8JOTPqS6CPTsYjhY= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3 h1:lOpSw2vJP0y5eLBW906QwKsUK/fe/QDyoqM5rnnuPDY= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0 h1:reN85Pxc5larApoH1keMBiu2GWtPqXQ1nc9gx+jOU+E= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.9.5 h1:U+CaK85mrNNb4k8BNOfgJtJ/gr6kswUCFj6miSzVC6M= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5 h1:hyz3dwM5QLc1Rfoz4FuWJQG5BN7tc6K1MndAUnGpQr4= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kyoh86/richgo v0.3.6 h1:T8FvemjZbC1ObVuu8DZVu8Gq3KYMAwvKxMVzY1Js4fw= +github.com/kyoh86/richgo v0.3.6/go.mod h1:UVOVW9OZfxxM7ZeN0OQwS/wlDGZKUh23hjS00s2EUks= +github.com/kyoh86/xdg v0.0.0-20171007020617-d28e4c5d7b81 h1:C2Yb5TxdHWrtWXdf+j8xWW4QQu8lXuxtj1UOK816dpA= +github.com/kyoh86/xdg v0.0.0-20171007020617-d28e4c5d7b81/go.mod h1:Z5mDqe0fxyxn3W2yTxsBAOQqIrXADQIh02wrTnaRM38= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= +github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2 h1:JgVTCPf0uBVcUSWpyXmGpgOc62nK5HWUBKAGc3Qqa5k= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.0-20170925054904-a5cdd64afdee h1:tUyoJR5V1TdXnTh9v8c1YAHvDdut2+zkuyUX3gAY/wI= +github.com/mattn/go-isatty v0.0.0-20170925054904-a5cdd64afdee/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c h1:nXxl5PrvVm2L/wCy8dQu6DMTwH4oIuGN8GJDAlqDdVE= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/myitcv/gobin v0.0.14/go.mod h1:GvHEiYCWroKI2KrMT+xQkHC3FC551wigVWeR4Sgg5P4= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= +github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1 h1:VasscCm72135zRysgrJDKsntdmPN+OuU3+nnHYA9wyc= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/pquerna/cachecontrol v0.0.0-20200921180117-858c6e7e6b7e h1:BLqxdwZ6j771IpSCRx7s/GJjXHUE00Hmu7/YegCGdzA= +github.com/pquerna/cachecontrol v0.0.0-20200921180117-858c6e7e6b7e/go.mod h1:hoLfEwdY11HjRfKFH6KqnPsfxlo3BP6bJehpDv8t6sQ= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= +github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.4.1 h1:asw9sl74539yqavKaglDM5hFpdJVK0Y5Dr/JOgQ89nQ= +github.com/spf13/afero v1.4.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9rrstGQ= +github.com/toqueteos/webbrowser v1.2.0/go.mod h1:XWoZq4cyp9WeUeak7w7LXRUQf1F1ATJMir8RTqb4ayM= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/vektah/gqlparser v1.1.2 h1:ZsyLGn7/7jDNI+y4SEhI4yAxRChlv15pUHMjijT+e68= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/wacul/ptr v0.0.0-20170209030335-91632201dfc8 h1:js9Z9dWq50Ttu4D1YRqgS1gkSgRfpKp+rMza4io7qNw= +github.com/wacul/ptr v0.0.0-20170209030335-91632201dfc8/go.mod h1:BD0gjsZrCwtoR+yWDB9v2hQ8STlq9tT84qKfa+3txOc= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc h1:n+nNi93yXLkJvKwXNP9d55HC7lGK4H/SRcwB5IaUZLo= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.2 h1:Z/90sZLPOeCy2PwprqkFa25PdkusRzaj9P8zm/KNyvk= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.1 h1:op56IfTQiaY2679w922KVWa3qcHdml2K/Io8ayAOUEQ= +go.mongodb.org/mongo-driver v1.3.1/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.5 h1:TLtO+iD8krabXxvY1F1qpBOHgOxhLWR7XsT7kQeRmMY= +go.mongodb.org/mongo-driver v1.4.5/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc= +golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58 h1:Mj83v+wSRNEar42a/MQgxk9X42TdEmrOl9i+y8WbxLo= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170927054621-314a259e304f/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201126233918-771906719818 h1:f1CIuDlJhwANEC2MM87MBEVMr3jl5bifgsfj90XAF9c= +golang.org/x/sys v0.0.0-20201126233918-771906719818/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 h1:gkI/wGGwpcG5W4hLCzZNGxA4wzWBGGDStRI1MrjDl2Q= +golang.org/x/tools v0.0.0-20200313205530-4303120df7d8/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20201125231158-b5590deeca9b h1:Lq5JUTFhiybGVf28jB6QRpqd13/JPOaCnET17PVzYJE= +golang.org/x/tools v0.0.0-20201125231158-b5590deeca9b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 h1:PDIOdWxZ8eRizhKa1AAvY53xsvLB1cWorMjslvY3VA8= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.54.0 h1:oM5ElzbIi7gwLnNbPX2M25ED1vSAK3B6dex50eS/6Fs= +gopkg.in/ini.v1 v1.54.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/go/client/bitrise_api_client.go b/go/client/bitrise_api_client.go new file mode 100644 index 0000000..034b38a --- /dev/null +++ b/go/client/bitrise_api_client.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/Staffbase/bitrise-api/go/client/operations" + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// Default bitrise API HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "api.bitrise.io" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/v0.1" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"https"} + +// NewHTTPClient creates a new bitrise API HTTP client. +func NewHTTPClient(formats strfmt.Registry) *BitriseAPI { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new bitrise API HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *BitriseAPI { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new bitrise API client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *BitriseAPI { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(BitriseAPI) + cli.Transport = transport + cli.Operations = operations.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// BitriseAPI is a client for bitrise API +type BitriseAPI struct { + Operations operations.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *BitriseAPI) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.Operations.SetTransport(transport) +} diff --git a/go/client/operations/activity_list_parameters.go b/go/client/operations/activity_list_parameters.go new file mode 100644 index 0000000..a2214f7 --- /dev/null +++ b/go/client/operations/activity_list_parameters.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewActivityListParams creates a new ActivityListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewActivityListParams() *ActivityListParams { + return &ActivityListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewActivityListParamsWithTimeout creates a new ActivityListParams object +// with the ability to set a timeout on a request. +func NewActivityListParamsWithTimeout(timeout time.Duration) *ActivityListParams { + return &ActivityListParams{ + timeout: timeout, + } +} + +// NewActivityListParamsWithContext creates a new ActivityListParams object +// with the ability to set a context for a request. +func NewActivityListParamsWithContext(ctx context.Context) *ActivityListParams { + return &ActivityListParams{ + Context: ctx, + } +} + +// NewActivityListParamsWithHTTPClient creates a new ActivityListParams object +// with the ability to set a custom HTTPClient for a request. +func NewActivityListParamsWithHTTPClient(client *http.Client) *ActivityListParams { + return &ActivityListParams{ + HTTPClient: client, + } +} + +/* ActivityListParams contains all the parameters to send to the API endpoint + for the activity list operation. + + Typically these are written to a http.Request. +*/ +type ActivityListParams struct { + + /* Limit. + + Max number of elements per page (default: 50) + */ + Limit *int64 + + /* Next. + + Slug of the first activity event in the response + */ + Next *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the activity list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ActivityListParams) WithDefaults() *ActivityListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the activity list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ActivityListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the activity list params +func (o *ActivityListParams) WithTimeout(timeout time.Duration) *ActivityListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the activity list params +func (o *ActivityListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the activity list params +func (o *ActivityListParams) WithContext(ctx context.Context) *ActivityListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the activity list params +func (o *ActivityListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the activity list params +func (o *ActivityListParams) WithHTTPClient(client *http.Client) *ActivityListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the activity list params +func (o *ActivityListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the activity list params +func (o *ActivityListParams) WithLimit(limit *int64) *ActivityListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the activity list params +func (o *ActivityListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the activity list params +func (o *ActivityListParams) WithNext(next *string) *ActivityListParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the activity list params +func (o *ActivityListParams) SetNext(next *string) { + o.Next = next +} + +// WriteToRequest writes these params to a swagger request +func (o *ActivityListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/activity_list_responses.go b/go/client/operations/activity_list_responses.go new file mode 100644 index 0000000..25a023f --- /dev/null +++ b/go/client/operations/activity_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ActivityListReader is a Reader for the ActivityList structure. +type ActivityListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ActivityListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewActivityListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewActivityListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewActivityListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewActivityListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewActivityListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewActivityListOK creates a ActivityListOK with default headers values +func NewActivityListOK() *ActivityListOK { + return &ActivityListOK{} +} + +/* ActivityListOK describes a response with status code 200, with default header values. + +OK +*/ +type ActivityListOK struct { + Payload *models.V0ActivityEventListResponseModel +} + +func (o *ActivityListOK) Error() string { + return fmt.Sprintf("[GET /me/activities][%d] activityListOK %+v", 200, o.Payload) +} +func (o *ActivityListOK) GetPayload() *models.V0ActivityEventListResponseModel { + return o.Payload +} + +func (o *ActivityListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ActivityEventListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewActivityListBadRequest creates a ActivityListBadRequest with default headers values +func NewActivityListBadRequest() *ActivityListBadRequest { + return &ActivityListBadRequest{} +} + +/* ActivityListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ActivityListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ActivityListBadRequest) Error() string { + return fmt.Sprintf("[GET /me/activities][%d] activityListBadRequest %+v", 400, o.Payload) +} +func (o *ActivityListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ActivityListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewActivityListUnauthorized creates a ActivityListUnauthorized with default headers values +func NewActivityListUnauthorized() *ActivityListUnauthorized { + return &ActivityListUnauthorized{} +} + +/* ActivityListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ActivityListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ActivityListUnauthorized) Error() string { + return fmt.Sprintf("[GET /me/activities][%d] activityListUnauthorized %+v", 401, o.Payload) +} +func (o *ActivityListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ActivityListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewActivityListNotFound creates a ActivityListNotFound with default headers values +func NewActivityListNotFound() *ActivityListNotFound { + return &ActivityListNotFound{} +} + +/* ActivityListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ActivityListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ActivityListNotFound) Error() string { + return fmt.Sprintf("[GET /me/activities][%d] activityListNotFound %+v", 404, o.Payload) +} +func (o *ActivityListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ActivityListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewActivityListInternalServerError creates a ActivityListInternalServerError with default headers values +func NewActivityListInternalServerError() *ActivityListInternalServerError { + return &ActivityListInternalServerError{} +} + +/* ActivityListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ActivityListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ActivityListInternalServerError) Error() string { + return fmt.Sprintf("[GET /me/activities][%d] activityListInternalServerError %+v", 500, o.Payload) +} +func (o *ActivityListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ActivityListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/addon_list_by_app_parameters.go b/go/client/operations/addon_list_by_app_parameters.go new file mode 100644 index 0000000..fe3f3df --- /dev/null +++ b/go/client/operations/addon_list_by_app_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAddonListByAppParams creates a new AddonListByAppParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAddonListByAppParams() *AddonListByAppParams { + return &AddonListByAppParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAddonListByAppParamsWithTimeout creates a new AddonListByAppParams object +// with the ability to set a timeout on a request. +func NewAddonListByAppParamsWithTimeout(timeout time.Duration) *AddonListByAppParams { + return &AddonListByAppParams{ + timeout: timeout, + } +} + +// NewAddonListByAppParamsWithContext creates a new AddonListByAppParams object +// with the ability to set a context for a request. +func NewAddonListByAppParamsWithContext(ctx context.Context) *AddonListByAppParams { + return &AddonListByAppParams{ + Context: ctx, + } +} + +// NewAddonListByAppParamsWithHTTPClient creates a new AddonListByAppParams object +// with the ability to set a custom HTTPClient for a request. +func NewAddonListByAppParamsWithHTTPClient(client *http.Client) *AddonListByAppParams { + return &AddonListByAppParams{ + HTTPClient: client, + } +} + +/* AddonListByAppParams contains all the parameters to send to the API endpoint + for the addon list by app operation. + + Typically these are written to a http.Request. +*/ +type AddonListByAppParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the addon list by app params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddonListByAppParams) WithDefaults() *AddonListByAppParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the addon list by app params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddonListByAppParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the addon list by app params +func (o *AddonListByAppParams) WithTimeout(timeout time.Duration) *AddonListByAppParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the addon list by app params +func (o *AddonListByAppParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the addon list by app params +func (o *AddonListByAppParams) WithContext(ctx context.Context) *AddonListByAppParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the addon list by app params +func (o *AddonListByAppParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the addon list by app params +func (o *AddonListByAppParams) WithHTTPClient(client *http.Client) *AddonListByAppParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the addon list by app params +func (o *AddonListByAppParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the addon list by app params +func (o *AddonListByAppParams) WithAppSlug(appSlug string) *AddonListByAppParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the addon list by app params +func (o *AddonListByAppParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AddonListByAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/addon_list_by_app_responses.go b/go/client/operations/addon_list_by_app_responses.go new file mode 100644 index 0000000..20762f5 --- /dev/null +++ b/go/client/operations/addon_list_by_app_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AddonListByAppReader is a Reader for the AddonListByApp structure. +type AddonListByAppReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AddonListByAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAddonListByAppOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAddonListByAppBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAddonListByAppUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAddonListByAppNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAddonListByAppInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAddonListByAppOK creates a AddonListByAppOK with default headers values +func NewAddonListByAppOK() *AddonListByAppOK { + return &AddonListByAppOK{} +} + +/* AddonListByAppOK describes a response with status code 200, with default header values. + +OK +*/ +type AddonListByAppOK struct { + Payload *models.V0AppAddOnsListResponseModel +} + +func (o *AddonListByAppOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/addons][%d] addonListByAppOK %+v", 200, o.Payload) +} +func (o *AddonListByAppOK) GetPayload() *models.V0AppAddOnsListResponseModel { + return o.Payload +} + +func (o *AddonListByAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppAddOnsListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByAppBadRequest creates a AddonListByAppBadRequest with default headers values +func NewAddonListByAppBadRequest() *AddonListByAppBadRequest { + return &AddonListByAppBadRequest{} +} + +/* AddonListByAppBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AddonListByAppBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByAppBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/addons][%d] addonListByAppBadRequest %+v", 400, o.Payload) +} +func (o *AddonListByAppBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByAppBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByAppUnauthorized creates a AddonListByAppUnauthorized with default headers values +func NewAddonListByAppUnauthorized() *AddonListByAppUnauthorized { + return &AddonListByAppUnauthorized{} +} + +/* AddonListByAppUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AddonListByAppUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByAppUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/addons][%d] addonListByAppUnauthorized %+v", 401, o.Payload) +} +func (o *AddonListByAppUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByAppUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByAppNotFound creates a AddonListByAppNotFound with default headers values +func NewAddonListByAppNotFound() *AddonListByAppNotFound { + return &AddonListByAppNotFound{} +} + +/* AddonListByAppNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AddonListByAppNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByAppNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/addons][%d] addonListByAppNotFound %+v", 404, o.Payload) +} +func (o *AddonListByAppNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByAppNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByAppInternalServerError creates a AddonListByAppInternalServerError with default headers values +func NewAddonListByAppInternalServerError() *AddonListByAppInternalServerError { + return &AddonListByAppInternalServerError{} +} + +/* AddonListByAppInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AddonListByAppInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByAppInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/addons][%d] addonListByAppInternalServerError %+v", 500, o.Payload) +} +func (o *AddonListByAppInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByAppInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/addon_list_by_organization_parameters.go b/go/client/operations/addon_list_by_organization_parameters.go new file mode 100644 index 0000000..b3e754e --- /dev/null +++ b/go/client/operations/addon_list_by_organization_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAddonListByOrganizationParams creates a new AddonListByOrganizationParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAddonListByOrganizationParams() *AddonListByOrganizationParams { + return &AddonListByOrganizationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAddonListByOrganizationParamsWithTimeout creates a new AddonListByOrganizationParams object +// with the ability to set a timeout on a request. +func NewAddonListByOrganizationParamsWithTimeout(timeout time.Duration) *AddonListByOrganizationParams { + return &AddonListByOrganizationParams{ + timeout: timeout, + } +} + +// NewAddonListByOrganizationParamsWithContext creates a new AddonListByOrganizationParams object +// with the ability to set a context for a request. +func NewAddonListByOrganizationParamsWithContext(ctx context.Context) *AddonListByOrganizationParams { + return &AddonListByOrganizationParams{ + Context: ctx, + } +} + +// NewAddonListByOrganizationParamsWithHTTPClient creates a new AddonListByOrganizationParams object +// with the ability to set a custom HTTPClient for a request. +func NewAddonListByOrganizationParamsWithHTTPClient(client *http.Client) *AddonListByOrganizationParams { + return &AddonListByOrganizationParams{ + HTTPClient: client, + } +} + +/* AddonListByOrganizationParams contains all the parameters to send to the API endpoint + for the addon list by organization operation. + + Typically these are written to a http.Request. +*/ +type AddonListByOrganizationParams struct { + + /* OrganizationSlug. + + Organization slug + */ + OrganizationSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the addon list by organization params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddonListByOrganizationParams) WithDefaults() *AddonListByOrganizationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the addon list by organization params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddonListByOrganizationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the addon list by organization params +func (o *AddonListByOrganizationParams) WithTimeout(timeout time.Duration) *AddonListByOrganizationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the addon list by organization params +func (o *AddonListByOrganizationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the addon list by organization params +func (o *AddonListByOrganizationParams) WithContext(ctx context.Context) *AddonListByOrganizationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the addon list by organization params +func (o *AddonListByOrganizationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the addon list by organization params +func (o *AddonListByOrganizationParams) WithHTTPClient(client *http.Client) *AddonListByOrganizationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the addon list by organization params +func (o *AddonListByOrganizationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOrganizationSlug adds the organizationSlug to the addon list by organization params +func (o *AddonListByOrganizationParams) WithOrganizationSlug(organizationSlug string) *AddonListByOrganizationParams { + o.SetOrganizationSlug(organizationSlug) + return o +} + +// SetOrganizationSlug adds the organizationSlug to the addon list by organization params +func (o *AddonListByOrganizationParams) SetOrganizationSlug(organizationSlug string) { + o.OrganizationSlug = organizationSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AddonListByOrganizationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param organization-slug + if err := r.SetPathParam("organization-slug", o.OrganizationSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/addon_list_by_organization_responses.go b/go/client/operations/addon_list_by_organization_responses.go new file mode 100644 index 0000000..e730028 --- /dev/null +++ b/go/client/operations/addon_list_by_organization_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AddonListByOrganizationReader is a Reader for the AddonListByOrganization structure. +type AddonListByOrganizationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AddonListByOrganizationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAddonListByOrganizationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAddonListByOrganizationBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAddonListByOrganizationUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAddonListByOrganizationNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAddonListByOrganizationInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAddonListByOrganizationOK creates a AddonListByOrganizationOK with default headers values +func NewAddonListByOrganizationOK() *AddonListByOrganizationOK { + return &AddonListByOrganizationOK{} +} + +/* AddonListByOrganizationOK describes a response with status code 200, with default header values. + +OK +*/ +type AddonListByOrganizationOK struct { + Payload *models.V0OwnerAddOnsListResponseModel +} + +func (o *AddonListByOrganizationOK) Error() string { + return fmt.Sprintf("[GET /organizations/{organization-slug}/addons][%d] addonListByOrganizationOK %+v", 200, o.Payload) +} +func (o *AddonListByOrganizationOK) GetPayload() *models.V0OwnerAddOnsListResponseModel { + return o.Payload +} + +func (o *AddonListByOrganizationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0OwnerAddOnsListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByOrganizationBadRequest creates a AddonListByOrganizationBadRequest with default headers values +func NewAddonListByOrganizationBadRequest() *AddonListByOrganizationBadRequest { + return &AddonListByOrganizationBadRequest{} +} + +/* AddonListByOrganizationBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AddonListByOrganizationBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByOrganizationBadRequest) Error() string { + return fmt.Sprintf("[GET /organizations/{organization-slug}/addons][%d] addonListByOrganizationBadRequest %+v", 400, o.Payload) +} +func (o *AddonListByOrganizationBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByOrganizationBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByOrganizationUnauthorized creates a AddonListByOrganizationUnauthorized with default headers values +func NewAddonListByOrganizationUnauthorized() *AddonListByOrganizationUnauthorized { + return &AddonListByOrganizationUnauthorized{} +} + +/* AddonListByOrganizationUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AddonListByOrganizationUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByOrganizationUnauthorized) Error() string { + return fmt.Sprintf("[GET /organizations/{organization-slug}/addons][%d] addonListByOrganizationUnauthorized %+v", 401, o.Payload) +} +func (o *AddonListByOrganizationUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByOrganizationUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByOrganizationNotFound creates a AddonListByOrganizationNotFound with default headers values +func NewAddonListByOrganizationNotFound() *AddonListByOrganizationNotFound { + return &AddonListByOrganizationNotFound{} +} + +/* AddonListByOrganizationNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AddonListByOrganizationNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByOrganizationNotFound) Error() string { + return fmt.Sprintf("[GET /organizations/{organization-slug}/addons][%d] addonListByOrganizationNotFound %+v", 404, o.Payload) +} +func (o *AddonListByOrganizationNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByOrganizationNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByOrganizationInternalServerError creates a AddonListByOrganizationInternalServerError with default headers values +func NewAddonListByOrganizationInternalServerError() *AddonListByOrganizationInternalServerError { + return &AddonListByOrganizationInternalServerError{} +} + +/* AddonListByOrganizationInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AddonListByOrganizationInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByOrganizationInternalServerError) Error() string { + return fmt.Sprintf("[GET /organizations/{organization-slug}/addons][%d] addonListByOrganizationInternalServerError %+v", 500, o.Payload) +} +func (o *AddonListByOrganizationInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByOrganizationInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/addon_list_by_user_parameters.go b/go/client/operations/addon_list_by_user_parameters.go new file mode 100644 index 0000000..9517b61 --- /dev/null +++ b/go/client/operations/addon_list_by_user_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAddonListByUserParams creates a new AddonListByUserParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAddonListByUserParams() *AddonListByUserParams { + return &AddonListByUserParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAddonListByUserParamsWithTimeout creates a new AddonListByUserParams object +// with the ability to set a timeout on a request. +func NewAddonListByUserParamsWithTimeout(timeout time.Duration) *AddonListByUserParams { + return &AddonListByUserParams{ + timeout: timeout, + } +} + +// NewAddonListByUserParamsWithContext creates a new AddonListByUserParams object +// with the ability to set a context for a request. +func NewAddonListByUserParamsWithContext(ctx context.Context) *AddonListByUserParams { + return &AddonListByUserParams{ + Context: ctx, + } +} + +// NewAddonListByUserParamsWithHTTPClient creates a new AddonListByUserParams object +// with the ability to set a custom HTTPClient for a request. +func NewAddonListByUserParamsWithHTTPClient(client *http.Client) *AddonListByUserParams { + return &AddonListByUserParams{ + HTTPClient: client, + } +} + +/* AddonListByUserParams contains all the parameters to send to the API endpoint + for the addon list by user operation. + + Typically these are written to a http.Request. +*/ +type AddonListByUserParams struct { + + /* UserSlug. + + User slug + */ + UserSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the addon list by user params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddonListByUserParams) WithDefaults() *AddonListByUserParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the addon list by user params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddonListByUserParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the addon list by user params +func (o *AddonListByUserParams) WithTimeout(timeout time.Duration) *AddonListByUserParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the addon list by user params +func (o *AddonListByUserParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the addon list by user params +func (o *AddonListByUserParams) WithContext(ctx context.Context) *AddonListByUserParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the addon list by user params +func (o *AddonListByUserParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the addon list by user params +func (o *AddonListByUserParams) WithHTTPClient(client *http.Client) *AddonListByUserParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the addon list by user params +func (o *AddonListByUserParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUserSlug adds the userSlug to the addon list by user params +func (o *AddonListByUserParams) WithUserSlug(userSlug string) *AddonListByUserParams { + o.SetUserSlug(userSlug) + return o +} + +// SetUserSlug adds the userSlug to the addon list by user params +func (o *AddonListByUserParams) SetUserSlug(userSlug string) { + o.UserSlug = userSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AddonListByUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param user-slug + if err := r.SetPathParam("user-slug", o.UserSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/addon_list_by_user_responses.go b/go/client/operations/addon_list_by_user_responses.go new file mode 100644 index 0000000..94c7c8f --- /dev/null +++ b/go/client/operations/addon_list_by_user_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AddonListByUserReader is a Reader for the AddonListByUser structure. +type AddonListByUserReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AddonListByUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAddonListByUserOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAddonListByUserBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAddonListByUserUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAddonListByUserNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAddonListByUserInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAddonListByUserOK creates a AddonListByUserOK with default headers values +func NewAddonListByUserOK() *AddonListByUserOK { + return &AddonListByUserOK{} +} + +/* AddonListByUserOK describes a response with status code 200, with default header values. + +OK +*/ +type AddonListByUserOK struct { + Payload *models.V0OwnerAddOnsListResponseModel +} + +func (o *AddonListByUserOK) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/addons][%d] addonListByUserOK %+v", 200, o.Payload) +} +func (o *AddonListByUserOK) GetPayload() *models.V0OwnerAddOnsListResponseModel { + return o.Payload +} + +func (o *AddonListByUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0OwnerAddOnsListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByUserBadRequest creates a AddonListByUserBadRequest with default headers values +func NewAddonListByUserBadRequest() *AddonListByUserBadRequest { + return &AddonListByUserBadRequest{} +} + +/* AddonListByUserBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AddonListByUserBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByUserBadRequest) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/addons][%d] addonListByUserBadRequest %+v", 400, o.Payload) +} +func (o *AddonListByUserBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByUserBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByUserUnauthorized creates a AddonListByUserUnauthorized with default headers values +func NewAddonListByUserUnauthorized() *AddonListByUserUnauthorized { + return &AddonListByUserUnauthorized{} +} + +/* AddonListByUserUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AddonListByUserUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByUserUnauthorized) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/addons][%d] addonListByUserUnauthorized %+v", 401, o.Payload) +} +func (o *AddonListByUserUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByUserUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByUserNotFound creates a AddonListByUserNotFound with default headers values +func NewAddonListByUserNotFound() *AddonListByUserNotFound { + return &AddonListByUserNotFound{} +} + +/* AddonListByUserNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AddonListByUserNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByUserNotFound) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/addons][%d] addonListByUserNotFound %+v", 404, o.Payload) +} +func (o *AddonListByUserNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByUserNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonListByUserInternalServerError creates a AddonListByUserInternalServerError with default headers values +func NewAddonListByUserInternalServerError() *AddonListByUserInternalServerError { + return &AddonListByUserInternalServerError{} +} + +/* AddonListByUserInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AddonListByUserInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonListByUserInternalServerError) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/addons][%d] addonListByUserInternalServerError %+v", 500, o.Payload) +} +func (o *AddonListByUserInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonListByUserInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/addons_list_parameters.go b/go/client/operations/addons_list_parameters.go new file mode 100644 index 0000000..5bbdf1b --- /dev/null +++ b/go/client/operations/addons_list_parameters.go @@ -0,0 +1,126 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAddonsListParams creates a new AddonsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAddonsListParams() *AddonsListParams { + return &AddonsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAddonsListParamsWithTimeout creates a new AddonsListParams object +// with the ability to set a timeout on a request. +func NewAddonsListParamsWithTimeout(timeout time.Duration) *AddonsListParams { + return &AddonsListParams{ + timeout: timeout, + } +} + +// NewAddonsListParamsWithContext creates a new AddonsListParams object +// with the ability to set a context for a request. +func NewAddonsListParamsWithContext(ctx context.Context) *AddonsListParams { + return &AddonsListParams{ + Context: ctx, + } +} + +// NewAddonsListParamsWithHTTPClient creates a new AddonsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewAddonsListParamsWithHTTPClient(client *http.Client) *AddonsListParams { + return &AddonsListParams{ + HTTPClient: client, + } +} + +/* AddonsListParams contains all the parameters to send to the API endpoint + for the addons list operation. + + Typically these are written to a http.Request. +*/ +type AddonsListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the addons list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddonsListParams) WithDefaults() *AddonsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the addons list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddonsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the addons list params +func (o *AddonsListParams) WithTimeout(timeout time.Duration) *AddonsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the addons list params +func (o *AddonsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the addons list params +func (o *AddonsListParams) WithContext(ctx context.Context) *AddonsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the addons list params +func (o *AddonsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the addons list params +func (o *AddonsListParams) WithHTTPClient(client *http.Client) *AddonsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the addons list params +func (o *AddonsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *AddonsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/addons_list_responses.go b/go/client/operations/addons_list_responses.go new file mode 100644 index 0000000..7873298 --- /dev/null +++ b/go/client/operations/addons_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AddonsListReader is a Reader for the AddonsList structure. +type AddonsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AddonsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAddonsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAddonsListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAddonsListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAddonsListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAddonsListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAddonsListOK creates a AddonsListOK with default headers values +func NewAddonsListOK() *AddonsListOK { + return &AddonsListOK{} +} + +/* AddonsListOK describes a response with status code 200, with default header values. + +OK +*/ +type AddonsListOK struct { + Payload *models.V0AddonsListResponseModel +} + +func (o *AddonsListOK) Error() string { + return fmt.Sprintf("[GET /addons][%d] addonsListOK %+v", 200, o.Payload) +} +func (o *AddonsListOK) GetPayload() *models.V0AddonsListResponseModel { + return o.Payload +} + +func (o *AddonsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AddonsListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonsListBadRequest creates a AddonsListBadRequest with default headers values +func NewAddonsListBadRequest() *AddonsListBadRequest { + return &AddonsListBadRequest{} +} + +/* AddonsListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AddonsListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonsListBadRequest) Error() string { + return fmt.Sprintf("[GET /addons][%d] addonsListBadRequest %+v", 400, o.Payload) +} +func (o *AddonsListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonsListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonsListUnauthorized creates a AddonsListUnauthorized with default headers values +func NewAddonsListUnauthorized() *AddonsListUnauthorized { + return &AddonsListUnauthorized{} +} + +/* AddonsListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AddonsListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonsListUnauthorized) Error() string { + return fmt.Sprintf("[GET /addons][%d] addonsListUnauthorized %+v", 401, o.Payload) +} +func (o *AddonsListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonsListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonsListNotFound creates a AddonsListNotFound with default headers values +func NewAddonsListNotFound() *AddonsListNotFound { + return &AddonsListNotFound{} +} + +/* AddonsListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AddonsListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonsListNotFound) Error() string { + return fmt.Sprintf("[GET /addons][%d] addonsListNotFound %+v", 404, o.Payload) +} +func (o *AddonsListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonsListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonsListInternalServerError creates a AddonsListInternalServerError with default headers values +func NewAddonsListInternalServerError() *AddonsListInternalServerError { + return &AddonsListInternalServerError{} +} + +/* AddonsListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AddonsListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonsListInternalServerError) Error() string { + return fmt.Sprintf("[GET /addons][%d] addonsListInternalServerError %+v", 500, o.Payload) +} +func (o *AddonsListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonsListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/addons_show_parameters.go b/go/client/operations/addons_show_parameters.go new file mode 100644 index 0000000..40acaec --- /dev/null +++ b/go/client/operations/addons_show_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAddonsShowParams creates a new AddonsShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAddonsShowParams() *AddonsShowParams { + return &AddonsShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAddonsShowParamsWithTimeout creates a new AddonsShowParams object +// with the ability to set a timeout on a request. +func NewAddonsShowParamsWithTimeout(timeout time.Duration) *AddonsShowParams { + return &AddonsShowParams{ + timeout: timeout, + } +} + +// NewAddonsShowParamsWithContext creates a new AddonsShowParams object +// with the ability to set a context for a request. +func NewAddonsShowParamsWithContext(ctx context.Context) *AddonsShowParams { + return &AddonsShowParams{ + Context: ctx, + } +} + +// NewAddonsShowParamsWithHTTPClient creates a new AddonsShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewAddonsShowParamsWithHTTPClient(client *http.Client) *AddonsShowParams { + return &AddonsShowParams{ + HTTPClient: client, + } +} + +/* AddonsShowParams contains all the parameters to send to the API endpoint + for the addons show operation. + + Typically these are written to a http.Request. +*/ +type AddonsShowParams struct { + + /* AddonID. + + Addon ID + */ + AddonID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the addons show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddonsShowParams) WithDefaults() *AddonsShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the addons show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddonsShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the addons show params +func (o *AddonsShowParams) WithTimeout(timeout time.Duration) *AddonsShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the addons show params +func (o *AddonsShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the addons show params +func (o *AddonsShowParams) WithContext(ctx context.Context) *AddonsShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the addons show params +func (o *AddonsShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the addons show params +func (o *AddonsShowParams) WithHTTPClient(client *http.Client) *AddonsShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the addons show params +func (o *AddonsShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddonID adds the addonID to the addons show params +func (o *AddonsShowParams) WithAddonID(addonID string) *AddonsShowParams { + o.SetAddonID(addonID) + return o +} + +// SetAddonID adds the addonId to the addons show params +func (o *AddonsShowParams) SetAddonID(addonID string) { + o.AddonID = addonID +} + +// WriteToRequest writes these params to a swagger request +func (o *AddonsShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param addon-id + if err := r.SetPathParam("addon-id", o.AddonID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/addons_show_responses.go b/go/client/operations/addons_show_responses.go new file mode 100644 index 0000000..190ea83 --- /dev/null +++ b/go/client/operations/addons_show_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AddonsShowReader is a Reader for the AddonsShow structure. +type AddonsShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AddonsShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAddonsShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAddonsShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAddonsShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAddonsShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAddonsShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAddonsShowOK creates a AddonsShowOK with default headers values +func NewAddonsShowOK() *AddonsShowOK { + return &AddonsShowOK{} +} + +/* AddonsShowOK describes a response with status code 200, with default header values. + +OK +*/ +type AddonsShowOK struct { + Payload *models.V0AddonsShowResponseModel +} + +func (o *AddonsShowOK) Error() string { + return fmt.Sprintf("[GET /addons/{addon-id}][%d] addonsShowOK %+v", 200, o.Payload) +} +func (o *AddonsShowOK) GetPayload() *models.V0AddonsShowResponseModel { + return o.Payload +} + +func (o *AddonsShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AddonsShowResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonsShowBadRequest creates a AddonsShowBadRequest with default headers values +func NewAddonsShowBadRequest() *AddonsShowBadRequest { + return &AddonsShowBadRequest{} +} + +/* AddonsShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AddonsShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonsShowBadRequest) Error() string { + return fmt.Sprintf("[GET /addons/{addon-id}][%d] addonsShowBadRequest %+v", 400, o.Payload) +} +func (o *AddonsShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonsShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonsShowUnauthorized creates a AddonsShowUnauthorized with default headers values +func NewAddonsShowUnauthorized() *AddonsShowUnauthorized { + return &AddonsShowUnauthorized{} +} + +/* AddonsShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AddonsShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonsShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /addons/{addon-id}][%d] addonsShowUnauthorized %+v", 401, o.Payload) +} +func (o *AddonsShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonsShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonsShowNotFound creates a AddonsShowNotFound with default headers values +func NewAddonsShowNotFound() *AddonsShowNotFound { + return &AddonsShowNotFound{} +} + +/* AddonsShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AddonsShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonsShowNotFound) Error() string { + return fmt.Sprintf("[GET /addons/{addon-id}][%d] addonsShowNotFound %+v", 404, o.Payload) +} +func (o *AddonsShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonsShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddonsShowInternalServerError creates a AddonsShowInternalServerError with default headers values +func NewAddonsShowInternalServerError() *AddonsShowInternalServerError { + return &AddonsShowInternalServerError{} +} + +/* AddonsShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AddonsShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AddonsShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /addons/{addon-id}][%d] addonsShowInternalServerError %+v", 500, o.Payload) +} +func (o *AddonsShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AddonsShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/android_keystore_file_create_parameters.go b/go/client/operations/android_keystore_file_create_parameters.go new file mode 100644 index 0000000..3f6fa23 --- /dev/null +++ b/go/client/operations/android_keystore_file_create_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewAndroidKeystoreFileCreateParams creates a new AndroidKeystoreFileCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAndroidKeystoreFileCreateParams() *AndroidKeystoreFileCreateParams { + return &AndroidKeystoreFileCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAndroidKeystoreFileCreateParamsWithTimeout creates a new AndroidKeystoreFileCreateParams object +// with the ability to set a timeout on a request. +func NewAndroidKeystoreFileCreateParamsWithTimeout(timeout time.Duration) *AndroidKeystoreFileCreateParams { + return &AndroidKeystoreFileCreateParams{ + timeout: timeout, + } +} + +// NewAndroidKeystoreFileCreateParamsWithContext creates a new AndroidKeystoreFileCreateParams object +// with the ability to set a context for a request. +func NewAndroidKeystoreFileCreateParamsWithContext(ctx context.Context) *AndroidKeystoreFileCreateParams { + return &AndroidKeystoreFileCreateParams{ + Context: ctx, + } +} + +// NewAndroidKeystoreFileCreateParamsWithHTTPClient creates a new AndroidKeystoreFileCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewAndroidKeystoreFileCreateParamsWithHTTPClient(client *http.Client) *AndroidKeystoreFileCreateParams { + return &AndroidKeystoreFileCreateParams{ + HTTPClient: client, + } +} + +/* AndroidKeystoreFileCreateParams contains all the parameters to send to the API endpoint + for the android keystore file create operation. + + Typically these are written to a http.Request. +*/ +type AndroidKeystoreFileCreateParams struct { + + /* AndroidKeystoreFile. + + Android keystore file parameters + */ + AndroidKeystoreFile *models.V0AndroidKeystoreFileUploadParams + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the android keystore file create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AndroidKeystoreFileCreateParams) WithDefaults() *AndroidKeystoreFileCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the android keystore file create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AndroidKeystoreFileCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the android keystore file create params +func (o *AndroidKeystoreFileCreateParams) WithTimeout(timeout time.Duration) *AndroidKeystoreFileCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the android keystore file create params +func (o *AndroidKeystoreFileCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the android keystore file create params +func (o *AndroidKeystoreFileCreateParams) WithContext(ctx context.Context) *AndroidKeystoreFileCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the android keystore file create params +func (o *AndroidKeystoreFileCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the android keystore file create params +func (o *AndroidKeystoreFileCreateParams) WithHTTPClient(client *http.Client) *AndroidKeystoreFileCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the android keystore file create params +func (o *AndroidKeystoreFileCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAndroidKeystoreFile adds the androidKeystoreFile to the android keystore file create params +func (o *AndroidKeystoreFileCreateParams) WithAndroidKeystoreFile(androidKeystoreFile *models.V0AndroidKeystoreFileUploadParams) *AndroidKeystoreFileCreateParams { + o.SetAndroidKeystoreFile(androidKeystoreFile) + return o +} + +// SetAndroidKeystoreFile adds the androidKeystoreFile to the android keystore file create params +func (o *AndroidKeystoreFileCreateParams) SetAndroidKeystoreFile(androidKeystoreFile *models.V0AndroidKeystoreFileUploadParams) { + o.AndroidKeystoreFile = androidKeystoreFile +} + +// WithAppSlug adds the appSlug to the android keystore file create params +func (o *AndroidKeystoreFileCreateParams) WithAppSlug(appSlug string) *AndroidKeystoreFileCreateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the android keystore file create params +func (o *AndroidKeystoreFileCreateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AndroidKeystoreFileCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.AndroidKeystoreFile != nil { + if err := r.SetBodyParam(o.AndroidKeystoreFile); err != nil { + return err + } + } + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/android_keystore_file_create_responses.go b/go/client/operations/android_keystore_file_create_responses.go new file mode 100644 index 0000000..5dac2d4 --- /dev/null +++ b/go/client/operations/android_keystore_file_create_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AndroidKeystoreFileCreateReader is a Reader for the AndroidKeystoreFileCreate structure. +type AndroidKeystoreFileCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AndroidKeystoreFileCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewAndroidKeystoreFileCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAndroidKeystoreFileCreateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAndroidKeystoreFileCreateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAndroidKeystoreFileCreateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAndroidKeystoreFileCreateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAndroidKeystoreFileCreateCreated creates a AndroidKeystoreFileCreateCreated with default headers values +func NewAndroidKeystoreFileCreateCreated() *AndroidKeystoreFileCreateCreated { + return &AndroidKeystoreFileCreateCreated{} +} + +/* AndroidKeystoreFileCreateCreated describes a response with status code 201, with default header values. + +Created +*/ +type AndroidKeystoreFileCreateCreated struct { + Payload *models.V0ProjectFileStorageResponseModel +} + +func (o *AndroidKeystoreFileCreateCreated) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/android-keystore-files][%d] androidKeystoreFileCreateCreated %+v", 201, o.Payload) +} +func (o *AndroidKeystoreFileCreateCreated) GetPayload() *models.V0ProjectFileStorageResponseModel { + return o.Payload +} + +func (o *AndroidKeystoreFileCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProjectFileStorageResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAndroidKeystoreFileCreateBadRequest creates a AndroidKeystoreFileCreateBadRequest with default headers values +func NewAndroidKeystoreFileCreateBadRequest() *AndroidKeystoreFileCreateBadRequest { + return &AndroidKeystoreFileCreateBadRequest{} +} + +/* AndroidKeystoreFileCreateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AndroidKeystoreFileCreateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AndroidKeystoreFileCreateBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/android-keystore-files][%d] androidKeystoreFileCreateBadRequest %+v", 400, o.Payload) +} +func (o *AndroidKeystoreFileCreateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AndroidKeystoreFileCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAndroidKeystoreFileCreateUnauthorized creates a AndroidKeystoreFileCreateUnauthorized with default headers values +func NewAndroidKeystoreFileCreateUnauthorized() *AndroidKeystoreFileCreateUnauthorized { + return &AndroidKeystoreFileCreateUnauthorized{} +} + +/* AndroidKeystoreFileCreateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AndroidKeystoreFileCreateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AndroidKeystoreFileCreateUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/android-keystore-files][%d] androidKeystoreFileCreateUnauthorized %+v", 401, o.Payload) +} +func (o *AndroidKeystoreFileCreateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AndroidKeystoreFileCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAndroidKeystoreFileCreateNotFound creates a AndroidKeystoreFileCreateNotFound with default headers values +func NewAndroidKeystoreFileCreateNotFound() *AndroidKeystoreFileCreateNotFound { + return &AndroidKeystoreFileCreateNotFound{} +} + +/* AndroidKeystoreFileCreateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AndroidKeystoreFileCreateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AndroidKeystoreFileCreateNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/android-keystore-files][%d] androidKeystoreFileCreateNotFound %+v", 404, o.Payload) +} +func (o *AndroidKeystoreFileCreateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AndroidKeystoreFileCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAndroidKeystoreFileCreateInternalServerError creates a AndroidKeystoreFileCreateInternalServerError with default headers values +func NewAndroidKeystoreFileCreateInternalServerError() *AndroidKeystoreFileCreateInternalServerError { + return &AndroidKeystoreFileCreateInternalServerError{} +} + +/* AndroidKeystoreFileCreateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AndroidKeystoreFileCreateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AndroidKeystoreFileCreateInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/android-keystore-files][%d] androidKeystoreFileCreateInternalServerError %+v", 500, o.Payload) +} +func (o *AndroidKeystoreFileCreateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AndroidKeystoreFileCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/android_keystore_file_list_parameters.go b/go/client/operations/android_keystore_file_list_parameters.go new file mode 100644 index 0000000..fe1af3a --- /dev/null +++ b/go/client/operations/android_keystore_file_list_parameters.go @@ -0,0 +1,218 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewAndroidKeystoreFileListParams creates a new AndroidKeystoreFileListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAndroidKeystoreFileListParams() *AndroidKeystoreFileListParams { + return &AndroidKeystoreFileListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAndroidKeystoreFileListParamsWithTimeout creates a new AndroidKeystoreFileListParams object +// with the ability to set a timeout on a request. +func NewAndroidKeystoreFileListParamsWithTimeout(timeout time.Duration) *AndroidKeystoreFileListParams { + return &AndroidKeystoreFileListParams{ + timeout: timeout, + } +} + +// NewAndroidKeystoreFileListParamsWithContext creates a new AndroidKeystoreFileListParams object +// with the ability to set a context for a request. +func NewAndroidKeystoreFileListParamsWithContext(ctx context.Context) *AndroidKeystoreFileListParams { + return &AndroidKeystoreFileListParams{ + Context: ctx, + } +} + +// NewAndroidKeystoreFileListParamsWithHTTPClient creates a new AndroidKeystoreFileListParams object +// with the ability to set a custom HTTPClient for a request. +func NewAndroidKeystoreFileListParamsWithHTTPClient(client *http.Client) *AndroidKeystoreFileListParams { + return &AndroidKeystoreFileListParams{ + HTTPClient: client, + } +} + +/* AndroidKeystoreFileListParams contains all the parameters to send to the API endpoint + for the android keystore file list operation. + + Typically these are written to a http.Request. +*/ +type AndroidKeystoreFileListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* Limit. + + Max number of build certificates per page is 50. + */ + Limit *int64 + + /* Next. + + Slug of the first android keystore file in the response + */ + Next *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the android keystore file list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AndroidKeystoreFileListParams) WithDefaults() *AndroidKeystoreFileListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the android keystore file list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AndroidKeystoreFileListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the android keystore file list params +func (o *AndroidKeystoreFileListParams) WithTimeout(timeout time.Duration) *AndroidKeystoreFileListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the android keystore file list params +func (o *AndroidKeystoreFileListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the android keystore file list params +func (o *AndroidKeystoreFileListParams) WithContext(ctx context.Context) *AndroidKeystoreFileListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the android keystore file list params +func (o *AndroidKeystoreFileListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the android keystore file list params +func (o *AndroidKeystoreFileListParams) WithHTTPClient(client *http.Client) *AndroidKeystoreFileListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the android keystore file list params +func (o *AndroidKeystoreFileListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the android keystore file list params +func (o *AndroidKeystoreFileListParams) WithAppSlug(appSlug string) *AndroidKeystoreFileListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the android keystore file list params +func (o *AndroidKeystoreFileListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithLimit adds the limit to the android keystore file list params +func (o *AndroidKeystoreFileListParams) WithLimit(limit *int64) *AndroidKeystoreFileListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the android keystore file list params +func (o *AndroidKeystoreFileListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the android keystore file list params +func (o *AndroidKeystoreFileListParams) WithNext(next *string) *AndroidKeystoreFileListParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the android keystore file list params +func (o *AndroidKeystoreFileListParams) SetNext(next *string) { + o.Next = next +} + +// WriteToRequest writes these params to a swagger request +func (o *AndroidKeystoreFileListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/android_keystore_file_list_responses.go b/go/client/operations/android_keystore_file_list_responses.go new file mode 100644 index 0000000..96bdbdc --- /dev/null +++ b/go/client/operations/android_keystore_file_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AndroidKeystoreFileListReader is a Reader for the AndroidKeystoreFileList structure. +type AndroidKeystoreFileListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AndroidKeystoreFileListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAndroidKeystoreFileListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAndroidKeystoreFileListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAndroidKeystoreFileListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAndroidKeystoreFileListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAndroidKeystoreFileListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAndroidKeystoreFileListOK creates a AndroidKeystoreFileListOK with default headers values +func NewAndroidKeystoreFileListOK() *AndroidKeystoreFileListOK { + return &AndroidKeystoreFileListOK{} +} + +/* AndroidKeystoreFileListOK describes a response with status code 200, with default header values. + +OK +*/ +type AndroidKeystoreFileListOK struct { + Payload *models.V0ProjectFileStorageListResponseModel +} + +func (o *AndroidKeystoreFileListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/android-keystore-files][%d] androidKeystoreFileListOK %+v", 200, o.Payload) +} +func (o *AndroidKeystoreFileListOK) GetPayload() *models.V0ProjectFileStorageListResponseModel { + return o.Payload +} + +func (o *AndroidKeystoreFileListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProjectFileStorageListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAndroidKeystoreFileListBadRequest creates a AndroidKeystoreFileListBadRequest with default headers values +func NewAndroidKeystoreFileListBadRequest() *AndroidKeystoreFileListBadRequest { + return &AndroidKeystoreFileListBadRequest{} +} + +/* AndroidKeystoreFileListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AndroidKeystoreFileListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AndroidKeystoreFileListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/android-keystore-files][%d] androidKeystoreFileListBadRequest %+v", 400, o.Payload) +} +func (o *AndroidKeystoreFileListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AndroidKeystoreFileListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAndroidKeystoreFileListUnauthorized creates a AndroidKeystoreFileListUnauthorized with default headers values +func NewAndroidKeystoreFileListUnauthorized() *AndroidKeystoreFileListUnauthorized { + return &AndroidKeystoreFileListUnauthorized{} +} + +/* AndroidKeystoreFileListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AndroidKeystoreFileListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AndroidKeystoreFileListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/android-keystore-files][%d] androidKeystoreFileListUnauthorized %+v", 401, o.Payload) +} +func (o *AndroidKeystoreFileListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AndroidKeystoreFileListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAndroidKeystoreFileListNotFound creates a AndroidKeystoreFileListNotFound with default headers values +func NewAndroidKeystoreFileListNotFound() *AndroidKeystoreFileListNotFound { + return &AndroidKeystoreFileListNotFound{} +} + +/* AndroidKeystoreFileListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AndroidKeystoreFileListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AndroidKeystoreFileListNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/android-keystore-files][%d] androidKeystoreFileListNotFound %+v", 404, o.Payload) +} +func (o *AndroidKeystoreFileListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AndroidKeystoreFileListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAndroidKeystoreFileListInternalServerError creates a AndroidKeystoreFileListInternalServerError with default headers values +func NewAndroidKeystoreFileListInternalServerError() *AndroidKeystoreFileListInternalServerError { + return &AndroidKeystoreFileListInternalServerError{} +} + +/* AndroidKeystoreFileListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AndroidKeystoreFileListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AndroidKeystoreFileListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/android-keystore-files][%d] androidKeystoreFileListInternalServerError %+v", 500, o.Payload) +} +func (o *AndroidKeystoreFileListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AndroidKeystoreFileListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_config_create_parameters.go b/go/client/operations/app_config_create_parameters.go new file mode 100644 index 0000000..2131a7b --- /dev/null +++ b/go/client/operations/app_config_create_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewAppConfigCreateParams creates a new AppConfigCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppConfigCreateParams() *AppConfigCreateParams { + return &AppConfigCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppConfigCreateParamsWithTimeout creates a new AppConfigCreateParams object +// with the ability to set a timeout on a request. +func NewAppConfigCreateParamsWithTimeout(timeout time.Duration) *AppConfigCreateParams { + return &AppConfigCreateParams{ + timeout: timeout, + } +} + +// NewAppConfigCreateParamsWithContext creates a new AppConfigCreateParams object +// with the ability to set a context for a request. +func NewAppConfigCreateParamsWithContext(ctx context.Context) *AppConfigCreateParams { + return &AppConfigCreateParams{ + Context: ctx, + } +} + +// NewAppConfigCreateParamsWithHTTPClient creates a new AppConfigCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppConfigCreateParamsWithHTTPClient(client *http.Client) *AppConfigCreateParams { + return &AppConfigCreateParams{ + HTTPClient: client, + } +} + +/* AppConfigCreateParams contains all the parameters to send to the API endpoint + for the app config create operation. + + Typically these are written to a http.Request. +*/ +type AppConfigCreateParams struct { + + /* AppConfig. + + App config parameters + */ + AppConfig *models.V0AppConfigRequestParam + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app config create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppConfigCreateParams) WithDefaults() *AppConfigCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app config create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppConfigCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app config create params +func (o *AppConfigCreateParams) WithTimeout(timeout time.Duration) *AppConfigCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app config create params +func (o *AppConfigCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app config create params +func (o *AppConfigCreateParams) WithContext(ctx context.Context) *AppConfigCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app config create params +func (o *AppConfigCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app config create params +func (o *AppConfigCreateParams) WithHTTPClient(client *http.Client) *AppConfigCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app config create params +func (o *AppConfigCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppConfig adds the appConfig to the app config create params +func (o *AppConfigCreateParams) WithAppConfig(appConfig *models.V0AppConfigRequestParam) *AppConfigCreateParams { + o.SetAppConfig(appConfig) + return o +} + +// SetAppConfig adds the appConfig to the app config create params +func (o *AppConfigCreateParams) SetAppConfig(appConfig *models.V0AppConfigRequestParam) { + o.AppConfig = appConfig +} + +// WithAppSlug adds the appSlug to the app config create params +func (o *AppConfigCreateParams) WithAppSlug(appSlug string) *AppConfigCreateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the app config create params +func (o *AppConfigCreateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AppConfigCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.AppConfig != nil { + if err := r.SetBodyParam(o.AppConfig); err != nil { + return err + } + } + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_config_create_responses.go b/go/client/operations/app_config_create_responses.go new file mode 100644 index 0000000..66e0216 --- /dev/null +++ b/go/client/operations/app_config_create_responses.go @@ -0,0 +1,217 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppConfigCreateReader is a Reader for the AppConfigCreate structure. +type AppConfigCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppConfigCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppConfigCreateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppConfigCreateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppConfigCreateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppConfigCreateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppConfigCreateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppConfigCreateOK creates a AppConfigCreateOK with default headers values +func NewAppConfigCreateOK() *AppConfigCreateOK { + return &AppConfigCreateOK{} +} + +/* AppConfigCreateOK describes a response with status code 200, with default header values. + +OK +*/ +type AppConfigCreateOK struct { + Payload models.V0AppConfigRespModel +} + +func (o *AppConfigCreateOK) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/bitrise.yml][%d] appConfigCreateOK %+v", 200, o.Payload) +} +func (o *AppConfigCreateOK) GetPayload() models.V0AppConfigRespModel { + return o.Payload +} + +func (o *AppConfigCreateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppConfigCreateBadRequest creates a AppConfigCreateBadRequest with default headers values +func NewAppConfigCreateBadRequest() *AppConfigCreateBadRequest { + return &AppConfigCreateBadRequest{} +} + +/* AppConfigCreateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppConfigCreateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppConfigCreateBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/bitrise.yml][%d] appConfigCreateBadRequest %+v", 400, o.Payload) +} +func (o *AppConfigCreateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppConfigCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppConfigCreateUnauthorized creates a AppConfigCreateUnauthorized with default headers values +func NewAppConfigCreateUnauthorized() *AppConfigCreateUnauthorized { + return &AppConfigCreateUnauthorized{} +} + +/* AppConfigCreateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppConfigCreateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppConfigCreateUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/bitrise.yml][%d] appConfigCreateUnauthorized %+v", 401, o.Payload) +} +func (o *AppConfigCreateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppConfigCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppConfigCreateNotFound creates a AppConfigCreateNotFound with default headers values +func NewAppConfigCreateNotFound() *AppConfigCreateNotFound { + return &AppConfigCreateNotFound{} +} + +/* AppConfigCreateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppConfigCreateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppConfigCreateNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/bitrise.yml][%d] appConfigCreateNotFound %+v", 404, o.Payload) +} +func (o *AppConfigCreateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppConfigCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppConfigCreateInternalServerError creates a AppConfigCreateInternalServerError with default headers values +func NewAppConfigCreateInternalServerError() *AppConfigCreateInternalServerError { + return &AppConfigCreateInternalServerError{} +} + +/* AppConfigCreateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppConfigCreateInternalServerError struct { + Payload *models.V0ProxyErrorRespModel +} + +func (o *AppConfigCreateInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/bitrise.yml][%d] appConfigCreateInternalServerError %+v", 500, o.Payload) +} +func (o *AppConfigCreateInternalServerError) GetPayload() *models.V0ProxyErrorRespModel { + return o.Payload +} + +func (o *AppConfigCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProxyErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_config_datastore_show_parameters.go b/go/client/operations/app_config_datastore_show_parameters.go new file mode 100644 index 0000000..dd5c777 --- /dev/null +++ b/go/client/operations/app_config_datastore_show_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAppConfigDatastoreShowParams creates a new AppConfigDatastoreShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppConfigDatastoreShowParams() *AppConfigDatastoreShowParams { + return &AppConfigDatastoreShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppConfigDatastoreShowParamsWithTimeout creates a new AppConfigDatastoreShowParams object +// with the ability to set a timeout on a request. +func NewAppConfigDatastoreShowParamsWithTimeout(timeout time.Duration) *AppConfigDatastoreShowParams { + return &AppConfigDatastoreShowParams{ + timeout: timeout, + } +} + +// NewAppConfigDatastoreShowParamsWithContext creates a new AppConfigDatastoreShowParams object +// with the ability to set a context for a request. +func NewAppConfigDatastoreShowParamsWithContext(ctx context.Context) *AppConfigDatastoreShowParams { + return &AppConfigDatastoreShowParams{ + Context: ctx, + } +} + +// NewAppConfigDatastoreShowParamsWithHTTPClient creates a new AppConfigDatastoreShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppConfigDatastoreShowParamsWithHTTPClient(client *http.Client) *AppConfigDatastoreShowParams { + return &AppConfigDatastoreShowParams{ + HTTPClient: client, + } +} + +/* AppConfigDatastoreShowParams contains all the parameters to send to the API endpoint + for the app config datastore show operation. + + Typically these are written to a http.Request. +*/ +type AppConfigDatastoreShowParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app config datastore show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppConfigDatastoreShowParams) WithDefaults() *AppConfigDatastoreShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app config datastore show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppConfigDatastoreShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app config datastore show params +func (o *AppConfigDatastoreShowParams) WithTimeout(timeout time.Duration) *AppConfigDatastoreShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app config datastore show params +func (o *AppConfigDatastoreShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app config datastore show params +func (o *AppConfigDatastoreShowParams) WithContext(ctx context.Context) *AppConfigDatastoreShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app config datastore show params +func (o *AppConfigDatastoreShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app config datastore show params +func (o *AppConfigDatastoreShowParams) WithHTTPClient(client *http.Client) *AppConfigDatastoreShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app config datastore show params +func (o *AppConfigDatastoreShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the app config datastore show params +func (o *AppConfigDatastoreShowParams) WithAppSlug(appSlug string) *AppConfigDatastoreShowParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the app config datastore show params +func (o *AppConfigDatastoreShowParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AppConfigDatastoreShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_config_datastore_show_responses.go b/go/client/operations/app_config_datastore_show_responses.go new file mode 100644 index 0000000..a9da318 --- /dev/null +++ b/go/client/operations/app_config_datastore_show_responses.go @@ -0,0 +1,217 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppConfigDatastoreShowReader is a Reader for the AppConfigDatastoreShow structure. +type AppConfigDatastoreShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppConfigDatastoreShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppConfigDatastoreShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppConfigDatastoreShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppConfigDatastoreShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppConfigDatastoreShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppConfigDatastoreShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppConfigDatastoreShowOK creates a AppConfigDatastoreShowOK with default headers values +func NewAppConfigDatastoreShowOK() *AppConfigDatastoreShowOK { + return &AppConfigDatastoreShowOK{} +} + +/* AppConfigDatastoreShowOK describes a response with status code 200, with default header values. + +{the bitrise.yml in yml format} +*/ +type AppConfigDatastoreShowOK struct { + Payload string +} + +func (o *AppConfigDatastoreShowOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml][%d] appConfigDatastoreShowOK %+v", 200, o.Payload) +} +func (o *AppConfigDatastoreShowOK) GetPayload() string { + return o.Payload +} + +func (o *AppConfigDatastoreShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppConfigDatastoreShowBadRequest creates a AppConfigDatastoreShowBadRequest with default headers values +func NewAppConfigDatastoreShowBadRequest() *AppConfigDatastoreShowBadRequest { + return &AppConfigDatastoreShowBadRequest{} +} + +/* AppConfigDatastoreShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppConfigDatastoreShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppConfigDatastoreShowBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml][%d] appConfigDatastoreShowBadRequest %+v", 400, o.Payload) +} +func (o *AppConfigDatastoreShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppConfigDatastoreShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppConfigDatastoreShowUnauthorized creates a AppConfigDatastoreShowUnauthorized with default headers values +func NewAppConfigDatastoreShowUnauthorized() *AppConfigDatastoreShowUnauthorized { + return &AppConfigDatastoreShowUnauthorized{} +} + +/* AppConfigDatastoreShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppConfigDatastoreShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppConfigDatastoreShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml][%d] appConfigDatastoreShowUnauthorized %+v", 401, o.Payload) +} +func (o *AppConfigDatastoreShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppConfigDatastoreShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppConfigDatastoreShowNotFound creates a AppConfigDatastoreShowNotFound with default headers values +func NewAppConfigDatastoreShowNotFound() *AppConfigDatastoreShowNotFound { + return &AppConfigDatastoreShowNotFound{} +} + +/* AppConfigDatastoreShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppConfigDatastoreShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppConfigDatastoreShowNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml][%d] appConfigDatastoreShowNotFound %+v", 404, o.Payload) +} +func (o *AppConfigDatastoreShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppConfigDatastoreShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppConfigDatastoreShowInternalServerError creates a AppConfigDatastoreShowInternalServerError with default headers values +func NewAppConfigDatastoreShowInternalServerError() *AppConfigDatastoreShowInternalServerError { + return &AppConfigDatastoreShowInternalServerError{} +} + +/* AppConfigDatastoreShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppConfigDatastoreShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppConfigDatastoreShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/bitrise.yml][%d] appConfigDatastoreShowInternalServerError %+v", 500, o.Payload) +} +func (o *AppConfigDatastoreShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppConfigDatastoreShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_create_parameters.go b/go/client/operations/app_create_parameters.go new file mode 100644 index 0000000..820f230 --- /dev/null +++ b/go/client/operations/app_create_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewAppCreateParams creates a new AppCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppCreateParams() *AppCreateParams { + return &AppCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppCreateParamsWithTimeout creates a new AppCreateParams object +// with the ability to set a timeout on a request. +func NewAppCreateParamsWithTimeout(timeout time.Duration) *AppCreateParams { + return &AppCreateParams{ + timeout: timeout, + } +} + +// NewAppCreateParamsWithContext creates a new AppCreateParams object +// with the ability to set a context for a request. +func NewAppCreateParamsWithContext(ctx context.Context) *AppCreateParams { + return &AppCreateParams{ + Context: ctx, + } +} + +// NewAppCreateParamsWithHTTPClient creates a new AppCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppCreateParamsWithHTTPClient(client *http.Client) *AppCreateParams { + return &AppCreateParams{ + HTTPClient: client, + } +} + +/* AppCreateParams contains all the parameters to send to the API endpoint + for the app create operation. + + Typically these are written to a http.Request. +*/ +type AppCreateParams struct { + + /* App. + + App parameters + */ + App *models.V0AppUploadParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppCreateParams) WithDefaults() *AppCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app create params +func (o *AppCreateParams) WithTimeout(timeout time.Duration) *AppCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app create params +func (o *AppCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app create params +func (o *AppCreateParams) WithContext(ctx context.Context) *AppCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app create params +func (o *AppCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app create params +func (o *AppCreateParams) WithHTTPClient(client *http.Client) *AppCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app create params +func (o *AppCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithApp adds the app to the app create params +func (o *AppCreateParams) WithApp(app *models.V0AppUploadParams) *AppCreateParams { + o.SetApp(app) + return o +} + +// SetApp adds the app to the app create params +func (o *AppCreateParams) SetApp(app *models.V0AppUploadParams) { + o.App = app +} + +// WriteToRequest writes these params to a swagger request +func (o *AppCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.App != nil { + if err := r.SetBodyParam(o.App); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_create_responses.go b/go/client/operations/app_create_responses.go new file mode 100644 index 0000000..ff87634 --- /dev/null +++ b/go/client/operations/app_create_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppCreateReader is a Reader for the AppCreate structure. +type AppCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppCreateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppCreateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppCreateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppCreateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppCreateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppCreateOK creates a AppCreateOK with default headers values +func NewAppCreateOK() *AppCreateOK { + return &AppCreateOK{} +} + +/* AppCreateOK describes a response with status code 200, with default header values. + +OK +*/ +type AppCreateOK struct { + Payload *models.V0AppRespModel +} + +func (o *AppCreateOK) Error() string { + return fmt.Sprintf("[POST /apps/register][%d] appCreateOK %+v", 200, o.Payload) +} +func (o *AppCreateOK) GetPayload() *models.V0AppRespModel { + return o.Payload +} + +func (o *AppCreateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppCreateBadRequest creates a AppCreateBadRequest with default headers values +func NewAppCreateBadRequest() *AppCreateBadRequest { + return &AppCreateBadRequest{} +} + +/* AppCreateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppCreateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppCreateBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/register][%d] appCreateBadRequest %+v", 400, o.Payload) +} +func (o *AppCreateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppCreateUnauthorized creates a AppCreateUnauthorized with default headers values +func NewAppCreateUnauthorized() *AppCreateUnauthorized { + return &AppCreateUnauthorized{} +} + +/* AppCreateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppCreateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppCreateUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/register][%d] appCreateUnauthorized %+v", 401, o.Payload) +} +func (o *AppCreateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppCreateNotFound creates a AppCreateNotFound with default headers values +func NewAppCreateNotFound() *AppCreateNotFound { + return &AppCreateNotFound{} +} + +/* AppCreateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppCreateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppCreateNotFound) Error() string { + return fmt.Sprintf("[POST /apps/register][%d] appCreateNotFound %+v", 404, o.Payload) +} +func (o *AppCreateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppCreateInternalServerError creates a AppCreateInternalServerError with default headers values +func NewAppCreateInternalServerError() *AppCreateInternalServerError { + return &AppCreateInternalServerError{} +} + +/* AppCreateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppCreateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppCreateInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/register][%d] appCreateInternalServerError %+v", 500, o.Payload) +} +func (o *AppCreateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_finish_parameters.go b/go/client/operations/app_finish_parameters.go new file mode 100644 index 0000000..2dcf8c8 --- /dev/null +++ b/go/client/operations/app_finish_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewAppFinishParams creates a new AppFinishParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppFinishParams() *AppFinishParams { + return &AppFinishParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppFinishParamsWithTimeout creates a new AppFinishParams object +// with the ability to set a timeout on a request. +func NewAppFinishParamsWithTimeout(timeout time.Duration) *AppFinishParams { + return &AppFinishParams{ + timeout: timeout, + } +} + +// NewAppFinishParamsWithContext creates a new AppFinishParams object +// with the ability to set a context for a request. +func NewAppFinishParamsWithContext(ctx context.Context) *AppFinishParams { + return &AppFinishParams{ + Context: ctx, + } +} + +// NewAppFinishParamsWithHTTPClient creates a new AppFinishParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppFinishParamsWithHTTPClient(client *http.Client) *AppFinishParams { + return &AppFinishParams{ + HTTPClient: client, + } +} + +/* AppFinishParams contains all the parameters to send to the API endpoint + for the app finish operation. + + Typically these are written to a http.Request. +*/ +type AppFinishParams struct { + + /* App. + + App finish parameters + */ + App *models.V0AppFinishParams + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app finish params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppFinishParams) WithDefaults() *AppFinishParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app finish params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppFinishParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app finish params +func (o *AppFinishParams) WithTimeout(timeout time.Duration) *AppFinishParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app finish params +func (o *AppFinishParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app finish params +func (o *AppFinishParams) WithContext(ctx context.Context) *AppFinishParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app finish params +func (o *AppFinishParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app finish params +func (o *AppFinishParams) WithHTTPClient(client *http.Client) *AppFinishParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app finish params +func (o *AppFinishParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithApp adds the app to the app finish params +func (o *AppFinishParams) WithApp(app *models.V0AppFinishParams) *AppFinishParams { + o.SetApp(app) + return o +} + +// SetApp adds the app to the app finish params +func (o *AppFinishParams) SetApp(app *models.V0AppFinishParams) { + o.App = app +} + +// WithAppSlug adds the appSlug to the app finish params +func (o *AppFinishParams) WithAppSlug(appSlug string) *AppFinishParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the app finish params +func (o *AppFinishParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AppFinishParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.App != nil { + if err := r.SetBodyParam(o.App); err != nil { + return err + } + } + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_finish_responses.go b/go/client/operations/app_finish_responses.go new file mode 100644 index 0000000..229bc29 --- /dev/null +++ b/go/client/operations/app_finish_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppFinishReader is a Reader for the AppFinish structure. +type AppFinishReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppFinishReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppFinishOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppFinishBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppFinishUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppFinishNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppFinishInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppFinishOK creates a AppFinishOK with default headers values +func NewAppFinishOK() *AppFinishOK { + return &AppFinishOK{} +} + +/* AppFinishOK describes a response with status code 200, with default header values. + +OK +*/ +type AppFinishOK struct { + Payload *models.V0AppFinishRespModel +} + +func (o *AppFinishOK) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/finish][%d] appFinishOK %+v", 200, o.Payload) +} +func (o *AppFinishOK) GetPayload() *models.V0AppFinishRespModel { + return o.Payload +} + +func (o *AppFinishOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppFinishRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppFinishBadRequest creates a AppFinishBadRequest with default headers values +func NewAppFinishBadRequest() *AppFinishBadRequest { + return &AppFinishBadRequest{} +} + +/* AppFinishBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppFinishBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppFinishBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/finish][%d] appFinishBadRequest %+v", 400, o.Payload) +} +func (o *AppFinishBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppFinishBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppFinishUnauthorized creates a AppFinishUnauthorized with default headers values +func NewAppFinishUnauthorized() *AppFinishUnauthorized { + return &AppFinishUnauthorized{} +} + +/* AppFinishUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppFinishUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppFinishUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/finish][%d] appFinishUnauthorized %+v", 401, o.Payload) +} +func (o *AppFinishUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppFinishUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppFinishNotFound creates a AppFinishNotFound with default headers values +func NewAppFinishNotFound() *AppFinishNotFound { + return &AppFinishNotFound{} +} + +/* AppFinishNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppFinishNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppFinishNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/finish][%d] appFinishNotFound %+v", 404, o.Payload) +} +func (o *AppFinishNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppFinishNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppFinishInternalServerError creates a AppFinishInternalServerError with default headers values +func NewAppFinishInternalServerError() *AppFinishInternalServerError { + return &AppFinishInternalServerError{} +} + +/* AppFinishInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppFinishInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppFinishInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/finish][%d] appFinishInternalServerError %+v", 500, o.Payload) +} +func (o *AppFinishInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppFinishInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_list_by_organization_parameters.go b/go/client/operations/app_list_by_organization_parameters.go new file mode 100644 index 0000000..6e2d8c8 --- /dev/null +++ b/go/client/operations/app_list_by_organization_parameters.go @@ -0,0 +1,252 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewAppListByOrganizationParams creates a new AppListByOrganizationParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppListByOrganizationParams() *AppListByOrganizationParams { + return &AppListByOrganizationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppListByOrganizationParamsWithTimeout creates a new AppListByOrganizationParams object +// with the ability to set a timeout on a request. +func NewAppListByOrganizationParamsWithTimeout(timeout time.Duration) *AppListByOrganizationParams { + return &AppListByOrganizationParams{ + timeout: timeout, + } +} + +// NewAppListByOrganizationParamsWithContext creates a new AppListByOrganizationParams object +// with the ability to set a context for a request. +func NewAppListByOrganizationParamsWithContext(ctx context.Context) *AppListByOrganizationParams { + return &AppListByOrganizationParams{ + Context: ctx, + } +} + +// NewAppListByOrganizationParamsWithHTTPClient creates a new AppListByOrganizationParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppListByOrganizationParamsWithHTTPClient(client *http.Client) *AppListByOrganizationParams { + return &AppListByOrganizationParams{ + HTTPClient: client, + } +} + +/* AppListByOrganizationParams contains all the parameters to send to the API endpoint + for the app list by organization operation. + + Typically these are written to a http.Request. +*/ +type AppListByOrganizationParams struct { + + /* Limit. + + Max number of elements per page (default: 50) + */ + Limit *int64 + + /* Next. + + Slug of the first app in the response + */ + Next *string + + /* OrgSlug. + + Organization slug + */ + OrgSlug string + + /* SortBy. + + Order of applications: sort them based on when they were created or the time of their last build + */ + SortBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app list by organization params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppListByOrganizationParams) WithDefaults() *AppListByOrganizationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app list by organization params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppListByOrganizationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app list by organization params +func (o *AppListByOrganizationParams) WithTimeout(timeout time.Duration) *AppListByOrganizationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app list by organization params +func (o *AppListByOrganizationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app list by organization params +func (o *AppListByOrganizationParams) WithContext(ctx context.Context) *AppListByOrganizationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app list by organization params +func (o *AppListByOrganizationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app list by organization params +func (o *AppListByOrganizationParams) WithHTTPClient(client *http.Client) *AppListByOrganizationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app list by organization params +func (o *AppListByOrganizationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the app list by organization params +func (o *AppListByOrganizationParams) WithLimit(limit *int64) *AppListByOrganizationParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the app list by organization params +func (o *AppListByOrganizationParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the app list by organization params +func (o *AppListByOrganizationParams) WithNext(next *string) *AppListByOrganizationParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the app list by organization params +func (o *AppListByOrganizationParams) SetNext(next *string) { + o.Next = next +} + +// WithOrgSlug adds the orgSlug to the app list by organization params +func (o *AppListByOrganizationParams) WithOrgSlug(orgSlug string) *AppListByOrganizationParams { + o.SetOrgSlug(orgSlug) + return o +} + +// SetOrgSlug adds the orgSlug to the app list by organization params +func (o *AppListByOrganizationParams) SetOrgSlug(orgSlug string) { + o.OrgSlug = orgSlug +} + +// WithSortBy adds the sortBy to the app list by organization params +func (o *AppListByOrganizationParams) WithSortBy(sortBy *string) *AppListByOrganizationParams { + o.SetSortBy(sortBy) + return o +} + +// SetSortBy adds the sortBy to the app list by organization params +func (o *AppListByOrganizationParams) SetSortBy(sortBy *string) { + o.SortBy = sortBy +} + +// WriteToRequest writes these params to a swagger request +func (o *AppListByOrganizationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + // path param org-slug + if err := r.SetPathParam("org-slug", o.OrgSlug); err != nil { + return err + } + + if o.SortBy != nil { + + // query param sort_by + var qrSortBy string + + if o.SortBy != nil { + qrSortBy = *o.SortBy + } + qSortBy := qrSortBy + if qSortBy != "" { + + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_list_by_organization_responses.go b/go/client/operations/app_list_by_organization_responses.go new file mode 100644 index 0000000..6091115 --- /dev/null +++ b/go/client/operations/app_list_by_organization_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppListByOrganizationReader is a Reader for the AppListByOrganization structure. +type AppListByOrganizationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppListByOrganizationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppListByOrganizationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppListByOrganizationBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppListByOrganizationUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppListByOrganizationNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppListByOrganizationInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppListByOrganizationOK creates a AppListByOrganizationOK with default headers values +func NewAppListByOrganizationOK() *AppListByOrganizationOK { + return &AppListByOrganizationOK{} +} + +/* AppListByOrganizationOK describes a response with status code 200, with default header values. + +OK +*/ +type AppListByOrganizationOK struct { + Payload *models.V0AppListResponseModel +} + +func (o *AppListByOrganizationOK) Error() string { + return fmt.Sprintf("[GET /organizations/{org-slug}/apps][%d] appListByOrganizationOK %+v", 200, o.Payload) +} +func (o *AppListByOrganizationOK) GetPayload() *models.V0AppListResponseModel { + return o.Payload +} + +func (o *AppListByOrganizationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListByOrganizationBadRequest creates a AppListByOrganizationBadRequest with default headers values +func NewAppListByOrganizationBadRequest() *AppListByOrganizationBadRequest { + return &AppListByOrganizationBadRequest{} +} + +/* AppListByOrganizationBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppListByOrganizationBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListByOrganizationBadRequest) Error() string { + return fmt.Sprintf("[GET /organizations/{org-slug}/apps][%d] appListByOrganizationBadRequest %+v", 400, o.Payload) +} +func (o *AppListByOrganizationBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListByOrganizationBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListByOrganizationUnauthorized creates a AppListByOrganizationUnauthorized with default headers values +func NewAppListByOrganizationUnauthorized() *AppListByOrganizationUnauthorized { + return &AppListByOrganizationUnauthorized{} +} + +/* AppListByOrganizationUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppListByOrganizationUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListByOrganizationUnauthorized) Error() string { + return fmt.Sprintf("[GET /organizations/{org-slug}/apps][%d] appListByOrganizationUnauthorized %+v", 401, o.Payload) +} +func (o *AppListByOrganizationUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListByOrganizationUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListByOrganizationNotFound creates a AppListByOrganizationNotFound with default headers values +func NewAppListByOrganizationNotFound() *AppListByOrganizationNotFound { + return &AppListByOrganizationNotFound{} +} + +/* AppListByOrganizationNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppListByOrganizationNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListByOrganizationNotFound) Error() string { + return fmt.Sprintf("[GET /organizations/{org-slug}/apps][%d] appListByOrganizationNotFound %+v", 404, o.Payload) +} +func (o *AppListByOrganizationNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListByOrganizationNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListByOrganizationInternalServerError creates a AppListByOrganizationInternalServerError with default headers values +func NewAppListByOrganizationInternalServerError() *AppListByOrganizationInternalServerError { + return &AppListByOrganizationInternalServerError{} +} + +/* AppListByOrganizationInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppListByOrganizationInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListByOrganizationInternalServerError) Error() string { + return fmt.Sprintf("[GET /organizations/{org-slug}/apps][%d] appListByOrganizationInternalServerError %+v", 500, o.Payload) +} +func (o *AppListByOrganizationInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListByOrganizationInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_list_by_user_parameters.go b/go/client/operations/app_list_by_user_parameters.go new file mode 100644 index 0000000..61fcd2b --- /dev/null +++ b/go/client/operations/app_list_by_user_parameters.go @@ -0,0 +1,252 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewAppListByUserParams creates a new AppListByUserParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppListByUserParams() *AppListByUserParams { + return &AppListByUserParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppListByUserParamsWithTimeout creates a new AppListByUserParams object +// with the ability to set a timeout on a request. +func NewAppListByUserParamsWithTimeout(timeout time.Duration) *AppListByUserParams { + return &AppListByUserParams{ + timeout: timeout, + } +} + +// NewAppListByUserParamsWithContext creates a new AppListByUserParams object +// with the ability to set a context for a request. +func NewAppListByUserParamsWithContext(ctx context.Context) *AppListByUserParams { + return &AppListByUserParams{ + Context: ctx, + } +} + +// NewAppListByUserParamsWithHTTPClient creates a new AppListByUserParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppListByUserParamsWithHTTPClient(client *http.Client) *AppListByUserParams { + return &AppListByUserParams{ + HTTPClient: client, + } +} + +/* AppListByUserParams contains all the parameters to send to the API endpoint + for the app list by user operation. + + Typically these are written to a http.Request. +*/ +type AppListByUserParams struct { + + /* Limit. + + Max number of elements per page (default: 50) + */ + Limit *int64 + + /* Next. + + Slug of the first app in the response + */ + Next *string + + /* SortBy. + + Order of applications + */ + SortBy *string + + /* UserSlug. + + User slug + */ + UserSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app list by user params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppListByUserParams) WithDefaults() *AppListByUserParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app list by user params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppListByUserParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app list by user params +func (o *AppListByUserParams) WithTimeout(timeout time.Duration) *AppListByUserParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app list by user params +func (o *AppListByUserParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app list by user params +func (o *AppListByUserParams) WithContext(ctx context.Context) *AppListByUserParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app list by user params +func (o *AppListByUserParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app list by user params +func (o *AppListByUserParams) WithHTTPClient(client *http.Client) *AppListByUserParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app list by user params +func (o *AppListByUserParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the app list by user params +func (o *AppListByUserParams) WithLimit(limit *int64) *AppListByUserParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the app list by user params +func (o *AppListByUserParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the app list by user params +func (o *AppListByUserParams) WithNext(next *string) *AppListByUserParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the app list by user params +func (o *AppListByUserParams) SetNext(next *string) { + o.Next = next +} + +// WithSortBy adds the sortBy to the app list by user params +func (o *AppListByUserParams) WithSortBy(sortBy *string) *AppListByUserParams { + o.SetSortBy(sortBy) + return o +} + +// SetSortBy adds the sortBy to the app list by user params +func (o *AppListByUserParams) SetSortBy(sortBy *string) { + o.SortBy = sortBy +} + +// WithUserSlug adds the userSlug to the app list by user params +func (o *AppListByUserParams) WithUserSlug(userSlug string) *AppListByUserParams { + o.SetUserSlug(userSlug) + return o +} + +// SetUserSlug adds the userSlug to the app list by user params +func (o *AppListByUserParams) SetUserSlug(userSlug string) { + o.UserSlug = userSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AppListByUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if o.SortBy != nil { + + // query param sort_by + var qrSortBy string + + if o.SortBy != nil { + qrSortBy = *o.SortBy + } + qSortBy := qrSortBy + if qSortBy != "" { + + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { + return err + } + } + } + + // path param user-slug + if err := r.SetPathParam("user-slug", o.UserSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_list_by_user_responses.go b/go/client/operations/app_list_by_user_responses.go new file mode 100644 index 0000000..dc36ba3 --- /dev/null +++ b/go/client/operations/app_list_by_user_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppListByUserReader is a Reader for the AppListByUser structure. +type AppListByUserReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppListByUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppListByUserOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppListByUserBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppListByUserUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppListByUserNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppListByUserInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppListByUserOK creates a AppListByUserOK with default headers values +func NewAppListByUserOK() *AppListByUserOK { + return &AppListByUserOK{} +} + +/* AppListByUserOK describes a response with status code 200, with default header values. + +OK +*/ +type AppListByUserOK struct { + Payload *models.V0AppListResponseModel +} + +func (o *AppListByUserOK) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/apps][%d] appListByUserOK %+v", 200, o.Payload) +} +func (o *AppListByUserOK) GetPayload() *models.V0AppListResponseModel { + return o.Payload +} + +func (o *AppListByUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListByUserBadRequest creates a AppListByUserBadRequest with default headers values +func NewAppListByUserBadRequest() *AppListByUserBadRequest { + return &AppListByUserBadRequest{} +} + +/* AppListByUserBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppListByUserBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListByUserBadRequest) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/apps][%d] appListByUserBadRequest %+v", 400, o.Payload) +} +func (o *AppListByUserBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListByUserBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListByUserUnauthorized creates a AppListByUserUnauthorized with default headers values +func NewAppListByUserUnauthorized() *AppListByUserUnauthorized { + return &AppListByUserUnauthorized{} +} + +/* AppListByUserUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppListByUserUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListByUserUnauthorized) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/apps][%d] appListByUserUnauthorized %+v", 401, o.Payload) +} +func (o *AppListByUserUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListByUserUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListByUserNotFound creates a AppListByUserNotFound with default headers values +func NewAppListByUserNotFound() *AppListByUserNotFound { + return &AppListByUserNotFound{} +} + +/* AppListByUserNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppListByUserNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListByUserNotFound) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/apps][%d] appListByUserNotFound %+v", 404, o.Payload) +} +func (o *AppListByUserNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListByUserNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListByUserInternalServerError creates a AppListByUserInternalServerError with default headers values +func NewAppListByUserInternalServerError() *AppListByUserInternalServerError { + return &AppListByUserInternalServerError{} +} + +/* AppListByUserInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppListByUserInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListByUserInternalServerError) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/apps][%d] appListByUserInternalServerError %+v", 500, o.Payload) +} +func (o *AppListByUserInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListByUserInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_list_parameters.go b/go/client/operations/app_list_parameters.go new file mode 100644 index 0000000..f71e041 --- /dev/null +++ b/go/client/operations/app_list_parameters.go @@ -0,0 +1,230 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewAppListParams creates a new AppListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppListParams() *AppListParams { + return &AppListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppListParamsWithTimeout creates a new AppListParams object +// with the ability to set a timeout on a request. +func NewAppListParamsWithTimeout(timeout time.Duration) *AppListParams { + return &AppListParams{ + timeout: timeout, + } +} + +// NewAppListParamsWithContext creates a new AppListParams object +// with the ability to set a context for a request. +func NewAppListParamsWithContext(ctx context.Context) *AppListParams { + return &AppListParams{ + Context: ctx, + } +} + +// NewAppListParamsWithHTTPClient creates a new AppListParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppListParamsWithHTTPClient(client *http.Client) *AppListParams { + return &AppListParams{ + HTTPClient: client, + } +} + +/* AppListParams contains all the parameters to send to the API endpoint + for the app list operation. + + Typically these are written to a http.Request. +*/ +type AppListParams struct { + + /* Limit. + + Max number of elements per page (default: 50) + */ + Limit *int64 + + /* Next. + + Slug of the first app in the response + */ + Next *string + + /* SortBy. + + Order of the applications: sort them based on when they were created or the time of their last build + */ + SortBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppListParams) WithDefaults() *AppListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app list params +func (o *AppListParams) WithTimeout(timeout time.Duration) *AppListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app list params +func (o *AppListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app list params +func (o *AppListParams) WithContext(ctx context.Context) *AppListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app list params +func (o *AppListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app list params +func (o *AppListParams) WithHTTPClient(client *http.Client) *AppListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app list params +func (o *AppListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the app list params +func (o *AppListParams) WithLimit(limit *int64) *AppListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the app list params +func (o *AppListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the app list params +func (o *AppListParams) WithNext(next *string) *AppListParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the app list params +func (o *AppListParams) SetNext(next *string) { + o.Next = next +} + +// WithSortBy adds the sortBy to the app list params +func (o *AppListParams) WithSortBy(sortBy *string) *AppListParams { + o.SetSortBy(sortBy) + return o +} + +// SetSortBy adds the sortBy to the app list params +func (o *AppListParams) SetSortBy(sortBy *string) { + o.SortBy = sortBy +} + +// WriteToRequest writes these params to a swagger request +func (o *AppListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if o.SortBy != nil { + + // query param sort_by + var qrSortBy string + + if o.SortBy != nil { + qrSortBy = *o.SortBy + } + qSortBy := qrSortBy + if qSortBy != "" { + + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_list_responses.go b/go/client/operations/app_list_responses.go new file mode 100644 index 0000000..68694b6 --- /dev/null +++ b/go/client/operations/app_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppListReader is a Reader for the AppList structure. +type AppListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppListOK creates a AppListOK with default headers values +func NewAppListOK() *AppListOK { + return &AppListOK{} +} + +/* AppListOK describes a response with status code 200, with default header values. + +OK +*/ +type AppListOK struct { + Payload *models.V0AppListResponseModel +} + +func (o *AppListOK) Error() string { + return fmt.Sprintf("[GET /apps][%d] appListOK %+v", 200, o.Payload) +} +func (o *AppListOK) GetPayload() *models.V0AppListResponseModel { + return o.Payload +} + +func (o *AppListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListBadRequest creates a AppListBadRequest with default headers values +func NewAppListBadRequest() *AppListBadRequest { + return &AppListBadRequest{} +} + +/* AppListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps][%d] appListBadRequest %+v", 400, o.Payload) +} +func (o *AppListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListUnauthorized creates a AppListUnauthorized with default headers values +func NewAppListUnauthorized() *AppListUnauthorized { + return &AppListUnauthorized{} +} + +/* AppListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps][%d] appListUnauthorized %+v", 401, o.Payload) +} +func (o *AppListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListNotFound creates a AppListNotFound with default headers values +func NewAppListNotFound() *AppListNotFound { + return &AppListNotFound{} +} + +/* AppListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListNotFound) Error() string { + return fmt.Sprintf("[GET /apps][%d] appListNotFound %+v", 404, o.Payload) +} +func (o *AppListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppListInternalServerError creates a AppListInternalServerError with default headers values +func NewAppListInternalServerError() *AppListInternalServerError { + return &AppListInternalServerError{} +} + +/* AppListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps][%d] appListInternalServerError %+v", 500, o.Payload) +} +func (o *AppListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_show_parameters.go b/go/client/operations/app_show_parameters.go new file mode 100644 index 0000000..ea22a85 --- /dev/null +++ b/go/client/operations/app_show_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAppShowParams creates a new AppShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppShowParams() *AppShowParams { + return &AppShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppShowParamsWithTimeout creates a new AppShowParams object +// with the ability to set a timeout on a request. +func NewAppShowParamsWithTimeout(timeout time.Duration) *AppShowParams { + return &AppShowParams{ + timeout: timeout, + } +} + +// NewAppShowParamsWithContext creates a new AppShowParams object +// with the ability to set a context for a request. +func NewAppShowParamsWithContext(ctx context.Context) *AppShowParams { + return &AppShowParams{ + Context: ctx, + } +} + +// NewAppShowParamsWithHTTPClient creates a new AppShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppShowParamsWithHTTPClient(client *http.Client) *AppShowParams { + return &AppShowParams{ + HTTPClient: client, + } +} + +/* AppShowParams contains all the parameters to send to the API endpoint + for the app show operation. + + Typically these are written to a http.Request. +*/ +type AppShowParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppShowParams) WithDefaults() *AppShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app show params +func (o *AppShowParams) WithTimeout(timeout time.Duration) *AppShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app show params +func (o *AppShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app show params +func (o *AppShowParams) WithContext(ctx context.Context) *AppShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app show params +func (o *AppShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app show params +func (o *AppShowParams) WithHTTPClient(client *http.Client) *AppShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app show params +func (o *AppShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the app show params +func (o *AppShowParams) WithAppSlug(appSlug string) *AppShowParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the app show params +func (o *AppShowParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AppShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_show_responses.go b/go/client/operations/app_show_responses.go new file mode 100644 index 0000000..72609d8 --- /dev/null +++ b/go/client/operations/app_show_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppShowReader is a Reader for the AppShow structure. +type AppShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppShowOK creates a AppShowOK with default headers values +func NewAppShowOK() *AppShowOK { + return &AppShowOK{} +} + +/* AppShowOK describes a response with status code 200, with default header values. + +OK +*/ +type AppShowOK struct { + Payload *models.V0AppShowResponseModel +} + +func (o *AppShowOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}][%d] appShowOK %+v", 200, o.Payload) +} +func (o *AppShowOK) GetPayload() *models.V0AppShowResponseModel { + return o.Payload +} + +func (o *AppShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppShowResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppShowBadRequest creates a AppShowBadRequest with default headers values +func NewAppShowBadRequest() *AppShowBadRequest { + return &AppShowBadRequest{} +} + +/* AppShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppShowBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}][%d] appShowBadRequest %+v", 400, o.Payload) +} +func (o *AppShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppShowUnauthorized creates a AppShowUnauthorized with default headers values +func NewAppShowUnauthorized() *AppShowUnauthorized { + return &AppShowUnauthorized{} +} + +/* AppShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}][%d] appShowUnauthorized %+v", 401, o.Payload) +} +func (o *AppShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppShowNotFound creates a AppShowNotFound with default headers values +func NewAppShowNotFound() *AppShowNotFound { + return &AppShowNotFound{} +} + +/* AppShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppShowNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}][%d] appShowNotFound %+v", 404, o.Payload) +} +func (o *AppShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppShowInternalServerError creates a AppShowInternalServerError with default headers values +func NewAppShowInternalServerError() *AppShowInternalServerError { + return &AppShowInternalServerError{} +} + +/* AppShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}][%d] appShowInternalServerError %+v", 500, o.Payload) +} +func (o *AppShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/app_webhook_create_parameters.go b/go/client/operations/app_webhook_create_parameters.go new file mode 100644 index 0000000..eb188dd --- /dev/null +++ b/go/client/operations/app_webhook_create_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAppWebhookCreateParams creates a new AppWebhookCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppWebhookCreateParams() *AppWebhookCreateParams { + return &AppWebhookCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppWebhookCreateParamsWithTimeout creates a new AppWebhookCreateParams object +// with the ability to set a timeout on a request. +func NewAppWebhookCreateParamsWithTimeout(timeout time.Duration) *AppWebhookCreateParams { + return &AppWebhookCreateParams{ + timeout: timeout, + } +} + +// NewAppWebhookCreateParamsWithContext creates a new AppWebhookCreateParams object +// with the ability to set a context for a request. +func NewAppWebhookCreateParamsWithContext(ctx context.Context) *AppWebhookCreateParams { + return &AppWebhookCreateParams{ + Context: ctx, + } +} + +// NewAppWebhookCreateParamsWithHTTPClient creates a new AppWebhookCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppWebhookCreateParamsWithHTTPClient(client *http.Client) *AppWebhookCreateParams { + return &AppWebhookCreateParams{ + HTTPClient: client, + } +} + +/* AppWebhookCreateParams contains all the parameters to send to the API endpoint + for the app webhook create operation. + + Typically these are written to a http.Request. +*/ +type AppWebhookCreateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the app webhook create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppWebhookCreateParams) WithDefaults() *AppWebhookCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the app webhook create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppWebhookCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the app webhook create params +func (o *AppWebhookCreateParams) WithTimeout(timeout time.Duration) *AppWebhookCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app webhook create params +func (o *AppWebhookCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app webhook create params +func (o *AppWebhookCreateParams) WithContext(ctx context.Context) *AppWebhookCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app webhook create params +func (o *AppWebhookCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app webhook create params +func (o *AppWebhookCreateParams) WithHTTPClient(client *http.Client) *AppWebhookCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app webhook create params +func (o *AppWebhookCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the app webhook create params +func (o *AppWebhookCreateParams) WithAppSlug(appSlug string) *AppWebhookCreateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the app webhook create params +func (o *AppWebhookCreateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AppWebhookCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/app_webhook_create_responses.go b/go/client/operations/app_webhook_create_responses.go new file mode 100644 index 0000000..680ead9 --- /dev/null +++ b/go/client/operations/app_webhook_create_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppWebhookCreateReader is a Reader for the AppWebhookCreate structure. +type AppWebhookCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppWebhookCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppWebhookCreateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppWebhookCreateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppWebhookCreateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppWebhookCreateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppWebhookCreateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppWebhookCreateOK creates a AppWebhookCreateOK with default headers values +func NewAppWebhookCreateOK() *AppWebhookCreateOK { + return &AppWebhookCreateOK{} +} + +/* AppWebhookCreateOK describes a response with status code 200, with default header values. + +OK +*/ +type AppWebhookCreateOK struct { + Payload *models.V0WebhookRespModel +} + +func (o *AppWebhookCreateOK) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/register-webhook][%d] appWebhookCreateOK %+v", 200, o.Payload) +} +func (o *AppWebhookCreateOK) GetPayload() *models.V0WebhookRespModel { + return o.Payload +} + +func (o *AppWebhookCreateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0WebhookRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppWebhookCreateBadRequest creates a AppWebhookCreateBadRequest with default headers values +func NewAppWebhookCreateBadRequest() *AppWebhookCreateBadRequest { + return &AppWebhookCreateBadRequest{} +} + +/* AppWebhookCreateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppWebhookCreateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppWebhookCreateBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/register-webhook][%d] appWebhookCreateBadRequest %+v", 400, o.Payload) +} +func (o *AppWebhookCreateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppWebhookCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppWebhookCreateUnauthorized creates a AppWebhookCreateUnauthorized with default headers values +func NewAppWebhookCreateUnauthorized() *AppWebhookCreateUnauthorized { + return &AppWebhookCreateUnauthorized{} +} + +/* AppWebhookCreateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppWebhookCreateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppWebhookCreateUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/register-webhook][%d] appWebhookCreateUnauthorized %+v", 401, o.Payload) +} +func (o *AppWebhookCreateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppWebhookCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppWebhookCreateNotFound creates a AppWebhookCreateNotFound with default headers values +func NewAppWebhookCreateNotFound() *AppWebhookCreateNotFound { + return &AppWebhookCreateNotFound{} +} + +/* AppWebhookCreateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppWebhookCreateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppWebhookCreateNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/register-webhook][%d] appWebhookCreateNotFound %+v", 404, o.Payload) +} +func (o *AppWebhookCreateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppWebhookCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppWebhookCreateInternalServerError creates a AppWebhookCreateInternalServerError with default headers values +func NewAppWebhookCreateInternalServerError() *AppWebhookCreateInternalServerError { + return &AppWebhookCreateInternalServerError{} +} + +/* AppWebhookCreateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppWebhookCreateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppWebhookCreateInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/register-webhook][%d] appWebhookCreateInternalServerError %+v", 500, o.Payload) +} +func (o *AppWebhookCreateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppWebhookCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/apple_api_credential_list_parameters.go b/go/client/operations/apple_api_credential_list_parameters.go new file mode 100644 index 0000000..7baddd2 --- /dev/null +++ b/go/client/operations/apple_api_credential_list_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAppleAPICredentialListParams creates a new AppleAPICredentialListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAppleAPICredentialListParams() *AppleAPICredentialListParams { + return &AppleAPICredentialListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAppleAPICredentialListParamsWithTimeout creates a new AppleAPICredentialListParams object +// with the ability to set a timeout on a request. +func NewAppleAPICredentialListParamsWithTimeout(timeout time.Duration) *AppleAPICredentialListParams { + return &AppleAPICredentialListParams{ + timeout: timeout, + } +} + +// NewAppleAPICredentialListParamsWithContext creates a new AppleAPICredentialListParams object +// with the ability to set a context for a request. +func NewAppleAPICredentialListParamsWithContext(ctx context.Context) *AppleAPICredentialListParams { + return &AppleAPICredentialListParams{ + Context: ctx, + } +} + +// NewAppleAPICredentialListParamsWithHTTPClient creates a new AppleAPICredentialListParams object +// with the ability to set a custom HTTPClient for a request. +func NewAppleAPICredentialListParamsWithHTTPClient(client *http.Client) *AppleAPICredentialListParams { + return &AppleAPICredentialListParams{ + HTTPClient: client, + } +} + +/* AppleAPICredentialListParams contains all the parameters to send to the API endpoint + for the apple api credential list operation. + + Typically these are written to a http.Request. +*/ +type AppleAPICredentialListParams struct { + + /* UserSlug. + + User slug + */ + UserSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the apple api credential list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppleAPICredentialListParams) WithDefaults() *AppleAPICredentialListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the apple api credential list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AppleAPICredentialListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the apple api credential list params +func (o *AppleAPICredentialListParams) WithTimeout(timeout time.Duration) *AppleAPICredentialListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the apple api credential list params +func (o *AppleAPICredentialListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the apple api credential list params +func (o *AppleAPICredentialListParams) WithContext(ctx context.Context) *AppleAPICredentialListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the apple api credential list params +func (o *AppleAPICredentialListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the apple api credential list params +func (o *AppleAPICredentialListParams) WithHTTPClient(client *http.Client) *AppleAPICredentialListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the apple api credential list params +func (o *AppleAPICredentialListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUserSlug adds the userSlug to the apple api credential list params +func (o *AppleAPICredentialListParams) WithUserSlug(userSlug string) *AppleAPICredentialListParams { + o.SetUserSlug(userSlug) + return o +} + +// SetUserSlug adds the userSlug to the apple api credential list params +func (o *AppleAPICredentialListParams) SetUserSlug(userSlug string) { + o.UserSlug = userSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AppleAPICredentialListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param user-slug + if err := r.SetPathParam("user-slug", o.UserSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/apple_api_credential_list_responses.go b/go/client/operations/apple_api_credential_list_responses.go new file mode 100644 index 0000000..6cafdb5 --- /dev/null +++ b/go/client/operations/apple_api_credential_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AppleAPICredentialListReader is a Reader for the AppleAPICredentialList structure. +type AppleAPICredentialListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppleAPICredentialListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppleAPICredentialListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAppleAPICredentialListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAppleAPICredentialListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAppleAPICredentialListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAppleAPICredentialListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAppleAPICredentialListOK creates a AppleAPICredentialListOK with default headers values +func NewAppleAPICredentialListOK() *AppleAPICredentialListOK { + return &AppleAPICredentialListOK{} +} + +/* AppleAPICredentialListOK describes a response with status code 200, with default header values. + +OK +*/ +type AppleAPICredentialListOK struct { + Payload *models.V0AppleAPICredentialsListResponse +} + +func (o *AppleAPICredentialListOK) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/apple-api-credentials][%d] appleApiCredentialListOK %+v", 200, o.Payload) +} +func (o *AppleAPICredentialListOK) GetPayload() *models.V0AppleAPICredentialsListResponse { + return o.Payload +} + +func (o *AppleAPICredentialListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppleAPICredentialsListResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppleAPICredentialListBadRequest creates a AppleAPICredentialListBadRequest with default headers values +func NewAppleAPICredentialListBadRequest() *AppleAPICredentialListBadRequest { + return &AppleAPICredentialListBadRequest{} +} + +/* AppleAPICredentialListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AppleAPICredentialListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppleAPICredentialListBadRequest) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/apple-api-credentials][%d] appleApiCredentialListBadRequest %+v", 400, o.Payload) +} +func (o *AppleAPICredentialListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppleAPICredentialListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppleAPICredentialListUnauthorized creates a AppleAPICredentialListUnauthorized with default headers values +func NewAppleAPICredentialListUnauthorized() *AppleAPICredentialListUnauthorized { + return &AppleAPICredentialListUnauthorized{} +} + +/* AppleAPICredentialListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AppleAPICredentialListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppleAPICredentialListUnauthorized) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/apple-api-credentials][%d] appleApiCredentialListUnauthorized %+v", 401, o.Payload) +} +func (o *AppleAPICredentialListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppleAPICredentialListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppleAPICredentialListNotFound creates a AppleAPICredentialListNotFound with default headers values +func NewAppleAPICredentialListNotFound() *AppleAPICredentialListNotFound { + return &AppleAPICredentialListNotFound{} +} + +/* AppleAPICredentialListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AppleAPICredentialListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppleAPICredentialListNotFound) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/apple-api-credentials][%d] appleApiCredentialListNotFound %+v", 404, o.Payload) +} +func (o *AppleAPICredentialListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppleAPICredentialListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAppleAPICredentialListInternalServerError creates a AppleAPICredentialListInternalServerError with default headers values +func NewAppleAPICredentialListInternalServerError() *AppleAPICredentialListInternalServerError { + return &AppleAPICredentialListInternalServerError{} +} + +/* AppleAPICredentialListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AppleAPICredentialListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AppleAPICredentialListInternalServerError) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}/apple-api-credentials][%d] appleApiCredentialListInternalServerError %+v", 500, o.Payload) +} +func (o *AppleAPICredentialListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AppleAPICredentialListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/artifact_delete_parameters.go b/go/client/operations/artifact_delete_parameters.go new file mode 100644 index 0000000..fc19af0 --- /dev/null +++ b/go/client/operations/artifact_delete_parameters.go @@ -0,0 +1,193 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewArtifactDeleteParams creates a new ArtifactDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewArtifactDeleteParams() *ArtifactDeleteParams { + return &ArtifactDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewArtifactDeleteParamsWithTimeout creates a new ArtifactDeleteParams object +// with the ability to set a timeout on a request. +func NewArtifactDeleteParamsWithTimeout(timeout time.Duration) *ArtifactDeleteParams { + return &ArtifactDeleteParams{ + timeout: timeout, + } +} + +// NewArtifactDeleteParamsWithContext creates a new ArtifactDeleteParams object +// with the ability to set a context for a request. +func NewArtifactDeleteParamsWithContext(ctx context.Context) *ArtifactDeleteParams { + return &ArtifactDeleteParams{ + Context: ctx, + } +} + +// NewArtifactDeleteParamsWithHTTPClient creates a new ArtifactDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewArtifactDeleteParamsWithHTTPClient(client *http.Client) *ArtifactDeleteParams { + return &ArtifactDeleteParams{ + HTTPClient: client, + } +} + +/* ArtifactDeleteParams contains all the parameters to send to the API endpoint + for the artifact delete operation. + + Typically these are written to a http.Request. +*/ +type ArtifactDeleteParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* ArtifactSlug. + + Artifact slug + */ + ArtifactSlug string + + /* BuildSlug. + + Build slug + */ + BuildSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the artifact delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArtifactDeleteParams) WithDefaults() *ArtifactDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the artifact delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArtifactDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the artifact delete params +func (o *ArtifactDeleteParams) WithTimeout(timeout time.Duration) *ArtifactDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the artifact delete params +func (o *ArtifactDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the artifact delete params +func (o *ArtifactDeleteParams) WithContext(ctx context.Context) *ArtifactDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the artifact delete params +func (o *ArtifactDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the artifact delete params +func (o *ArtifactDeleteParams) WithHTTPClient(client *http.Client) *ArtifactDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the artifact delete params +func (o *ArtifactDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the artifact delete params +func (o *ArtifactDeleteParams) WithAppSlug(appSlug string) *ArtifactDeleteParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the artifact delete params +func (o *ArtifactDeleteParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithArtifactSlug adds the artifactSlug to the artifact delete params +func (o *ArtifactDeleteParams) WithArtifactSlug(artifactSlug string) *ArtifactDeleteParams { + o.SetArtifactSlug(artifactSlug) + return o +} + +// SetArtifactSlug adds the artifactSlug to the artifact delete params +func (o *ArtifactDeleteParams) SetArtifactSlug(artifactSlug string) { + o.ArtifactSlug = artifactSlug +} + +// WithBuildSlug adds the buildSlug to the artifact delete params +func (o *ArtifactDeleteParams) WithBuildSlug(buildSlug string) *ArtifactDeleteParams { + o.SetBuildSlug(buildSlug) + return o +} + +// SetBuildSlug adds the buildSlug to the artifact delete params +func (o *ArtifactDeleteParams) SetBuildSlug(buildSlug string) { + o.BuildSlug = buildSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *ArtifactDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param artifact-slug + if err := r.SetPathParam("artifact-slug", o.ArtifactSlug); err != nil { + return err + } + + // path param build-slug + if err := r.SetPathParam("build-slug", o.BuildSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/artifact_delete_responses.go b/go/client/operations/artifact_delete_responses.go new file mode 100644 index 0000000..9e2fadc --- /dev/null +++ b/go/client/operations/artifact_delete_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ArtifactDeleteReader is a Reader for the ArtifactDelete structure. +type ArtifactDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ArtifactDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewArtifactDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewArtifactDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewArtifactDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewArtifactDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewArtifactDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewArtifactDeleteOK creates a ArtifactDeleteOK with default headers values +func NewArtifactDeleteOK() *ArtifactDeleteOK { + return &ArtifactDeleteOK{} +} + +/* ArtifactDeleteOK describes a response with status code 200, with default header values. + +OK +*/ +type ArtifactDeleteOK struct { + Payload *models.V0ArtifactDeleteResponseModel +} + +func (o *ArtifactDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactDeleteOK %+v", 200, o.Payload) +} +func (o *ArtifactDeleteOK) GetPayload() *models.V0ArtifactDeleteResponseModel { + return o.Payload +} + +func (o *ArtifactDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ArtifactDeleteResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactDeleteBadRequest creates a ArtifactDeleteBadRequest with default headers values +func NewArtifactDeleteBadRequest() *ArtifactDeleteBadRequest { + return &ArtifactDeleteBadRequest{} +} + +/* ArtifactDeleteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ArtifactDeleteBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactDeleteBadRequest) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactDeleteBadRequest %+v", 400, o.Payload) +} +func (o *ArtifactDeleteBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactDeleteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactDeleteUnauthorized creates a ArtifactDeleteUnauthorized with default headers values +func NewArtifactDeleteUnauthorized() *ArtifactDeleteUnauthorized { + return &ArtifactDeleteUnauthorized{} +} + +/* ArtifactDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ArtifactDeleteUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactDeleteUnauthorized %+v", 401, o.Payload) +} +func (o *ArtifactDeleteUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactDeleteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactDeleteNotFound creates a ArtifactDeleteNotFound with default headers values +func NewArtifactDeleteNotFound() *ArtifactDeleteNotFound { + return &ArtifactDeleteNotFound{} +} + +/* ArtifactDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ArtifactDeleteNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactDeleteNotFound %+v", 404, o.Payload) +} +func (o *ArtifactDeleteNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactDeleteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactDeleteInternalServerError creates a ArtifactDeleteInternalServerError with default headers values +func NewArtifactDeleteInternalServerError() *ArtifactDeleteInternalServerError { + return &ArtifactDeleteInternalServerError{} +} + +/* ArtifactDeleteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ArtifactDeleteInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactDeleteInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactDeleteInternalServerError %+v", 500, o.Payload) +} +func (o *ArtifactDeleteInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactDeleteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/artifact_list_parameters.go b/go/client/operations/artifact_list_parameters.go new file mode 100644 index 0000000..7b7e624 --- /dev/null +++ b/go/client/operations/artifact_list_parameters.go @@ -0,0 +1,240 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewArtifactListParams creates a new ArtifactListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewArtifactListParams() *ArtifactListParams { + return &ArtifactListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewArtifactListParamsWithTimeout creates a new ArtifactListParams object +// with the ability to set a timeout on a request. +func NewArtifactListParamsWithTimeout(timeout time.Duration) *ArtifactListParams { + return &ArtifactListParams{ + timeout: timeout, + } +} + +// NewArtifactListParamsWithContext creates a new ArtifactListParams object +// with the ability to set a context for a request. +func NewArtifactListParamsWithContext(ctx context.Context) *ArtifactListParams { + return &ArtifactListParams{ + Context: ctx, + } +} + +// NewArtifactListParamsWithHTTPClient creates a new ArtifactListParams object +// with the ability to set a custom HTTPClient for a request. +func NewArtifactListParamsWithHTTPClient(client *http.Client) *ArtifactListParams { + return &ArtifactListParams{ + HTTPClient: client, + } +} + +/* ArtifactListParams contains all the parameters to send to the API endpoint + for the artifact list operation. + + Typically these are written to a http.Request. +*/ +type ArtifactListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildSlug. + + Build slug + */ + BuildSlug string + + /* Limit. + + Max number of build artifacts per page is 50. + */ + Limit *int64 + + /* Next. + + Slug of the first build artifact in the response + */ + Next *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the artifact list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArtifactListParams) WithDefaults() *ArtifactListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the artifact list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArtifactListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the artifact list params +func (o *ArtifactListParams) WithTimeout(timeout time.Duration) *ArtifactListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the artifact list params +func (o *ArtifactListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the artifact list params +func (o *ArtifactListParams) WithContext(ctx context.Context) *ArtifactListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the artifact list params +func (o *ArtifactListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the artifact list params +func (o *ArtifactListParams) WithHTTPClient(client *http.Client) *ArtifactListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the artifact list params +func (o *ArtifactListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the artifact list params +func (o *ArtifactListParams) WithAppSlug(appSlug string) *ArtifactListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the artifact list params +func (o *ArtifactListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildSlug adds the buildSlug to the artifact list params +func (o *ArtifactListParams) WithBuildSlug(buildSlug string) *ArtifactListParams { + o.SetBuildSlug(buildSlug) + return o +} + +// SetBuildSlug adds the buildSlug to the artifact list params +func (o *ArtifactListParams) SetBuildSlug(buildSlug string) { + o.BuildSlug = buildSlug +} + +// WithLimit adds the limit to the artifact list params +func (o *ArtifactListParams) WithLimit(limit *int64) *ArtifactListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the artifact list params +func (o *ArtifactListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the artifact list params +func (o *ArtifactListParams) WithNext(next *string) *ArtifactListParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the artifact list params +func (o *ArtifactListParams) SetNext(next *string) { + o.Next = next +} + +// WriteToRequest writes these params to a swagger request +func (o *ArtifactListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param build-slug + if err := r.SetPathParam("build-slug", o.BuildSlug); err != nil { + return err + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/artifact_list_responses.go b/go/client/operations/artifact_list_responses.go new file mode 100644 index 0000000..4c1685d --- /dev/null +++ b/go/client/operations/artifact_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ArtifactListReader is a Reader for the ArtifactList structure. +type ArtifactListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ArtifactListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewArtifactListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewArtifactListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewArtifactListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewArtifactListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewArtifactListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewArtifactListOK creates a ArtifactListOK with default headers values +func NewArtifactListOK() *ArtifactListOK { + return &ArtifactListOK{} +} + +/* ArtifactListOK describes a response with status code 200, with default header values. + +OK +*/ +type ArtifactListOK struct { + Payload *models.V0ArtifactListResponseModel +} + +func (o *ArtifactListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/artifacts][%d] artifactListOK %+v", 200, o.Payload) +} +func (o *ArtifactListOK) GetPayload() *models.V0ArtifactListResponseModel { + return o.Payload +} + +func (o *ArtifactListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ArtifactListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactListBadRequest creates a ArtifactListBadRequest with default headers values +func NewArtifactListBadRequest() *ArtifactListBadRequest { + return &ArtifactListBadRequest{} +} + +/* ArtifactListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ArtifactListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/artifacts][%d] artifactListBadRequest %+v", 400, o.Payload) +} +func (o *ArtifactListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactListUnauthorized creates a ArtifactListUnauthorized with default headers values +func NewArtifactListUnauthorized() *ArtifactListUnauthorized { + return &ArtifactListUnauthorized{} +} + +/* ArtifactListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ArtifactListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/artifacts][%d] artifactListUnauthorized %+v", 401, o.Payload) +} +func (o *ArtifactListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactListNotFound creates a ArtifactListNotFound with default headers values +func NewArtifactListNotFound() *ArtifactListNotFound { + return &ArtifactListNotFound{} +} + +/* ArtifactListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ArtifactListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactListNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/artifacts][%d] artifactListNotFound %+v", 404, o.Payload) +} +func (o *ArtifactListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactListInternalServerError creates a ArtifactListInternalServerError with default headers values +func NewArtifactListInternalServerError() *ArtifactListInternalServerError { + return &ArtifactListInternalServerError{} +} + +/* ArtifactListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ArtifactListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/artifacts][%d] artifactListInternalServerError %+v", 500, o.Payload) +} +func (o *ArtifactListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/artifact_show_parameters.go b/go/client/operations/artifact_show_parameters.go new file mode 100644 index 0000000..5adb773 --- /dev/null +++ b/go/client/operations/artifact_show_parameters.go @@ -0,0 +1,228 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewArtifactShowParams creates a new ArtifactShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewArtifactShowParams() *ArtifactShowParams { + return &ArtifactShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewArtifactShowParamsWithTimeout creates a new ArtifactShowParams object +// with the ability to set a timeout on a request. +func NewArtifactShowParamsWithTimeout(timeout time.Duration) *ArtifactShowParams { + return &ArtifactShowParams{ + timeout: timeout, + } +} + +// NewArtifactShowParamsWithContext creates a new ArtifactShowParams object +// with the ability to set a context for a request. +func NewArtifactShowParamsWithContext(ctx context.Context) *ArtifactShowParams { + return &ArtifactShowParams{ + Context: ctx, + } +} + +// NewArtifactShowParamsWithHTTPClient creates a new ArtifactShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewArtifactShowParamsWithHTTPClient(client *http.Client) *ArtifactShowParams { + return &ArtifactShowParams{ + HTTPClient: client, + } +} + +/* ArtifactShowParams contains all the parameters to send to the API endpoint + for the artifact show operation. + + Typically these are written to a http.Request. +*/ +type ArtifactShowParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* ArtifactSlug. + + Artifact slug + */ + ArtifactSlug string + + /* BuildSlug. + + Build slug + */ + BuildSlug string + + /* Download. + + Setting this will result in a redirect to the artifact download location + */ + Download *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the artifact show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArtifactShowParams) WithDefaults() *ArtifactShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the artifact show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArtifactShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the artifact show params +func (o *ArtifactShowParams) WithTimeout(timeout time.Duration) *ArtifactShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the artifact show params +func (o *ArtifactShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the artifact show params +func (o *ArtifactShowParams) WithContext(ctx context.Context) *ArtifactShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the artifact show params +func (o *ArtifactShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the artifact show params +func (o *ArtifactShowParams) WithHTTPClient(client *http.Client) *ArtifactShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the artifact show params +func (o *ArtifactShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the artifact show params +func (o *ArtifactShowParams) WithAppSlug(appSlug string) *ArtifactShowParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the artifact show params +func (o *ArtifactShowParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithArtifactSlug adds the artifactSlug to the artifact show params +func (o *ArtifactShowParams) WithArtifactSlug(artifactSlug string) *ArtifactShowParams { + o.SetArtifactSlug(artifactSlug) + return o +} + +// SetArtifactSlug adds the artifactSlug to the artifact show params +func (o *ArtifactShowParams) SetArtifactSlug(artifactSlug string) { + o.ArtifactSlug = artifactSlug +} + +// WithBuildSlug adds the buildSlug to the artifact show params +func (o *ArtifactShowParams) WithBuildSlug(buildSlug string) *ArtifactShowParams { + o.SetBuildSlug(buildSlug) + return o +} + +// SetBuildSlug adds the buildSlug to the artifact show params +func (o *ArtifactShowParams) SetBuildSlug(buildSlug string) { + o.BuildSlug = buildSlug +} + +// WithDownload adds the download to the artifact show params +func (o *ArtifactShowParams) WithDownload(download *int64) *ArtifactShowParams { + o.SetDownload(download) + return o +} + +// SetDownload adds the download to the artifact show params +func (o *ArtifactShowParams) SetDownload(download *int64) { + o.Download = download +} + +// WriteToRequest writes these params to a swagger request +func (o *ArtifactShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param artifact-slug + if err := r.SetPathParam("artifact-slug", o.ArtifactSlug); err != nil { + return err + } + + // path param build-slug + if err := r.SetPathParam("build-slug", o.BuildSlug); err != nil { + return err + } + + if o.Download != nil { + + // query param download + var qrDownload int64 + + if o.Download != nil { + qrDownload = *o.Download + } + qDownload := swag.FormatInt64(qrDownload) + if qDownload != "" { + + if err := r.SetQueryParam("download", qDownload); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/artifact_show_responses.go b/go/client/operations/artifact_show_responses.go new file mode 100644 index 0000000..a5c9111 --- /dev/null +++ b/go/client/operations/artifact_show_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ArtifactShowReader is a Reader for the ArtifactShow structure. +type ArtifactShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ArtifactShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewArtifactShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewArtifactShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewArtifactShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewArtifactShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewArtifactShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewArtifactShowOK creates a ArtifactShowOK with default headers values +func NewArtifactShowOK() *ArtifactShowOK { + return &ArtifactShowOK{} +} + +/* ArtifactShowOK describes a response with status code 200, with default header values. + +OK +*/ +type ArtifactShowOK struct { + Payload *models.V0ArtifactShowResponseModel +} + +func (o *ArtifactShowOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactShowOK %+v", 200, o.Payload) +} +func (o *ArtifactShowOK) GetPayload() *models.V0ArtifactShowResponseModel { + return o.Payload +} + +func (o *ArtifactShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ArtifactShowResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactShowBadRequest creates a ArtifactShowBadRequest with default headers values +func NewArtifactShowBadRequest() *ArtifactShowBadRequest { + return &ArtifactShowBadRequest{} +} + +/* ArtifactShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ArtifactShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactShowBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactShowBadRequest %+v", 400, o.Payload) +} +func (o *ArtifactShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactShowUnauthorized creates a ArtifactShowUnauthorized with default headers values +func NewArtifactShowUnauthorized() *ArtifactShowUnauthorized { + return &ArtifactShowUnauthorized{} +} + +/* ArtifactShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ArtifactShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactShowUnauthorized %+v", 401, o.Payload) +} +func (o *ArtifactShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactShowNotFound creates a ArtifactShowNotFound with default headers values +func NewArtifactShowNotFound() *ArtifactShowNotFound { + return &ArtifactShowNotFound{} +} + +/* ArtifactShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ArtifactShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactShowNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactShowNotFound %+v", 404, o.Payload) +} +func (o *ArtifactShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactShowInternalServerError creates a ArtifactShowInternalServerError with default headers values +func NewArtifactShowInternalServerError() *ArtifactShowInternalServerError { + return &ArtifactShowInternalServerError{} +} + +/* ArtifactShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ArtifactShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactShowInternalServerError %+v", 500, o.Payload) +} +func (o *ArtifactShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/artifact_update_parameters.go b/go/client/operations/artifact_update_parameters.go new file mode 100644 index 0000000..8c58f41 --- /dev/null +++ b/go/client/operations/artifact_update_parameters.go @@ -0,0 +1,217 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewArtifactUpdateParams creates a new ArtifactUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewArtifactUpdateParams() *ArtifactUpdateParams { + return &ArtifactUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewArtifactUpdateParamsWithTimeout creates a new ArtifactUpdateParams object +// with the ability to set a timeout on a request. +func NewArtifactUpdateParamsWithTimeout(timeout time.Duration) *ArtifactUpdateParams { + return &ArtifactUpdateParams{ + timeout: timeout, + } +} + +// NewArtifactUpdateParamsWithContext creates a new ArtifactUpdateParams object +// with the ability to set a context for a request. +func NewArtifactUpdateParamsWithContext(ctx context.Context) *ArtifactUpdateParams { + return &ArtifactUpdateParams{ + Context: ctx, + } +} + +// NewArtifactUpdateParamsWithHTTPClient creates a new ArtifactUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewArtifactUpdateParamsWithHTTPClient(client *http.Client) *ArtifactUpdateParams { + return &ArtifactUpdateParams{ + HTTPClient: client, + } +} + +/* ArtifactUpdateParams contains all the parameters to send to the API endpoint + for the artifact update operation. + + Typically these are written to a http.Request. +*/ +type ArtifactUpdateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* ArtifactParams. + + Artifact parameters + */ + ArtifactParams *models.V0ArtifactUpdateParams + + /* ArtifactSlug. + + Artifact slug + */ + ArtifactSlug string + + /* BuildSlug. + + Build slug + */ + BuildSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the artifact update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArtifactUpdateParams) WithDefaults() *ArtifactUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the artifact update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArtifactUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the artifact update params +func (o *ArtifactUpdateParams) WithTimeout(timeout time.Duration) *ArtifactUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the artifact update params +func (o *ArtifactUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the artifact update params +func (o *ArtifactUpdateParams) WithContext(ctx context.Context) *ArtifactUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the artifact update params +func (o *ArtifactUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the artifact update params +func (o *ArtifactUpdateParams) WithHTTPClient(client *http.Client) *ArtifactUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the artifact update params +func (o *ArtifactUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the artifact update params +func (o *ArtifactUpdateParams) WithAppSlug(appSlug string) *ArtifactUpdateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the artifact update params +func (o *ArtifactUpdateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithArtifactParams adds the artifactParams to the artifact update params +func (o *ArtifactUpdateParams) WithArtifactParams(artifactParams *models.V0ArtifactUpdateParams) *ArtifactUpdateParams { + o.SetArtifactParams(artifactParams) + return o +} + +// SetArtifactParams adds the artifactParams to the artifact update params +func (o *ArtifactUpdateParams) SetArtifactParams(artifactParams *models.V0ArtifactUpdateParams) { + o.ArtifactParams = artifactParams +} + +// WithArtifactSlug adds the artifactSlug to the artifact update params +func (o *ArtifactUpdateParams) WithArtifactSlug(artifactSlug string) *ArtifactUpdateParams { + o.SetArtifactSlug(artifactSlug) + return o +} + +// SetArtifactSlug adds the artifactSlug to the artifact update params +func (o *ArtifactUpdateParams) SetArtifactSlug(artifactSlug string) { + o.ArtifactSlug = artifactSlug +} + +// WithBuildSlug adds the buildSlug to the artifact update params +func (o *ArtifactUpdateParams) WithBuildSlug(buildSlug string) *ArtifactUpdateParams { + o.SetBuildSlug(buildSlug) + return o +} + +// SetBuildSlug adds the buildSlug to the artifact update params +func (o *ArtifactUpdateParams) SetBuildSlug(buildSlug string) { + o.BuildSlug = buildSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *ArtifactUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.ArtifactParams != nil { + if err := r.SetBodyParam(o.ArtifactParams); err != nil { + return err + } + } + + // path param artifact-slug + if err := r.SetPathParam("artifact-slug", o.ArtifactSlug); err != nil { + return err + } + + // path param build-slug + if err := r.SetPathParam("build-slug", o.BuildSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/artifact_update_responses.go b/go/client/operations/artifact_update_responses.go new file mode 100644 index 0000000..3135f3e --- /dev/null +++ b/go/client/operations/artifact_update_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ArtifactUpdateReader is a Reader for the ArtifactUpdate structure. +type ArtifactUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ArtifactUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewArtifactUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewArtifactUpdateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewArtifactUpdateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewArtifactUpdateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewArtifactUpdateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewArtifactUpdateOK creates a ArtifactUpdateOK with default headers values +func NewArtifactUpdateOK() *ArtifactUpdateOK { + return &ArtifactUpdateOK{} +} + +/* ArtifactUpdateOK describes a response with status code 200, with default header values. + +OK +*/ +type ArtifactUpdateOK struct { + Payload *models.V0ArtifactShowResponseModel +} + +func (o *ArtifactUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactUpdateOK %+v", 200, o.Payload) +} +func (o *ArtifactUpdateOK) GetPayload() *models.V0ArtifactShowResponseModel { + return o.Payload +} + +func (o *ArtifactUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ArtifactShowResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactUpdateBadRequest creates a ArtifactUpdateBadRequest with default headers values +func NewArtifactUpdateBadRequest() *ArtifactUpdateBadRequest { + return &ArtifactUpdateBadRequest{} +} + +/* ArtifactUpdateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ArtifactUpdateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactUpdateBadRequest) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactUpdateBadRequest %+v", 400, o.Payload) +} +func (o *ArtifactUpdateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactUpdateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactUpdateUnauthorized creates a ArtifactUpdateUnauthorized with default headers values +func NewArtifactUpdateUnauthorized() *ArtifactUpdateUnauthorized { + return &ArtifactUpdateUnauthorized{} +} + +/* ArtifactUpdateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ArtifactUpdateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactUpdateUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactUpdateUnauthorized %+v", 401, o.Payload) +} +func (o *ArtifactUpdateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactUpdateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactUpdateNotFound creates a ArtifactUpdateNotFound with default headers values +func NewArtifactUpdateNotFound() *ArtifactUpdateNotFound { + return &ArtifactUpdateNotFound{} +} + +/* ArtifactUpdateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ArtifactUpdateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactUpdateNotFound) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactUpdateNotFound %+v", 404, o.Payload) +} +func (o *ArtifactUpdateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactUpdateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArtifactUpdateInternalServerError creates a ArtifactUpdateInternalServerError with default headers values +func NewArtifactUpdateInternalServerError() *ArtifactUpdateInternalServerError { + return &ArtifactUpdateInternalServerError{} +} + +/* ArtifactUpdateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ArtifactUpdateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ArtifactUpdateInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}][%d] artifactUpdateInternalServerError %+v", 500, o.Payload) +} +func (o *ArtifactUpdateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ArtifactUpdateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/avatar_candidate_create_parameters.go b/go/client/operations/avatar_candidate_create_parameters.go new file mode 100644 index 0000000..9845f06 --- /dev/null +++ b/go/client/operations/avatar_candidate_create_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewAvatarCandidateCreateParams creates a new AvatarCandidateCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAvatarCandidateCreateParams() *AvatarCandidateCreateParams { + return &AvatarCandidateCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAvatarCandidateCreateParamsWithTimeout creates a new AvatarCandidateCreateParams object +// with the ability to set a timeout on a request. +func NewAvatarCandidateCreateParamsWithTimeout(timeout time.Duration) *AvatarCandidateCreateParams { + return &AvatarCandidateCreateParams{ + timeout: timeout, + } +} + +// NewAvatarCandidateCreateParamsWithContext creates a new AvatarCandidateCreateParams object +// with the ability to set a context for a request. +func NewAvatarCandidateCreateParamsWithContext(ctx context.Context) *AvatarCandidateCreateParams { + return &AvatarCandidateCreateParams{ + Context: ctx, + } +} + +// NewAvatarCandidateCreateParamsWithHTTPClient creates a new AvatarCandidateCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewAvatarCandidateCreateParamsWithHTTPClient(client *http.Client) *AvatarCandidateCreateParams { + return &AvatarCandidateCreateParams{ + HTTPClient: client, + } +} + +/* AvatarCandidateCreateParams contains all the parameters to send to the API endpoint + for the avatar candidate create operation. + + Typically these are written to a http.Request. +*/ +type AvatarCandidateCreateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* AvatarCandidate. + + Avatar candidate parameters + */ + AvatarCandidate []*models.V0AvatarCandidateCreateParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the avatar candidate create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AvatarCandidateCreateParams) WithDefaults() *AvatarCandidateCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the avatar candidate create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AvatarCandidateCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the avatar candidate create params +func (o *AvatarCandidateCreateParams) WithTimeout(timeout time.Duration) *AvatarCandidateCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the avatar candidate create params +func (o *AvatarCandidateCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the avatar candidate create params +func (o *AvatarCandidateCreateParams) WithContext(ctx context.Context) *AvatarCandidateCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the avatar candidate create params +func (o *AvatarCandidateCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the avatar candidate create params +func (o *AvatarCandidateCreateParams) WithHTTPClient(client *http.Client) *AvatarCandidateCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the avatar candidate create params +func (o *AvatarCandidateCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the avatar candidate create params +func (o *AvatarCandidateCreateParams) WithAppSlug(appSlug string) *AvatarCandidateCreateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the avatar candidate create params +func (o *AvatarCandidateCreateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithAvatarCandidate adds the avatarCandidate to the avatar candidate create params +func (o *AvatarCandidateCreateParams) WithAvatarCandidate(avatarCandidate []*models.V0AvatarCandidateCreateParams) *AvatarCandidateCreateParams { + o.SetAvatarCandidate(avatarCandidate) + return o +} + +// SetAvatarCandidate adds the avatarCandidate to the avatar candidate create params +func (o *AvatarCandidateCreateParams) SetAvatarCandidate(avatarCandidate []*models.V0AvatarCandidateCreateParams) { + o.AvatarCandidate = avatarCandidate +} + +// WriteToRequest writes these params to a swagger request +func (o *AvatarCandidateCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.AvatarCandidate != nil { + if err := r.SetBodyParam(o.AvatarCandidate); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/avatar_candidate_create_responses.go b/go/client/operations/avatar_candidate_create_responses.go new file mode 100644 index 0000000..60f014e --- /dev/null +++ b/go/client/operations/avatar_candidate_create_responses.go @@ -0,0 +1,217 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AvatarCandidateCreateReader is a Reader for the AvatarCandidateCreate structure. +type AvatarCandidateCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AvatarCandidateCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewAvatarCandidateCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAvatarCandidateCreateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAvatarCandidateCreateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAvatarCandidateCreateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAvatarCandidateCreateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAvatarCandidateCreateCreated creates a AvatarCandidateCreateCreated with default headers values +func NewAvatarCandidateCreateCreated() *AvatarCandidateCreateCreated { + return &AvatarCandidateCreateCreated{} +} + +/* AvatarCandidateCreateCreated describes a response with status code 201, with default header values. + +Created +*/ +type AvatarCandidateCreateCreated struct { + Payload []*models.V0AvatarCandidateCreateResponseItem +} + +func (o *AvatarCandidateCreateCreated) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/avatar-candidates][%d] avatarCandidateCreateCreated %+v", 201, o.Payload) +} +func (o *AvatarCandidateCreateCreated) GetPayload() []*models.V0AvatarCandidateCreateResponseItem { + return o.Payload +} + +func (o *AvatarCandidateCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidateCreateBadRequest creates a AvatarCandidateCreateBadRequest with default headers values +func NewAvatarCandidateCreateBadRequest() *AvatarCandidateCreateBadRequest { + return &AvatarCandidateCreateBadRequest{} +} + +/* AvatarCandidateCreateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AvatarCandidateCreateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidateCreateBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/avatar-candidates][%d] avatarCandidateCreateBadRequest %+v", 400, o.Payload) +} +func (o *AvatarCandidateCreateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidateCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidateCreateUnauthorized creates a AvatarCandidateCreateUnauthorized with default headers values +func NewAvatarCandidateCreateUnauthorized() *AvatarCandidateCreateUnauthorized { + return &AvatarCandidateCreateUnauthorized{} +} + +/* AvatarCandidateCreateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AvatarCandidateCreateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidateCreateUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/avatar-candidates][%d] avatarCandidateCreateUnauthorized %+v", 401, o.Payload) +} +func (o *AvatarCandidateCreateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidateCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidateCreateNotFound creates a AvatarCandidateCreateNotFound with default headers values +func NewAvatarCandidateCreateNotFound() *AvatarCandidateCreateNotFound { + return &AvatarCandidateCreateNotFound{} +} + +/* AvatarCandidateCreateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AvatarCandidateCreateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidateCreateNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/avatar-candidates][%d] avatarCandidateCreateNotFound %+v", 404, o.Payload) +} +func (o *AvatarCandidateCreateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidateCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidateCreateInternalServerError creates a AvatarCandidateCreateInternalServerError with default headers values +func NewAvatarCandidateCreateInternalServerError() *AvatarCandidateCreateInternalServerError { + return &AvatarCandidateCreateInternalServerError{} +} + +/* AvatarCandidateCreateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AvatarCandidateCreateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidateCreateInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/avatar-candidates][%d] avatarCandidateCreateInternalServerError %+v", 500, o.Payload) +} +func (o *AvatarCandidateCreateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidateCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/avatar_candidate_list_parameters.go b/go/client/operations/avatar_candidate_list_parameters.go new file mode 100644 index 0000000..7aa4f07 --- /dev/null +++ b/go/client/operations/avatar_candidate_list_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAvatarCandidateListParams creates a new AvatarCandidateListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAvatarCandidateListParams() *AvatarCandidateListParams { + return &AvatarCandidateListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAvatarCandidateListParamsWithTimeout creates a new AvatarCandidateListParams object +// with the ability to set a timeout on a request. +func NewAvatarCandidateListParamsWithTimeout(timeout time.Duration) *AvatarCandidateListParams { + return &AvatarCandidateListParams{ + timeout: timeout, + } +} + +// NewAvatarCandidateListParamsWithContext creates a new AvatarCandidateListParams object +// with the ability to set a context for a request. +func NewAvatarCandidateListParamsWithContext(ctx context.Context) *AvatarCandidateListParams { + return &AvatarCandidateListParams{ + Context: ctx, + } +} + +// NewAvatarCandidateListParamsWithHTTPClient creates a new AvatarCandidateListParams object +// with the ability to set a custom HTTPClient for a request. +func NewAvatarCandidateListParamsWithHTTPClient(client *http.Client) *AvatarCandidateListParams { + return &AvatarCandidateListParams{ + HTTPClient: client, + } +} + +/* AvatarCandidateListParams contains all the parameters to send to the API endpoint + for the avatar candidate list operation. + + Typically these are written to a http.Request. +*/ +type AvatarCandidateListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the avatar candidate list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AvatarCandidateListParams) WithDefaults() *AvatarCandidateListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the avatar candidate list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AvatarCandidateListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the avatar candidate list params +func (o *AvatarCandidateListParams) WithTimeout(timeout time.Duration) *AvatarCandidateListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the avatar candidate list params +func (o *AvatarCandidateListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the avatar candidate list params +func (o *AvatarCandidateListParams) WithContext(ctx context.Context) *AvatarCandidateListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the avatar candidate list params +func (o *AvatarCandidateListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the avatar candidate list params +func (o *AvatarCandidateListParams) WithHTTPClient(client *http.Client) *AvatarCandidateListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the avatar candidate list params +func (o *AvatarCandidateListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the avatar candidate list params +func (o *AvatarCandidateListParams) WithAppSlug(appSlug string) *AvatarCandidateListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the avatar candidate list params +func (o *AvatarCandidateListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AvatarCandidateListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/avatar_candidate_list_responses.go b/go/client/operations/avatar_candidate_list_responses.go new file mode 100644 index 0000000..1995d9d --- /dev/null +++ b/go/client/operations/avatar_candidate_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AvatarCandidateListReader is a Reader for the AvatarCandidateList structure. +type AvatarCandidateListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AvatarCandidateListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAvatarCandidateListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAvatarCandidateListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAvatarCandidateListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAvatarCandidateListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAvatarCandidateListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAvatarCandidateListOK creates a AvatarCandidateListOK with default headers values +func NewAvatarCandidateListOK() *AvatarCandidateListOK { + return &AvatarCandidateListOK{} +} + +/* AvatarCandidateListOK describes a response with status code 200, with default header values. + +OK +*/ +type AvatarCandidateListOK struct { + Payload *models.V0FindAvatarCandidateResponse +} + +func (o *AvatarCandidateListOK) Error() string { + return fmt.Sprintf("[GET /v0.1/apps/{app-slug}/avatar-candidates][%d] avatarCandidateListOK %+v", 200, o.Payload) +} +func (o *AvatarCandidateListOK) GetPayload() *models.V0FindAvatarCandidateResponse { + return o.Payload +} + +func (o *AvatarCandidateListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0FindAvatarCandidateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidateListBadRequest creates a AvatarCandidateListBadRequest with default headers values +func NewAvatarCandidateListBadRequest() *AvatarCandidateListBadRequest { + return &AvatarCandidateListBadRequest{} +} + +/* AvatarCandidateListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AvatarCandidateListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidateListBadRequest) Error() string { + return fmt.Sprintf("[GET /v0.1/apps/{app-slug}/avatar-candidates][%d] avatarCandidateListBadRequest %+v", 400, o.Payload) +} +func (o *AvatarCandidateListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidateListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidateListUnauthorized creates a AvatarCandidateListUnauthorized with default headers values +func NewAvatarCandidateListUnauthorized() *AvatarCandidateListUnauthorized { + return &AvatarCandidateListUnauthorized{} +} + +/* AvatarCandidateListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AvatarCandidateListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidateListUnauthorized) Error() string { + return fmt.Sprintf("[GET /v0.1/apps/{app-slug}/avatar-candidates][%d] avatarCandidateListUnauthorized %+v", 401, o.Payload) +} +func (o *AvatarCandidateListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidateListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidateListNotFound creates a AvatarCandidateListNotFound with default headers values +func NewAvatarCandidateListNotFound() *AvatarCandidateListNotFound { + return &AvatarCandidateListNotFound{} +} + +/* AvatarCandidateListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AvatarCandidateListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidateListNotFound) Error() string { + return fmt.Sprintf("[GET /v0.1/apps/{app-slug}/avatar-candidates][%d] avatarCandidateListNotFound %+v", 404, o.Payload) +} +func (o *AvatarCandidateListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidateListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidateListInternalServerError creates a AvatarCandidateListInternalServerError with default headers values +func NewAvatarCandidateListInternalServerError() *AvatarCandidateListInternalServerError { + return &AvatarCandidateListInternalServerError{} +} + +/* AvatarCandidateListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AvatarCandidateListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidateListInternalServerError) Error() string { + return fmt.Sprintf("[GET /v0.1/apps/{app-slug}/avatar-candidates][%d] avatarCandidateListInternalServerError %+v", 500, o.Payload) +} +func (o *AvatarCandidateListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidateListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/avatar_candidate_promote_parameters.go b/go/client/operations/avatar_candidate_promote_parameters.go new file mode 100644 index 0000000..1a63b8a --- /dev/null +++ b/go/client/operations/avatar_candidate_promote_parameters.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewAvatarCandidatePromoteParams creates a new AvatarCandidatePromoteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAvatarCandidatePromoteParams() *AvatarCandidatePromoteParams { + return &AvatarCandidatePromoteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAvatarCandidatePromoteParamsWithTimeout creates a new AvatarCandidatePromoteParams object +// with the ability to set a timeout on a request. +func NewAvatarCandidatePromoteParamsWithTimeout(timeout time.Duration) *AvatarCandidatePromoteParams { + return &AvatarCandidatePromoteParams{ + timeout: timeout, + } +} + +// NewAvatarCandidatePromoteParamsWithContext creates a new AvatarCandidatePromoteParams object +// with the ability to set a context for a request. +func NewAvatarCandidatePromoteParamsWithContext(ctx context.Context) *AvatarCandidatePromoteParams { + return &AvatarCandidatePromoteParams{ + Context: ctx, + } +} + +// NewAvatarCandidatePromoteParamsWithHTTPClient creates a new AvatarCandidatePromoteParams object +// with the ability to set a custom HTTPClient for a request. +func NewAvatarCandidatePromoteParamsWithHTTPClient(client *http.Client) *AvatarCandidatePromoteParams { + return &AvatarCandidatePromoteParams{ + HTTPClient: client, + } +} + +/* AvatarCandidatePromoteParams contains all the parameters to send to the API endpoint + for the avatar candidate promote operation. + + Typically these are written to a http.Request. +*/ +type AvatarCandidatePromoteParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* AvatarPromoteParams. + + Avatar promote parameters + */ + AvatarPromoteParams *models.V0AvatarPromoteParams + + /* AvatarSlug. + + Avatar candidate slug + */ + AvatarSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the avatar candidate promote params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AvatarCandidatePromoteParams) WithDefaults() *AvatarCandidatePromoteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the avatar candidate promote params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AvatarCandidatePromoteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) WithTimeout(timeout time.Duration) *AvatarCandidatePromoteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) WithContext(ctx context.Context) *AvatarCandidatePromoteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) WithHTTPClient(client *http.Client) *AvatarCandidatePromoteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) WithAppSlug(appSlug string) *AvatarCandidatePromoteParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithAvatarPromoteParams adds the avatarPromoteParams to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) WithAvatarPromoteParams(avatarPromoteParams *models.V0AvatarPromoteParams) *AvatarCandidatePromoteParams { + o.SetAvatarPromoteParams(avatarPromoteParams) + return o +} + +// SetAvatarPromoteParams adds the avatarPromoteParams to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) SetAvatarPromoteParams(avatarPromoteParams *models.V0AvatarPromoteParams) { + o.AvatarPromoteParams = avatarPromoteParams +} + +// WithAvatarSlug adds the avatarSlug to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) WithAvatarSlug(avatarSlug string) *AvatarCandidatePromoteParams { + o.SetAvatarSlug(avatarSlug) + return o +} + +// SetAvatarSlug adds the avatarSlug to the avatar candidate promote params +func (o *AvatarCandidatePromoteParams) SetAvatarSlug(avatarSlug string) { + o.AvatarSlug = avatarSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *AvatarCandidatePromoteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.AvatarPromoteParams != nil { + if err := r.SetBodyParam(o.AvatarPromoteParams); err != nil { + return err + } + } + + // path param avatar-slug + if err := r.SetPathParam("avatar-slug", o.AvatarSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/avatar_candidate_promote_responses.go b/go/client/operations/avatar_candidate_promote_responses.go new file mode 100644 index 0000000..00ec3eb --- /dev/null +++ b/go/client/operations/avatar_candidate_promote_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// AvatarCandidatePromoteReader is a Reader for the AvatarCandidatePromote structure. +type AvatarCandidatePromoteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AvatarCandidatePromoteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAvatarCandidatePromoteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewAvatarCandidatePromoteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewAvatarCandidatePromoteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewAvatarCandidatePromoteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewAvatarCandidatePromoteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewAvatarCandidatePromoteOK creates a AvatarCandidatePromoteOK with default headers values +func NewAvatarCandidatePromoteOK() *AvatarCandidatePromoteOK { + return &AvatarCandidatePromoteOK{} +} + +/* AvatarCandidatePromoteOK describes a response with status code 200, with default header values. + +OK +*/ +type AvatarCandidatePromoteOK struct { + Payload *models.V0AvatarPromoteResponseModel +} + +func (o *AvatarCandidatePromoteOK) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/avatar-candidates/{avatar-slug}][%d] avatarCandidatePromoteOK %+v", 200, o.Payload) +} +func (o *AvatarCandidatePromoteOK) GetPayload() *models.V0AvatarPromoteResponseModel { + return o.Payload +} + +func (o *AvatarCandidatePromoteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AvatarPromoteResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidatePromoteBadRequest creates a AvatarCandidatePromoteBadRequest with default headers values +func NewAvatarCandidatePromoteBadRequest() *AvatarCandidatePromoteBadRequest { + return &AvatarCandidatePromoteBadRequest{} +} + +/* AvatarCandidatePromoteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type AvatarCandidatePromoteBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidatePromoteBadRequest) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/avatar-candidates/{avatar-slug}][%d] avatarCandidatePromoteBadRequest %+v", 400, o.Payload) +} +func (o *AvatarCandidatePromoteBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidatePromoteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidatePromoteUnauthorized creates a AvatarCandidatePromoteUnauthorized with default headers values +func NewAvatarCandidatePromoteUnauthorized() *AvatarCandidatePromoteUnauthorized { + return &AvatarCandidatePromoteUnauthorized{} +} + +/* AvatarCandidatePromoteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type AvatarCandidatePromoteUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidatePromoteUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/avatar-candidates/{avatar-slug}][%d] avatarCandidatePromoteUnauthorized %+v", 401, o.Payload) +} +func (o *AvatarCandidatePromoteUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidatePromoteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidatePromoteNotFound creates a AvatarCandidatePromoteNotFound with default headers values +func NewAvatarCandidatePromoteNotFound() *AvatarCandidatePromoteNotFound { + return &AvatarCandidatePromoteNotFound{} +} + +/* AvatarCandidatePromoteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type AvatarCandidatePromoteNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidatePromoteNotFound) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/avatar-candidates/{avatar-slug}][%d] avatarCandidatePromoteNotFound %+v", 404, o.Payload) +} +func (o *AvatarCandidatePromoteNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidatePromoteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAvatarCandidatePromoteInternalServerError creates a AvatarCandidatePromoteInternalServerError with default headers values +func NewAvatarCandidatePromoteInternalServerError() *AvatarCandidatePromoteInternalServerError { + return &AvatarCandidatePromoteInternalServerError{} +} + +/* AvatarCandidatePromoteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type AvatarCandidatePromoteInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *AvatarCandidatePromoteInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/avatar-candidates/{avatar-slug}][%d] avatarCandidatePromoteInternalServerError %+v", 500, o.Payload) +} +func (o *AvatarCandidatePromoteInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *AvatarCandidatePromoteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/branch_list_parameters.go b/go/client/operations/branch_list_parameters.go new file mode 100644 index 0000000..160b51f --- /dev/null +++ b/go/client/operations/branch_list_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBranchListParams creates a new BranchListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBranchListParams() *BranchListParams { + return &BranchListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBranchListParamsWithTimeout creates a new BranchListParams object +// with the ability to set a timeout on a request. +func NewBranchListParamsWithTimeout(timeout time.Duration) *BranchListParams { + return &BranchListParams{ + timeout: timeout, + } +} + +// NewBranchListParamsWithContext creates a new BranchListParams object +// with the ability to set a context for a request. +func NewBranchListParamsWithContext(ctx context.Context) *BranchListParams { + return &BranchListParams{ + Context: ctx, + } +} + +// NewBranchListParamsWithHTTPClient creates a new BranchListParams object +// with the ability to set a custom HTTPClient for a request. +func NewBranchListParamsWithHTTPClient(client *http.Client) *BranchListParams { + return &BranchListParams{ + HTTPClient: client, + } +} + +/* BranchListParams contains all the parameters to send to the API endpoint + for the branch list operation. + + Typically these are written to a http.Request. +*/ +type BranchListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the branch list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BranchListParams) WithDefaults() *BranchListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the branch list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BranchListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the branch list params +func (o *BranchListParams) WithTimeout(timeout time.Duration) *BranchListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the branch list params +func (o *BranchListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the branch list params +func (o *BranchListParams) WithContext(ctx context.Context) *BranchListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the branch list params +func (o *BranchListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the branch list params +func (o *BranchListParams) WithHTTPClient(client *http.Client) *BranchListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the branch list params +func (o *BranchListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the branch list params +func (o *BranchListParams) WithAppSlug(appSlug string) *BranchListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the branch list params +func (o *BranchListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BranchListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/branch_list_responses.go b/go/client/operations/branch_list_responses.go new file mode 100644 index 0000000..70617de --- /dev/null +++ b/go/client/operations/branch_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BranchListReader is a Reader for the BranchList structure. +type BranchListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BranchListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBranchListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBranchListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBranchListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBranchListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBranchListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBranchListOK creates a BranchListOK with default headers values +func NewBranchListOK() *BranchListOK { + return &BranchListOK{} +} + +/* BranchListOK describes a response with status code 200, with default header values. + +OK +*/ +type BranchListOK struct { + Payload *models.V0BranchListResponseModel +} + +func (o *BranchListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/branches][%d] branchListOK %+v", 200, o.Payload) +} +func (o *BranchListOK) GetPayload() *models.V0BranchListResponseModel { + return o.Payload +} + +func (o *BranchListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BranchListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBranchListBadRequest creates a BranchListBadRequest with default headers values +func NewBranchListBadRequest() *BranchListBadRequest { + return &BranchListBadRequest{} +} + +/* BranchListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BranchListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BranchListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/branches][%d] branchListBadRequest %+v", 400, o.Payload) +} +func (o *BranchListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BranchListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBranchListUnauthorized creates a BranchListUnauthorized with default headers values +func NewBranchListUnauthorized() *BranchListUnauthorized { + return &BranchListUnauthorized{} +} + +/* BranchListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BranchListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BranchListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/branches][%d] branchListUnauthorized %+v", 401, o.Payload) +} +func (o *BranchListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BranchListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBranchListNotFound creates a BranchListNotFound with default headers values +func NewBranchListNotFound() *BranchListNotFound { + return &BranchListNotFound{} +} + +/* BranchListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BranchListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BranchListNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/branches][%d] branchListNotFound %+v", 404, o.Payload) +} +func (o *BranchListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BranchListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBranchListInternalServerError creates a BranchListInternalServerError with default headers values +func NewBranchListInternalServerError() *BranchListInternalServerError { + return &BranchListInternalServerError{} +} + +/* BranchListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BranchListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BranchListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/branches][%d] branchListInternalServerError %+v", 500, o.Payload) +} +func (o *BranchListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BranchListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_abort_parameters.go b/go/client/operations/build_abort_parameters.go new file mode 100644 index 0000000..73065ad --- /dev/null +++ b/go/client/operations/build_abort_parameters.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewBuildAbortParams creates a new BuildAbortParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildAbortParams() *BuildAbortParams { + return &BuildAbortParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildAbortParamsWithTimeout creates a new BuildAbortParams object +// with the ability to set a timeout on a request. +func NewBuildAbortParamsWithTimeout(timeout time.Duration) *BuildAbortParams { + return &BuildAbortParams{ + timeout: timeout, + } +} + +// NewBuildAbortParamsWithContext creates a new BuildAbortParams object +// with the ability to set a context for a request. +func NewBuildAbortParamsWithContext(ctx context.Context) *BuildAbortParams { + return &BuildAbortParams{ + Context: ctx, + } +} + +// NewBuildAbortParamsWithHTTPClient creates a new BuildAbortParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildAbortParamsWithHTTPClient(client *http.Client) *BuildAbortParams { + return &BuildAbortParams{ + HTTPClient: client, + } +} + +/* BuildAbortParams contains all the parameters to send to the API endpoint + for the build abort operation. + + Typically these are written to a http.Request. +*/ +type BuildAbortParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildAbortParams. + + Build abort parameters + */ + BuildAbortParams *models.V0BuildAbortParams + + /* BuildSlug. + + Build slug + */ + BuildSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build abort params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildAbortParams) WithDefaults() *BuildAbortParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build abort params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildAbortParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build abort params +func (o *BuildAbortParams) WithTimeout(timeout time.Duration) *BuildAbortParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build abort params +func (o *BuildAbortParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build abort params +func (o *BuildAbortParams) WithContext(ctx context.Context) *BuildAbortParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build abort params +func (o *BuildAbortParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build abort params +func (o *BuildAbortParams) WithHTTPClient(client *http.Client) *BuildAbortParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build abort params +func (o *BuildAbortParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build abort params +func (o *BuildAbortParams) WithAppSlug(appSlug string) *BuildAbortParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build abort params +func (o *BuildAbortParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildAbortParams adds the buildAbortParams to the build abort params +func (o *BuildAbortParams) WithBuildAbortParams(buildAbortParams *models.V0BuildAbortParams) *BuildAbortParams { + o.SetBuildAbortParams(buildAbortParams) + return o +} + +// SetBuildAbortParams adds the buildAbortParams to the build abort params +func (o *BuildAbortParams) SetBuildAbortParams(buildAbortParams *models.V0BuildAbortParams) { + o.BuildAbortParams = buildAbortParams +} + +// WithBuildSlug adds the buildSlug to the build abort params +func (o *BuildAbortParams) WithBuildSlug(buildSlug string) *BuildAbortParams { + o.SetBuildSlug(buildSlug) + return o +} + +// SetBuildSlug adds the buildSlug to the build abort params +func (o *BuildAbortParams) SetBuildSlug(buildSlug string) { + o.BuildSlug = buildSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildAbortParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.BuildAbortParams != nil { + if err := r.SetBodyParam(o.BuildAbortParams); err != nil { + return err + } + } + + // path param build-slug + if err := r.SetPathParam("build-slug", o.BuildSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_abort_responses.go b/go/client/operations/build_abort_responses.go new file mode 100644 index 0000000..5543c00 --- /dev/null +++ b/go/client/operations/build_abort_responses.go @@ -0,0 +1,257 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildAbortReader is a Reader for the BuildAbort structure. +type BuildAbortReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildAbortReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildAbortOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildAbortBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildAbortUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildAbortNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewBuildAbortTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildAbortInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildAbortOK creates a BuildAbortOK with default headers values +func NewBuildAbortOK() *BuildAbortOK { + return &BuildAbortOK{} +} + +/* BuildAbortOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildAbortOK struct { + Payload *models.V0BuildAbortResponseModel +} + +func (o *BuildAbortOK) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds/{build-slug}/abort][%d] buildAbortOK %+v", 200, o.Payload) +} +func (o *BuildAbortOK) GetPayload() *models.V0BuildAbortResponseModel { + return o.Payload +} + +func (o *BuildAbortOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildAbortResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildAbortBadRequest creates a BuildAbortBadRequest with default headers values +func NewBuildAbortBadRequest() *BuildAbortBadRequest { + return &BuildAbortBadRequest{} +} + +/* BuildAbortBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildAbortBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildAbortBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds/{build-slug}/abort][%d] buildAbortBadRequest %+v", 400, o.Payload) +} +func (o *BuildAbortBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildAbortBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildAbortUnauthorized creates a BuildAbortUnauthorized with default headers values +func NewBuildAbortUnauthorized() *BuildAbortUnauthorized { + return &BuildAbortUnauthorized{} +} + +/* BuildAbortUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildAbortUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildAbortUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds/{build-slug}/abort][%d] buildAbortUnauthorized %+v", 401, o.Payload) +} +func (o *BuildAbortUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildAbortUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildAbortNotFound creates a BuildAbortNotFound with default headers values +func NewBuildAbortNotFound() *BuildAbortNotFound { + return &BuildAbortNotFound{} +} + +/* BuildAbortNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildAbortNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildAbortNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds/{build-slug}/abort][%d] buildAbortNotFound %+v", 404, o.Payload) +} +func (o *BuildAbortNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildAbortNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildAbortTooManyRequests creates a BuildAbortTooManyRequests with default headers values +func NewBuildAbortTooManyRequests() *BuildAbortTooManyRequests { + return &BuildAbortTooManyRequests{} +} + +/* BuildAbortTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type BuildAbortTooManyRequests struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildAbortTooManyRequests) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds/{build-slug}/abort][%d] buildAbortTooManyRequests %+v", 429, o.Payload) +} +func (o *BuildAbortTooManyRequests) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildAbortTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildAbortInternalServerError creates a BuildAbortInternalServerError with default headers values +func NewBuildAbortInternalServerError() *BuildAbortInternalServerError { + return &BuildAbortInternalServerError{} +} + +/* BuildAbortInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildAbortInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildAbortInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds/{build-slug}/abort][%d] buildAbortInternalServerError %+v", 500, o.Payload) +} +func (o *BuildAbortInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildAbortInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_bitrise_yml_show_parameters.go b/go/client/operations/build_bitrise_yml_show_parameters.go new file mode 100644 index 0000000..db04705 --- /dev/null +++ b/go/client/operations/build_bitrise_yml_show_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBuildBitriseYmlShowParams creates a new BuildBitriseYmlShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildBitriseYmlShowParams() *BuildBitriseYmlShowParams { + return &BuildBitriseYmlShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildBitriseYmlShowParamsWithTimeout creates a new BuildBitriseYmlShowParams object +// with the ability to set a timeout on a request. +func NewBuildBitriseYmlShowParamsWithTimeout(timeout time.Duration) *BuildBitriseYmlShowParams { + return &BuildBitriseYmlShowParams{ + timeout: timeout, + } +} + +// NewBuildBitriseYmlShowParamsWithContext creates a new BuildBitriseYmlShowParams object +// with the ability to set a context for a request. +func NewBuildBitriseYmlShowParamsWithContext(ctx context.Context) *BuildBitriseYmlShowParams { + return &BuildBitriseYmlShowParams{ + Context: ctx, + } +} + +// NewBuildBitriseYmlShowParamsWithHTTPClient creates a new BuildBitriseYmlShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildBitriseYmlShowParamsWithHTTPClient(client *http.Client) *BuildBitriseYmlShowParams { + return &BuildBitriseYmlShowParams{ + HTTPClient: client, + } +} + +/* BuildBitriseYmlShowParams contains all the parameters to send to the API endpoint + for the build bitrise yml show operation. + + Typically these are written to a http.Request. +*/ +type BuildBitriseYmlShowParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildSlug. + + Build slug + */ + BuildSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build bitrise yml show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildBitriseYmlShowParams) WithDefaults() *BuildBitriseYmlShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build bitrise yml show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildBitriseYmlShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build bitrise yml show params +func (o *BuildBitriseYmlShowParams) WithTimeout(timeout time.Duration) *BuildBitriseYmlShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build bitrise yml show params +func (o *BuildBitriseYmlShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build bitrise yml show params +func (o *BuildBitriseYmlShowParams) WithContext(ctx context.Context) *BuildBitriseYmlShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build bitrise yml show params +func (o *BuildBitriseYmlShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build bitrise yml show params +func (o *BuildBitriseYmlShowParams) WithHTTPClient(client *http.Client) *BuildBitriseYmlShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build bitrise yml show params +func (o *BuildBitriseYmlShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build bitrise yml show params +func (o *BuildBitriseYmlShowParams) WithAppSlug(appSlug string) *BuildBitriseYmlShowParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build bitrise yml show params +func (o *BuildBitriseYmlShowParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildSlug adds the buildSlug to the build bitrise yml show params +func (o *BuildBitriseYmlShowParams) WithBuildSlug(buildSlug string) *BuildBitriseYmlShowParams { + o.SetBuildSlug(buildSlug) + return o +} + +// SetBuildSlug adds the buildSlug to the build bitrise yml show params +func (o *BuildBitriseYmlShowParams) SetBuildSlug(buildSlug string) { + o.BuildSlug = buildSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildBitriseYmlShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param build-slug + if err := r.SetPathParam("build-slug", o.BuildSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_bitrise_yml_show_responses.go b/go/client/operations/build_bitrise_yml_show_responses.go new file mode 100644 index 0000000..3881d8f --- /dev/null +++ b/go/client/operations/build_bitrise_yml_show_responses.go @@ -0,0 +1,217 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildBitriseYmlShowReader is a Reader for the BuildBitriseYmlShow structure. +type BuildBitriseYmlShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildBitriseYmlShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildBitriseYmlShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildBitriseYmlShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildBitriseYmlShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildBitriseYmlShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildBitriseYmlShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildBitriseYmlShowOK creates a BuildBitriseYmlShowOK with default headers values +func NewBuildBitriseYmlShowOK() *BuildBitriseYmlShowOK { + return &BuildBitriseYmlShowOK{} +} + +/* BuildBitriseYmlShowOK describes a response with status code 200, with default header values. + +{the bitrise.yml in yml format} +*/ +type BuildBitriseYmlShowOK struct { + Payload string +} + +func (o *BuildBitriseYmlShowOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/bitrise.yml][%d] buildBitriseYmlShowOK %+v", 200, o.Payload) +} +func (o *BuildBitriseYmlShowOK) GetPayload() string { + return o.Payload +} + +func (o *BuildBitriseYmlShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildBitriseYmlShowBadRequest creates a BuildBitriseYmlShowBadRequest with default headers values +func NewBuildBitriseYmlShowBadRequest() *BuildBitriseYmlShowBadRequest { + return &BuildBitriseYmlShowBadRequest{} +} + +/* BuildBitriseYmlShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildBitriseYmlShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildBitriseYmlShowBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/bitrise.yml][%d] buildBitriseYmlShowBadRequest %+v", 400, o.Payload) +} +func (o *BuildBitriseYmlShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildBitriseYmlShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildBitriseYmlShowUnauthorized creates a BuildBitriseYmlShowUnauthorized with default headers values +func NewBuildBitriseYmlShowUnauthorized() *BuildBitriseYmlShowUnauthorized { + return &BuildBitriseYmlShowUnauthorized{} +} + +/* BuildBitriseYmlShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildBitriseYmlShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildBitriseYmlShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/bitrise.yml][%d] buildBitriseYmlShowUnauthorized %+v", 401, o.Payload) +} +func (o *BuildBitriseYmlShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildBitriseYmlShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildBitriseYmlShowNotFound creates a BuildBitriseYmlShowNotFound with default headers values +func NewBuildBitriseYmlShowNotFound() *BuildBitriseYmlShowNotFound { + return &BuildBitriseYmlShowNotFound{} +} + +/* BuildBitriseYmlShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildBitriseYmlShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildBitriseYmlShowNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/bitrise.yml][%d] buildBitriseYmlShowNotFound %+v", 404, o.Payload) +} +func (o *BuildBitriseYmlShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildBitriseYmlShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildBitriseYmlShowInternalServerError creates a BuildBitriseYmlShowInternalServerError with default headers values +func NewBuildBitriseYmlShowInternalServerError() *BuildBitriseYmlShowInternalServerError { + return &BuildBitriseYmlShowInternalServerError{} +} + +/* BuildBitriseYmlShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildBitriseYmlShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildBitriseYmlShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/bitrise.yml][%d] buildBitriseYmlShowInternalServerError %+v", 500, o.Payload) +} +func (o *BuildBitriseYmlShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildBitriseYmlShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_certificate_confirm_parameters.go b/go/client/operations/build_certificate_confirm_parameters.go new file mode 100644 index 0000000..5cdc2c8 --- /dev/null +++ b/go/client/operations/build_certificate_confirm_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBuildCertificateConfirmParams creates a new BuildCertificateConfirmParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildCertificateConfirmParams() *BuildCertificateConfirmParams { + return &BuildCertificateConfirmParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildCertificateConfirmParamsWithTimeout creates a new BuildCertificateConfirmParams object +// with the ability to set a timeout on a request. +func NewBuildCertificateConfirmParamsWithTimeout(timeout time.Duration) *BuildCertificateConfirmParams { + return &BuildCertificateConfirmParams{ + timeout: timeout, + } +} + +// NewBuildCertificateConfirmParamsWithContext creates a new BuildCertificateConfirmParams object +// with the ability to set a context for a request. +func NewBuildCertificateConfirmParamsWithContext(ctx context.Context) *BuildCertificateConfirmParams { + return &BuildCertificateConfirmParams{ + Context: ctx, + } +} + +// NewBuildCertificateConfirmParamsWithHTTPClient creates a new BuildCertificateConfirmParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildCertificateConfirmParamsWithHTTPClient(client *http.Client) *BuildCertificateConfirmParams { + return &BuildCertificateConfirmParams{ + HTTPClient: client, + } +} + +/* BuildCertificateConfirmParams contains all the parameters to send to the API endpoint + for the build certificate confirm operation. + + Typically these are written to a http.Request. +*/ +type BuildCertificateConfirmParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildCertificateSlug. + + Build certificate slug + */ + BuildCertificateSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build certificate confirm params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateConfirmParams) WithDefaults() *BuildCertificateConfirmParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build certificate confirm params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateConfirmParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build certificate confirm params +func (o *BuildCertificateConfirmParams) WithTimeout(timeout time.Duration) *BuildCertificateConfirmParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build certificate confirm params +func (o *BuildCertificateConfirmParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build certificate confirm params +func (o *BuildCertificateConfirmParams) WithContext(ctx context.Context) *BuildCertificateConfirmParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build certificate confirm params +func (o *BuildCertificateConfirmParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build certificate confirm params +func (o *BuildCertificateConfirmParams) WithHTTPClient(client *http.Client) *BuildCertificateConfirmParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build certificate confirm params +func (o *BuildCertificateConfirmParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build certificate confirm params +func (o *BuildCertificateConfirmParams) WithAppSlug(appSlug string) *BuildCertificateConfirmParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build certificate confirm params +func (o *BuildCertificateConfirmParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildCertificateSlug adds the buildCertificateSlug to the build certificate confirm params +func (o *BuildCertificateConfirmParams) WithBuildCertificateSlug(buildCertificateSlug string) *BuildCertificateConfirmParams { + o.SetBuildCertificateSlug(buildCertificateSlug) + return o +} + +// SetBuildCertificateSlug adds the buildCertificateSlug to the build certificate confirm params +func (o *BuildCertificateConfirmParams) SetBuildCertificateSlug(buildCertificateSlug string) { + o.BuildCertificateSlug = buildCertificateSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildCertificateConfirmParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param build-certificate-slug + if err := r.SetPathParam("build-certificate-slug", o.BuildCertificateSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_certificate_confirm_responses.go b/go/client/operations/build_certificate_confirm_responses.go new file mode 100644 index 0000000..b3101ae --- /dev/null +++ b/go/client/operations/build_certificate_confirm_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildCertificateConfirmReader is a Reader for the BuildCertificateConfirm structure. +type BuildCertificateConfirmReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildCertificateConfirmReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildCertificateConfirmOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildCertificateConfirmBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildCertificateConfirmUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildCertificateConfirmNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildCertificateConfirmInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildCertificateConfirmOK creates a BuildCertificateConfirmOK with default headers values +func NewBuildCertificateConfirmOK() *BuildCertificateConfirmOK { + return &BuildCertificateConfirmOK{} +} + +/* BuildCertificateConfirmOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildCertificateConfirmOK struct { + Payload *models.V0BuildCertificateResponseModel +} + +func (o *BuildCertificateConfirmOK) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded][%d] buildCertificateConfirmOK %+v", 200, o.Payload) +} +func (o *BuildCertificateConfirmOK) GetPayload() *models.V0BuildCertificateResponseModel { + return o.Payload +} + +func (o *BuildCertificateConfirmOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildCertificateResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateConfirmBadRequest creates a BuildCertificateConfirmBadRequest with default headers values +func NewBuildCertificateConfirmBadRequest() *BuildCertificateConfirmBadRequest { + return &BuildCertificateConfirmBadRequest{} +} + +/* BuildCertificateConfirmBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildCertificateConfirmBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateConfirmBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded][%d] buildCertificateConfirmBadRequest %+v", 400, o.Payload) +} +func (o *BuildCertificateConfirmBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateConfirmBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateConfirmUnauthorized creates a BuildCertificateConfirmUnauthorized with default headers values +func NewBuildCertificateConfirmUnauthorized() *BuildCertificateConfirmUnauthorized { + return &BuildCertificateConfirmUnauthorized{} +} + +/* BuildCertificateConfirmUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildCertificateConfirmUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateConfirmUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded][%d] buildCertificateConfirmUnauthorized %+v", 401, o.Payload) +} +func (o *BuildCertificateConfirmUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateConfirmUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateConfirmNotFound creates a BuildCertificateConfirmNotFound with default headers values +func NewBuildCertificateConfirmNotFound() *BuildCertificateConfirmNotFound { + return &BuildCertificateConfirmNotFound{} +} + +/* BuildCertificateConfirmNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildCertificateConfirmNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateConfirmNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded][%d] buildCertificateConfirmNotFound %+v", 404, o.Payload) +} +func (o *BuildCertificateConfirmNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateConfirmNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateConfirmInternalServerError creates a BuildCertificateConfirmInternalServerError with default headers values +func NewBuildCertificateConfirmInternalServerError() *BuildCertificateConfirmInternalServerError { + return &BuildCertificateConfirmInternalServerError{} +} + +/* BuildCertificateConfirmInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildCertificateConfirmInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateConfirmInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded][%d] buildCertificateConfirmInternalServerError %+v", 500, o.Payload) +} +func (o *BuildCertificateConfirmInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateConfirmInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_certificate_create_parameters.go b/go/client/operations/build_certificate_create_parameters.go new file mode 100644 index 0000000..a20741b --- /dev/null +++ b/go/client/operations/build_certificate_create_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewBuildCertificateCreateParams creates a new BuildCertificateCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildCertificateCreateParams() *BuildCertificateCreateParams { + return &BuildCertificateCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildCertificateCreateParamsWithTimeout creates a new BuildCertificateCreateParams object +// with the ability to set a timeout on a request. +func NewBuildCertificateCreateParamsWithTimeout(timeout time.Duration) *BuildCertificateCreateParams { + return &BuildCertificateCreateParams{ + timeout: timeout, + } +} + +// NewBuildCertificateCreateParamsWithContext creates a new BuildCertificateCreateParams object +// with the ability to set a context for a request. +func NewBuildCertificateCreateParamsWithContext(ctx context.Context) *BuildCertificateCreateParams { + return &BuildCertificateCreateParams{ + Context: ctx, + } +} + +// NewBuildCertificateCreateParamsWithHTTPClient creates a new BuildCertificateCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildCertificateCreateParamsWithHTTPClient(client *http.Client) *BuildCertificateCreateParams { + return &BuildCertificateCreateParams{ + HTTPClient: client, + } +} + +/* BuildCertificateCreateParams contains all the parameters to send to the API endpoint + for the build certificate create operation. + + Typically these are written to a http.Request. +*/ +type BuildCertificateCreateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildCertificate. + + Build certificate parameters such as file name and its file size + */ + BuildCertificate *models.V0BuildCertificateUploadParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build certificate create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateCreateParams) WithDefaults() *BuildCertificateCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build certificate create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build certificate create params +func (o *BuildCertificateCreateParams) WithTimeout(timeout time.Duration) *BuildCertificateCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build certificate create params +func (o *BuildCertificateCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build certificate create params +func (o *BuildCertificateCreateParams) WithContext(ctx context.Context) *BuildCertificateCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build certificate create params +func (o *BuildCertificateCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build certificate create params +func (o *BuildCertificateCreateParams) WithHTTPClient(client *http.Client) *BuildCertificateCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build certificate create params +func (o *BuildCertificateCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build certificate create params +func (o *BuildCertificateCreateParams) WithAppSlug(appSlug string) *BuildCertificateCreateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build certificate create params +func (o *BuildCertificateCreateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildCertificate adds the buildCertificate to the build certificate create params +func (o *BuildCertificateCreateParams) WithBuildCertificate(buildCertificate *models.V0BuildCertificateUploadParams) *BuildCertificateCreateParams { + o.SetBuildCertificate(buildCertificate) + return o +} + +// SetBuildCertificate adds the buildCertificate to the build certificate create params +func (o *BuildCertificateCreateParams) SetBuildCertificate(buildCertificate *models.V0BuildCertificateUploadParams) { + o.BuildCertificate = buildCertificate +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildCertificateCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.BuildCertificate != nil { + if err := r.SetBodyParam(o.BuildCertificate); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_certificate_create_responses.go b/go/client/operations/build_certificate_create_responses.go new file mode 100644 index 0000000..010bc0b --- /dev/null +++ b/go/client/operations/build_certificate_create_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildCertificateCreateReader is a Reader for the BuildCertificateCreate structure. +type BuildCertificateCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildCertificateCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewBuildCertificateCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildCertificateCreateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildCertificateCreateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildCertificateCreateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildCertificateCreateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildCertificateCreateCreated creates a BuildCertificateCreateCreated with default headers values +func NewBuildCertificateCreateCreated() *BuildCertificateCreateCreated { + return &BuildCertificateCreateCreated{} +} + +/* BuildCertificateCreateCreated describes a response with status code 201, with default header values. + +Created +*/ +type BuildCertificateCreateCreated struct { + Payload *models.V0BuildCertificateResponseModel +} + +func (o *BuildCertificateCreateCreated) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/build-certificates][%d] buildCertificateCreateCreated %+v", 201, o.Payload) +} +func (o *BuildCertificateCreateCreated) GetPayload() *models.V0BuildCertificateResponseModel { + return o.Payload +} + +func (o *BuildCertificateCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildCertificateResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateCreateBadRequest creates a BuildCertificateCreateBadRequest with default headers values +func NewBuildCertificateCreateBadRequest() *BuildCertificateCreateBadRequest { + return &BuildCertificateCreateBadRequest{} +} + +/* BuildCertificateCreateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildCertificateCreateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateCreateBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/build-certificates][%d] buildCertificateCreateBadRequest %+v", 400, o.Payload) +} +func (o *BuildCertificateCreateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateCreateUnauthorized creates a BuildCertificateCreateUnauthorized with default headers values +func NewBuildCertificateCreateUnauthorized() *BuildCertificateCreateUnauthorized { + return &BuildCertificateCreateUnauthorized{} +} + +/* BuildCertificateCreateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildCertificateCreateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateCreateUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/build-certificates][%d] buildCertificateCreateUnauthorized %+v", 401, o.Payload) +} +func (o *BuildCertificateCreateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateCreateNotFound creates a BuildCertificateCreateNotFound with default headers values +func NewBuildCertificateCreateNotFound() *BuildCertificateCreateNotFound { + return &BuildCertificateCreateNotFound{} +} + +/* BuildCertificateCreateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildCertificateCreateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateCreateNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/build-certificates][%d] buildCertificateCreateNotFound %+v", 404, o.Payload) +} +func (o *BuildCertificateCreateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateCreateInternalServerError creates a BuildCertificateCreateInternalServerError with default headers values +func NewBuildCertificateCreateInternalServerError() *BuildCertificateCreateInternalServerError { + return &BuildCertificateCreateInternalServerError{} +} + +/* BuildCertificateCreateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildCertificateCreateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateCreateInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/build-certificates][%d] buildCertificateCreateInternalServerError %+v", 500, o.Payload) +} +func (o *BuildCertificateCreateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_certificate_delete_parameters.go b/go/client/operations/build_certificate_delete_parameters.go new file mode 100644 index 0000000..2de6712 --- /dev/null +++ b/go/client/operations/build_certificate_delete_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBuildCertificateDeleteParams creates a new BuildCertificateDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildCertificateDeleteParams() *BuildCertificateDeleteParams { + return &BuildCertificateDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildCertificateDeleteParamsWithTimeout creates a new BuildCertificateDeleteParams object +// with the ability to set a timeout on a request. +func NewBuildCertificateDeleteParamsWithTimeout(timeout time.Duration) *BuildCertificateDeleteParams { + return &BuildCertificateDeleteParams{ + timeout: timeout, + } +} + +// NewBuildCertificateDeleteParamsWithContext creates a new BuildCertificateDeleteParams object +// with the ability to set a context for a request. +func NewBuildCertificateDeleteParamsWithContext(ctx context.Context) *BuildCertificateDeleteParams { + return &BuildCertificateDeleteParams{ + Context: ctx, + } +} + +// NewBuildCertificateDeleteParamsWithHTTPClient creates a new BuildCertificateDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildCertificateDeleteParamsWithHTTPClient(client *http.Client) *BuildCertificateDeleteParams { + return &BuildCertificateDeleteParams{ + HTTPClient: client, + } +} + +/* BuildCertificateDeleteParams contains all the parameters to send to the API endpoint + for the build certificate delete operation. + + Typically these are written to a http.Request. +*/ +type BuildCertificateDeleteParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildCertificateSlug. + + Build certificate slug + */ + BuildCertificateSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build certificate delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateDeleteParams) WithDefaults() *BuildCertificateDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build certificate delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build certificate delete params +func (o *BuildCertificateDeleteParams) WithTimeout(timeout time.Duration) *BuildCertificateDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build certificate delete params +func (o *BuildCertificateDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build certificate delete params +func (o *BuildCertificateDeleteParams) WithContext(ctx context.Context) *BuildCertificateDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build certificate delete params +func (o *BuildCertificateDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build certificate delete params +func (o *BuildCertificateDeleteParams) WithHTTPClient(client *http.Client) *BuildCertificateDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build certificate delete params +func (o *BuildCertificateDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build certificate delete params +func (o *BuildCertificateDeleteParams) WithAppSlug(appSlug string) *BuildCertificateDeleteParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build certificate delete params +func (o *BuildCertificateDeleteParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildCertificateSlug adds the buildCertificateSlug to the build certificate delete params +func (o *BuildCertificateDeleteParams) WithBuildCertificateSlug(buildCertificateSlug string) *BuildCertificateDeleteParams { + o.SetBuildCertificateSlug(buildCertificateSlug) + return o +} + +// SetBuildCertificateSlug adds the buildCertificateSlug to the build certificate delete params +func (o *BuildCertificateDeleteParams) SetBuildCertificateSlug(buildCertificateSlug string) { + o.BuildCertificateSlug = buildCertificateSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildCertificateDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param build-certificate-slug + if err := r.SetPathParam("build-certificate-slug", o.BuildCertificateSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_certificate_delete_responses.go b/go/client/operations/build_certificate_delete_responses.go new file mode 100644 index 0000000..3939423 --- /dev/null +++ b/go/client/operations/build_certificate_delete_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildCertificateDeleteReader is a Reader for the BuildCertificateDelete structure. +type BuildCertificateDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildCertificateDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildCertificateDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildCertificateDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildCertificateDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildCertificateDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildCertificateDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildCertificateDeleteOK creates a BuildCertificateDeleteOK with default headers values +func NewBuildCertificateDeleteOK() *BuildCertificateDeleteOK { + return &BuildCertificateDeleteOK{} +} + +/* BuildCertificateDeleteOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildCertificateDeleteOK struct { + Payload *models.V0BuildCertificateResponseModel +} + +func (o *BuildCertificateDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateDeleteOK %+v", 200, o.Payload) +} +func (o *BuildCertificateDeleteOK) GetPayload() *models.V0BuildCertificateResponseModel { + return o.Payload +} + +func (o *BuildCertificateDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildCertificateResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateDeleteBadRequest creates a BuildCertificateDeleteBadRequest with default headers values +func NewBuildCertificateDeleteBadRequest() *BuildCertificateDeleteBadRequest { + return &BuildCertificateDeleteBadRequest{} +} + +/* BuildCertificateDeleteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildCertificateDeleteBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateDeleteBadRequest) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateDeleteBadRequest %+v", 400, o.Payload) +} +func (o *BuildCertificateDeleteBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateDeleteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateDeleteUnauthorized creates a BuildCertificateDeleteUnauthorized with default headers values +func NewBuildCertificateDeleteUnauthorized() *BuildCertificateDeleteUnauthorized { + return &BuildCertificateDeleteUnauthorized{} +} + +/* BuildCertificateDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildCertificateDeleteUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateDeleteUnauthorized %+v", 401, o.Payload) +} +func (o *BuildCertificateDeleteUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateDeleteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateDeleteNotFound creates a BuildCertificateDeleteNotFound with default headers values +func NewBuildCertificateDeleteNotFound() *BuildCertificateDeleteNotFound { + return &BuildCertificateDeleteNotFound{} +} + +/* BuildCertificateDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildCertificateDeleteNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateDeleteNotFound %+v", 404, o.Payload) +} +func (o *BuildCertificateDeleteNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateDeleteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateDeleteInternalServerError creates a BuildCertificateDeleteInternalServerError with default headers values +func NewBuildCertificateDeleteInternalServerError() *BuildCertificateDeleteInternalServerError { + return &BuildCertificateDeleteInternalServerError{} +} + +/* BuildCertificateDeleteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildCertificateDeleteInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateDeleteInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateDeleteInternalServerError %+v", 500, o.Payload) +} +func (o *BuildCertificateDeleteInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateDeleteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_certificate_list_parameters.go b/go/client/operations/build_certificate_list_parameters.go new file mode 100644 index 0000000..3a85c5f --- /dev/null +++ b/go/client/operations/build_certificate_list_parameters.go @@ -0,0 +1,218 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBuildCertificateListParams creates a new BuildCertificateListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildCertificateListParams() *BuildCertificateListParams { + return &BuildCertificateListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildCertificateListParamsWithTimeout creates a new BuildCertificateListParams object +// with the ability to set a timeout on a request. +func NewBuildCertificateListParamsWithTimeout(timeout time.Duration) *BuildCertificateListParams { + return &BuildCertificateListParams{ + timeout: timeout, + } +} + +// NewBuildCertificateListParamsWithContext creates a new BuildCertificateListParams object +// with the ability to set a context for a request. +func NewBuildCertificateListParamsWithContext(ctx context.Context) *BuildCertificateListParams { + return &BuildCertificateListParams{ + Context: ctx, + } +} + +// NewBuildCertificateListParamsWithHTTPClient creates a new BuildCertificateListParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildCertificateListParamsWithHTTPClient(client *http.Client) *BuildCertificateListParams { + return &BuildCertificateListParams{ + HTTPClient: client, + } +} + +/* BuildCertificateListParams contains all the parameters to send to the API endpoint + for the build certificate list operation. + + Typically these are written to a http.Request. +*/ +type BuildCertificateListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* Limit. + + Max number of build certificates per page is 50. + */ + Limit *int64 + + /* Next. + + Slug of the first build certificate in the response + */ + Next *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build certificate list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateListParams) WithDefaults() *BuildCertificateListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build certificate list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build certificate list params +func (o *BuildCertificateListParams) WithTimeout(timeout time.Duration) *BuildCertificateListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build certificate list params +func (o *BuildCertificateListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build certificate list params +func (o *BuildCertificateListParams) WithContext(ctx context.Context) *BuildCertificateListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build certificate list params +func (o *BuildCertificateListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build certificate list params +func (o *BuildCertificateListParams) WithHTTPClient(client *http.Client) *BuildCertificateListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build certificate list params +func (o *BuildCertificateListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build certificate list params +func (o *BuildCertificateListParams) WithAppSlug(appSlug string) *BuildCertificateListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build certificate list params +func (o *BuildCertificateListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithLimit adds the limit to the build certificate list params +func (o *BuildCertificateListParams) WithLimit(limit *int64) *BuildCertificateListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the build certificate list params +func (o *BuildCertificateListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the build certificate list params +func (o *BuildCertificateListParams) WithNext(next *string) *BuildCertificateListParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the build certificate list params +func (o *BuildCertificateListParams) SetNext(next *string) { + o.Next = next +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildCertificateListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_certificate_list_responses.go b/go/client/operations/build_certificate_list_responses.go new file mode 100644 index 0000000..1c53d11 --- /dev/null +++ b/go/client/operations/build_certificate_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildCertificateListReader is a Reader for the BuildCertificateList structure. +type BuildCertificateListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildCertificateListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildCertificateListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildCertificateListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildCertificateListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildCertificateListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildCertificateListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildCertificateListOK creates a BuildCertificateListOK with default headers values +func NewBuildCertificateListOK() *BuildCertificateListOK { + return &BuildCertificateListOK{} +} + +/* BuildCertificateListOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildCertificateListOK struct { + Payload *models.V0BuildCertificateListResponseModel +} + +func (o *BuildCertificateListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-certificates][%d] buildCertificateListOK %+v", 200, o.Payload) +} +func (o *BuildCertificateListOK) GetPayload() *models.V0BuildCertificateListResponseModel { + return o.Payload +} + +func (o *BuildCertificateListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildCertificateListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateListBadRequest creates a BuildCertificateListBadRequest with default headers values +func NewBuildCertificateListBadRequest() *BuildCertificateListBadRequest { + return &BuildCertificateListBadRequest{} +} + +/* BuildCertificateListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildCertificateListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-certificates][%d] buildCertificateListBadRequest %+v", 400, o.Payload) +} +func (o *BuildCertificateListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateListUnauthorized creates a BuildCertificateListUnauthorized with default headers values +func NewBuildCertificateListUnauthorized() *BuildCertificateListUnauthorized { + return &BuildCertificateListUnauthorized{} +} + +/* BuildCertificateListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildCertificateListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-certificates][%d] buildCertificateListUnauthorized %+v", 401, o.Payload) +} +func (o *BuildCertificateListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateListNotFound creates a BuildCertificateListNotFound with default headers values +func NewBuildCertificateListNotFound() *BuildCertificateListNotFound { + return &BuildCertificateListNotFound{} +} + +/* BuildCertificateListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildCertificateListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateListNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-certificates][%d] buildCertificateListNotFound %+v", 404, o.Payload) +} +func (o *BuildCertificateListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateListInternalServerError creates a BuildCertificateListInternalServerError with default headers values +func NewBuildCertificateListInternalServerError() *BuildCertificateListInternalServerError { + return &BuildCertificateListInternalServerError{} +} + +/* BuildCertificateListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildCertificateListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-certificates][%d] buildCertificateListInternalServerError %+v", 500, o.Payload) +} +func (o *BuildCertificateListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_certificate_show_parameters.go b/go/client/operations/build_certificate_show_parameters.go new file mode 100644 index 0000000..1efd15e --- /dev/null +++ b/go/client/operations/build_certificate_show_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBuildCertificateShowParams creates a new BuildCertificateShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildCertificateShowParams() *BuildCertificateShowParams { + return &BuildCertificateShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildCertificateShowParamsWithTimeout creates a new BuildCertificateShowParams object +// with the ability to set a timeout on a request. +func NewBuildCertificateShowParamsWithTimeout(timeout time.Duration) *BuildCertificateShowParams { + return &BuildCertificateShowParams{ + timeout: timeout, + } +} + +// NewBuildCertificateShowParamsWithContext creates a new BuildCertificateShowParams object +// with the ability to set a context for a request. +func NewBuildCertificateShowParamsWithContext(ctx context.Context) *BuildCertificateShowParams { + return &BuildCertificateShowParams{ + Context: ctx, + } +} + +// NewBuildCertificateShowParamsWithHTTPClient creates a new BuildCertificateShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildCertificateShowParamsWithHTTPClient(client *http.Client) *BuildCertificateShowParams { + return &BuildCertificateShowParams{ + HTTPClient: client, + } +} + +/* BuildCertificateShowParams contains all the parameters to send to the API endpoint + for the build certificate show operation. + + Typically these are written to a http.Request. +*/ +type BuildCertificateShowParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildCertificateSlug. + + Build certificate slug + */ + BuildCertificateSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build certificate show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateShowParams) WithDefaults() *BuildCertificateShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build certificate show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build certificate show params +func (o *BuildCertificateShowParams) WithTimeout(timeout time.Duration) *BuildCertificateShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build certificate show params +func (o *BuildCertificateShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build certificate show params +func (o *BuildCertificateShowParams) WithContext(ctx context.Context) *BuildCertificateShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build certificate show params +func (o *BuildCertificateShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build certificate show params +func (o *BuildCertificateShowParams) WithHTTPClient(client *http.Client) *BuildCertificateShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build certificate show params +func (o *BuildCertificateShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build certificate show params +func (o *BuildCertificateShowParams) WithAppSlug(appSlug string) *BuildCertificateShowParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build certificate show params +func (o *BuildCertificateShowParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildCertificateSlug adds the buildCertificateSlug to the build certificate show params +func (o *BuildCertificateShowParams) WithBuildCertificateSlug(buildCertificateSlug string) *BuildCertificateShowParams { + o.SetBuildCertificateSlug(buildCertificateSlug) + return o +} + +// SetBuildCertificateSlug adds the buildCertificateSlug to the build certificate show params +func (o *BuildCertificateShowParams) SetBuildCertificateSlug(buildCertificateSlug string) { + o.BuildCertificateSlug = buildCertificateSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildCertificateShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param build-certificate-slug + if err := r.SetPathParam("build-certificate-slug", o.BuildCertificateSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_certificate_show_responses.go b/go/client/operations/build_certificate_show_responses.go new file mode 100644 index 0000000..692ccdb --- /dev/null +++ b/go/client/operations/build_certificate_show_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildCertificateShowReader is a Reader for the BuildCertificateShow structure. +type BuildCertificateShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildCertificateShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildCertificateShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildCertificateShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildCertificateShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildCertificateShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildCertificateShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildCertificateShowOK creates a BuildCertificateShowOK with default headers values +func NewBuildCertificateShowOK() *BuildCertificateShowOK { + return &BuildCertificateShowOK{} +} + +/* BuildCertificateShowOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildCertificateShowOK struct { + Payload *models.V0BuildCertificateResponseModel +} + +func (o *BuildCertificateShowOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateShowOK %+v", 200, o.Payload) +} +func (o *BuildCertificateShowOK) GetPayload() *models.V0BuildCertificateResponseModel { + return o.Payload +} + +func (o *BuildCertificateShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildCertificateResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateShowBadRequest creates a BuildCertificateShowBadRequest with default headers values +func NewBuildCertificateShowBadRequest() *BuildCertificateShowBadRequest { + return &BuildCertificateShowBadRequest{} +} + +/* BuildCertificateShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildCertificateShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateShowBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateShowBadRequest %+v", 400, o.Payload) +} +func (o *BuildCertificateShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateShowUnauthorized creates a BuildCertificateShowUnauthorized with default headers values +func NewBuildCertificateShowUnauthorized() *BuildCertificateShowUnauthorized { + return &BuildCertificateShowUnauthorized{} +} + +/* BuildCertificateShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildCertificateShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateShowUnauthorized %+v", 401, o.Payload) +} +func (o *BuildCertificateShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateShowNotFound creates a BuildCertificateShowNotFound with default headers values +func NewBuildCertificateShowNotFound() *BuildCertificateShowNotFound { + return &BuildCertificateShowNotFound{} +} + +/* BuildCertificateShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildCertificateShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateShowNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateShowNotFound %+v", 404, o.Payload) +} +func (o *BuildCertificateShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateShowInternalServerError creates a BuildCertificateShowInternalServerError with default headers values +func NewBuildCertificateShowInternalServerError() *BuildCertificateShowInternalServerError { + return &BuildCertificateShowInternalServerError{} +} + +/* BuildCertificateShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildCertificateShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateShowInternalServerError %+v", 500, o.Payload) +} +func (o *BuildCertificateShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_certificate_update_parameters.go b/go/client/operations/build_certificate_update_parameters.go new file mode 100644 index 0000000..871b4ec --- /dev/null +++ b/go/client/operations/build_certificate_update_parameters.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewBuildCertificateUpdateParams creates a new BuildCertificateUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildCertificateUpdateParams() *BuildCertificateUpdateParams { + return &BuildCertificateUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildCertificateUpdateParamsWithTimeout creates a new BuildCertificateUpdateParams object +// with the ability to set a timeout on a request. +func NewBuildCertificateUpdateParamsWithTimeout(timeout time.Duration) *BuildCertificateUpdateParams { + return &BuildCertificateUpdateParams{ + timeout: timeout, + } +} + +// NewBuildCertificateUpdateParamsWithContext creates a new BuildCertificateUpdateParams object +// with the ability to set a context for a request. +func NewBuildCertificateUpdateParamsWithContext(ctx context.Context) *BuildCertificateUpdateParams { + return &BuildCertificateUpdateParams{ + Context: ctx, + } +} + +// NewBuildCertificateUpdateParamsWithHTTPClient creates a new BuildCertificateUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildCertificateUpdateParamsWithHTTPClient(client *http.Client) *BuildCertificateUpdateParams { + return &BuildCertificateUpdateParams{ + HTTPClient: client, + } +} + +/* BuildCertificateUpdateParams contains all the parameters to send to the API endpoint + for the build certificate update operation. + + Typically these are written to a http.Request. +*/ +type BuildCertificateUpdateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildCertificate. + + Build certificate parameters + */ + BuildCertificate *models.V0BuildCertificateUpdateParams + + /* BuildCertificateSlug. + + Build certificate slug + */ + BuildCertificateSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build certificate update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateUpdateParams) WithDefaults() *BuildCertificateUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build certificate update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildCertificateUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build certificate update params +func (o *BuildCertificateUpdateParams) WithTimeout(timeout time.Duration) *BuildCertificateUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build certificate update params +func (o *BuildCertificateUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build certificate update params +func (o *BuildCertificateUpdateParams) WithContext(ctx context.Context) *BuildCertificateUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build certificate update params +func (o *BuildCertificateUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build certificate update params +func (o *BuildCertificateUpdateParams) WithHTTPClient(client *http.Client) *BuildCertificateUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build certificate update params +func (o *BuildCertificateUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build certificate update params +func (o *BuildCertificateUpdateParams) WithAppSlug(appSlug string) *BuildCertificateUpdateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build certificate update params +func (o *BuildCertificateUpdateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildCertificate adds the buildCertificate to the build certificate update params +func (o *BuildCertificateUpdateParams) WithBuildCertificate(buildCertificate *models.V0BuildCertificateUpdateParams) *BuildCertificateUpdateParams { + o.SetBuildCertificate(buildCertificate) + return o +} + +// SetBuildCertificate adds the buildCertificate to the build certificate update params +func (o *BuildCertificateUpdateParams) SetBuildCertificate(buildCertificate *models.V0BuildCertificateUpdateParams) { + o.BuildCertificate = buildCertificate +} + +// WithBuildCertificateSlug adds the buildCertificateSlug to the build certificate update params +func (o *BuildCertificateUpdateParams) WithBuildCertificateSlug(buildCertificateSlug string) *BuildCertificateUpdateParams { + o.SetBuildCertificateSlug(buildCertificateSlug) + return o +} + +// SetBuildCertificateSlug adds the buildCertificateSlug to the build certificate update params +func (o *BuildCertificateUpdateParams) SetBuildCertificateSlug(buildCertificateSlug string) { + o.BuildCertificateSlug = buildCertificateSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildCertificateUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.BuildCertificate != nil { + if err := r.SetBodyParam(o.BuildCertificate); err != nil { + return err + } + } + + // path param build-certificate-slug + if err := r.SetPathParam("build-certificate-slug", o.BuildCertificateSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_certificate_update_responses.go b/go/client/operations/build_certificate_update_responses.go new file mode 100644 index 0000000..29c196c --- /dev/null +++ b/go/client/operations/build_certificate_update_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildCertificateUpdateReader is a Reader for the BuildCertificateUpdate structure. +type BuildCertificateUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildCertificateUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildCertificateUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildCertificateUpdateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildCertificateUpdateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildCertificateUpdateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildCertificateUpdateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildCertificateUpdateOK creates a BuildCertificateUpdateOK with default headers values +func NewBuildCertificateUpdateOK() *BuildCertificateUpdateOK { + return &BuildCertificateUpdateOK{} +} + +/* BuildCertificateUpdateOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildCertificateUpdateOK struct { + Payload *models.V0BuildCertificateResponseModel +} + +func (o *BuildCertificateUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateUpdateOK %+v", 200, o.Payload) +} +func (o *BuildCertificateUpdateOK) GetPayload() *models.V0BuildCertificateResponseModel { + return o.Payload +} + +func (o *BuildCertificateUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildCertificateResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateUpdateBadRequest creates a BuildCertificateUpdateBadRequest with default headers values +func NewBuildCertificateUpdateBadRequest() *BuildCertificateUpdateBadRequest { + return &BuildCertificateUpdateBadRequest{} +} + +/* BuildCertificateUpdateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildCertificateUpdateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateUpdateBadRequest) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateUpdateBadRequest %+v", 400, o.Payload) +} +func (o *BuildCertificateUpdateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateUpdateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateUpdateUnauthorized creates a BuildCertificateUpdateUnauthorized with default headers values +func NewBuildCertificateUpdateUnauthorized() *BuildCertificateUpdateUnauthorized { + return &BuildCertificateUpdateUnauthorized{} +} + +/* BuildCertificateUpdateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildCertificateUpdateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateUpdateUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateUpdateUnauthorized %+v", 401, o.Payload) +} +func (o *BuildCertificateUpdateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateUpdateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateUpdateNotFound creates a BuildCertificateUpdateNotFound with default headers values +func NewBuildCertificateUpdateNotFound() *BuildCertificateUpdateNotFound { + return &BuildCertificateUpdateNotFound{} +} + +/* BuildCertificateUpdateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildCertificateUpdateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateUpdateNotFound) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateUpdateNotFound %+v", 404, o.Payload) +} +func (o *BuildCertificateUpdateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateUpdateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildCertificateUpdateInternalServerError creates a BuildCertificateUpdateInternalServerError with default headers values +func NewBuildCertificateUpdateInternalServerError() *BuildCertificateUpdateInternalServerError { + return &BuildCertificateUpdateInternalServerError{} +} + +/* BuildCertificateUpdateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildCertificateUpdateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildCertificateUpdateInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/build-certificates/{build-certificate-slug}][%d] buildCertificateUpdateInternalServerError %+v", 500, o.Payload) +} +func (o *BuildCertificateUpdateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildCertificateUpdateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_list_all_parameters.go b/go/client/operations/build_list_all_parameters.go new file mode 100644 index 0000000..e03cde4 --- /dev/null +++ b/go/client/operations/build_list_all_parameters.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBuildListAllParams creates a new BuildListAllParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildListAllParams() *BuildListAllParams { + return &BuildListAllParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildListAllParamsWithTimeout creates a new BuildListAllParams object +// with the ability to set a timeout on a request. +func NewBuildListAllParamsWithTimeout(timeout time.Duration) *BuildListAllParams { + return &BuildListAllParams{ + timeout: timeout, + } +} + +// NewBuildListAllParamsWithContext creates a new BuildListAllParams object +// with the ability to set a context for a request. +func NewBuildListAllParamsWithContext(ctx context.Context) *BuildListAllParams { + return &BuildListAllParams{ + Context: ctx, + } +} + +// NewBuildListAllParamsWithHTTPClient creates a new BuildListAllParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildListAllParamsWithHTTPClient(client *http.Client) *BuildListAllParams { + return &BuildListAllParams{ + HTTPClient: client, + } +} + +/* BuildListAllParams contains all the parameters to send to the API endpoint + for the build list all operation. + + Typically these are written to a http.Request. +*/ +type BuildListAllParams struct { + + /* IsOnHold. + + Indicates whether the build has started yet (true: the build hasn't started) + */ + IsOnHold *bool + + /* Limit. + + Max number of elements per page (default: 50) + */ + Limit *int64 + + /* Next. + + Slug of the first build in the response + */ + Next *string + + /* OwnerSlug. + + The slug of the owner of the app or apps + */ + OwnerSlug *string + + /* Status. + + The status of the build: not finished (0), successful (1), failed (2), aborted with failure (3), aborted with success (4) + */ + Status *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build list all params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildListAllParams) WithDefaults() *BuildListAllParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build list all params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildListAllParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build list all params +func (o *BuildListAllParams) WithTimeout(timeout time.Duration) *BuildListAllParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build list all params +func (o *BuildListAllParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build list all params +func (o *BuildListAllParams) WithContext(ctx context.Context) *BuildListAllParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build list all params +func (o *BuildListAllParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build list all params +func (o *BuildListAllParams) WithHTTPClient(client *http.Client) *BuildListAllParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build list all params +func (o *BuildListAllParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIsOnHold adds the isOnHold to the build list all params +func (o *BuildListAllParams) WithIsOnHold(isOnHold *bool) *BuildListAllParams { + o.SetIsOnHold(isOnHold) + return o +} + +// SetIsOnHold adds the isOnHold to the build list all params +func (o *BuildListAllParams) SetIsOnHold(isOnHold *bool) { + o.IsOnHold = isOnHold +} + +// WithLimit adds the limit to the build list all params +func (o *BuildListAllParams) WithLimit(limit *int64) *BuildListAllParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the build list all params +func (o *BuildListAllParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the build list all params +func (o *BuildListAllParams) WithNext(next *string) *BuildListAllParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the build list all params +func (o *BuildListAllParams) SetNext(next *string) { + o.Next = next +} + +// WithOwnerSlug adds the ownerSlug to the build list all params +func (o *BuildListAllParams) WithOwnerSlug(ownerSlug *string) *BuildListAllParams { + o.SetOwnerSlug(ownerSlug) + return o +} + +// SetOwnerSlug adds the ownerSlug to the build list all params +func (o *BuildListAllParams) SetOwnerSlug(ownerSlug *string) { + o.OwnerSlug = ownerSlug +} + +// WithStatus adds the status to the build list all params +func (o *BuildListAllParams) WithStatus(status *int64) *BuildListAllParams { + o.SetStatus(status) + return o +} + +// SetStatus adds the status to the build list all params +func (o *BuildListAllParams) SetStatus(status *int64) { + o.Status = status +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildListAllParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IsOnHold != nil { + + // query param is_on_hold + var qrIsOnHold bool + + if o.IsOnHold != nil { + qrIsOnHold = *o.IsOnHold + } + qIsOnHold := swag.FormatBool(qrIsOnHold) + if qIsOnHold != "" { + + if err := r.SetQueryParam("is_on_hold", qIsOnHold); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if o.OwnerSlug != nil { + + // query param owner_slug + var qrOwnerSlug string + + if o.OwnerSlug != nil { + qrOwnerSlug = *o.OwnerSlug + } + qOwnerSlug := qrOwnerSlug + if qOwnerSlug != "" { + + if err := r.SetQueryParam("owner_slug", qOwnerSlug); err != nil { + return err + } + } + } + + if o.Status != nil { + + // query param status + var qrStatus int64 + + if o.Status != nil { + qrStatus = *o.Status + } + qStatus := swag.FormatInt64(qrStatus) + if qStatus != "" { + + if err := r.SetQueryParam("status", qStatus); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_list_all_responses.go b/go/client/operations/build_list_all_responses.go new file mode 100644 index 0000000..2715580 --- /dev/null +++ b/go/client/operations/build_list_all_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildListAllReader is a Reader for the BuildListAll structure. +type BuildListAllReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildListAllReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildListAllOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildListAllBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildListAllUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildListAllNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildListAllInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildListAllOK creates a BuildListAllOK with default headers values +func NewBuildListAllOK() *BuildListAllOK { + return &BuildListAllOK{} +} + +/* BuildListAllOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildListAllOK struct { + Payload *models.V0BuildListAllResponseModel +} + +func (o *BuildListAllOK) Error() string { + return fmt.Sprintf("[GET /builds][%d] buildListAllOK %+v", 200, o.Payload) +} +func (o *BuildListAllOK) GetPayload() *models.V0BuildListAllResponseModel { + return o.Payload +} + +func (o *BuildListAllOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildListAllResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildListAllBadRequest creates a BuildListAllBadRequest with default headers values +func NewBuildListAllBadRequest() *BuildListAllBadRequest { + return &BuildListAllBadRequest{} +} + +/* BuildListAllBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildListAllBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildListAllBadRequest) Error() string { + return fmt.Sprintf("[GET /builds][%d] buildListAllBadRequest %+v", 400, o.Payload) +} +func (o *BuildListAllBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildListAllBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildListAllUnauthorized creates a BuildListAllUnauthorized with default headers values +func NewBuildListAllUnauthorized() *BuildListAllUnauthorized { + return &BuildListAllUnauthorized{} +} + +/* BuildListAllUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildListAllUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildListAllUnauthorized) Error() string { + return fmt.Sprintf("[GET /builds][%d] buildListAllUnauthorized %+v", 401, o.Payload) +} +func (o *BuildListAllUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildListAllUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildListAllNotFound creates a BuildListAllNotFound with default headers values +func NewBuildListAllNotFound() *BuildListAllNotFound { + return &BuildListAllNotFound{} +} + +/* BuildListAllNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildListAllNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildListAllNotFound) Error() string { + return fmt.Sprintf("[GET /builds][%d] buildListAllNotFound %+v", 404, o.Payload) +} +func (o *BuildListAllNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildListAllNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildListAllInternalServerError creates a BuildListAllInternalServerError with default headers values +func NewBuildListAllInternalServerError() *BuildListAllInternalServerError { + return &BuildListAllInternalServerError{} +} + +/* BuildListAllInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildListAllInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildListAllInternalServerError) Error() string { + return fmt.Sprintf("[GET /builds][%d] buildListAllInternalServerError %+v", 500, o.Payload) +} +func (o *BuildListAllInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildListAllInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_list_parameters.go b/go/client/operations/build_list_parameters.go new file mode 100644 index 0000000..0e5473a --- /dev/null +++ b/go/client/operations/build_list_parameters.go @@ -0,0 +1,558 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBuildListParams creates a new BuildListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildListParams() *BuildListParams { + return &BuildListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildListParamsWithTimeout creates a new BuildListParams object +// with the ability to set a timeout on a request. +func NewBuildListParamsWithTimeout(timeout time.Duration) *BuildListParams { + return &BuildListParams{ + timeout: timeout, + } +} + +// NewBuildListParamsWithContext creates a new BuildListParams object +// with the ability to set a context for a request. +func NewBuildListParamsWithContext(ctx context.Context) *BuildListParams { + return &BuildListParams{ + Context: ctx, + } +} + +// NewBuildListParamsWithHTTPClient creates a new BuildListParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildListParamsWithHTTPClient(client *http.Client) *BuildListParams { + return &BuildListParams{ + HTTPClient: client, + } +} + +/* BuildListParams contains all the parameters to send to the API endpoint + for the build list operation. + + Typically these are written to a http.Request. +*/ +type BuildListParams struct { + + /* After. + + List builds run after a given date (Unix Timestamp) + */ + After *int64 + + /* AppSlug. + + App slug + */ + AppSlug string + + /* Before. + + List builds run before a given date (Unix Timestamp) + */ + Before *int64 + + /* Branch. + + The branch which was built + */ + Branch *string + + /* BuildNumber. + + The build number + */ + BuildNumber *int64 + + /* CommitMessage. + + The commit message of the build + */ + CommitMessage *string + + /* Limit. + + Max number of elements per page (default: 50) + */ + Limit *int64 + + /* Next. + + Slug of the first build in the response + */ + Next *string + + /* PullRequestID. + + The id of the pull request that triggered the build + */ + PullRequestID *int64 + + /* SortBy. + + Order of builds: sort them based on when they were created or the time when they were triggered + */ + SortBy *string + + /* Status. + + The status of the build: not finished (0), successful (1), failed (2), aborted with failure (3), aborted with success (4) + */ + Status *int64 + + /* TriggerEventType. + + The event that triggered the build (push, pull-request, tag) + */ + TriggerEventType *string + + /* Workflow. + + The name of the workflow used for the build + */ + Workflow *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildListParams) WithDefaults() *BuildListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build list params +func (o *BuildListParams) WithTimeout(timeout time.Duration) *BuildListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build list params +func (o *BuildListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build list params +func (o *BuildListParams) WithContext(ctx context.Context) *BuildListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build list params +func (o *BuildListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build list params +func (o *BuildListParams) WithHTTPClient(client *http.Client) *BuildListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build list params +func (o *BuildListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAfter adds the after to the build list params +func (o *BuildListParams) WithAfter(after *int64) *BuildListParams { + o.SetAfter(after) + return o +} + +// SetAfter adds the after to the build list params +func (o *BuildListParams) SetAfter(after *int64) { + o.After = after +} + +// WithAppSlug adds the appSlug to the build list params +func (o *BuildListParams) WithAppSlug(appSlug string) *BuildListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build list params +func (o *BuildListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBefore adds the before to the build list params +func (o *BuildListParams) WithBefore(before *int64) *BuildListParams { + o.SetBefore(before) + return o +} + +// SetBefore adds the before to the build list params +func (o *BuildListParams) SetBefore(before *int64) { + o.Before = before +} + +// WithBranch adds the branch to the build list params +func (o *BuildListParams) WithBranch(branch *string) *BuildListParams { + o.SetBranch(branch) + return o +} + +// SetBranch adds the branch to the build list params +func (o *BuildListParams) SetBranch(branch *string) { + o.Branch = branch +} + +// WithBuildNumber adds the buildNumber to the build list params +func (o *BuildListParams) WithBuildNumber(buildNumber *int64) *BuildListParams { + o.SetBuildNumber(buildNumber) + return o +} + +// SetBuildNumber adds the buildNumber to the build list params +func (o *BuildListParams) SetBuildNumber(buildNumber *int64) { + o.BuildNumber = buildNumber +} + +// WithCommitMessage adds the commitMessage to the build list params +func (o *BuildListParams) WithCommitMessage(commitMessage *string) *BuildListParams { + o.SetCommitMessage(commitMessage) + return o +} + +// SetCommitMessage adds the commitMessage to the build list params +func (o *BuildListParams) SetCommitMessage(commitMessage *string) { + o.CommitMessage = commitMessage +} + +// WithLimit adds the limit to the build list params +func (o *BuildListParams) WithLimit(limit *int64) *BuildListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the build list params +func (o *BuildListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the build list params +func (o *BuildListParams) WithNext(next *string) *BuildListParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the build list params +func (o *BuildListParams) SetNext(next *string) { + o.Next = next +} + +// WithPullRequestID adds the pullRequestID to the build list params +func (o *BuildListParams) WithPullRequestID(pullRequestID *int64) *BuildListParams { + o.SetPullRequestID(pullRequestID) + return o +} + +// SetPullRequestID adds the pullRequestId to the build list params +func (o *BuildListParams) SetPullRequestID(pullRequestID *int64) { + o.PullRequestID = pullRequestID +} + +// WithSortBy adds the sortBy to the build list params +func (o *BuildListParams) WithSortBy(sortBy *string) *BuildListParams { + o.SetSortBy(sortBy) + return o +} + +// SetSortBy adds the sortBy to the build list params +func (o *BuildListParams) SetSortBy(sortBy *string) { + o.SortBy = sortBy +} + +// WithStatus adds the status to the build list params +func (o *BuildListParams) WithStatus(status *int64) *BuildListParams { + o.SetStatus(status) + return o +} + +// SetStatus adds the status to the build list params +func (o *BuildListParams) SetStatus(status *int64) { + o.Status = status +} + +// WithTriggerEventType adds the triggerEventType to the build list params +func (o *BuildListParams) WithTriggerEventType(triggerEventType *string) *BuildListParams { + o.SetTriggerEventType(triggerEventType) + return o +} + +// SetTriggerEventType adds the triggerEventType to the build list params +func (o *BuildListParams) SetTriggerEventType(triggerEventType *string) { + o.TriggerEventType = triggerEventType +} + +// WithWorkflow adds the workflow to the build list params +func (o *BuildListParams) WithWorkflow(workflow *string) *BuildListParams { + o.SetWorkflow(workflow) + return o +} + +// SetWorkflow adds the workflow to the build list params +func (o *BuildListParams) SetWorkflow(workflow *string) { + o.Workflow = workflow +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.After != nil { + + // query param after + var qrAfter int64 + + if o.After != nil { + qrAfter = *o.After + } + qAfter := swag.FormatInt64(qrAfter) + if qAfter != "" { + + if err := r.SetQueryParam("after", qAfter); err != nil { + return err + } + } + } + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if o.Before != nil { + + // query param before + var qrBefore int64 + + if o.Before != nil { + qrBefore = *o.Before + } + qBefore := swag.FormatInt64(qrBefore) + if qBefore != "" { + + if err := r.SetQueryParam("before", qBefore); err != nil { + return err + } + } + } + + if o.Branch != nil { + + // query param branch + var qrBranch string + + if o.Branch != nil { + qrBranch = *o.Branch + } + qBranch := qrBranch + if qBranch != "" { + + if err := r.SetQueryParam("branch", qBranch); err != nil { + return err + } + } + } + + if o.BuildNumber != nil { + + // query param build_number + var qrBuildNumber int64 + + if o.BuildNumber != nil { + qrBuildNumber = *o.BuildNumber + } + qBuildNumber := swag.FormatInt64(qrBuildNumber) + if qBuildNumber != "" { + + if err := r.SetQueryParam("build_number", qBuildNumber); err != nil { + return err + } + } + } + + if o.CommitMessage != nil { + + // query param commit_message + var qrCommitMessage string + + if o.CommitMessage != nil { + qrCommitMessage = *o.CommitMessage + } + qCommitMessage := qrCommitMessage + if qCommitMessage != "" { + + if err := r.SetQueryParam("commit_message", qCommitMessage); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if o.PullRequestID != nil { + + // query param pull_request_id + var qrPullRequestID int64 + + if o.PullRequestID != nil { + qrPullRequestID = *o.PullRequestID + } + qPullRequestID := swag.FormatInt64(qrPullRequestID) + if qPullRequestID != "" { + + if err := r.SetQueryParam("pull_request_id", qPullRequestID); err != nil { + return err + } + } + } + + if o.SortBy != nil { + + // query param sort_by + var qrSortBy string + + if o.SortBy != nil { + qrSortBy = *o.SortBy + } + qSortBy := qrSortBy + if qSortBy != "" { + + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { + return err + } + } + } + + if o.Status != nil { + + // query param status + var qrStatus int64 + + if o.Status != nil { + qrStatus = *o.Status + } + qStatus := swag.FormatInt64(qrStatus) + if qStatus != "" { + + if err := r.SetQueryParam("status", qStatus); err != nil { + return err + } + } + } + + if o.TriggerEventType != nil { + + // query param trigger_event_type + var qrTriggerEventType string + + if o.TriggerEventType != nil { + qrTriggerEventType = *o.TriggerEventType + } + qTriggerEventType := qrTriggerEventType + if qTriggerEventType != "" { + + if err := r.SetQueryParam("trigger_event_type", qTriggerEventType); err != nil { + return err + } + } + } + + if o.Workflow != nil { + + // query param workflow + var qrWorkflow string + + if o.Workflow != nil { + qrWorkflow = *o.Workflow + } + qWorkflow := qrWorkflow + if qWorkflow != "" { + + if err := r.SetQueryParam("workflow", qWorkflow); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_list_responses.go b/go/client/operations/build_list_responses.go new file mode 100644 index 0000000..da4547d --- /dev/null +++ b/go/client/operations/build_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildListReader is a Reader for the BuildList structure. +type BuildListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildListOK creates a BuildListOK with default headers values +func NewBuildListOK() *BuildListOK { + return &BuildListOK{} +} + +/* BuildListOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildListOK struct { + Payload *models.V0BuildListResponseModel +} + +func (o *BuildListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds][%d] buildListOK %+v", 200, o.Payload) +} +func (o *BuildListOK) GetPayload() *models.V0BuildListResponseModel { + return o.Payload +} + +func (o *BuildListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildListBadRequest creates a BuildListBadRequest with default headers values +func NewBuildListBadRequest() *BuildListBadRequest { + return &BuildListBadRequest{} +} + +/* BuildListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds][%d] buildListBadRequest %+v", 400, o.Payload) +} +func (o *BuildListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildListUnauthorized creates a BuildListUnauthorized with default headers values +func NewBuildListUnauthorized() *BuildListUnauthorized { + return &BuildListUnauthorized{} +} + +/* BuildListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds][%d] buildListUnauthorized %+v", 401, o.Payload) +} +func (o *BuildListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildListNotFound creates a BuildListNotFound with default headers values +func NewBuildListNotFound() *BuildListNotFound { + return &BuildListNotFound{} +} + +/* BuildListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildListNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds][%d] buildListNotFound %+v", 404, o.Payload) +} +func (o *BuildListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildListInternalServerError creates a BuildListInternalServerError with default headers values +func NewBuildListInternalServerError() *BuildListInternalServerError { + return &BuildListInternalServerError{} +} + +/* BuildListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds][%d] buildListInternalServerError %+v", 500, o.Payload) +} +func (o *BuildListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_log_parameters.go b/go/client/operations/build_log_parameters.go new file mode 100644 index 0000000..f9f67b8 --- /dev/null +++ b/go/client/operations/build_log_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBuildLogParams creates a new BuildLogParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildLogParams() *BuildLogParams { + return &BuildLogParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildLogParamsWithTimeout creates a new BuildLogParams object +// with the ability to set a timeout on a request. +func NewBuildLogParamsWithTimeout(timeout time.Duration) *BuildLogParams { + return &BuildLogParams{ + timeout: timeout, + } +} + +// NewBuildLogParamsWithContext creates a new BuildLogParams object +// with the ability to set a context for a request. +func NewBuildLogParamsWithContext(ctx context.Context) *BuildLogParams { + return &BuildLogParams{ + Context: ctx, + } +} + +// NewBuildLogParamsWithHTTPClient creates a new BuildLogParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildLogParamsWithHTTPClient(client *http.Client) *BuildLogParams { + return &BuildLogParams{ + HTTPClient: client, + } +} + +/* BuildLogParams contains all the parameters to send to the API endpoint + for the build log operation. + + Typically these are written to a http.Request. +*/ +type BuildLogParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildSlug. + + Build slug + */ + BuildSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build log params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildLogParams) WithDefaults() *BuildLogParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build log params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildLogParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build log params +func (o *BuildLogParams) WithTimeout(timeout time.Duration) *BuildLogParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build log params +func (o *BuildLogParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build log params +func (o *BuildLogParams) WithContext(ctx context.Context) *BuildLogParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build log params +func (o *BuildLogParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build log params +func (o *BuildLogParams) WithHTTPClient(client *http.Client) *BuildLogParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build log params +func (o *BuildLogParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build log params +func (o *BuildLogParams) WithAppSlug(appSlug string) *BuildLogParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build log params +func (o *BuildLogParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildSlug adds the buildSlug to the build log params +func (o *BuildLogParams) WithBuildSlug(buildSlug string) *BuildLogParams { + o.SetBuildSlug(buildSlug) + return o +} + +// SetBuildSlug adds the buildSlug to the build log params +func (o *BuildLogParams) SetBuildSlug(buildSlug string) { + o.BuildSlug = buildSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param build-slug + if err := r.SetPathParam("build-slug", o.BuildSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_log_responses.go b/go/client/operations/build_log_responses.go new file mode 100644 index 0000000..41a7678 --- /dev/null +++ b/go/client/operations/build_log_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildLogReader is a Reader for the BuildLog structure. +type BuildLogReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildLogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildLogOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildLogBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildLogUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildLogNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildLogInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildLogOK creates a BuildLogOK with default headers values +func NewBuildLogOK() *BuildLogOK { + return &BuildLogOK{} +} + +/* BuildLogOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildLogOK struct { + Payload *models.V0BuildLogInfoResponseModel +} + +func (o *BuildLogOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/log][%d] buildLogOK %+v", 200, o.Payload) +} +func (o *BuildLogOK) GetPayload() *models.V0BuildLogInfoResponseModel { + return o.Payload +} + +func (o *BuildLogOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildLogInfoResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildLogBadRequest creates a BuildLogBadRequest with default headers values +func NewBuildLogBadRequest() *BuildLogBadRequest { + return &BuildLogBadRequest{} +} + +/* BuildLogBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildLogBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildLogBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/log][%d] buildLogBadRequest %+v", 400, o.Payload) +} +func (o *BuildLogBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildLogBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildLogUnauthorized creates a BuildLogUnauthorized with default headers values +func NewBuildLogUnauthorized() *BuildLogUnauthorized { + return &BuildLogUnauthorized{} +} + +/* BuildLogUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildLogUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildLogUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/log][%d] buildLogUnauthorized %+v", 401, o.Payload) +} +func (o *BuildLogUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildLogUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildLogNotFound creates a BuildLogNotFound with default headers values +func NewBuildLogNotFound() *BuildLogNotFound { + return &BuildLogNotFound{} +} + +/* BuildLogNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildLogNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildLogNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/log][%d] buildLogNotFound %+v", 404, o.Payload) +} +func (o *BuildLogNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildLogNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildLogInternalServerError creates a BuildLogInternalServerError with default headers values +func NewBuildLogInternalServerError() *BuildLogInternalServerError { + return &BuildLogInternalServerError{} +} + +/* BuildLogInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildLogInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildLogInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}/log][%d] buildLogInternalServerError %+v", 500, o.Payload) +} +func (o *BuildLogInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildLogInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_request_list_parameters.go b/go/client/operations/build_request_list_parameters.go new file mode 100644 index 0000000..5e77a35 --- /dev/null +++ b/go/client/operations/build_request_list_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBuildRequestListParams creates a new BuildRequestListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildRequestListParams() *BuildRequestListParams { + return &BuildRequestListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildRequestListParamsWithTimeout creates a new BuildRequestListParams object +// with the ability to set a timeout on a request. +func NewBuildRequestListParamsWithTimeout(timeout time.Duration) *BuildRequestListParams { + return &BuildRequestListParams{ + timeout: timeout, + } +} + +// NewBuildRequestListParamsWithContext creates a new BuildRequestListParams object +// with the ability to set a context for a request. +func NewBuildRequestListParamsWithContext(ctx context.Context) *BuildRequestListParams { + return &BuildRequestListParams{ + Context: ctx, + } +} + +// NewBuildRequestListParamsWithHTTPClient creates a new BuildRequestListParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildRequestListParamsWithHTTPClient(client *http.Client) *BuildRequestListParams { + return &BuildRequestListParams{ + HTTPClient: client, + } +} + +/* BuildRequestListParams contains all the parameters to send to the API endpoint + for the build request list operation. + + Typically these are written to a http.Request. +*/ +type BuildRequestListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build request list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildRequestListParams) WithDefaults() *BuildRequestListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build request list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildRequestListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build request list params +func (o *BuildRequestListParams) WithTimeout(timeout time.Duration) *BuildRequestListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build request list params +func (o *BuildRequestListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build request list params +func (o *BuildRequestListParams) WithContext(ctx context.Context) *BuildRequestListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build request list params +func (o *BuildRequestListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build request list params +func (o *BuildRequestListParams) WithHTTPClient(client *http.Client) *BuildRequestListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build request list params +func (o *BuildRequestListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build request list params +func (o *BuildRequestListParams) WithAppSlug(appSlug string) *BuildRequestListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build request list params +func (o *BuildRequestListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildRequestListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_request_list_responses.go b/go/client/operations/build_request_list_responses.go new file mode 100644 index 0000000..fb5bd6b --- /dev/null +++ b/go/client/operations/build_request_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildRequestListReader is a Reader for the BuildRequestList structure. +type BuildRequestListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildRequestListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildRequestListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildRequestListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildRequestListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildRequestListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildRequestListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildRequestListOK creates a BuildRequestListOK with default headers values +func NewBuildRequestListOK() *BuildRequestListOK { + return &BuildRequestListOK{} +} + +/* BuildRequestListOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildRequestListOK struct { + Payload *models.V0BuildRequestListResponseModel +} + +func (o *BuildRequestListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-requests][%d] buildRequestListOK %+v", 200, o.Payload) +} +func (o *BuildRequestListOK) GetPayload() *models.V0BuildRequestListResponseModel { + return o.Payload +} + +func (o *BuildRequestListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildRequestListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildRequestListBadRequest creates a BuildRequestListBadRequest with default headers values +func NewBuildRequestListBadRequest() *BuildRequestListBadRequest { + return &BuildRequestListBadRequest{} +} + +/* BuildRequestListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildRequestListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildRequestListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-requests][%d] buildRequestListBadRequest %+v", 400, o.Payload) +} +func (o *BuildRequestListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildRequestListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildRequestListUnauthorized creates a BuildRequestListUnauthorized with default headers values +func NewBuildRequestListUnauthorized() *BuildRequestListUnauthorized { + return &BuildRequestListUnauthorized{} +} + +/* BuildRequestListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildRequestListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildRequestListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-requests][%d] buildRequestListUnauthorized %+v", 401, o.Payload) +} +func (o *BuildRequestListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildRequestListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildRequestListNotFound creates a BuildRequestListNotFound with default headers values +func NewBuildRequestListNotFound() *BuildRequestListNotFound { + return &BuildRequestListNotFound{} +} + +/* BuildRequestListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildRequestListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildRequestListNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-requests][%d] buildRequestListNotFound %+v", 404, o.Payload) +} +func (o *BuildRequestListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildRequestListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildRequestListInternalServerError creates a BuildRequestListInternalServerError with default headers values +func NewBuildRequestListInternalServerError() *BuildRequestListInternalServerError { + return &BuildRequestListInternalServerError{} +} + +/* BuildRequestListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildRequestListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildRequestListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-requests][%d] buildRequestListInternalServerError %+v", 500, o.Payload) +} +func (o *BuildRequestListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildRequestListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_request_update_parameters.go b/go/client/operations/build_request_update_parameters.go new file mode 100644 index 0000000..5b7ffee --- /dev/null +++ b/go/client/operations/build_request_update_parameters.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewBuildRequestUpdateParams creates a new BuildRequestUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildRequestUpdateParams() *BuildRequestUpdateParams { + return &BuildRequestUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildRequestUpdateParamsWithTimeout creates a new BuildRequestUpdateParams object +// with the ability to set a timeout on a request. +func NewBuildRequestUpdateParamsWithTimeout(timeout time.Duration) *BuildRequestUpdateParams { + return &BuildRequestUpdateParams{ + timeout: timeout, + } +} + +// NewBuildRequestUpdateParamsWithContext creates a new BuildRequestUpdateParams object +// with the ability to set a context for a request. +func NewBuildRequestUpdateParamsWithContext(ctx context.Context) *BuildRequestUpdateParams { + return &BuildRequestUpdateParams{ + Context: ctx, + } +} + +// NewBuildRequestUpdateParamsWithHTTPClient creates a new BuildRequestUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildRequestUpdateParamsWithHTTPClient(client *http.Client) *BuildRequestUpdateParams { + return &BuildRequestUpdateParams{ + HTTPClient: client, + } +} + +/* BuildRequestUpdateParams contains all the parameters to send to the API endpoint + for the build request update operation. + + Typically these are written to a http.Request. +*/ +type BuildRequestUpdateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildRequest. + + Build request parameters + */ + BuildRequest *models.V0BuildRequestUpdateParams + + /* BuildRequestSlug. + + Build request slug + */ + BuildRequestSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build request update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildRequestUpdateParams) WithDefaults() *BuildRequestUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build request update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildRequestUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build request update params +func (o *BuildRequestUpdateParams) WithTimeout(timeout time.Duration) *BuildRequestUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build request update params +func (o *BuildRequestUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build request update params +func (o *BuildRequestUpdateParams) WithContext(ctx context.Context) *BuildRequestUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build request update params +func (o *BuildRequestUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build request update params +func (o *BuildRequestUpdateParams) WithHTTPClient(client *http.Client) *BuildRequestUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build request update params +func (o *BuildRequestUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build request update params +func (o *BuildRequestUpdateParams) WithAppSlug(appSlug string) *BuildRequestUpdateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build request update params +func (o *BuildRequestUpdateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildRequest adds the buildRequest to the build request update params +func (o *BuildRequestUpdateParams) WithBuildRequest(buildRequest *models.V0BuildRequestUpdateParams) *BuildRequestUpdateParams { + o.SetBuildRequest(buildRequest) + return o +} + +// SetBuildRequest adds the buildRequest to the build request update params +func (o *BuildRequestUpdateParams) SetBuildRequest(buildRequest *models.V0BuildRequestUpdateParams) { + o.BuildRequest = buildRequest +} + +// WithBuildRequestSlug adds the buildRequestSlug to the build request update params +func (o *BuildRequestUpdateParams) WithBuildRequestSlug(buildRequestSlug string) *BuildRequestUpdateParams { + o.SetBuildRequestSlug(buildRequestSlug) + return o +} + +// SetBuildRequestSlug adds the buildRequestSlug to the build request update params +func (o *BuildRequestUpdateParams) SetBuildRequestSlug(buildRequestSlug string) { + o.BuildRequestSlug = buildRequestSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildRequestUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.BuildRequest != nil { + if err := r.SetBodyParam(o.BuildRequest); err != nil { + return err + } + } + + // path param build-request-slug + if err := r.SetPathParam("build-request-slug", o.BuildRequestSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_request_update_responses.go b/go/client/operations/build_request_update_responses.go new file mode 100644 index 0000000..2af21d7 --- /dev/null +++ b/go/client/operations/build_request_update_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildRequestUpdateReader is a Reader for the BuildRequestUpdate structure. +type BuildRequestUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildRequestUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildRequestUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildRequestUpdateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildRequestUpdateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildRequestUpdateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildRequestUpdateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildRequestUpdateOK creates a BuildRequestUpdateOK with default headers values +func NewBuildRequestUpdateOK() *BuildRequestUpdateOK { + return &BuildRequestUpdateOK{} +} + +/* BuildRequestUpdateOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildRequestUpdateOK struct { + Payload *models.V0BuildRequestUpdateResponseModel +} + +func (o *BuildRequestUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/build-requests/{build-request-slug}][%d] buildRequestUpdateOK %+v", 200, o.Payload) +} +func (o *BuildRequestUpdateOK) GetPayload() *models.V0BuildRequestUpdateResponseModel { + return o.Payload +} + +func (o *BuildRequestUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildRequestUpdateResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildRequestUpdateBadRequest creates a BuildRequestUpdateBadRequest with default headers values +func NewBuildRequestUpdateBadRequest() *BuildRequestUpdateBadRequest { + return &BuildRequestUpdateBadRequest{} +} + +/* BuildRequestUpdateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildRequestUpdateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildRequestUpdateBadRequest) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/build-requests/{build-request-slug}][%d] buildRequestUpdateBadRequest %+v", 400, o.Payload) +} +func (o *BuildRequestUpdateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildRequestUpdateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildRequestUpdateUnauthorized creates a BuildRequestUpdateUnauthorized with default headers values +func NewBuildRequestUpdateUnauthorized() *BuildRequestUpdateUnauthorized { + return &BuildRequestUpdateUnauthorized{} +} + +/* BuildRequestUpdateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildRequestUpdateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildRequestUpdateUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/build-requests/{build-request-slug}][%d] buildRequestUpdateUnauthorized %+v", 401, o.Payload) +} +func (o *BuildRequestUpdateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildRequestUpdateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildRequestUpdateNotFound creates a BuildRequestUpdateNotFound with default headers values +func NewBuildRequestUpdateNotFound() *BuildRequestUpdateNotFound { + return &BuildRequestUpdateNotFound{} +} + +/* BuildRequestUpdateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildRequestUpdateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildRequestUpdateNotFound) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/build-requests/{build-request-slug}][%d] buildRequestUpdateNotFound %+v", 404, o.Payload) +} +func (o *BuildRequestUpdateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildRequestUpdateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildRequestUpdateInternalServerError creates a BuildRequestUpdateInternalServerError with default headers values +func NewBuildRequestUpdateInternalServerError() *BuildRequestUpdateInternalServerError { + return &BuildRequestUpdateInternalServerError{} +} + +/* BuildRequestUpdateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildRequestUpdateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildRequestUpdateInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/build-requests/{build-request-slug}][%d] buildRequestUpdateInternalServerError %+v", 500, o.Payload) +} +func (o *BuildRequestUpdateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildRequestUpdateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_show_parameters.go b/go/client/operations/build_show_parameters.go new file mode 100644 index 0000000..32d8d82 --- /dev/null +++ b/go/client/operations/build_show_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBuildShowParams creates a new BuildShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildShowParams() *BuildShowParams { + return &BuildShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildShowParamsWithTimeout creates a new BuildShowParams object +// with the ability to set a timeout on a request. +func NewBuildShowParamsWithTimeout(timeout time.Duration) *BuildShowParams { + return &BuildShowParams{ + timeout: timeout, + } +} + +// NewBuildShowParamsWithContext creates a new BuildShowParams object +// with the ability to set a context for a request. +func NewBuildShowParamsWithContext(ctx context.Context) *BuildShowParams { + return &BuildShowParams{ + Context: ctx, + } +} + +// NewBuildShowParamsWithHTTPClient creates a new BuildShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildShowParamsWithHTTPClient(client *http.Client) *BuildShowParams { + return &BuildShowParams{ + HTTPClient: client, + } +} + +/* BuildShowParams contains all the parameters to send to the API endpoint + for the build show operation. + + Typically these are written to a http.Request. +*/ +type BuildShowParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildSlug. + + Build slug + */ + BuildSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildShowParams) WithDefaults() *BuildShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build show params +func (o *BuildShowParams) WithTimeout(timeout time.Duration) *BuildShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build show params +func (o *BuildShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build show params +func (o *BuildShowParams) WithContext(ctx context.Context) *BuildShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build show params +func (o *BuildShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build show params +func (o *BuildShowParams) WithHTTPClient(client *http.Client) *BuildShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build show params +func (o *BuildShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build show params +func (o *BuildShowParams) WithAppSlug(appSlug string) *BuildShowParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build show params +func (o *BuildShowParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildSlug adds the buildSlug to the build show params +func (o *BuildShowParams) WithBuildSlug(buildSlug string) *BuildShowParams { + o.SetBuildSlug(buildSlug) + return o +} + +// SetBuildSlug adds the buildSlug to the build show params +func (o *BuildShowParams) SetBuildSlug(buildSlug string) { + o.BuildSlug = buildSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param build-slug + if err := r.SetPathParam("build-slug", o.BuildSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_show_responses.go b/go/client/operations/build_show_responses.go new file mode 100644 index 0000000..316bfbc --- /dev/null +++ b/go/client/operations/build_show_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildShowReader is a Reader for the BuildShow structure. +type BuildShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildShowOK creates a BuildShowOK with default headers values +func NewBuildShowOK() *BuildShowOK { + return &BuildShowOK{} +} + +/* BuildShowOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildShowOK struct { + Payload *models.V0BuildShowResponseModel +} + +func (o *BuildShowOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}][%d] buildShowOK %+v", 200, o.Payload) +} +func (o *BuildShowOK) GetPayload() *models.V0BuildShowResponseModel { + return o.Payload +} + +func (o *BuildShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildShowResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildShowBadRequest creates a BuildShowBadRequest with default headers values +func NewBuildShowBadRequest() *BuildShowBadRequest { + return &BuildShowBadRequest{} +} + +/* BuildShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildShowBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}][%d] buildShowBadRequest %+v", 400, o.Payload) +} +func (o *BuildShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildShowUnauthorized creates a BuildShowUnauthorized with default headers values +func NewBuildShowUnauthorized() *BuildShowUnauthorized { + return &BuildShowUnauthorized{} +} + +/* BuildShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}][%d] buildShowUnauthorized %+v", 401, o.Payload) +} +func (o *BuildShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildShowNotFound creates a BuildShowNotFound with default headers values +func NewBuildShowNotFound() *BuildShowNotFound { + return &BuildShowNotFound{} +} + +/* BuildShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildShowNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}][%d] buildShowNotFound %+v", 404, o.Payload) +} +func (o *BuildShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildShowInternalServerError creates a BuildShowInternalServerError with default headers values +func NewBuildShowInternalServerError() *BuildShowInternalServerError { + return &BuildShowInternalServerError{} +} + +/* BuildShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/builds/{build-slug}][%d] buildShowInternalServerError %+v", 500, o.Payload) +} +func (o *BuildShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_trigger_parameters.go b/go/client/operations/build_trigger_parameters.go new file mode 100644 index 0000000..19468fb --- /dev/null +++ b/go/client/operations/build_trigger_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewBuildTriggerParams creates a new BuildTriggerParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildTriggerParams() *BuildTriggerParams { + return &BuildTriggerParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildTriggerParamsWithTimeout creates a new BuildTriggerParams object +// with the ability to set a timeout on a request. +func NewBuildTriggerParamsWithTimeout(timeout time.Duration) *BuildTriggerParams { + return &BuildTriggerParams{ + timeout: timeout, + } +} + +// NewBuildTriggerParamsWithContext creates a new BuildTriggerParams object +// with the ability to set a context for a request. +func NewBuildTriggerParamsWithContext(ctx context.Context) *BuildTriggerParams { + return &BuildTriggerParams{ + Context: ctx, + } +} + +// NewBuildTriggerParamsWithHTTPClient creates a new BuildTriggerParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildTriggerParamsWithHTTPClient(client *http.Client) *BuildTriggerParams { + return &BuildTriggerParams{ + HTTPClient: client, + } +} + +/* BuildTriggerParams contains all the parameters to send to the API endpoint + for the build trigger operation. + + Typically these are written to a http.Request. +*/ +type BuildTriggerParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* BuildParams. + + Build trigger parameters + */ + BuildParams *models.V0BuildTriggerParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build trigger params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildTriggerParams) WithDefaults() *BuildTriggerParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build trigger params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildTriggerParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build trigger params +func (o *BuildTriggerParams) WithTimeout(timeout time.Duration) *BuildTriggerParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build trigger params +func (o *BuildTriggerParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build trigger params +func (o *BuildTriggerParams) WithContext(ctx context.Context) *BuildTriggerParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build trigger params +func (o *BuildTriggerParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build trigger params +func (o *BuildTriggerParams) WithHTTPClient(client *http.Client) *BuildTriggerParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build trigger params +func (o *BuildTriggerParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build trigger params +func (o *BuildTriggerParams) WithAppSlug(appSlug string) *BuildTriggerParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build trigger params +func (o *BuildTriggerParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithBuildParams adds the buildParams to the build trigger params +func (o *BuildTriggerParams) WithBuildParams(buildParams *models.V0BuildTriggerParams) *BuildTriggerParams { + o.SetBuildParams(buildParams) + return o +} + +// SetBuildParams adds the buildParams to the build trigger params +func (o *BuildTriggerParams) SetBuildParams(buildParams *models.V0BuildTriggerParams) { + o.BuildParams = buildParams +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildTriggerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.BuildParams != nil { + if err := r.SetBodyParam(o.BuildParams); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_trigger_responses.go b/go/client/operations/build_trigger_responses.go new file mode 100644 index 0000000..1059af4 --- /dev/null +++ b/go/client/operations/build_trigger_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildTriggerReader is a Reader for the BuildTrigger structure. +type BuildTriggerReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildTriggerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewBuildTriggerCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildTriggerBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildTriggerUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildTriggerNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildTriggerInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildTriggerCreated creates a BuildTriggerCreated with default headers values +func NewBuildTriggerCreated() *BuildTriggerCreated { + return &BuildTriggerCreated{} +} + +/* BuildTriggerCreated describes a response with status code 201, with default header values. + +OK +*/ +type BuildTriggerCreated struct { + Payload *models.V0BuildTriggerRespModel +} + +func (o *BuildTriggerCreated) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds][%d] buildTriggerCreated %+v", 201, o.Payload) +} +func (o *BuildTriggerCreated) GetPayload() *models.V0BuildTriggerRespModel { + return o.Payload +} + +func (o *BuildTriggerCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildTriggerRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildTriggerBadRequest creates a BuildTriggerBadRequest with default headers values +func NewBuildTriggerBadRequest() *BuildTriggerBadRequest { + return &BuildTriggerBadRequest{} +} + +/* BuildTriggerBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildTriggerBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildTriggerBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds][%d] buildTriggerBadRequest %+v", 400, o.Payload) +} +func (o *BuildTriggerBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildTriggerBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildTriggerUnauthorized creates a BuildTriggerUnauthorized with default headers values +func NewBuildTriggerUnauthorized() *BuildTriggerUnauthorized { + return &BuildTriggerUnauthorized{} +} + +/* BuildTriggerUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildTriggerUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildTriggerUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds][%d] buildTriggerUnauthorized %+v", 401, o.Payload) +} +func (o *BuildTriggerUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildTriggerUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildTriggerNotFound creates a BuildTriggerNotFound with default headers values +func NewBuildTriggerNotFound() *BuildTriggerNotFound { + return &BuildTriggerNotFound{} +} + +/* BuildTriggerNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildTriggerNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildTriggerNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds][%d] buildTriggerNotFound %+v", 404, o.Payload) +} +func (o *BuildTriggerNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildTriggerNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildTriggerInternalServerError creates a BuildTriggerInternalServerError with default headers values +func NewBuildTriggerInternalServerError() *BuildTriggerInternalServerError { + return &BuildTriggerInternalServerError{} +} + +/* BuildTriggerInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildTriggerInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildTriggerInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/builds][%d] buildTriggerInternalServerError %+v", 500, o.Payload) +} +func (o *BuildTriggerInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildTriggerInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/build_workflow_list_parameters.go b/go/client/operations/build_workflow_list_parameters.go new file mode 100644 index 0000000..35af9af --- /dev/null +++ b/go/client/operations/build_workflow_list_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBuildWorkflowListParams creates a new BuildWorkflowListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBuildWorkflowListParams() *BuildWorkflowListParams { + return &BuildWorkflowListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBuildWorkflowListParamsWithTimeout creates a new BuildWorkflowListParams object +// with the ability to set a timeout on a request. +func NewBuildWorkflowListParamsWithTimeout(timeout time.Duration) *BuildWorkflowListParams { + return &BuildWorkflowListParams{ + timeout: timeout, + } +} + +// NewBuildWorkflowListParamsWithContext creates a new BuildWorkflowListParams object +// with the ability to set a context for a request. +func NewBuildWorkflowListParamsWithContext(ctx context.Context) *BuildWorkflowListParams { + return &BuildWorkflowListParams{ + Context: ctx, + } +} + +// NewBuildWorkflowListParamsWithHTTPClient creates a new BuildWorkflowListParams object +// with the ability to set a custom HTTPClient for a request. +func NewBuildWorkflowListParamsWithHTTPClient(client *http.Client) *BuildWorkflowListParams { + return &BuildWorkflowListParams{ + HTTPClient: client, + } +} + +/* BuildWorkflowListParams contains all the parameters to send to the API endpoint + for the build workflow list operation. + + Typically these are written to a http.Request. +*/ +type BuildWorkflowListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the build workflow list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildWorkflowListParams) WithDefaults() *BuildWorkflowListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the build workflow list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BuildWorkflowListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the build workflow list params +func (o *BuildWorkflowListParams) WithTimeout(timeout time.Duration) *BuildWorkflowListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the build workflow list params +func (o *BuildWorkflowListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the build workflow list params +func (o *BuildWorkflowListParams) WithContext(ctx context.Context) *BuildWorkflowListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the build workflow list params +func (o *BuildWorkflowListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the build workflow list params +func (o *BuildWorkflowListParams) WithHTTPClient(client *http.Client) *BuildWorkflowListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the build workflow list params +func (o *BuildWorkflowListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the build workflow list params +func (o *BuildWorkflowListParams) WithAppSlug(appSlug string) *BuildWorkflowListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the build workflow list params +func (o *BuildWorkflowListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *BuildWorkflowListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/build_workflow_list_responses.go b/go/client/operations/build_workflow_list_responses.go new file mode 100644 index 0000000..4ebbfa1 --- /dev/null +++ b/go/client/operations/build_workflow_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// BuildWorkflowListReader is a Reader for the BuildWorkflowList structure. +type BuildWorkflowListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BuildWorkflowListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBuildWorkflowListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBuildWorkflowListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBuildWorkflowListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBuildWorkflowListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBuildWorkflowListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewBuildWorkflowListOK creates a BuildWorkflowListOK with default headers values +func NewBuildWorkflowListOK() *BuildWorkflowListOK { + return &BuildWorkflowListOK{} +} + +/* BuildWorkflowListOK describes a response with status code 200, with default header values. + +OK +*/ +type BuildWorkflowListOK struct { + Payload *models.V0BuildWorkflowListResponseModel +} + +func (o *BuildWorkflowListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-workflows][%d] buildWorkflowListOK %+v", 200, o.Payload) +} +func (o *BuildWorkflowListOK) GetPayload() *models.V0BuildWorkflowListResponseModel { + return o.Payload +} + +func (o *BuildWorkflowListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0BuildWorkflowListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildWorkflowListBadRequest creates a BuildWorkflowListBadRequest with default headers values +func NewBuildWorkflowListBadRequest() *BuildWorkflowListBadRequest { + return &BuildWorkflowListBadRequest{} +} + +/* BuildWorkflowListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type BuildWorkflowListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildWorkflowListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-workflows][%d] buildWorkflowListBadRequest %+v", 400, o.Payload) +} +func (o *BuildWorkflowListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildWorkflowListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildWorkflowListUnauthorized creates a BuildWorkflowListUnauthorized with default headers values +func NewBuildWorkflowListUnauthorized() *BuildWorkflowListUnauthorized { + return &BuildWorkflowListUnauthorized{} +} + +/* BuildWorkflowListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BuildWorkflowListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildWorkflowListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-workflows][%d] buildWorkflowListUnauthorized %+v", 401, o.Payload) +} +func (o *BuildWorkflowListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildWorkflowListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildWorkflowListNotFound creates a BuildWorkflowListNotFound with default headers values +func NewBuildWorkflowListNotFound() *BuildWorkflowListNotFound { + return &BuildWorkflowListNotFound{} +} + +/* BuildWorkflowListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BuildWorkflowListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildWorkflowListNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-workflows][%d] buildWorkflowListNotFound %+v", 404, o.Payload) +} +func (o *BuildWorkflowListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildWorkflowListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBuildWorkflowListInternalServerError creates a BuildWorkflowListInternalServerError with default headers values +func NewBuildWorkflowListInternalServerError() *BuildWorkflowListInternalServerError { + return &BuildWorkflowListInternalServerError{} +} + +/* BuildWorkflowListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type BuildWorkflowListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *BuildWorkflowListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/build-workflows][%d] buildWorkflowListInternalServerError %+v", 500, o.Payload) +} +func (o *BuildWorkflowListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *BuildWorkflowListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/generic_project_file_confirm_parameters.go b/go/client/operations/generic_project_file_confirm_parameters.go new file mode 100644 index 0000000..4e59ef9 --- /dev/null +++ b/go/client/operations/generic_project_file_confirm_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGenericProjectFileConfirmParams creates a new GenericProjectFileConfirmParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGenericProjectFileConfirmParams() *GenericProjectFileConfirmParams { + return &GenericProjectFileConfirmParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGenericProjectFileConfirmParamsWithTimeout creates a new GenericProjectFileConfirmParams object +// with the ability to set a timeout on a request. +func NewGenericProjectFileConfirmParamsWithTimeout(timeout time.Duration) *GenericProjectFileConfirmParams { + return &GenericProjectFileConfirmParams{ + timeout: timeout, + } +} + +// NewGenericProjectFileConfirmParamsWithContext creates a new GenericProjectFileConfirmParams object +// with the ability to set a context for a request. +func NewGenericProjectFileConfirmParamsWithContext(ctx context.Context) *GenericProjectFileConfirmParams { + return &GenericProjectFileConfirmParams{ + Context: ctx, + } +} + +// NewGenericProjectFileConfirmParamsWithHTTPClient creates a new GenericProjectFileConfirmParams object +// with the ability to set a custom HTTPClient for a request. +func NewGenericProjectFileConfirmParamsWithHTTPClient(client *http.Client) *GenericProjectFileConfirmParams { + return &GenericProjectFileConfirmParams{ + HTTPClient: client, + } +} + +/* GenericProjectFileConfirmParams contains all the parameters to send to the API endpoint + for the generic project file confirm operation. + + Typically these are written to a http.Request. +*/ +type GenericProjectFileConfirmParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* GenericProjectFileSlug. + + Generic project file slug + */ + GenericProjectFileSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the generic project file confirm params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFileConfirmParams) WithDefaults() *GenericProjectFileConfirmParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the generic project file confirm params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFileConfirmParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the generic project file confirm params +func (o *GenericProjectFileConfirmParams) WithTimeout(timeout time.Duration) *GenericProjectFileConfirmParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the generic project file confirm params +func (o *GenericProjectFileConfirmParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the generic project file confirm params +func (o *GenericProjectFileConfirmParams) WithContext(ctx context.Context) *GenericProjectFileConfirmParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the generic project file confirm params +func (o *GenericProjectFileConfirmParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the generic project file confirm params +func (o *GenericProjectFileConfirmParams) WithHTTPClient(client *http.Client) *GenericProjectFileConfirmParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the generic project file confirm params +func (o *GenericProjectFileConfirmParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the generic project file confirm params +func (o *GenericProjectFileConfirmParams) WithAppSlug(appSlug string) *GenericProjectFileConfirmParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the generic project file confirm params +func (o *GenericProjectFileConfirmParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithGenericProjectFileSlug adds the genericProjectFileSlug to the generic project file confirm params +func (o *GenericProjectFileConfirmParams) WithGenericProjectFileSlug(genericProjectFileSlug string) *GenericProjectFileConfirmParams { + o.SetGenericProjectFileSlug(genericProjectFileSlug) + return o +} + +// SetGenericProjectFileSlug adds the genericProjectFileSlug to the generic project file confirm params +func (o *GenericProjectFileConfirmParams) SetGenericProjectFileSlug(genericProjectFileSlug string) { + o.GenericProjectFileSlug = genericProjectFileSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *GenericProjectFileConfirmParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param generic-project-file-slug + if err := r.SetPathParam("generic-project-file-slug", o.GenericProjectFileSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/generic_project_file_confirm_responses.go b/go/client/operations/generic_project_file_confirm_responses.go new file mode 100644 index 0000000..16f8b3e --- /dev/null +++ b/go/client/operations/generic_project_file_confirm_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// GenericProjectFileConfirmReader is a Reader for the GenericProjectFileConfirm structure. +type GenericProjectFileConfirmReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GenericProjectFileConfirmReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGenericProjectFileConfirmOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGenericProjectFileConfirmBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewGenericProjectFileConfirmUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGenericProjectFileConfirmNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGenericProjectFileConfirmInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGenericProjectFileConfirmOK creates a GenericProjectFileConfirmOK with default headers values +func NewGenericProjectFileConfirmOK() *GenericProjectFileConfirmOK { + return &GenericProjectFileConfirmOK{} +} + +/* GenericProjectFileConfirmOK describes a response with status code 200, with default header values. + +OK +*/ +type GenericProjectFileConfirmOK struct { + Payload *models.V0ProjectFileStorageResponseModel +} + +func (o *GenericProjectFileConfirmOK) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded][%d] genericProjectFileConfirmOK %+v", 200, o.Payload) +} +func (o *GenericProjectFileConfirmOK) GetPayload() *models.V0ProjectFileStorageResponseModel { + return o.Payload +} + +func (o *GenericProjectFileConfirmOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProjectFileStorageResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileConfirmBadRequest creates a GenericProjectFileConfirmBadRequest with default headers values +func NewGenericProjectFileConfirmBadRequest() *GenericProjectFileConfirmBadRequest { + return &GenericProjectFileConfirmBadRequest{} +} + +/* GenericProjectFileConfirmBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GenericProjectFileConfirmBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileConfirmBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded][%d] genericProjectFileConfirmBadRequest %+v", 400, o.Payload) +} +func (o *GenericProjectFileConfirmBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileConfirmBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileConfirmUnauthorized creates a GenericProjectFileConfirmUnauthorized with default headers values +func NewGenericProjectFileConfirmUnauthorized() *GenericProjectFileConfirmUnauthorized { + return &GenericProjectFileConfirmUnauthorized{} +} + +/* GenericProjectFileConfirmUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type GenericProjectFileConfirmUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileConfirmUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded][%d] genericProjectFileConfirmUnauthorized %+v", 401, o.Payload) +} +func (o *GenericProjectFileConfirmUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileConfirmUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileConfirmNotFound creates a GenericProjectFileConfirmNotFound with default headers values +func NewGenericProjectFileConfirmNotFound() *GenericProjectFileConfirmNotFound { + return &GenericProjectFileConfirmNotFound{} +} + +/* GenericProjectFileConfirmNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type GenericProjectFileConfirmNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileConfirmNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded][%d] genericProjectFileConfirmNotFound %+v", 404, o.Payload) +} +func (o *GenericProjectFileConfirmNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileConfirmNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileConfirmInternalServerError creates a GenericProjectFileConfirmInternalServerError with default headers values +func NewGenericProjectFileConfirmInternalServerError() *GenericProjectFileConfirmInternalServerError { + return &GenericProjectFileConfirmInternalServerError{} +} + +/* GenericProjectFileConfirmInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GenericProjectFileConfirmInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileConfirmInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded][%d] genericProjectFileConfirmInternalServerError %+v", 500, o.Payload) +} +func (o *GenericProjectFileConfirmInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileConfirmInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/generic_project_file_delete_parameters.go b/go/client/operations/generic_project_file_delete_parameters.go new file mode 100644 index 0000000..fbb6555 --- /dev/null +++ b/go/client/operations/generic_project_file_delete_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGenericProjectFileDeleteParams creates a new GenericProjectFileDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGenericProjectFileDeleteParams() *GenericProjectFileDeleteParams { + return &GenericProjectFileDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGenericProjectFileDeleteParamsWithTimeout creates a new GenericProjectFileDeleteParams object +// with the ability to set a timeout on a request. +func NewGenericProjectFileDeleteParamsWithTimeout(timeout time.Duration) *GenericProjectFileDeleteParams { + return &GenericProjectFileDeleteParams{ + timeout: timeout, + } +} + +// NewGenericProjectFileDeleteParamsWithContext creates a new GenericProjectFileDeleteParams object +// with the ability to set a context for a request. +func NewGenericProjectFileDeleteParamsWithContext(ctx context.Context) *GenericProjectFileDeleteParams { + return &GenericProjectFileDeleteParams{ + Context: ctx, + } +} + +// NewGenericProjectFileDeleteParamsWithHTTPClient creates a new GenericProjectFileDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewGenericProjectFileDeleteParamsWithHTTPClient(client *http.Client) *GenericProjectFileDeleteParams { + return &GenericProjectFileDeleteParams{ + HTTPClient: client, + } +} + +/* GenericProjectFileDeleteParams contains all the parameters to send to the API endpoint + for the generic project file delete operation. + + Typically these are written to a http.Request. +*/ +type GenericProjectFileDeleteParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* GenericProjectFileSlug. + + Generic project file slug + */ + GenericProjectFileSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the generic project file delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFileDeleteParams) WithDefaults() *GenericProjectFileDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the generic project file delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFileDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the generic project file delete params +func (o *GenericProjectFileDeleteParams) WithTimeout(timeout time.Duration) *GenericProjectFileDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the generic project file delete params +func (o *GenericProjectFileDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the generic project file delete params +func (o *GenericProjectFileDeleteParams) WithContext(ctx context.Context) *GenericProjectFileDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the generic project file delete params +func (o *GenericProjectFileDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the generic project file delete params +func (o *GenericProjectFileDeleteParams) WithHTTPClient(client *http.Client) *GenericProjectFileDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the generic project file delete params +func (o *GenericProjectFileDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the generic project file delete params +func (o *GenericProjectFileDeleteParams) WithAppSlug(appSlug string) *GenericProjectFileDeleteParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the generic project file delete params +func (o *GenericProjectFileDeleteParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithGenericProjectFileSlug adds the genericProjectFileSlug to the generic project file delete params +func (o *GenericProjectFileDeleteParams) WithGenericProjectFileSlug(genericProjectFileSlug string) *GenericProjectFileDeleteParams { + o.SetGenericProjectFileSlug(genericProjectFileSlug) + return o +} + +// SetGenericProjectFileSlug adds the genericProjectFileSlug to the generic project file delete params +func (o *GenericProjectFileDeleteParams) SetGenericProjectFileSlug(genericProjectFileSlug string) { + o.GenericProjectFileSlug = genericProjectFileSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *GenericProjectFileDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param generic-project-file-slug + if err := r.SetPathParam("generic-project-file-slug", o.GenericProjectFileSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/generic_project_file_delete_responses.go b/go/client/operations/generic_project_file_delete_responses.go new file mode 100644 index 0000000..04e698d --- /dev/null +++ b/go/client/operations/generic_project_file_delete_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// GenericProjectFileDeleteReader is a Reader for the GenericProjectFileDelete structure. +type GenericProjectFileDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GenericProjectFileDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGenericProjectFileDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGenericProjectFileDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewGenericProjectFileDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGenericProjectFileDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGenericProjectFileDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGenericProjectFileDeleteOK creates a GenericProjectFileDeleteOK with default headers values +func NewGenericProjectFileDeleteOK() *GenericProjectFileDeleteOK { + return &GenericProjectFileDeleteOK{} +} + +/* GenericProjectFileDeleteOK describes a response with status code 200, with default header values. + +OK +*/ +type GenericProjectFileDeleteOK struct { + Payload *models.V0ProjectFileStorageResponseModel +} + +func (o *GenericProjectFileDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileDeleteOK %+v", 200, o.Payload) +} +func (o *GenericProjectFileDeleteOK) GetPayload() *models.V0ProjectFileStorageResponseModel { + return o.Payload +} + +func (o *GenericProjectFileDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProjectFileStorageResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileDeleteBadRequest creates a GenericProjectFileDeleteBadRequest with default headers values +func NewGenericProjectFileDeleteBadRequest() *GenericProjectFileDeleteBadRequest { + return &GenericProjectFileDeleteBadRequest{} +} + +/* GenericProjectFileDeleteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GenericProjectFileDeleteBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileDeleteBadRequest) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileDeleteBadRequest %+v", 400, o.Payload) +} +func (o *GenericProjectFileDeleteBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileDeleteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileDeleteUnauthorized creates a GenericProjectFileDeleteUnauthorized with default headers values +func NewGenericProjectFileDeleteUnauthorized() *GenericProjectFileDeleteUnauthorized { + return &GenericProjectFileDeleteUnauthorized{} +} + +/* GenericProjectFileDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type GenericProjectFileDeleteUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileDeleteUnauthorized %+v", 401, o.Payload) +} +func (o *GenericProjectFileDeleteUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileDeleteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileDeleteNotFound creates a GenericProjectFileDeleteNotFound with default headers values +func NewGenericProjectFileDeleteNotFound() *GenericProjectFileDeleteNotFound { + return &GenericProjectFileDeleteNotFound{} +} + +/* GenericProjectFileDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type GenericProjectFileDeleteNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileDeleteNotFound %+v", 404, o.Payload) +} +func (o *GenericProjectFileDeleteNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileDeleteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileDeleteInternalServerError creates a GenericProjectFileDeleteInternalServerError with default headers values +func NewGenericProjectFileDeleteInternalServerError() *GenericProjectFileDeleteInternalServerError { + return &GenericProjectFileDeleteInternalServerError{} +} + +/* GenericProjectFileDeleteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GenericProjectFileDeleteInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileDeleteInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileDeleteInternalServerError %+v", 500, o.Payload) +} +func (o *GenericProjectFileDeleteInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileDeleteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/generic_project_file_list_parameters.go b/go/client/operations/generic_project_file_list_parameters.go new file mode 100644 index 0000000..9631425 --- /dev/null +++ b/go/client/operations/generic_project_file_list_parameters.go @@ -0,0 +1,218 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGenericProjectFileListParams creates a new GenericProjectFileListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGenericProjectFileListParams() *GenericProjectFileListParams { + return &GenericProjectFileListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGenericProjectFileListParamsWithTimeout creates a new GenericProjectFileListParams object +// with the ability to set a timeout on a request. +func NewGenericProjectFileListParamsWithTimeout(timeout time.Duration) *GenericProjectFileListParams { + return &GenericProjectFileListParams{ + timeout: timeout, + } +} + +// NewGenericProjectFileListParamsWithContext creates a new GenericProjectFileListParams object +// with the ability to set a context for a request. +func NewGenericProjectFileListParamsWithContext(ctx context.Context) *GenericProjectFileListParams { + return &GenericProjectFileListParams{ + Context: ctx, + } +} + +// NewGenericProjectFileListParamsWithHTTPClient creates a new GenericProjectFileListParams object +// with the ability to set a custom HTTPClient for a request. +func NewGenericProjectFileListParamsWithHTTPClient(client *http.Client) *GenericProjectFileListParams { + return &GenericProjectFileListParams{ + HTTPClient: client, + } +} + +/* GenericProjectFileListParams contains all the parameters to send to the API endpoint + for the generic project file list operation. + + Typically these are written to a http.Request. +*/ +type GenericProjectFileListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* Limit. + + Max number of build certificates per page is 50. + */ + Limit *int64 + + /* Next. + + Slug of the first generic project file in the response + */ + Next *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the generic project file list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFileListParams) WithDefaults() *GenericProjectFileListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the generic project file list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFileListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the generic project file list params +func (o *GenericProjectFileListParams) WithTimeout(timeout time.Duration) *GenericProjectFileListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the generic project file list params +func (o *GenericProjectFileListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the generic project file list params +func (o *GenericProjectFileListParams) WithContext(ctx context.Context) *GenericProjectFileListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the generic project file list params +func (o *GenericProjectFileListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the generic project file list params +func (o *GenericProjectFileListParams) WithHTTPClient(client *http.Client) *GenericProjectFileListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the generic project file list params +func (o *GenericProjectFileListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the generic project file list params +func (o *GenericProjectFileListParams) WithAppSlug(appSlug string) *GenericProjectFileListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the generic project file list params +func (o *GenericProjectFileListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithLimit adds the limit to the generic project file list params +func (o *GenericProjectFileListParams) WithLimit(limit *int64) *GenericProjectFileListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the generic project file list params +func (o *GenericProjectFileListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the generic project file list params +func (o *GenericProjectFileListParams) WithNext(next *string) *GenericProjectFileListParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the generic project file list params +func (o *GenericProjectFileListParams) SetNext(next *string) { + o.Next = next +} + +// WriteToRequest writes these params to a swagger request +func (o *GenericProjectFileListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/generic_project_file_list_responses.go b/go/client/operations/generic_project_file_list_responses.go new file mode 100644 index 0000000..80f8d8c --- /dev/null +++ b/go/client/operations/generic_project_file_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// GenericProjectFileListReader is a Reader for the GenericProjectFileList structure. +type GenericProjectFileListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GenericProjectFileListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGenericProjectFileListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGenericProjectFileListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewGenericProjectFileListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGenericProjectFileListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGenericProjectFileListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGenericProjectFileListOK creates a GenericProjectFileListOK with default headers values +func NewGenericProjectFileListOK() *GenericProjectFileListOK { + return &GenericProjectFileListOK{} +} + +/* GenericProjectFileListOK describes a response with status code 200, with default header values. + +OK +*/ +type GenericProjectFileListOK struct { + Payload *models.V0ProjectFileStorageListResponseModel +} + +func (o *GenericProjectFileListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/generic-project-files][%d] genericProjectFileListOK %+v", 200, o.Payload) +} +func (o *GenericProjectFileListOK) GetPayload() *models.V0ProjectFileStorageListResponseModel { + return o.Payload +} + +func (o *GenericProjectFileListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProjectFileStorageListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileListBadRequest creates a GenericProjectFileListBadRequest with default headers values +func NewGenericProjectFileListBadRequest() *GenericProjectFileListBadRequest { + return &GenericProjectFileListBadRequest{} +} + +/* GenericProjectFileListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GenericProjectFileListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/generic-project-files][%d] genericProjectFileListBadRequest %+v", 400, o.Payload) +} +func (o *GenericProjectFileListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileListUnauthorized creates a GenericProjectFileListUnauthorized with default headers values +func NewGenericProjectFileListUnauthorized() *GenericProjectFileListUnauthorized { + return &GenericProjectFileListUnauthorized{} +} + +/* GenericProjectFileListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type GenericProjectFileListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/generic-project-files][%d] genericProjectFileListUnauthorized %+v", 401, o.Payload) +} +func (o *GenericProjectFileListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileListNotFound creates a GenericProjectFileListNotFound with default headers values +func NewGenericProjectFileListNotFound() *GenericProjectFileListNotFound { + return &GenericProjectFileListNotFound{} +} + +/* GenericProjectFileListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type GenericProjectFileListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileListNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/generic-project-files][%d] genericProjectFileListNotFound %+v", 404, o.Payload) +} +func (o *GenericProjectFileListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileListInternalServerError creates a GenericProjectFileListInternalServerError with default headers values +func NewGenericProjectFileListInternalServerError() *GenericProjectFileListInternalServerError { + return &GenericProjectFileListInternalServerError{} +} + +/* GenericProjectFileListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GenericProjectFileListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/generic-project-files][%d] genericProjectFileListInternalServerError %+v", 500, o.Payload) +} +func (o *GenericProjectFileListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/generic_project_file_show_parameters.go b/go/client/operations/generic_project_file_show_parameters.go new file mode 100644 index 0000000..03e5619 --- /dev/null +++ b/go/client/operations/generic_project_file_show_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGenericProjectFileShowParams creates a new GenericProjectFileShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGenericProjectFileShowParams() *GenericProjectFileShowParams { + return &GenericProjectFileShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGenericProjectFileShowParamsWithTimeout creates a new GenericProjectFileShowParams object +// with the ability to set a timeout on a request. +func NewGenericProjectFileShowParamsWithTimeout(timeout time.Duration) *GenericProjectFileShowParams { + return &GenericProjectFileShowParams{ + timeout: timeout, + } +} + +// NewGenericProjectFileShowParamsWithContext creates a new GenericProjectFileShowParams object +// with the ability to set a context for a request. +func NewGenericProjectFileShowParamsWithContext(ctx context.Context) *GenericProjectFileShowParams { + return &GenericProjectFileShowParams{ + Context: ctx, + } +} + +// NewGenericProjectFileShowParamsWithHTTPClient creates a new GenericProjectFileShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewGenericProjectFileShowParamsWithHTTPClient(client *http.Client) *GenericProjectFileShowParams { + return &GenericProjectFileShowParams{ + HTTPClient: client, + } +} + +/* GenericProjectFileShowParams contains all the parameters to send to the API endpoint + for the generic project file show operation. + + Typically these are written to a http.Request. +*/ +type GenericProjectFileShowParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* GenericProjectFileSlug. + + Generic project file slug + */ + GenericProjectFileSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the generic project file show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFileShowParams) WithDefaults() *GenericProjectFileShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the generic project file show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFileShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the generic project file show params +func (o *GenericProjectFileShowParams) WithTimeout(timeout time.Duration) *GenericProjectFileShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the generic project file show params +func (o *GenericProjectFileShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the generic project file show params +func (o *GenericProjectFileShowParams) WithContext(ctx context.Context) *GenericProjectFileShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the generic project file show params +func (o *GenericProjectFileShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the generic project file show params +func (o *GenericProjectFileShowParams) WithHTTPClient(client *http.Client) *GenericProjectFileShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the generic project file show params +func (o *GenericProjectFileShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the generic project file show params +func (o *GenericProjectFileShowParams) WithAppSlug(appSlug string) *GenericProjectFileShowParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the generic project file show params +func (o *GenericProjectFileShowParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithGenericProjectFileSlug adds the genericProjectFileSlug to the generic project file show params +func (o *GenericProjectFileShowParams) WithGenericProjectFileSlug(genericProjectFileSlug string) *GenericProjectFileShowParams { + o.SetGenericProjectFileSlug(genericProjectFileSlug) + return o +} + +// SetGenericProjectFileSlug adds the genericProjectFileSlug to the generic project file show params +func (o *GenericProjectFileShowParams) SetGenericProjectFileSlug(genericProjectFileSlug string) { + o.GenericProjectFileSlug = genericProjectFileSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *GenericProjectFileShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param generic-project-file-slug + if err := r.SetPathParam("generic-project-file-slug", o.GenericProjectFileSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/generic_project_file_show_responses.go b/go/client/operations/generic_project_file_show_responses.go new file mode 100644 index 0000000..0dc34e7 --- /dev/null +++ b/go/client/operations/generic_project_file_show_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// GenericProjectFileShowReader is a Reader for the GenericProjectFileShow structure. +type GenericProjectFileShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GenericProjectFileShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGenericProjectFileShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGenericProjectFileShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewGenericProjectFileShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGenericProjectFileShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGenericProjectFileShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGenericProjectFileShowOK creates a GenericProjectFileShowOK with default headers values +func NewGenericProjectFileShowOK() *GenericProjectFileShowOK { + return &GenericProjectFileShowOK{} +} + +/* GenericProjectFileShowOK describes a response with status code 200, with default header values. + +OK +*/ +type GenericProjectFileShowOK struct { + Payload *models.V0ProjectFileStorageResponseModel +} + +func (o *GenericProjectFileShowOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileShowOK %+v", 200, o.Payload) +} +func (o *GenericProjectFileShowOK) GetPayload() *models.V0ProjectFileStorageResponseModel { + return o.Payload +} + +func (o *GenericProjectFileShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProjectFileStorageResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileShowBadRequest creates a GenericProjectFileShowBadRequest with default headers values +func NewGenericProjectFileShowBadRequest() *GenericProjectFileShowBadRequest { + return &GenericProjectFileShowBadRequest{} +} + +/* GenericProjectFileShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GenericProjectFileShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileShowBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileShowBadRequest %+v", 400, o.Payload) +} +func (o *GenericProjectFileShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileShowUnauthorized creates a GenericProjectFileShowUnauthorized with default headers values +func NewGenericProjectFileShowUnauthorized() *GenericProjectFileShowUnauthorized { + return &GenericProjectFileShowUnauthorized{} +} + +/* GenericProjectFileShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type GenericProjectFileShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileShowUnauthorized %+v", 401, o.Payload) +} +func (o *GenericProjectFileShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileShowNotFound creates a GenericProjectFileShowNotFound with default headers values +func NewGenericProjectFileShowNotFound() *GenericProjectFileShowNotFound { + return &GenericProjectFileShowNotFound{} +} + +/* GenericProjectFileShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type GenericProjectFileShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileShowNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileShowNotFound %+v", 404, o.Payload) +} +func (o *GenericProjectFileShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileShowInternalServerError creates a GenericProjectFileShowInternalServerError with default headers values +func NewGenericProjectFileShowInternalServerError() *GenericProjectFileShowInternalServerError { + return &GenericProjectFileShowInternalServerError{} +} + +/* GenericProjectFileShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GenericProjectFileShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileShowInternalServerError %+v", 500, o.Payload) +} +func (o *GenericProjectFileShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/generic_project_file_update_parameters.go b/go/client/operations/generic_project_file_update_parameters.go new file mode 100644 index 0000000..541651f --- /dev/null +++ b/go/client/operations/generic_project_file_update_parameters.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewGenericProjectFileUpdateParams creates a new GenericProjectFileUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGenericProjectFileUpdateParams() *GenericProjectFileUpdateParams { + return &GenericProjectFileUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGenericProjectFileUpdateParamsWithTimeout creates a new GenericProjectFileUpdateParams object +// with the ability to set a timeout on a request. +func NewGenericProjectFileUpdateParamsWithTimeout(timeout time.Duration) *GenericProjectFileUpdateParams { + return &GenericProjectFileUpdateParams{ + timeout: timeout, + } +} + +// NewGenericProjectFileUpdateParamsWithContext creates a new GenericProjectFileUpdateParams object +// with the ability to set a context for a request. +func NewGenericProjectFileUpdateParamsWithContext(ctx context.Context) *GenericProjectFileUpdateParams { + return &GenericProjectFileUpdateParams{ + Context: ctx, + } +} + +// NewGenericProjectFileUpdateParamsWithHTTPClient creates a new GenericProjectFileUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewGenericProjectFileUpdateParamsWithHTTPClient(client *http.Client) *GenericProjectFileUpdateParams { + return &GenericProjectFileUpdateParams{ + HTTPClient: client, + } +} + +/* GenericProjectFileUpdateParams contains all the parameters to send to the API endpoint + for the generic project file update operation. + + Typically these are written to a http.Request. +*/ +type GenericProjectFileUpdateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* GenericProjectFile. + + Generic project file parameters + */ + GenericProjectFile *models.V0ProjectFileStorageDocumentUpdateParams + + /* GenericProjectFileSlug. + + Generic project file slug + */ + GenericProjectFileSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the generic project file update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFileUpdateParams) WithDefaults() *GenericProjectFileUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the generic project file update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFileUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the generic project file update params +func (o *GenericProjectFileUpdateParams) WithTimeout(timeout time.Duration) *GenericProjectFileUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the generic project file update params +func (o *GenericProjectFileUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the generic project file update params +func (o *GenericProjectFileUpdateParams) WithContext(ctx context.Context) *GenericProjectFileUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the generic project file update params +func (o *GenericProjectFileUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the generic project file update params +func (o *GenericProjectFileUpdateParams) WithHTTPClient(client *http.Client) *GenericProjectFileUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the generic project file update params +func (o *GenericProjectFileUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the generic project file update params +func (o *GenericProjectFileUpdateParams) WithAppSlug(appSlug string) *GenericProjectFileUpdateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the generic project file update params +func (o *GenericProjectFileUpdateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithGenericProjectFile adds the genericProjectFile to the generic project file update params +func (o *GenericProjectFileUpdateParams) WithGenericProjectFile(genericProjectFile *models.V0ProjectFileStorageDocumentUpdateParams) *GenericProjectFileUpdateParams { + o.SetGenericProjectFile(genericProjectFile) + return o +} + +// SetGenericProjectFile adds the genericProjectFile to the generic project file update params +func (o *GenericProjectFileUpdateParams) SetGenericProjectFile(genericProjectFile *models.V0ProjectFileStorageDocumentUpdateParams) { + o.GenericProjectFile = genericProjectFile +} + +// WithGenericProjectFileSlug adds the genericProjectFileSlug to the generic project file update params +func (o *GenericProjectFileUpdateParams) WithGenericProjectFileSlug(genericProjectFileSlug string) *GenericProjectFileUpdateParams { + o.SetGenericProjectFileSlug(genericProjectFileSlug) + return o +} + +// SetGenericProjectFileSlug adds the genericProjectFileSlug to the generic project file update params +func (o *GenericProjectFileUpdateParams) SetGenericProjectFileSlug(genericProjectFileSlug string) { + o.GenericProjectFileSlug = genericProjectFileSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *GenericProjectFileUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.GenericProjectFile != nil { + if err := r.SetBodyParam(o.GenericProjectFile); err != nil { + return err + } + } + + // path param generic-project-file-slug + if err := r.SetPathParam("generic-project-file-slug", o.GenericProjectFileSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/generic_project_file_update_responses.go b/go/client/operations/generic_project_file_update_responses.go new file mode 100644 index 0000000..3001c9f --- /dev/null +++ b/go/client/operations/generic_project_file_update_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// GenericProjectFileUpdateReader is a Reader for the GenericProjectFileUpdate structure. +type GenericProjectFileUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GenericProjectFileUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGenericProjectFileUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGenericProjectFileUpdateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewGenericProjectFileUpdateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGenericProjectFileUpdateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGenericProjectFileUpdateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGenericProjectFileUpdateOK creates a GenericProjectFileUpdateOK with default headers values +func NewGenericProjectFileUpdateOK() *GenericProjectFileUpdateOK { + return &GenericProjectFileUpdateOK{} +} + +/* GenericProjectFileUpdateOK describes a response with status code 200, with default header values. + +OK +*/ +type GenericProjectFileUpdateOK struct { + Payload *models.V0ProjectFileStorageResponseModel +} + +func (o *GenericProjectFileUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileUpdateOK %+v", 200, o.Payload) +} +func (o *GenericProjectFileUpdateOK) GetPayload() *models.V0ProjectFileStorageResponseModel { + return o.Payload +} + +func (o *GenericProjectFileUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProjectFileStorageResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileUpdateBadRequest creates a GenericProjectFileUpdateBadRequest with default headers values +func NewGenericProjectFileUpdateBadRequest() *GenericProjectFileUpdateBadRequest { + return &GenericProjectFileUpdateBadRequest{} +} + +/* GenericProjectFileUpdateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GenericProjectFileUpdateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileUpdateBadRequest) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileUpdateBadRequest %+v", 400, o.Payload) +} +func (o *GenericProjectFileUpdateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileUpdateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileUpdateUnauthorized creates a GenericProjectFileUpdateUnauthorized with default headers values +func NewGenericProjectFileUpdateUnauthorized() *GenericProjectFileUpdateUnauthorized { + return &GenericProjectFileUpdateUnauthorized{} +} + +/* GenericProjectFileUpdateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type GenericProjectFileUpdateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileUpdateUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileUpdateUnauthorized %+v", 401, o.Payload) +} +func (o *GenericProjectFileUpdateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileUpdateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileUpdateNotFound creates a GenericProjectFileUpdateNotFound with default headers values +func NewGenericProjectFileUpdateNotFound() *GenericProjectFileUpdateNotFound { + return &GenericProjectFileUpdateNotFound{} +} + +/* GenericProjectFileUpdateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type GenericProjectFileUpdateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileUpdateNotFound) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileUpdateNotFound %+v", 404, o.Payload) +} +func (o *GenericProjectFileUpdateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileUpdateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFileUpdateInternalServerError creates a GenericProjectFileUpdateInternalServerError with default headers values +func NewGenericProjectFileUpdateInternalServerError() *GenericProjectFileUpdateInternalServerError { + return &GenericProjectFileUpdateInternalServerError{} +} + +/* GenericProjectFileUpdateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GenericProjectFileUpdateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFileUpdateInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/generic-project-files/{generic-project-file-slug}][%d] genericProjectFileUpdateInternalServerError %+v", 500, o.Payload) +} +func (o *GenericProjectFileUpdateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFileUpdateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/generic_project_files_create_parameters.go b/go/client/operations/generic_project_files_create_parameters.go new file mode 100644 index 0000000..5f2b083 --- /dev/null +++ b/go/client/operations/generic_project_files_create_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewGenericProjectFilesCreateParams creates a new GenericProjectFilesCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGenericProjectFilesCreateParams() *GenericProjectFilesCreateParams { + return &GenericProjectFilesCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGenericProjectFilesCreateParamsWithTimeout creates a new GenericProjectFilesCreateParams object +// with the ability to set a timeout on a request. +func NewGenericProjectFilesCreateParamsWithTimeout(timeout time.Duration) *GenericProjectFilesCreateParams { + return &GenericProjectFilesCreateParams{ + timeout: timeout, + } +} + +// NewGenericProjectFilesCreateParamsWithContext creates a new GenericProjectFilesCreateParams object +// with the ability to set a context for a request. +func NewGenericProjectFilesCreateParamsWithContext(ctx context.Context) *GenericProjectFilesCreateParams { + return &GenericProjectFilesCreateParams{ + Context: ctx, + } +} + +// NewGenericProjectFilesCreateParamsWithHTTPClient creates a new GenericProjectFilesCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewGenericProjectFilesCreateParamsWithHTTPClient(client *http.Client) *GenericProjectFilesCreateParams { + return &GenericProjectFilesCreateParams{ + HTTPClient: client, + } +} + +/* GenericProjectFilesCreateParams contains all the parameters to send to the API endpoint + for the generic project files create operation. + + Typically these are written to a http.Request. +*/ +type GenericProjectFilesCreateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* GenericProjectFile. + + Generic project file parameters + */ + GenericProjectFile *models.V0ProjectFileStorageUploadParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the generic project files create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFilesCreateParams) WithDefaults() *GenericProjectFilesCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the generic project files create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GenericProjectFilesCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the generic project files create params +func (o *GenericProjectFilesCreateParams) WithTimeout(timeout time.Duration) *GenericProjectFilesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the generic project files create params +func (o *GenericProjectFilesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the generic project files create params +func (o *GenericProjectFilesCreateParams) WithContext(ctx context.Context) *GenericProjectFilesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the generic project files create params +func (o *GenericProjectFilesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the generic project files create params +func (o *GenericProjectFilesCreateParams) WithHTTPClient(client *http.Client) *GenericProjectFilesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the generic project files create params +func (o *GenericProjectFilesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the generic project files create params +func (o *GenericProjectFilesCreateParams) WithAppSlug(appSlug string) *GenericProjectFilesCreateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the generic project files create params +func (o *GenericProjectFilesCreateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithGenericProjectFile adds the genericProjectFile to the generic project files create params +func (o *GenericProjectFilesCreateParams) WithGenericProjectFile(genericProjectFile *models.V0ProjectFileStorageUploadParams) *GenericProjectFilesCreateParams { + o.SetGenericProjectFile(genericProjectFile) + return o +} + +// SetGenericProjectFile adds the genericProjectFile to the generic project files create params +func (o *GenericProjectFilesCreateParams) SetGenericProjectFile(genericProjectFile *models.V0ProjectFileStorageUploadParams) { + o.GenericProjectFile = genericProjectFile +} + +// WriteToRequest writes these params to a swagger request +func (o *GenericProjectFilesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.GenericProjectFile != nil { + if err := r.SetBodyParam(o.GenericProjectFile); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/generic_project_files_create_responses.go b/go/client/operations/generic_project_files_create_responses.go new file mode 100644 index 0000000..eb136de --- /dev/null +++ b/go/client/operations/generic_project_files_create_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// GenericProjectFilesCreateReader is a Reader for the GenericProjectFilesCreate structure. +type GenericProjectFilesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GenericProjectFilesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewGenericProjectFilesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGenericProjectFilesCreateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewGenericProjectFilesCreateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGenericProjectFilesCreateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGenericProjectFilesCreateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGenericProjectFilesCreateCreated creates a GenericProjectFilesCreateCreated with default headers values +func NewGenericProjectFilesCreateCreated() *GenericProjectFilesCreateCreated { + return &GenericProjectFilesCreateCreated{} +} + +/* GenericProjectFilesCreateCreated describes a response with status code 201, with default header values. + +Created +*/ +type GenericProjectFilesCreateCreated struct { + Payload *models.V0ProjectFileStorageResponseModel +} + +func (o *GenericProjectFilesCreateCreated) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/generic-project-files][%d] genericProjectFilesCreateCreated %+v", 201, o.Payload) +} +func (o *GenericProjectFilesCreateCreated) GetPayload() *models.V0ProjectFileStorageResponseModel { + return o.Payload +} + +func (o *GenericProjectFilesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProjectFileStorageResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFilesCreateBadRequest creates a GenericProjectFilesCreateBadRequest with default headers values +func NewGenericProjectFilesCreateBadRequest() *GenericProjectFilesCreateBadRequest { + return &GenericProjectFilesCreateBadRequest{} +} + +/* GenericProjectFilesCreateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GenericProjectFilesCreateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFilesCreateBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/generic-project-files][%d] genericProjectFilesCreateBadRequest %+v", 400, o.Payload) +} +func (o *GenericProjectFilesCreateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFilesCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFilesCreateUnauthorized creates a GenericProjectFilesCreateUnauthorized with default headers values +func NewGenericProjectFilesCreateUnauthorized() *GenericProjectFilesCreateUnauthorized { + return &GenericProjectFilesCreateUnauthorized{} +} + +/* GenericProjectFilesCreateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type GenericProjectFilesCreateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFilesCreateUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/generic-project-files][%d] genericProjectFilesCreateUnauthorized %+v", 401, o.Payload) +} +func (o *GenericProjectFilesCreateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFilesCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFilesCreateNotFound creates a GenericProjectFilesCreateNotFound with default headers values +func NewGenericProjectFilesCreateNotFound() *GenericProjectFilesCreateNotFound { + return &GenericProjectFilesCreateNotFound{} +} + +/* GenericProjectFilesCreateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type GenericProjectFilesCreateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFilesCreateNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/generic-project-files][%d] genericProjectFilesCreateNotFound %+v", 404, o.Payload) +} +func (o *GenericProjectFilesCreateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFilesCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGenericProjectFilesCreateInternalServerError creates a GenericProjectFilesCreateInternalServerError with default headers values +func NewGenericProjectFilesCreateInternalServerError() *GenericProjectFilesCreateInternalServerError { + return &GenericProjectFilesCreateInternalServerError{} +} + +/* GenericProjectFilesCreateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GenericProjectFilesCreateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *GenericProjectFilesCreateInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/generic-project-files][%d] genericProjectFilesCreateInternalServerError %+v", 500, o.Payload) +} +func (o *GenericProjectFilesCreateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *GenericProjectFilesCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/operations_client.go b/go/client/operations/operations_client.go new file mode 100644 index 0000000..c90cf32 --- /dev/null +++ b/go/client/operations/operations_client.go @@ -0,0 +1,2963 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new operations API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for operations API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + ActivityList(params *ActivityListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ActivityListOK, error) + + AddonListByApp(params *AddonListByAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddonListByAppOK, error) + + AddonListByOrganization(params *AddonListByOrganizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddonListByOrganizationOK, error) + + AddonListByUser(params *AddonListByUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddonListByUserOK, error) + + AddonsList(params *AddonsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddonsListOK, error) + + AddonsShow(params *AddonsShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddonsShowOK, error) + + AndroidKeystoreFileCreate(params *AndroidKeystoreFileCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AndroidKeystoreFileCreateCreated, error) + + AndroidKeystoreFileList(params *AndroidKeystoreFileListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AndroidKeystoreFileListOK, error) + + AppConfigCreate(params *AppConfigCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppConfigCreateOK, error) + + AppConfigDatastoreShow(params *AppConfigDatastoreShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppConfigDatastoreShowOK, error) + + AppCreate(params *AppCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppCreateOK, error) + + AppFinish(params *AppFinishParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppFinishOK, error) + + AppList(params *AppListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppListOK, error) + + AppListByOrganization(params *AppListByOrganizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppListByOrganizationOK, error) + + AppListByUser(params *AppListByUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppListByUserOK, error) + + AppShow(params *AppShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppShowOK, error) + + AppWebhookCreate(params *AppWebhookCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppWebhookCreateOK, error) + + AppleAPICredentialList(params *AppleAPICredentialListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppleAPICredentialListOK, error) + + ArtifactDelete(params *ArtifactDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ArtifactDeleteOK, error) + + ArtifactList(params *ArtifactListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ArtifactListOK, error) + + ArtifactShow(params *ArtifactShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ArtifactShowOK, error) + + ArtifactUpdate(params *ArtifactUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ArtifactUpdateOK, error) + + AvatarCandidateCreate(params *AvatarCandidateCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AvatarCandidateCreateCreated, error) + + AvatarCandidateList(params *AvatarCandidateListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AvatarCandidateListOK, error) + + AvatarCandidatePromote(params *AvatarCandidatePromoteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AvatarCandidatePromoteOK, error) + + BranchList(params *BranchListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BranchListOK, error) + + BuildAbort(params *BuildAbortParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildAbortOK, error) + + BuildBitriseYmlShow(params *BuildBitriseYmlShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildBitriseYmlShowOK, error) + + BuildCertificateConfirm(params *BuildCertificateConfirmParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateConfirmOK, error) + + BuildCertificateCreate(params *BuildCertificateCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateCreateCreated, error) + + BuildCertificateDelete(params *BuildCertificateDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateDeleteOK, error) + + BuildCertificateList(params *BuildCertificateListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateListOK, error) + + BuildCertificateShow(params *BuildCertificateShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateShowOK, error) + + BuildCertificateUpdate(params *BuildCertificateUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateUpdateOK, error) + + BuildList(params *BuildListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildListOK, error) + + BuildListAll(params *BuildListAllParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildListAllOK, error) + + BuildLog(params *BuildLogParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildLogOK, error) + + BuildRequestList(params *BuildRequestListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildRequestListOK, error) + + BuildRequestUpdate(params *BuildRequestUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildRequestUpdateOK, error) + + BuildShow(params *BuildShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildShowOK, error) + + BuildTrigger(params *BuildTriggerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildTriggerCreated, error) + + BuildWorkflowList(params *BuildWorkflowListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildWorkflowListOK, error) + + GenericProjectFileConfirm(params *GenericProjectFileConfirmParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFileConfirmOK, error) + + GenericProjectFileDelete(params *GenericProjectFileDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFileDeleteOK, error) + + GenericProjectFileList(params *GenericProjectFileListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFileListOK, error) + + GenericProjectFileShow(params *GenericProjectFileShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFileShowOK, error) + + GenericProjectFileUpdate(params *GenericProjectFileUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFileUpdateOK, error) + + GenericProjectFilesCreate(params *GenericProjectFilesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFilesCreateCreated, error) + + OrgList(params *OrgListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OrgListOK, error) + + OrgShow(params *OrgShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OrgShowOK, error) + + OutgoingWebhookCreate(params *OutgoingWebhookCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OutgoingWebhookCreateOK, error) + + OutgoingWebhookDelete(params *OutgoingWebhookDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OutgoingWebhookDeleteOK, error) + + OutgoingWebhookList(params *OutgoingWebhookListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OutgoingWebhookListOK, error) + + OutgoingWebhookUpdate(params *OutgoingWebhookUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OutgoingWebhookUpdateOK, error) + + ProvisioningProfileConfirm(params *ProvisioningProfileConfirmParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileConfirmOK, error) + + ProvisioningProfileCreate(params *ProvisioningProfileCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileCreateCreated, error) + + ProvisioningProfileDelete(params *ProvisioningProfileDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileDeleteOK, error) + + ProvisioningProfileList(params *ProvisioningProfileListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileListOK, error) + + ProvisioningProfileShow(params *ProvisioningProfileShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileShowOK, error) + + ProvisioningProfileUpdate(params *ProvisioningProfileUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileUpdateOK, error) + + SSHKeyCreate(params *SSHKeyCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SSHKeyCreateOK, error) + + TestDeviceList(params *TestDeviceListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TestDeviceListOK, error) + + UserPlan(params *UserPlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserPlanOK, error) + + UserProfile(params *UserProfileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserProfileOK, error) + + UserShow(params *UserShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserShowOK, error) + + WebhookDeliveryItemList(params *WebhookDeliveryItemListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WebhookDeliveryItemListOK, error) + + WebhookDeliveryItemRedeliver(params *WebhookDeliveryItemRedeliverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WebhookDeliveryItemRedeliverOK, error) + + WebhookDeliveryItemShow(params *WebhookDeliveryItemShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WebhookDeliveryItemShowOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + ActivityList gets list of bitrise activity events + + List all the Bitrise activity events +*/ +func (a *Client) ActivityList(params *ActivityListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ActivityListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewActivityListParams() + } + op := &runtime.ClientOperation{ + ID: "activity-list", + Method: "GET", + PathPattern: "/me/activities", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ActivityListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ActivityListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for activity-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AddonListByApp gets list of the addons for apps + + List all the provisioned addons for the authorized apps +*/ +func (a *Client) AddonListByApp(params *AddonListByAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddonListByAppOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAddonListByAppParams() + } + op := &runtime.ClientOperation{ + ID: "addon-list-by-app", + Method: "GET", + PathPattern: "/apps/{app-slug}/addons", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AddonListByAppReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AddonListByAppOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for addon-list-by-app: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AddonListByOrganization gets list of the addons for organization + + List all the provisioned addons for organization +*/ +func (a *Client) AddonListByOrganization(params *AddonListByOrganizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddonListByOrganizationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAddonListByOrganizationParams() + } + op := &runtime.ClientOperation{ + ID: "addon-list-by-organization", + Method: "GET", + PathPattern: "/organizations/{organization-slug}/addons", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AddonListByOrganizationReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AddonListByOrganizationOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for addon-list-by-organization: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AddonListByUser gets list of the addons for user + + List all the provisioned addons for the authenticated user +*/ +func (a *Client) AddonListByUser(params *AddonListByUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddonListByUserOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAddonListByUserParams() + } + op := &runtime.ClientOperation{ + ID: "addon-list-by-user", + Method: "GET", + PathPattern: "/users/{user-slug}/addons", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AddonListByUserReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AddonListByUserOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for addon-list-by-user: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AddonsList gets list of available bitrise addons + + List all the available Bitrise addons +*/ +func (a *Client) AddonsList(params *AddonsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddonsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAddonsListParams() + } + op := &runtime.ClientOperation{ + ID: "addons-list", + Method: "GET", + PathPattern: "/addons", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AddonsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AddonsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for addons-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AddonsShow gets a specific bitrise addon + + Show details of a specific Bitrise addon +*/ +func (a *Client) AddonsShow(params *AddonsShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddonsShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAddonsShowParams() + } + op := &runtime.ClientOperation{ + ID: "addons-show", + Method: "GET", + PathPattern: "/addons/{addon-id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AddonsShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AddonsShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for addons-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AndroidKeystoreFileCreate creates an android keystore file + + Add a new Android keystore file to an app +*/ +func (a *Client) AndroidKeystoreFileCreate(params *AndroidKeystoreFileCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AndroidKeystoreFileCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAndroidKeystoreFileCreateParams() + } + op := &runtime.ClientOperation{ + ID: "android-keystore-file-create", + Method: "POST", + PathPattern: "/apps/{app-slug}/android-keystore-files", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AndroidKeystoreFileCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AndroidKeystoreFileCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for android-keystore-file-create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AndroidKeystoreFileList gets a list of the android keystore files + + List all the android keystore files that have been uploaded to a specific app. +*/ +func (a *Client) AndroidKeystoreFileList(params *AndroidKeystoreFileListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AndroidKeystoreFileListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAndroidKeystoreFileListParams() + } + op := &runtime.ClientOperation{ + ID: "android-keystore-file-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/android-keystore-files", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AndroidKeystoreFileListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AndroidKeystoreFileListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for android-keystore-file-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AppConfigCreate uploads a new bitrise yml for your application + + Upload a new bitrise.yml for your application. +*/ +func (a *Client) AppConfigCreate(params *AppConfigCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppConfigCreateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppConfigCreateParams() + } + op := &runtime.ClientOperation{ + ID: "app-config-create", + Method: "POST", + PathPattern: "/apps/{app-slug}/bitrise.yml", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppConfigCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppConfigCreateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-config-create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AppConfigDatastoreShow gets bitrise yml of a specific app + + Get the full `bitrise.yml` configuration of an application, by providing the app slug. It returns the current `bitrise.yml` that is stored on bitrise.io in full, including the trigger map, the different workflows and the Steps. +*/ +func (a *Client) AppConfigDatastoreShow(params *AppConfigDatastoreShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppConfigDatastoreShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppConfigDatastoreShowParams() + } + op := &runtime.ClientOperation{ + ID: "app-config-datastore-show", + Method: "GET", + PathPattern: "/apps/{app-slug}/bitrise.yml", + ProducesMediaTypes: []string{"text/plain"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppConfigDatastoreShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppConfigDatastoreShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-config-datastore-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AppCreate adds a new app + + Add a new app to Bitrise. This is the first step of the app registration process. To successfully set it up, you need to provide the required app parameters: your git provider, the repository URL, the slug of the repository as it appears at the provider, and the slug of the owner of the repository. Read more about the app creation process in our [detailed guide](https://devcenter.bitrise.io/api/adding-and-managing-apps/#adding-a-new-app). +*/ +func (a *Client) AppCreate(params *AppCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppCreateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppCreateParams() + } + op := &runtime.ClientOperation{ + ID: "app-create", + Method: "POST", + PathPattern: "/apps/register", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppCreateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AppFinish saves the application at the end of the app registration process + + Save the application after registering it on Bitrise and registering an SSH key (and, optionally, adding a webhook). With this endpoint you can define the initial configuration, define application-level environment variables, determine the project type, and set an Organization to be the owner of the app. Read more about the app registration process in our [detailed guide](https://devcenter.bitrise.io/api/adding-and-managing-apps/#adding-a-new-app). +*/ +func (a *Client) AppFinish(params *AppFinishParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppFinishOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppFinishParams() + } + op := &runtime.ClientOperation{ + ID: "app-finish", + Method: "POST", + PathPattern: "/apps/{app-slug}/finish", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppFinishReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppFinishOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-finish: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AppList gets list of the apps + + List all the apps available for the authenticated account, including those that are owned by other users or Organizations. +*/ +func (a *Client) AppList(params *AppListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppListParams() + } + op := &runtime.ClientOperation{ + ID: "app-list", + Method: "GET", + PathPattern: "/apps", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AppListByOrganization gets list of the apps for an organization + + List all the available apps owned by a given organization. [Find the organization URL](https://devcenter.bitrise.io/team-management/organizations/org-url/) of the organisations you are part of; be aware that the endpoint will not return any apps if the authenticated account is not a member of the given organisation. +*/ +func (a *Client) AppListByOrganization(params *AppListByOrganizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppListByOrganizationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppListByOrganizationParams() + } + op := &runtime.ClientOperation{ + ID: "app-list-by-organization", + Method: "GET", + PathPattern: "/organizations/{org-slug}/apps", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppListByOrganizationReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppListByOrganizationOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-list-by-organization: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AppListByUser gets list of the apps for a user + + List all the available apps for the given user. It needs the user slug that you can get from the [GET /me](https://api-docs.bitrise.io/#/user/user-profile) endpoint. +*/ +func (a *Client) AppListByUser(params *AppListByUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppListByUserOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppListByUserParams() + } + op := &runtime.ClientOperation{ + ID: "app-list-by-user", + Method: "GET", + PathPattern: "/users/{user-slug}/apps", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppListByUserReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppListByUserOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-list-by-user: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AppShow gets a specific app + + Get the details of a specific app by providing the app slug. You can get the app slug by calling the [/apps](https://api-docs.bitrise.io/#/application/app-list) endpoint or by opening the app on bitrise.io and copying the slug from the URL. +*/ +func (a *Client) AppShow(params *AppShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppShowParams() + } + op := &runtime.ClientOperation{ + ID: "app-show", + Method: "GET", + PathPattern: "/apps/{app-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AppWebhookCreate registers an incoming webhook for a specific application + + [Register an incoming webhook](https://devcenter.bitrise.io/api/incoming-and-outgoing-webhooks/#incoming-webhooks) for a specific application. You can do this during the app registration process or at any other time in an app's life. When calling this endpoint, a webhook is registered at your git provider: this is necessary to automatically trigger builds on Bitrise. +*/ +func (a *Client) AppWebhookCreate(params *AppWebhookCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppWebhookCreateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppWebhookCreateParams() + } + op := &runtime.ClientOperation{ + ID: "app-webhook-create", + Method: "POST", + PathPattern: "/apps/{app-slug}/register-webhook", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppWebhookCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppWebhookCreateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for app-webhook-create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AppleAPICredentialList lists apple API credentials for a specific user + + List Apple API credentials for a specific Bitrise user +*/ +func (a *Client) AppleAPICredentialList(params *AppleAPICredentialListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppleAPICredentialListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppleAPICredentialListParams() + } + op := &runtime.ClientOperation{ + ID: "apple-api-credential-list", + Method: "GET", + PathPattern: "/users/{user-slug}/apple-api-credentials", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AppleAPICredentialListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AppleAPICredentialListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for apple-api-credential-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ArtifactDelete deletes a build artifact + + Delete a build artifact of an app's build. The required parameters are app slug, build slug and artifact slug. You can fetch the build artifact slug if you first list all build artifacts of an app with the [/apps/](https://api-docs.bitrise.io/#/build-artifact/artifact-list) endpoint. +*/ +func (a *Client) ArtifactDelete(params *ArtifactDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ArtifactDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewArtifactDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "artifact-delete", + Method: "DELETE", + PathPattern: "/apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ArtifactDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ArtifactDeleteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for artifact-delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ArtifactList gets a list of all build artifacts + + List all build artifacts that have been generated for an app's build. You can use the created build artifact slugs from the response output to retrieve data of a specific build artifact with the [GET/apps/](https://api-docs.bitrise.io/#/build-artifact/artifact-show) endpoint or update a build artifact with the [PATCH/apps](https://api-docs.bitrise.io/#/build-artifact/artifact-update) endpoint. +*/ +func (a *Client) ArtifactList(params *ArtifactListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ArtifactListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewArtifactListParams() + } + op := &runtime.ClientOperation{ + ID: "artifact-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/builds/{build-slug}/artifacts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ArtifactListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ArtifactListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for artifact-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ArtifactShow gets a specific build artifact + + Retrieve data of a specific build artifact. The response output contains a time-limited download url (expires in 10 minutes) and a public install page URL. You can view the build artifact with both URLs, but the public install page url will not work unless you [enable it](https://devcenter.bitrise.io/tutorials/deploy/bitrise-app-deployment/#enabling-public-page-for-the-app). +*/ +func (a *Client) ArtifactShow(params *ArtifactShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ArtifactShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewArtifactShowParams() + } + op := &runtime.ClientOperation{ + ID: "artifact-show", + Method: "GET", + PathPattern: "/apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ArtifactShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ArtifactShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for artifact-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ArtifactUpdate updates a build artifact + + Update the `is_public_page_enabled` attribute of your app's build. The required parameters are app slug, build slug and artifact slug. You can fetch the build artifact slug if you first list all build artifacts of an app with the [GET /apps/](https://api-docs.bitrise.io/#/build-artifact/artifact-list) endpoint. +*/ +func (a *Client) ArtifactUpdate(params *ArtifactUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ArtifactUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewArtifactUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "artifact-update", + Method: "PATCH", + PathPattern: "/apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ArtifactUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ArtifactUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for artifact-update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AvatarCandidateCreate creates avatar candidates + + Add new avatar candidates to a specific app +*/ +func (a *Client) AvatarCandidateCreate(params *AvatarCandidateCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AvatarCandidateCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAvatarCandidateCreateParams() + } + op := &runtime.ClientOperation{ + ID: "avatar-candidate-create", + Method: "POST", + PathPattern: "/apps/{app-slug}/avatar-candidates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AvatarCandidateCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AvatarCandidateCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for avatar-candidate-create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AvatarCandidateList gets list of the avatar candidates + + List all available avatar candidates for an application +*/ +func (a *Client) AvatarCandidateList(params *AvatarCandidateListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AvatarCandidateListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAvatarCandidateListParams() + } + op := &runtime.ClientOperation{ + ID: "avatar-candidate-list", + Method: "GET", + PathPattern: "/v0.1/apps/{app-slug}/avatar-candidates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AvatarCandidateListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AvatarCandidateListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for avatar-candidate-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AvatarCandidatePromote promotes an avatar candidate + + Promotes an avatar candidate for an app +*/ +func (a *Client) AvatarCandidatePromote(params *AvatarCandidatePromoteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AvatarCandidatePromoteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAvatarCandidatePromoteParams() + } + op := &runtime.ClientOperation{ + ID: "avatar-candidate-promote", + Method: "PATCH", + PathPattern: "/apps/{app-slug}/avatar-candidates/{avatar-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &AvatarCandidatePromoteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AvatarCandidatePromoteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for avatar-candidate-promote: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BranchList lists the branches with existing builds of an app s repository + + Lists only those branches of a specified Bitrise app that have existing builds. +*/ +func (a *Client) BranchList(params *BranchListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BranchListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBranchListParams() + } + op := &runtime.ClientOperation{ + ID: "branch-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/branches", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BranchListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BranchListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for branch-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildAbort aborts a specific build + + Abort a specific build. Set an abort reason with the `abort_reason` parameter. Use the `abort_with_success` parameter to abort a build but still count it as a successful one. +*/ +func (a *Client) BuildAbort(params *BuildAbortParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildAbortOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildAbortParams() + } + op := &runtime.ClientOperation{ + ID: "build-abort", + Method: "POST", + PathPattern: "/apps/{app-slug}/builds/{build-slug}/abort", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildAbortReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildAbortOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-abort: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildBitriseYmlShow gets the bitrise yml of a build + + Get the bitrise.yml file of one of the builds of a given app. This will return the `bitrise.yml` configuration with which the build ran. You can compare it to [the current bitrise.yml configuration](https://api-docs.bitrise.io/#/application/app-config-datastore-show) of the app. +*/ +func (a *Client) BuildBitriseYmlShow(params *BuildBitriseYmlShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildBitriseYmlShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildBitriseYmlShowParams() + } + op := &runtime.ClientOperation{ + ID: "build-bitrise-yml-show", + Method: "GET", + PathPattern: "/apps/{app-slug}/builds/{build-slug}/bitrise.yml", + ProducesMediaTypes: []string{"text/plain"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildBitriseYmlShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildBitriseYmlShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-bitrise-yml-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildCertificateConfirm confirms a build certificate upload + + This is the last step of uploading a build certificate to Bitrise. Confirm the build certificate upload and view the file on the Code Signing tab of a specific app. Read more in our [Confirming the iOS code signing file upload](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide. +*/ +func (a *Client) BuildCertificateConfirm(params *BuildCertificateConfirmParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateConfirmOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildCertificateConfirmParams() + } + op := &runtime.ClientOperation{ + ID: "build-certificate-confirm", + Method: "POST", + PathPattern: "/apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildCertificateConfirmReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildCertificateConfirmOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-certificate-confirm: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildCertificateCreate creates a build certificate + + Create a temporary pre-signed upload URL for the build certificate and upload the file to AWS with a simple `curl` request. To complete the uploading process and view your files on the Code Signing tab of your app, continue with the [POST /apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded](https://api-docs.bitrise.io/#/build-certificate/build-certificate-confirm) endpoint. Read more in our [Creating and uploading an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#creating--uploading-an-ios-code-signing-file) guide. +*/ +func (a *Client) BuildCertificateCreate(params *BuildCertificateCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildCertificateCreateParams() + } + op := &runtime.ClientOperation{ + ID: "build-certificate-create", + Method: "POST", + PathPattern: "/apps/{app-slug}/build-certificates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildCertificateCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildCertificateCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-certificate-create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildCertificateDelete deletes a build certificate + + Delete an app's build certificate. You can fetch the build certificate slug for this endpoint if you first call the [GET /apps/{app-slug}/build-certificates](https://api-docs.bitrise.io/#/build-certificate/build-certificate-list) endpoint to list all available build certificates of an app. Read more in our [Deleting an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#deleting-an-ios-code-signing-file) guide. +*/ +func (a *Client) BuildCertificateDelete(params *BuildCertificateDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildCertificateDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "build-certificate-delete", + Method: "DELETE", + PathPattern: "/apps/{app-slug}/build-certificates/{build-certificate-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildCertificateDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildCertificateDeleteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-certificate-delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildCertificateList gets a list of the build certificates + + List all the build certificates that have been uploaded to a specific app. Read more in our [Listing the uploaded iOS code signing files of an app](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#listing-the-uploaded-ios-code-signing-files-of-an-app) guide. +*/ +func (a *Client) BuildCertificateList(params *BuildCertificateListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildCertificateListParams() + } + op := &runtime.ClientOperation{ + ID: "build-certificate-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/build-certificates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildCertificateListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildCertificateListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-certificate-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildCertificateShow gets a specific build certificate + + Retrieve data of a specific build certificate. You can fetch the build certificate slug for this endpoint if you first call the [GET /apps/{app-slug}/build-certificates](https://api-docs.bitrise.io/#/build-certificate/build-certificate-list) endpoint to list all available build certificates of an app. Read more in our [Getting a specific iOS code signing file's data](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#getting-a-specific-ios-code-signing-files-data) guide. +*/ +func (a *Client) BuildCertificateShow(params *BuildCertificateShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildCertificateShowParams() + } + op := &runtime.ClientOperation{ + ID: "build-certificate-show", + Method: "GET", + PathPattern: "/apps/{app-slug}/build-certificates/{build-certificate-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildCertificateShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildCertificateShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-certificate-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildCertificateUpdate updates a build certificate + + Update an uploaded build certificate's attributes. You can fetch the build certificate slug for this endpoint if you first call the [GET /apps/{app-slug}/build-certificates](https://api-docs.bitrise.io/#/build-certificate/build-certificate-list) endpoint. Read more in our [Updating an uploaded iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide. +*/ +func (a *Client) BuildCertificateUpdate(params *BuildCertificateUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildCertificateUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildCertificateUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "build-certificate-update", + Method: "PATCH", + PathPattern: "/apps/{app-slug}/build-certificates/{build-certificate-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildCertificateUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildCertificateUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-certificate-update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildList lists all builds of an app + + List all the builds of a specified Bitrise app. Set parameters to filter builds: for example, you can search for builds run with a given workflow or all builds that were triggered by Pull Requests. It returns all the relevant data of the build. +*/ +func (a *Client) BuildList(params *BuildListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildListParams() + } + op := &runtime.ClientOperation{ + ID: "build-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/builds", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildListAll lists all builds + + List all the Bitrise builds that can be accessed with the authenticated account. Filter builds based on their owner, using the owner slug, or the status of the build. +*/ +func (a *Client) BuildListAll(params *BuildListAllParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildListAllOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildListAllParams() + } + op := &runtime.ClientOperation{ + ID: "build-list-all", + Method: "GET", + PathPattern: "/builds", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildListAllReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildListAllOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-list-all: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildLog gets the build log of a build + + Get the build log of a specified build of a Bitrise app. You can get the build slug either by calling the [/builds](https://api-docs.bitrise.io/#/builds/build-list) endpoint or by clicking on the build on bitrise.io and copying the slug from the URL. +*/ +func (a *Client) BuildLog(params *BuildLogParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildLogOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildLogParams() + } + op := &runtime.ClientOperation{ + ID: "build-log", + Method: "GET", + PathPattern: "/apps/{app-slug}/builds/{build-slug}/log", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildLogReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildLogOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-log: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildRequestList lists the open build requests for an app + + List the existing open build requests of a specified Bitrise app +*/ +func (a *Client) BuildRequestList(params *BuildRequestListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildRequestListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildRequestListParams() + } + op := &runtime.ClientOperation{ + ID: "build-request-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/build-requests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildRequestListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildRequestListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-request-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildRequestUpdate updates a build request + + Update a specific build request of a specific app +*/ +func (a *Client) BuildRequestUpdate(params *BuildRequestUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildRequestUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildRequestUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "build-request-update", + Method: "PATCH", + PathPattern: "/apps/{app-slug}/build-requests/{build-request-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildRequestUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildRequestUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-request-update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildShow gets a build of a given app + + Get the specified build of a given Bitrise app. You need to provide both an app slug and a build slug. You can get the build slug either by calling the [/builds](https://api-docs.bitrise.io/#/builds/build-list) endpoint or by clicking on the build on bitrise.io and copying the slug from the URL. The endpoint returns all the relevant data of the build. +*/ +func (a *Client) BuildShow(params *BuildShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildShowParams() + } + op := &runtime.ClientOperation{ + ID: "build-show", + Method: "GET", + PathPattern: "/apps/{app-slug}/builds/{build-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildTrigger triggers a new build + + Trigger a new build. Specify an app slug and at least one parameter out of three: a git tag or git commit hash, a branch, or a workflow ID. You can also set specific parameters for Pull Request builds and define additional environment variables for your build. [Check out our detailed guide](https://devcenter.bitrise.io/api/build-trigger/). +*/ +func (a *Client) BuildTrigger(params *BuildTriggerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildTriggerCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildTriggerParams() + } + op := &runtime.ClientOperation{ + ID: "build-trigger", + Method: "POST", + PathPattern: "/apps/{app-slug}/builds", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildTriggerReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildTriggerCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-trigger: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BuildWorkflowList lists the workflows of an app + + List the workflows that were triggered at any time for a given Bitrise app. Note that it might list workflows that are currently not defined in the app's `bitrise.yml` configuration - and conversely, workflows that were never triggered will not be listed even if they are defined in the `bitrise.yml` file. +*/ +func (a *Client) BuildWorkflowList(params *BuildWorkflowListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BuildWorkflowListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBuildWorkflowListParams() + } + op := &runtime.ClientOperation{ + ID: "build-workflow-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/build-workflows", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BuildWorkflowListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BuildWorkflowListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for build-workflow-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GenericProjectFileConfirm confirms a generic project file upload + + This is the last step of uploading a generic project file to Bitrise. Confirm the generic project file upload and view the file on the Code Signing tab of a specific app. Read more in our [Confirming the upload](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#confirming-the-file-upload) guide. +*/ +func (a *Client) GenericProjectFileConfirm(params *GenericProjectFileConfirmParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFileConfirmOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGenericProjectFileConfirmParams() + } + op := &runtime.ClientOperation{ + ID: "generic-project-file-confirm", + Method: "POST", + PathPattern: "/apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &GenericProjectFileConfirmReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GenericProjectFileConfirmOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for generic-project-file-confirm: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GenericProjectFileDelete deletes a generic project file + + Delete an app's generic project file. You can fetch an app's generic project file slug if you first list all the uploaded files with the [GET /apps/{app-slug}/generic-project-files](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-list) endpoint. Read more in our [Deleting a file](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#deleting-a-file) guide. +*/ +func (a *Client) GenericProjectFileDelete(params *GenericProjectFileDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFileDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGenericProjectFileDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "generic-project-file-delete", + Method: "DELETE", + PathPattern: "/apps/{app-slug}/generic-project-files/{generic-project-file-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &GenericProjectFileDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GenericProjectFileDeleteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for generic-project-file-delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GenericProjectFileList gets a list of the generic project files + + List all the generic project files that have been uploaded to a specific app. Read more in our [Listing the uploaded files of an app](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#listing-the-uploaded-files-of-an-app) guide. +*/ +func (a *Client) GenericProjectFileList(params *GenericProjectFileListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFileListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGenericProjectFileListParams() + } + op := &runtime.ClientOperation{ + ID: "generic-project-file-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/generic-project-files", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &GenericProjectFileListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GenericProjectFileListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for generic-project-file-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GenericProjectFileShow gets a specific generic project file + + Retrieve data of a specific generic project file to check its attributes and optionally modify them with the [PATCH /apps/](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-update) endpoint. Read more in our [Retrieving a specific file's data](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#retrieving-a-specific-files-data) guide. +*/ +func (a *Client) GenericProjectFileShow(params *GenericProjectFileShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFileShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGenericProjectFileShowParams() + } + op := &runtime.ClientOperation{ + ID: "generic-project-file-show", + Method: "GET", + PathPattern: "/apps/{app-slug}/generic-project-files/{generic-project-file-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &GenericProjectFileShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GenericProjectFileShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for generic-project-file-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GenericProjectFileUpdate updates a generic project file + + Update a generic project file's attributes. You can fetch an app's generic project file slug if you first list all the uploaded files with the [GET /apps/{app-slug}/generic-project-files](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-list) endpoint. Read more in our [Updating an uploaded file](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#updating-an-uploaded-file) guide. +*/ +func (a *Client) GenericProjectFileUpdate(params *GenericProjectFileUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFileUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGenericProjectFileUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "generic-project-file-update", + Method: "PATCH", + PathPattern: "/apps/{app-slug}/generic-project-files/{generic-project-file-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &GenericProjectFileUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GenericProjectFileUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for generic-project-file-update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GenericProjectFilesCreate creates a generic project file + + Create a temporary pre-signed upload URL (expires in 10 minutes) for the generic project file and upload it to AWS with a simple `curl` request. To complete the uploading process and view your files on the Code Signing tab of your app, continue with the [POST /apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-confirm) endpoint. Read more in our [Creating and uploading files to Generic File Storage](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#creating-and-uploading-files-to-generic-file-storage) guide. +*/ +func (a *Client) GenericProjectFilesCreate(params *GenericProjectFilesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenericProjectFilesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGenericProjectFilesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "generic-project-files-create", + Method: "POST", + PathPattern: "/apps/{app-slug}/generic-project-files", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &GenericProjectFilesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GenericProjectFilesCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for generic-project-files-create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + OrgList lists the organizations that the user is part of + + List all Bitrise organizations that the user is part of +*/ +func (a *Client) OrgList(params *OrgListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OrgListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOrgListParams() + } + op := &runtime.ClientOperation{ + ID: "org-list", + Method: "GET", + PathPattern: "/organizations", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OrgListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OrgListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for org-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + OrgShow gets a specified organization + + Get a specified Bitrise organization that the user is part of. +*/ +func (a *Client) OrgShow(params *OrgShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OrgShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOrgShowParams() + } + op := &runtime.ClientOperation{ + ID: "org-show", + Method: "GET", + PathPattern: "/organizations/{org-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OrgShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OrgShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for org-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + OutgoingWebhookCreate creates an outgoing webhook for an app + + Create an outgoing webhook for a specified Bitrise app: this can be used to send build events to a specified URL with custom headers. Currently, only build events can trigger outgoing webhooks. +*/ +func (a *Client) OutgoingWebhookCreate(params *OutgoingWebhookCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OutgoingWebhookCreateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOutgoingWebhookCreateParams() + } + op := &runtime.ClientOperation{ + ID: "outgoing-webhook-create", + Method: "POST", + PathPattern: "/apps/{app-slug}/outgoing-webhooks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OutgoingWebhookCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OutgoingWebhookCreateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for outgoing-webhook-create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + OutgoingWebhookDelete deletes an outgoing webhook of an app + + Delete an existing outgoing webhook for a specified Bitrise app. +*/ +func (a *Client) OutgoingWebhookDelete(params *OutgoingWebhookDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OutgoingWebhookDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOutgoingWebhookDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "outgoing-webhook-delete", + Method: "DELETE", + PathPattern: "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OutgoingWebhookDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OutgoingWebhookDeleteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for outgoing-webhook-delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + OutgoingWebhookList lists the outgoing webhooks of an app + + List all the outgoing webhooks registered for a specified Bitrise app. This returns all the relevant data of the webhook, including the slug of the webhook and its URL. +*/ +func (a *Client) OutgoingWebhookList(params *OutgoingWebhookListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OutgoingWebhookListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOutgoingWebhookListParams() + } + op := &runtime.ClientOperation{ + ID: "outgoing-webhook-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/outgoing-webhooks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OutgoingWebhookListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OutgoingWebhookListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for outgoing-webhook-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + OutgoingWebhookUpdate updates an outgoing webhook of an app + + Update an existing outgoing webhook (URL, events, secrets and headers) for a specified Bitrise app. Even if you do not want to change one of the parameters, you still have to provide that parameter as well: simply use its existing value. +*/ +func (a *Client) OutgoingWebhookUpdate(params *OutgoingWebhookUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OutgoingWebhookUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOutgoingWebhookUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "outgoing-webhook-update", + Method: "PUT", + PathPattern: "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OutgoingWebhookUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OutgoingWebhookUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for outgoing-webhook-update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ProvisioningProfileConfirm confirms a provisioning profile upload + + This is the last step of the upload process. Confirm the provisioning profile upload and view the file on the Code Signing tab of a specific app. Read more in our [Confirming the iOS code signing file upload](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide. +*/ +func (a *Client) ProvisioningProfileConfirm(params *ProvisioningProfileConfirmParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileConfirmOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProvisioningProfileConfirmParams() + } + op := &runtime.ClientOperation{ + ID: "provisioning-profile-confirm", + Method: "POST", + PathPattern: "/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ProvisioningProfileConfirmReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ProvisioningProfileConfirmOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for provisioning-profile-confirm: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ProvisioningProfileCreate creates a provisioning profile + + Create a temporary pre-signed upload URL (expires in 10 minutes) for the provisioning profile and upload it to AWS with a simple `curl` request. To complete the upload process, continue with the [POST /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-confirm) endpoint. Read more in our [Creating and uploading an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#creating--uploading-an-ios-code-signing-file) guide. +*/ +func (a *Client) ProvisioningProfileCreate(params *ProvisioningProfileCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProvisioningProfileCreateParams() + } + op := &runtime.ClientOperation{ + ID: "provisioning-profile-create", + Method: "POST", + PathPattern: "/apps/{app-slug}/provisioning-profiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ProvisioningProfileCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ProvisioningProfileCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for provisioning-profile-create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ProvisioningProfileDelete deletes a provisioning profile + + Delete an app's provisioning profile. You can fetch the provisioning profile's slug if you call the [GET /apps/{app-slug}/provisioning-profiles](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-list) endpoint. Read more in our [Deleting an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#deleting-an-ios-code-signing-file) guide. +*/ +func (a *Client) ProvisioningProfileDelete(params *ProvisioningProfileDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProvisioningProfileDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "provisioning-profile-delete", + Method: "DELETE", + PathPattern: "/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ProvisioningProfileDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ProvisioningProfileDeleteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for provisioning-profile-delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ProvisioningProfileList gets a list of the provisioning profiles + + List all the provisioning profiles that have been uploaded to a specific app. Read more in our [Listing the uploaded iOS code signing files of an app](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#listing-the-uploaded-ios-code-signing-files-of-an-app) guide. +*/ +func (a *Client) ProvisioningProfileList(params *ProvisioningProfileListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProvisioningProfileListParams() + } + op := &runtime.ClientOperation{ + ID: "provisioning-profile-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/provisioning-profiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ProvisioningProfileListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ProvisioningProfileListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for provisioning-profile-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ProvisioningProfileShow gets a specific provisioning profile + + Retrieve data of a specific provisioning profile. You can fetch the provisioning profile's slug if you call the [GET /apps/{app-slug}/provisioning-profiles](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-list) endpoint. Read more in our [Getting a specific iOS code signing file's data](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#getting-a-specific-ios-code-signing-files-data) guide. +*/ +func (a *Client) ProvisioningProfileShow(params *ProvisioningProfileShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProvisioningProfileShowParams() + } + op := &runtime.ClientOperation{ + ID: "provisioning-profile-show", + Method: "GET", + PathPattern: "/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ProvisioningProfileShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ProvisioningProfileShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for provisioning-profile-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ProvisioningProfileUpdate updates a provisioning profile + + Update an uploaded provisioning profile's attributes. You can fetch the provisioning profile's slug if you call the [GET /apps/{app-slug}/provisioning-profiles](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-list) endpoint. Read more in our [Updating an uploaded iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide. +*/ +func (a *Client) ProvisioningProfileUpdate(params *ProvisioningProfileUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProvisioningProfileUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProvisioningProfileUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "provisioning-profile-update", + Method: "PATCH", + PathPattern: "/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ProvisioningProfileUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ProvisioningProfileUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for provisioning-profile-update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + SSHKeyCreate adds an SSH key to a specific app + + Add an SSH-key to a specific app. After creating an app, you need to register the SSH key so that Bitrise will be able to access and clone your repository during the build process. This requires the app slug of your newly created app. +*/ +func (a *Client) SSHKeyCreate(params *SSHKeyCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SSHKeyCreateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSSHKeyCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ssh-key-create", + Method: "POST", + PathPattern: "/apps/{app-slug}/register-ssh-key", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &SSHKeyCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*SSHKeyCreateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ssh-key-create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TestDeviceList lists the test devices for an app + + List registered test devices of all members of a specified Bitrise app +*/ +func (a *Client) TestDeviceList(params *TestDeviceListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TestDeviceListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTestDeviceListParams() + } + op := &runtime.ClientOperation{ + ID: "test-device-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/test-devices", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TestDeviceListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TestDeviceListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for test-device-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UserPlan thes subscription plan of the user + + Get the subscription of the user: the current plan, any pending plans, and the duration of a trial period if applicable +*/ +func (a *Client) UserPlan(params *UserPlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserPlanOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUserPlanParams() + } + op := &runtime.ClientOperation{ + ID: "user-plan", + Method: "GET", + PathPattern: "/me/plan", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &UserPlanReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UserPlanOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for user-plan: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UserProfile gets your profile data + + Shows the authenticated users profile data +*/ +func (a *Client) UserProfile(params *UserProfileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserProfileOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUserProfileParams() + } + op := &runtime.ClientOperation{ + ID: "user-profile", + Method: "GET", + PathPattern: "/me", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &UserProfileReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UserProfileOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for user-profile: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UserShow gets a specific user + + Show information about a specific user +*/ +func (a *Client) UserShow(params *UserShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUserShowParams() + } + op := &runtime.ClientOperation{ + ID: "user-show", + Method: "GET", + PathPattern: "/users/{user-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &UserShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UserShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for user-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WebhookDeliveryItemList lists the webhook delivery items of an app + + List all the delivery items of an outgoing webhook of a Bitrise application +*/ +func (a *Client) WebhookDeliveryItemList(params *WebhookDeliveryItemListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WebhookDeliveryItemListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWebhookDeliveryItemListParams() + } + op := &runtime.ClientOperation{ + ID: "webhook-delivery-item-list", + Method: "GET", + PathPattern: "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WebhookDeliveryItemListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WebhookDeliveryItemListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for webhook-delivery-item-list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WebhookDeliveryItemRedeliver res deliver the webhook delivery items of an app + + Re-deliver the delivery item of a specified webhook of a Bitrise application +*/ +func (a *Client) WebhookDeliveryItemRedeliver(params *WebhookDeliveryItemRedeliverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WebhookDeliveryItemRedeliverOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWebhookDeliveryItemRedeliverParams() + } + op := &runtime.ClientOperation{ + ID: "webhook-delivery-item-redeliver", + Method: "POST", + PathPattern: "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}/redeliver", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WebhookDeliveryItemRedeliverReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WebhookDeliveryItemRedeliverOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for webhook-delivery-item-redeliver: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WebhookDeliveryItemShow gets a specific delivery item of a webhook + + Get the specified delivery item of an outgoing webhook of a Bitrise application +*/ +func (a *Client) WebhookDeliveryItemShow(params *WebhookDeliveryItemShowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WebhookDeliveryItemShowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWebhookDeliveryItemShowParams() + } + op := &runtime.ClientOperation{ + ID: "webhook-delivery-item-show", + Method: "GET", + PathPattern: "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WebhookDeliveryItemShowReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WebhookDeliveryItemShowOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for webhook-delivery-item-show: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/go/client/operations/org_list_parameters.go b/go/client/operations/org_list_parameters.go new file mode 100644 index 0000000..e9d1d3b --- /dev/null +++ b/go/client/operations/org_list_parameters.go @@ -0,0 +1,126 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewOrgListParams creates a new OrgListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOrgListParams() *OrgListParams { + return &OrgListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOrgListParamsWithTimeout creates a new OrgListParams object +// with the ability to set a timeout on a request. +func NewOrgListParamsWithTimeout(timeout time.Duration) *OrgListParams { + return &OrgListParams{ + timeout: timeout, + } +} + +// NewOrgListParamsWithContext creates a new OrgListParams object +// with the ability to set a context for a request. +func NewOrgListParamsWithContext(ctx context.Context) *OrgListParams { + return &OrgListParams{ + Context: ctx, + } +} + +// NewOrgListParamsWithHTTPClient creates a new OrgListParams object +// with the ability to set a custom HTTPClient for a request. +func NewOrgListParamsWithHTTPClient(client *http.Client) *OrgListParams { + return &OrgListParams{ + HTTPClient: client, + } +} + +/* OrgListParams contains all the parameters to send to the API endpoint + for the org list operation. + + Typically these are written to a http.Request. +*/ +type OrgListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the org list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OrgListParams) WithDefaults() *OrgListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the org list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OrgListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the org list params +func (o *OrgListParams) WithTimeout(timeout time.Duration) *OrgListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the org list params +func (o *OrgListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the org list params +func (o *OrgListParams) WithContext(ctx context.Context) *OrgListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the org list params +func (o *OrgListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the org list params +func (o *OrgListParams) WithHTTPClient(client *http.Client) *OrgListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the org list params +func (o *OrgListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *OrgListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/org_list_responses.go b/go/client/operations/org_list_responses.go new file mode 100644 index 0000000..9e1a8e6 --- /dev/null +++ b/go/client/operations/org_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// OrgListReader is a Reader for the OrgList structure. +type OrgListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OrgListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOrgListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewOrgListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewOrgListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOrgListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewOrgListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewOrgListOK creates a OrgListOK with default headers values +func NewOrgListOK() *OrgListOK { + return &OrgListOK{} +} + +/* OrgListOK describes a response with status code 200, with default header values. + +OK +*/ +type OrgListOK struct { + Payload *models.V0OrganizationListRespModel +} + +func (o *OrgListOK) Error() string { + return fmt.Sprintf("[GET /organizations][%d] orgListOK %+v", 200, o.Payload) +} +func (o *OrgListOK) GetPayload() *models.V0OrganizationListRespModel { + return o.Payload +} + +func (o *OrgListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0OrganizationListRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOrgListBadRequest creates a OrgListBadRequest with default headers values +func NewOrgListBadRequest() *OrgListBadRequest { + return &OrgListBadRequest{} +} + +/* OrgListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type OrgListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OrgListBadRequest) Error() string { + return fmt.Sprintf("[GET /organizations][%d] orgListBadRequest %+v", 400, o.Payload) +} +func (o *OrgListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OrgListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOrgListUnauthorized creates a OrgListUnauthorized with default headers values +func NewOrgListUnauthorized() *OrgListUnauthorized { + return &OrgListUnauthorized{} +} + +/* OrgListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type OrgListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OrgListUnauthorized) Error() string { + return fmt.Sprintf("[GET /organizations][%d] orgListUnauthorized %+v", 401, o.Payload) +} +func (o *OrgListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OrgListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOrgListNotFound creates a OrgListNotFound with default headers values +func NewOrgListNotFound() *OrgListNotFound { + return &OrgListNotFound{} +} + +/* OrgListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type OrgListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OrgListNotFound) Error() string { + return fmt.Sprintf("[GET /organizations][%d] orgListNotFound %+v", 404, o.Payload) +} +func (o *OrgListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OrgListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOrgListInternalServerError creates a OrgListInternalServerError with default headers values +func NewOrgListInternalServerError() *OrgListInternalServerError { + return &OrgListInternalServerError{} +} + +/* OrgListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type OrgListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OrgListInternalServerError) Error() string { + return fmt.Sprintf("[GET /organizations][%d] orgListInternalServerError %+v", 500, o.Payload) +} +func (o *OrgListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OrgListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/org_show_parameters.go b/go/client/operations/org_show_parameters.go new file mode 100644 index 0000000..67cd8ee --- /dev/null +++ b/go/client/operations/org_show_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewOrgShowParams creates a new OrgShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOrgShowParams() *OrgShowParams { + return &OrgShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOrgShowParamsWithTimeout creates a new OrgShowParams object +// with the ability to set a timeout on a request. +func NewOrgShowParamsWithTimeout(timeout time.Duration) *OrgShowParams { + return &OrgShowParams{ + timeout: timeout, + } +} + +// NewOrgShowParamsWithContext creates a new OrgShowParams object +// with the ability to set a context for a request. +func NewOrgShowParamsWithContext(ctx context.Context) *OrgShowParams { + return &OrgShowParams{ + Context: ctx, + } +} + +// NewOrgShowParamsWithHTTPClient creates a new OrgShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewOrgShowParamsWithHTTPClient(client *http.Client) *OrgShowParams { + return &OrgShowParams{ + HTTPClient: client, + } +} + +/* OrgShowParams contains all the parameters to send to the API endpoint + for the org show operation. + + Typically these are written to a http.Request. +*/ +type OrgShowParams struct { + + /* OrgSlug. + + The organization slug + */ + OrgSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the org show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OrgShowParams) WithDefaults() *OrgShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the org show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OrgShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the org show params +func (o *OrgShowParams) WithTimeout(timeout time.Duration) *OrgShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the org show params +func (o *OrgShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the org show params +func (o *OrgShowParams) WithContext(ctx context.Context) *OrgShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the org show params +func (o *OrgShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the org show params +func (o *OrgShowParams) WithHTTPClient(client *http.Client) *OrgShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the org show params +func (o *OrgShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOrgSlug adds the orgSlug to the org show params +func (o *OrgShowParams) WithOrgSlug(orgSlug string) *OrgShowParams { + o.SetOrgSlug(orgSlug) + return o +} + +// SetOrgSlug adds the orgSlug to the org show params +func (o *OrgShowParams) SetOrgSlug(orgSlug string) { + o.OrgSlug = orgSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *OrgShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param org-slug + if err := r.SetPathParam("org-slug", o.OrgSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/org_show_responses.go b/go/client/operations/org_show_responses.go new file mode 100644 index 0000000..a633767 --- /dev/null +++ b/go/client/operations/org_show_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// OrgShowReader is a Reader for the OrgShow structure. +type OrgShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OrgShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOrgShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewOrgShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewOrgShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOrgShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewOrgShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewOrgShowOK creates a OrgShowOK with default headers values +func NewOrgShowOK() *OrgShowOK { + return &OrgShowOK{} +} + +/* OrgShowOK describes a response with status code 200, with default header values. + +OK +*/ +type OrgShowOK struct { + Payload *models.V0OrganizationRespModel +} + +func (o *OrgShowOK) Error() string { + return fmt.Sprintf("[GET /organizations/{org-slug}][%d] orgShowOK %+v", 200, o.Payload) +} +func (o *OrgShowOK) GetPayload() *models.V0OrganizationRespModel { + return o.Payload +} + +func (o *OrgShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0OrganizationRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOrgShowBadRequest creates a OrgShowBadRequest with default headers values +func NewOrgShowBadRequest() *OrgShowBadRequest { + return &OrgShowBadRequest{} +} + +/* OrgShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type OrgShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OrgShowBadRequest) Error() string { + return fmt.Sprintf("[GET /organizations/{org-slug}][%d] orgShowBadRequest %+v", 400, o.Payload) +} +func (o *OrgShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OrgShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOrgShowUnauthorized creates a OrgShowUnauthorized with default headers values +func NewOrgShowUnauthorized() *OrgShowUnauthorized { + return &OrgShowUnauthorized{} +} + +/* OrgShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type OrgShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OrgShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /organizations/{org-slug}][%d] orgShowUnauthorized %+v", 401, o.Payload) +} +func (o *OrgShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OrgShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOrgShowNotFound creates a OrgShowNotFound with default headers values +func NewOrgShowNotFound() *OrgShowNotFound { + return &OrgShowNotFound{} +} + +/* OrgShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type OrgShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OrgShowNotFound) Error() string { + return fmt.Sprintf("[GET /organizations/{org-slug}][%d] orgShowNotFound %+v", 404, o.Payload) +} +func (o *OrgShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OrgShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOrgShowInternalServerError creates a OrgShowInternalServerError with default headers values +func NewOrgShowInternalServerError() *OrgShowInternalServerError { + return &OrgShowInternalServerError{} +} + +/* OrgShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type OrgShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OrgShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /organizations/{org-slug}][%d] orgShowInternalServerError %+v", 500, o.Payload) +} +func (o *OrgShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OrgShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/outgoing_webhook_create_parameters.go b/go/client/operations/outgoing_webhook_create_parameters.go new file mode 100644 index 0000000..520cf2b --- /dev/null +++ b/go/client/operations/outgoing_webhook_create_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewOutgoingWebhookCreateParams creates a new OutgoingWebhookCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOutgoingWebhookCreateParams() *OutgoingWebhookCreateParams { + return &OutgoingWebhookCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOutgoingWebhookCreateParamsWithTimeout creates a new OutgoingWebhookCreateParams object +// with the ability to set a timeout on a request. +func NewOutgoingWebhookCreateParamsWithTimeout(timeout time.Duration) *OutgoingWebhookCreateParams { + return &OutgoingWebhookCreateParams{ + timeout: timeout, + } +} + +// NewOutgoingWebhookCreateParamsWithContext creates a new OutgoingWebhookCreateParams object +// with the ability to set a context for a request. +func NewOutgoingWebhookCreateParamsWithContext(ctx context.Context) *OutgoingWebhookCreateParams { + return &OutgoingWebhookCreateParams{ + Context: ctx, + } +} + +// NewOutgoingWebhookCreateParamsWithHTTPClient creates a new OutgoingWebhookCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewOutgoingWebhookCreateParamsWithHTTPClient(client *http.Client) *OutgoingWebhookCreateParams { + return &OutgoingWebhookCreateParams{ + HTTPClient: client, + } +} + +/* OutgoingWebhookCreateParams contains all the parameters to send to the API endpoint + for the outgoing webhook create operation. + + Typically these are written to a http.Request. +*/ +type OutgoingWebhookCreateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* AppWebhookCreateParams. + + App webhook creation params + */ + AppWebhookCreateParams *models.V0AppWebhookCreateParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the outgoing webhook create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OutgoingWebhookCreateParams) WithDefaults() *OutgoingWebhookCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the outgoing webhook create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OutgoingWebhookCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the outgoing webhook create params +func (o *OutgoingWebhookCreateParams) WithTimeout(timeout time.Duration) *OutgoingWebhookCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the outgoing webhook create params +func (o *OutgoingWebhookCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the outgoing webhook create params +func (o *OutgoingWebhookCreateParams) WithContext(ctx context.Context) *OutgoingWebhookCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the outgoing webhook create params +func (o *OutgoingWebhookCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the outgoing webhook create params +func (o *OutgoingWebhookCreateParams) WithHTTPClient(client *http.Client) *OutgoingWebhookCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the outgoing webhook create params +func (o *OutgoingWebhookCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the outgoing webhook create params +func (o *OutgoingWebhookCreateParams) WithAppSlug(appSlug string) *OutgoingWebhookCreateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the outgoing webhook create params +func (o *OutgoingWebhookCreateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithAppWebhookCreateParams adds the appWebhookCreateParams to the outgoing webhook create params +func (o *OutgoingWebhookCreateParams) WithAppWebhookCreateParams(appWebhookCreateParams *models.V0AppWebhookCreateParams) *OutgoingWebhookCreateParams { + o.SetAppWebhookCreateParams(appWebhookCreateParams) + return o +} + +// SetAppWebhookCreateParams adds the appWebhookCreateParams to the outgoing webhook create params +func (o *OutgoingWebhookCreateParams) SetAppWebhookCreateParams(appWebhookCreateParams *models.V0AppWebhookCreateParams) { + o.AppWebhookCreateParams = appWebhookCreateParams +} + +// WriteToRequest writes these params to a swagger request +func (o *OutgoingWebhookCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.AppWebhookCreateParams != nil { + if err := r.SetBodyParam(o.AppWebhookCreateParams); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/outgoing_webhook_create_responses.go b/go/client/operations/outgoing_webhook_create_responses.go new file mode 100644 index 0000000..6087829 --- /dev/null +++ b/go/client/operations/outgoing_webhook_create_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// OutgoingWebhookCreateReader is a Reader for the OutgoingWebhookCreate structure. +type OutgoingWebhookCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OutgoingWebhookCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOutgoingWebhookCreateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewOutgoingWebhookCreateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewOutgoingWebhookCreateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOutgoingWebhookCreateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewOutgoingWebhookCreateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewOutgoingWebhookCreateOK creates a OutgoingWebhookCreateOK with default headers values +func NewOutgoingWebhookCreateOK() *OutgoingWebhookCreateOK { + return &OutgoingWebhookCreateOK{} +} + +/* OutgoingWebhookCreateOK describes a response with status code 200, with default header values. + +OK +*/ +type OutgoingWebhookCreateOK struct { + Payload *models.V0AppWebhookCreatedResponseModel +} + +func (o *OutgoingWebhookCreateOK) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/outgoing-webhooks][%d] outgoingWebhookCreateOK %+v", 200, o.Payload) +} +func (o *OutgoingWebhookCreateOK) GetPayload() *models.V0AppWebhookCreatedResponseModel { + return o.Payload +} + +func (o *OutgoingWebhookCreateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppWebhookCreatedResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookCreateBadRequest creates a OutgoingWebhookCreateBadRequest with default headers values +func NewOutgoingWebhookCreateBadRequest() *OutgoingWebhookCreateBadRequest { + return &OutgoingWebhookCreateBadRequest{} +} + +/* OutgoingWebhookCreateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type OutgoingWebhookCreateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookCreateBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/outgoing-webhooks][%d] outgoingWebhookCreateBadRequest %+v", 400, o.Payload) +} +func (o *OutgoingWebhookCreateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookCreateUnauthorized creates a OutgoingWebhookCreateUnauthorized with default headers values +func NewOutgoingWebhookCreateUnauthorized() *OutgoingWebhookCreateUnauthorized { + return &OutgoingWebhookCreateUnauthorized{} +} + +/* OutgoingWebhookCreateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type OutgoingWebhookCreateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookCreateUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/outgoing-webhooks][%d] outgoingWebhookCreateUnauthorized %+v", 401, o.Payload) +} +func (o *OutgoingWebhookCreateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookCreateNotFound creates a OutgoingWebhookCreateNotFound with default headers values +func NewOutgoingWebhookCreateNotFound() *OutgoingWebhookCreateNotFound { + return &OutgoingWebhookCreateNotFound{} +} + +/* OutgoingWebhookCreateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type OutgoingWebhookCreateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookCreateNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/outgoing-webhooks][%d] outgoingWebhookCreateNotFound %+v", 404, o.Payload) +} +func (o *OutgoingWebhookCreateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookCreateInternalServerError creates a OutgoingWebhookCreateInternalServerError with default headers values +func NewOutgoingWebhookCreateInternalServerError() *OutgoingWebhookCreateInternalServerError { + return &OutgoingWebhookCreateInternalServerError{} +} + +/* OutgoingWebhookCreateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type OutgoingWebhookCreateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookCreateInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/outgoing-webhooks][%d] outgoingWebhookCreateInternalServerError %+v", 500, o.Payload) +} +func (o *OutgoingWebhookCreateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/outgoing_webhook_delete_parameters.go b/go/client/operations/outgoing_webhook_delete_parameters.go new file mode 100644 index 0000000..1bb57a1 --- /dev/null +++ b/go/client/operations/outgoing_webhook_delete_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewOutgoingWebhookDeleteParams creates a new OutgoingWebhookDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOutgoingWebhookDeleteParams() *OutgoingWebhookDeleteParams { + return &OutgoingWebhookDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOutgoingWebhookDeleteParamsWithTimeout creates a new OutgoingWebhookDeleteParams object +// with the ability to set a timeout on a request. +func NewOutgoingWebhookDeleteParamsWithTimeout(timeout time.Duration) *OutgoingWebhookDeleteParams { + return &OutgoingWebhookDeleteParams{ + timeout: timeout, + } +} + +// NewOutgoingWebhookDeleteParamsWithContext creates a new OutgoingWebhookDeleteParams object +// with the ability to set a context for a request. +func NewOutgoingWebhookDeleteParamsWithContext(ctx context.Context) *OutgoingWebhookDeleteParams { + return &OutgoingWebhookDeleteParams{ + Context: ctx, + } +} + +// NewOutgoingWebhookDeleteParamsWithHTTPClient creates a new OutgoingWebhookDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewOutgoingWebhookDeleteParamsWithHTTPClient(client *http.Client) *OutgoingWebhookDeleteParams { + return &OutgoingWebhookDeleteParams{ + HTTPClient: client, + } +} + +/* OutgoingWebhookDeleteParams contains all the parameters to send to the API endpoint + for the outgoing webhook delete operation. + + Typically these are written to a http.Request. +*/ +type OutgoingWebhookDeleteParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* AppWebhookSlug. + + App webhook slug + */ + AppWebhookSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the outgoing webhook delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OutgoingWebhookDeleteParams) WithDefaults() *OutgoingWebhookDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the outgoing webhook delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OutgoingWebhookDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the outgoing webhook delete params +func (o *OutgoingWebhookDeleteParams) WithTimeout(timeout time.Duration) *OutgoingWebhookDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the outgoing webhook delete params +func (o *OutgoingWebhookDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the outgoing webhook delete params +func (o *OutgoingWebhookDeleteParams) WithContext(ctx context.Context) *OutgoingWebhookDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the outgoing webhook delete params +func (o *OutgoingWebhookDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the outgoing webhook delete params +func (o *OutgoingWebhookDeleteParams) WithHTTPClient(client *http.Client) *OutgoingWebhookDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the outgoing webhook delete params +func (o *OutgoingWebhookDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the outgoing webhook delete params +func (o *OutgoingWebhookDeleteParams) WithAppSlug(appSlug string) *OutgoingWebhookDeleteParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the outgoing webhook delete params +func (o *OutgoingWebhookDeleteParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithAppWebhookSlug adds the appWebhookSlug to the outgoing webhook delete params +func (o *OutgoingWebhookDeleteParams) WithAppWebhookSlug(appWebhookSlug string) *OutgoingWebhookDeleteParams { + o.SetAppWebhookSlug(appWebhookSlug) + return o +} + +// SetAppWebhookSlug adds the appWebhookSlug to the outgoing webhook delete params +func (o *OutgoingWebhookDeleteParams) SetAppWebhookSlug(appWebhookSlug string) { + o.AppWebhookSlug = appWebhookSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *OutgoingWebhookDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param app-webhook-slug + if err := r.SetPathParam("app-webhook-slug", o.AppWebhookSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/outgoing_webhook_delete_responses.go b/go/client/operations/outgoing_webhook_delete_responses.go new file mode 100644 index 0000000..164fb41 --- /dev/null +++ b/go/client/operations/outgoing_webhook_delete_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// OutgoingWebhookDeleteReader is a Reader for the OutgoingWebhookDelete structure. +type OutgoingWebhookDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OutgoingWebhookDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOutgoingWebhookDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewOutgoingWebhookDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewOutgoingWebhookDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOutgoingWebhookDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewOutgoingWebhookDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewOutgoingWebhookDeleteOK creates a OutgoingWebhookDeleteOK with default headers values +func NewOutgoingWebhookDeleteOK() *OutgoingWebhookDeleteOK { + return &OutgoingWebhookDeleteOK{} +} + +/* OutgoingWebhookDeleteOK describes a response with status code 200, with default header values. + +OK +*/ +type OutgoingWebhookDeleteOK struct { + Payload *models.V0AppWebhookDeletedResponseModel +} + +func (o *OutgoingWebhookDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}][%d] outgoingWebhookDeleteOK %+v", 200, o.Payload) +} +func (o *OutgoingWebhookDeleteOK) GetPayload() *models.V0AppWebhookDeletedResponseModel { + return o.Payload +} + +func (o *OutgoingWebhookDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppWebhookDeletedResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookDeleteBadRequest creates a OutgoingWebhookDeleteBadRequest with default headers values +func NewOutgoingWebhookDeleteBadRequest() *OutgoingWebhookDeleteBadRequest { + return &OutgoingWebhookDeleteBadRequest{} +} + +/* OutgoingWebhookDeleteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type OutgoingWebhookDeleteBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookDeleteBadRequest) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}][%d] outgoingWebhookDeleteBadRequest %+v", 400, o.Payload) +} +func (o *OutgoingWebhookDeleteBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookDeleteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookDeleteUnauthorized creates a OutgoingWebhookDeleteUnauthorized with default headers values +func NewOutgoingWebhookDeleteUnauthorized() *OutgoingWebhookDeleteUnauthorized { + return &OutgoingWebhookDeleteUnauthorized{} +} + +/* OutgoingWebhookDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type OutgoingWebhookDeleteUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}][%d] outgoingWebhookDeleteUnauthorized %+v", 401, o.Payload) +} +func (o *OutgoingWebhookDeleteUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookDeleteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookDeleteNotFound creates a OutgoingWebhookDeleteNotFound with default headers values +func NewOutgoingWebhookDeleteNotFound() *OutgoingWebhookDeleteNotFound { + return &OutgoingWebhookDeleteNotFound{} +} + +/* OutgoingWebhookDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type OutgoingWebhookDeleteNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}][%d] outgoingWebhookDeleteNotFound %+v", 404, o.Payload) +} +func (o *OutgoingWebhookDeleteNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookDeleteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookDeleteInternalServerError creates a OutgoingWebhookDeleteInternalServerError with default headers values +func NewOutgoingWebhookDeleteInternalServerError() *OutgoingWebhookDeleteInternalServerError { + return &OutgoingWebhookDeleteInternalServerError{} +} + +/* OutgoingWebhookDeleteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type OutgoingWebhookDeleteInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookDeleteInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}][%d] outgoingWebhookDeleteInternalServerError %+v", 500, o.Payload) +} +func (o *OutgoingWebhookDeleteInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookDeleteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/outgoing_webhook_list_parameters.go b/go/client/operations/outgoing_webhook_list_parameters.go new file mode 100644 index 0000000..9212f74 --- /dev/null +++ b/go/client/operations/outgoing_webhook_list_parameters.go @@ -0,0 +1,218 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewOutgoingWebhookListParams creates a new OutgoingWebhookListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOutgoingWebhookListParams() *OutgoingWebhookListParams { + return &OutgoingWebhookListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOutgoingWebhookListParamsWithTimeout creates a new OutgoingWebhookListParams object +// with the ability to set a timeout on a request. +func NewOutgoingWebhookListParamsWithTimeout(timeout time.Duration) *OutgoingWebhookListParams { + return &OutgoingWebhookListParams{ + timeout: timeout, + } +} + +// NewOutgoingWebhookListParamsWithContext creates a new OutgoingWebhookListParams object +// with the ability to set a context for a request. +func NewOutgoingWebhookListParamsWithContext(ctx context.Context) *OutgoingWebhookListParams { + return &OutgoingWebhookListParams{ + Context: ctx, + } +} + +// NewOutgoingWebhookListParamsWithHTTPClient creates a new OutgoingWebhookListParams object +// with the ability to set a custom HTTPClient for a request. +func NewOutgoingWebhookListParamsWithHTTPClient(client *http.Client) *OutgoingWebhookListParams { + return &OutgoingWebhookListParams{ + HTTPClient: client, + } +} + +/* OutgoingWebhookListParams contains all the parameters to send to the API endpoint + for the outgoing webhook list operation. + + Typically these are written to a http.Request. +*/ +type OutgoingWebhookListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* Limit. + + Max number of elements per page (default: 50) + */ + Limit *int64 + + /* Next. + + Slug of the first webhook in the response + */ + Next *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the outgoing webhook list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OutgoingWebhookListParams) WithDefaults() *OutgoingWebhookListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the outgoing webhook list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OutgoingWebhookListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the outgoing webhook list params +func (o *OutgoingWebhookListParams) WithTimeout(timeout time.Duration) *OutgoingWebhookListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the outgoing webhook list params +func (o *OutgoingWebhookListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the outgoing webhook list params +func (o *OutgoingWebhookListParams) WithContext(ctx context.Context) *OutgoingWebhookListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the outgoing webhook list params +func (o *OutgoingWebhookListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the outgoing webhook list params +func (o *OutgoingWebhookListParams) WithHTTPClient(client *http.Client) *OutgoingWebhookListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the outgoing webhook list params +func (o *OutgoingWebhookListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the outgoing webhook list params +func (o *OutgoingWebhookListParams) WithAppSlug(appSlug string) *OutgoingWebhookListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the outgoing webhook list params +func (o *OutgoingWebhookListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithLimit adds the limit to the outgoing webhook list params +func (o *OutgoingWebhookListParams) WithLimit(limit *int64) *OutgoingWebhookListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the outgoing webhook list params +func (o *OutgoingWebhookListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the outgoing webhook list params +func (o *OutgoingWebhookListParams) WithNext(next *string) *OutgoingWebhookListParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the outgoing webhook list params +func (o *OutgoingWebhookListParams) SetNext(next *string) { + o.Next = next +} + +// WriteToRequest writes these params to a swagger request +func (o *OutgoingWebhookListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/outgoing_webhook_list_responses.go b/go/client/operations/outgoing_webhook_list_responses.go new file mode 100644 index 0000000..c08b2f3 --- /dev/null +++ b/go/client/operations/outgoing_webhook_list_responses.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// OutgoingWebhookListReader is a Reader for the OutgoingWebhookList structure. +type OutgoingWebhookListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OutgoingWebhookListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOutgoingWebhookListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewOutgoingWebhookListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewOutgoingWebhookListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewOutgoingWebhookListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewOutgoingWebhookListOK creates a OutgoingWebhookListOK with default headers values +func NewOutgoingWebhookListOK() *OutgoingWebhookListOK { + return &OutgoingWebhookListOK{} +} + +/* OutgoingWebhookListOK describes a response with status code 200, with default header values. + +OK +*/ +type OutgoingWebhookListOK struct { + Payload *models.V0AppWebhookListResponseModel +} + +func (o *OutgoingWebhookListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks][%d] outgoingWebhookListOK %+v", 200, o.Payload) +} +func (o *OutgoingWebhookListOK) GetPayload() *models.V0AppWebhookListResponseModel { + return o.Payload +} + +func (o *OutgoingWebhookListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppWebhookListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookListBadRequest creates a OutgoingWebhookListBadRequest with default headers values +func NewOutgoingWebhookListBadRequest() *OutgoingWebhookListBadRequest { + return &OutgoingWebhookListBadRequest{} +} + +/* OutgoingWebhookListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type OutgoingWebhookListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks][%d] outgoingWebhookListBadRequest %+v", 400, o.Payload) +} +func (o *OutgoingWebhookListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookListUnauthorized creates a OutgoingWebhookListUnauthorized with default headers values +func NewOutgoingWebhookListUnauthorized() *OutgoingWebhookListUnauthorized { + return &OutgoingWebhookListUnauthorized{} +} + +/* OutgoingWebhookListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type OutgoingWebhookListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks][%d] outgoingWebhookListUnauthorized %+v", 401, o.Payload) +} +func (o *OutgoingWebhookListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookListInternalServerError creates a OutgoingWebhookListInternalServerError with default headers values +func NewOutgoingWebhookListInternalServerError() *OutgoingWebhookListInternalServerError { + return &OutgoingWebhookListInternalServerError{} +} + +/* OutgoingWebhookListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type OutgoingWebhookListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks][%d] outgoingWebhookListInternalServerError %+v", 500, o.Payload) +} +func (o *OutgoingWebhookListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/outgoing_webhook_update_parameters.go b/go/client/operations/outgoing_webhook_update_parameters.go new file mode 100644 index 0000000..b3a0d91 --- /dev/null +++ b/go/client/operations/outgoing_webhook_update_parameters.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewOutgoingWebhookUpdateParams creates a new OutgoingWebhookUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOutgoingWebhookUpdateParams() *OutgoingWebhookUpdateParams { + return &OutgoingWebhookUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOutgoingWebhookUpdateParamsWithTimeout creates a new OutgoingWebhookUpdateParams object +// with the ability to set a timeout on a request. +func NewOutgoingWebhookUpdateParamsWithTimeout(timeout time.Duration) *OutgoingWebhookUpdateParams { + return &OutgoingWebhookUpdateParams{ + timeout: timeout, + } +} + +// NewOutgoingWebhookUpdateParamsWithContext creates a new OutgoingWebhookUpdateParams object +// with the ability to set a context for a request. +func NewOutgoingWebhookUpdateParamsWithContext(ctx context.Context) *OutgoingWebhookUpdateParams { + return &OutgoingWebhookUpdateParams{ + Context: ctx, + } +} + +// NewOutgoingWebhookUpdateParamsWithHTTPClient creates a new OutgoingWebhookUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewOutgoingWebhookUpdateParamsWithHTTPClient(client *http.Client) *OutgoingWebhookUpdateParams { + return &OutgoingWebhookUpdateParams{ + HTTPClient: client, + } +} + +/* OutgoingWebhookUpdateParams contains all the parameters to send to the API endpoint + for the outgoing webhook update operation. + + Typically these are written to a http.Request. +*/ +type OutgoingWebhookUpdateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* AppWebhookSlug. + + App webhook slug + */ + AppWebhookSlug string + + /* AppWebhookUpdateParams. + + App webhook update params + */ + AppWebhookUpdateParams *models.V0AppWebhookUpdateParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the outgoing webhook update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OutgoingWebhookUpdateParams) WithDefaults() *OutgoingWebhookUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the outgoing webhook update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OutgoingWebhookUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) WithTimeout(timeout time.Duration) *OutgoingWebhookUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) WithContext(ctx context.Context) *OutgoingWebhookUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) WithHTTPClient(client *http.Client) *OutgoingWebhookUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) WithAppSlug(appSlug string) *OutgoingWebhookUpdateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithAppWebhookSlug adds the appWebhookSlug to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) WithAppWebhookSlug(appWebhookSlug string) *OutgoingWebhookUpdateParams { + o.SetAppWebhookSlug(appWebhookSlug) + return o +} + +// SetAppWebhookSlug adds the appWebhookSlug to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) SetAppWebhookSlug(appWebhookSlug string) { + o.AppWebhookSlug = appWebhookSlug +} + +// WithAppWebhookUpdateParams adds the appWebhookUpdateParams to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) WithAppWebhookUpdateParams(appWebhookUpdateParams *models.V0AppWebhookUpdateParams) *OutgoingWebhookUpdateParams { + o.SetAppWebhookUpdateParams(appWebhookUpdateParams) + return o +} + +// SetAppWebhookUpdateParams adds the appWebhookUpdateParams to the outgoing webhook update params +func (o *OutgoingWebhookUpdateParams) SetAppWebhookUpdateParams(appWebhookUpdateParams *models.V0AppWebhookUpdateParams) { + o.AppWebhookUpdateParams = appWebhookUpdateParams +} + +// WriteToRequest writes these params to a swagger request +func (o *OutgoingWebhookUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param app-webhook-slug + if err := r.SetPathParam("app-webhook-slug", o.AppWebhookSlug); err != nil { + return err + } + if o.AppWebhookUpdateParams != nil { + if err := r.SetBodyParam(o.AppWebhookUpdateParams); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/outgoing_webhook_update_responses.go b/go/client/operations/outgoing_webhook_update_responses.go new file mode 100644 index 0000000..66ab2a4 --- /dev/null +++ b/go/client/operations/outgoing_webhook_update_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// OutgoingWebhookUpdateReader is a Reader for the OutgoingWebhookUpdate structure. +type OutgoingWebhookUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OutgoingWebhookUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOutgoingWebhookUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewOutgoingWebhookUpdateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewOutgoingWebhookUpdateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOutgoingWebhookUpdateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewOutgoingWebhookUpdateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewOutgoingWebhookUpdateOK creates a OutgoingWebhookUpdateOK with default headers values +func NewOutgoingWebhookUpdateOK() *OutgoingWebhookUpdateOK { + return &OutgoingWebhookUpdateOK{} +} + +/* OutgoingWebhookUpdateOK describes a response with status code 200, with default header values. + +OK +*/ +type OutgoingWebhookUpdateOK struct { + Payload *models.V0AppWebhookResponseModel +} + +func (o *OutgoingWebhookUpdateOK) Error() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}][%d] outgoingWebhookUpdateOK %+v", 200, o.Payload) +} +func (o *OutgoingWebhookUpdateOK) GetPayload() *models.V0AppWebhookResponseModel { + return o.Payload +} + +func (o *OutgoingWebhookUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0AppWebhookResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookUpdateBadRequest creates a OutgoingWebhookUpdateBadRequest with default headers values +func NewOutgoingWebhookUpdateBadRequest() *OutgoingWebhookUpdateBadRequest { + return &OutgoingWebhookUpdateBadRequest{} +} + +/* OutgoingWebhookUpdateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type OutgoingWebhookUpdateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookUpdateBadRequest) Error() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}][%d] outgoingWebhookUpdateBadRequest %+v", 400, o.Payload) +} +func (o *OutgoingWebhookUpdateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookUpdateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookUpdateUnauthorized creates a OutgoingWebhookUpdateUnauthorized with default headers values +func NewOutgoingWebhookUpdateUnauthorized() *OutgoingWebhookUpdateUnauthorized { + return &OutgoingWebhookUpdateUnauthorized{} +} + +/* OutgoingWebhookUpdateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type OutgoingWebhookUpdateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookUpdateUnauthorized) Error() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}][%d] outgoingWebhookUpdateUnauthorized %+v", 401, o.Payload) +} +func (o *OutgoingWebhookUpdateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookUpdateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookUpdateNotFound creates a OutgoingWebhookUpdateNotFound with default headers values +func NewOutgoingWebhookUpdateNotFound() *OutgoingWebhookUpdateNotFound { + return &OutgoingWebhookUpdateNotFound{} +} + +/* OutgoingWebhookUpdateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type OutgoingWebhookUpdateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookUpdateNotFound) Error() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}][%d] outgoingWebhookUpdateNotFound %+v", 404, o.Payload) +} +func (o *OutgoingWebhookUpdateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookUpdateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOutgoingWebhookUpdateInternalServerError creates a OutgoingWebhookUpdateInternalServerError with default headers values +func NewOutgoingWebhookUpdateInternalServerError() *OutgoingWebhookUpdateInternalServerError { + return &OutgoingWebhookUpdateInternalServerError{} +} + +/* OutgoingWebhookUpdateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type OutgoingWebhookUpdateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *OutgoingWebhookUpdateInternalServerError) Error() string { + return fmt.Sprintf("[PUT /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}][%d] outgoingWebhookUpdateInternalServerError %+v", 500, o.Payload) +} +func (o *OutgoingWebhookUpdateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *OutgoingWebhookUpdateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/provisioning_profile_confirm_parameters.go b/go/client/operations/provisioning_profile_confirm_parameters.go new file mode 100644 index 0000000..c86df63 --- /dev/null +++ b/go/client/operations/provisioning_profile_confirm_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewProvisioningProfileConfirmParams creates a new ProvisioningProfileConfirmParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewProvisioningProfileConfirmParams() *ProvisioningProfileConfirmParams { + return &ProvisioningProfileConfirmParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewProvisioningProfileConfirmParamsWithTimeout creates a new ProvisioningProfileConfirmParams object +// with the ability to set a timeout on a request. +func NewProvisioningProfileConfirmParamsWithTimeout(timeout time.Duration) *ProvisioningProfileConfirmParams { + return &ProvisioningProfileConfirmParams{ + timeout: timeout, + } +} + +// NewProvisioningProfileConfirmParamsWithContext creates a new ProvisioningProfileConfirmParams object +// with the ability to set a context for a request. +func NewProvisioningProfileConfirmParamsWithContext(ctx context.Context) *ProvisioningProfileConfirmParams { + return &ProvisioningProfileConfirmParams{ + Context: ctx, + } +} + +// NewProvisioningProfileConfirmParamsWithHTTPClient creates a new ProvisioningProfileConfirmParams object +// with the ability to set a custom HTTPClient for a request. +func NewProvisioningProfileConfirmParamsWithHTTPClient(client *http.Client) *ProvisioningProfileConfirmParams { + return &ProvisioningProfileConfirmParams{ + HTTPClient: client, + } +} + +/* ProvisioningProfileConfirmParams contains all the parameters to send to the API endpoint + for the provisioning profile confirm operation. + + Typically these are written to a http.Request. +*/ +type ProvisioningProfileConfirmParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* ProvisioningProfileSlug. + + Provisioning profile slug + */ + ProvisioningProfileSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the provisioning profile confirm params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileConfirmParams) WithDefaults() *ProvisioningProfileConfirmParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the provisioning profile confirm params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileConfirmParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the provisioning profile confirm params +func (o *ProvisioningProfileConfirmParams) WithTimeout(timeout time.Duration) *ProvisioningProfileConfirmParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the provisioning profile confirm params +func (o *ProvisioningProfileConfirmParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the provisioning profile confirm params +func (o *ProvisioningProfileConfirmParams) WithContext(ctx context.Context) *ProvisioningProfileConfirmParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the provisioning profile confirm params +func (o *ProvisioningProfileConfirmParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the provisioning profile confirm params +func (o *ProvisioningProfileConfirmParams) WithHTTPClient(client *http.Client) *ProvisioningProfileConfirmParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the provisioning profile confirm params +func (o *ProvisioningProfileConfirmParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the provisioning profile confirm params +func (o *ProvisioningProfileConfirmParams) WithAppSlug(appSlug string) *ProvisioningProfileConfirmParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the provisioning profile confirm params +func (o *ProvisioningProfileConfirmParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithProvisioningProfileSlug adds the provisioningProfileSlug to the provisioning profile confirm params +func (o *ProvisioningProfileConfirmParams) WithProvisioningProfileSlug(provisioningProfileSlug string) *ProvisioningProfileConfirmParams { + o.SetProvisioningProfileSlug(provisioningProfileSlug) + return o +} + +// SetProvisioningProfileSlug adds the provisioningProfileSlug to the provisioning profile confirm params +func (o *ProvisioningProfileConfirmParams) SetProvisioningProfileSlug(provisioningProfileSlug string) { + o.ProvisioningProfileSlug = provisioningProfileSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *ProvisioningProfileConfirmParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param provisioning-profile-slug + if err := r.SetPathParam("provisioning-profile-slug", o.ProvisioningProfileSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/provisioning_profile_confirm_responses.go b/go/client/operations/provisioning_profile_confirm_responses.go new file mode 100644 index 0000000..919bfcc --- /dev/null +++ b/go/client/operations/provisioning_profile_confirm_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ProvisioningProfileConfirmReader is a Reader for the ProvisioningProfileConfirm structure. +type ProvisioningProfileConfirmReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProvisioningProfileConfirmReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewProvisioningProfileConfirmOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewProvisioningProfileConfirmBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewProvisioningProfileConfirmUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewProvisioningProfileConfirmNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewProvisioningProfileConfirmInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewProvisioningProfileConfirmOK creates a ProvisioningProfileConfirmOK with default headers values +func NewProvisioningProfileConfirmOK() *ProvisioningProfileConfirmOK { + return &ProvisioningProfileConfirmOK{} +} + +/* ProvisioningProfileConfirmOK describes a response with status code 200, with default header values. + +OK +*/ +type ProvisioningProfileConfirmOK struct { + Payload *models.V0ProvisionProfileResponseModel +} + +func (o *ProvisioningProfileConfirmOK) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded][%d] provisioningProfileConfirmOK %+v", 200, o.Payload) +} +func (o *ProvisioningProfileConfirmOK) GetPayload() *models.V0ProvisionProfileResponseModel { + return o.Payload +} + +func (o *ProvisioningProfileConfirmOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProvisionProfileResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileConfirmBadRequest creates a ProvisioningProfileConfirmBadRequest with default headers values +func NewProvisioningProfileConfirmBadRequest() *ProvisioningProfileConfirmBadRequest { + return &ProvisioningProfileConfirmBadRequest{} +} + +/* ProvisioningProfileConfirmBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ProvisioningProfileConfirmBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileConfirmBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded][%d] provisioningProfileConfirmBadRequest %+v", 400, o.Payload) +} +func (o *ProvisioningProfileConfirmBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileConfirmBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileConfirmUnauthorized creates a ProvisioningProfileConfirmUnauthorized with default headers values +func NewProvisioningProfileConfirmUnauthorized() *ProvisioningProfileConfirmUnauthorized { + return &ProvisioningProfileConfirmUnauthorized{} +} + +/* ProvisioningProfileConfirmUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ProvisioningProfileConfirmUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileConfirmUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded][%d] provisioningProfileConfirmUnauthorized %+v", 401, o.Payload) +} +func (o *ProvisioningProfileConfirmUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileConfirmUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileConfirmNotFound creates a ProvisioningProfileConfirmNotFound with default headers values +func NewProvisioningProfileConfirmNotFound() *ProvisioningProfileConfirmNotFound { + return &ProvisioningProfileConfirmNotFound{} +} + +/* ProvisioningProfileConfirmNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ProvisioningProfileConfirmNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileConfirmNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded][%d] provisioningProfileConfirmNotFound %+v", 404, o.Payload) +} +func (o *ProvisioningProfileConfirmNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileConfirmNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileConfirmInternalServerError creates a ProvisioningProfileConfirmInternalServerError with default headers values +func NewProvisioningProfileConfirmInternalServerError() *ProvisioningProfileConfirmInternalServerError { + return &ProvisioningProfileConfirmInternalServerError{} +} + +/* ProvisioningProfileConfirmInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ProvisioningProfileConfirmInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileConfirmInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded][%d] provisioningProfileConfirmInternalServerError %+v", 500, o.Payload) +} +func (o *ProvisioningProfileConfirmInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileConfirmInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/provisioning_profile_create_parameters.go b/go/client/operations/provisioning_profile_create_parameters.go new file mode 100644 index 0000000..57afd58 --- /dev/null +++ b/go/client/operations/provisioning_profile_create_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewProvisioningProfileCreateParams creates a new ProvisioningProfileCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewProvisioningProfileCreateParams() *ProvisioningProfileCreateParams { + return &ProvisioningProfileCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewProvisioningProfileCreateParamsWithTimeout creates a new ProvisioningProfileCreateParams object +// with the ability to set a timeout on a request. +func NewProvisioningProfileCreateParamsWithTimeout(timeout time.Duration) *ProvisioningProfileCreateParams { + return &ProvisioningProfileCreateParams{ + timeout: timeout, + } +} + +// NewProvisioningProfileCreateParamsWithContext creates a new ProvisioningProfileCreateParams object +// with the ability to set a context for a request. +func NewProvisioningProfileCreateParamsWithContext(ctx context.Context) *ProvisioningProfileCreateParams { + return &ProvisioningProfileCreateParams{ + Context: ctx, + } +} + +// NewProvisioningProfileCreateParamsWithHTTPClient creates a new ProvisioningProfileCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewProvisioningProfileCreateParamsWithHTTPClient(client *http.Client) *ProvisioningProfileCreateParams { + return &ProvisioningProfileCreateParams{ + HTTPClient: client, + } +} + +/* ProvisioningProfileCreateParams contains all the parameters to send to the API endpoint + for the provisioning profile create operation. + + Typically these are written to a http.Request. +*/ +type ProvisioningProfileCreateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* ProvisioningProfile. + + Provisioning profile parameters such as file name and file size + */ + ProvisioningProfile *models.V0ProvisionProfileUploadParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the provisioning profile create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileCreateParams) WithDefaults() *ProvisioningProfileCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the provisioning profile create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the provisioning profile create params +func (o *ProvisioningProfileCreateParams) WithTimeout(timeout time.Duration) *ProvisioningProfileCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the provisioning profile create params +func (o *ProvisioningProfileCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the provisioning profile create params +func (o *ProvisioningProfileCreateParams) WithContext(ctx context.Context) *ProvisioningProfileCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the provisioning profile create params +func (o *ProvisioningProfileCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the provisioning profile create params +func (o *ProvisioningProfileCreateParams) WithHTTPClient(client *http.Client) *ProvisioningProfileCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the provisioning profile create params +func (o *ProvisioningProfileCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the provisioning profile create params +func (o *ProvisioningProfileCreateParams) WithAppSlug(appSlug string) *ProvisioningProfileCreateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the provisioning profile create params +func (o *ProvisioningProfileCreateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithProvisioningProfile adds the provisioningProfile to the provisioning profile create params +func (o *ProvisioningProfileCreateParams) WithProvisioningProfile(provisioningProfile *models.V0ProvisionProfileUploadParams) *ProvisioningProfileCreateParams { + o.SetProvisioningProfile(provisioningProfile) + return o +} + +// SetProvisioningProfile adds the provisioningProfile to the provisioning profile create params +func (o *ProvisioningProfileCreateParams) SetProvisioningProfile(provisioningProfile *models.V0ProvisionProfileUploadParams) { + o.ProvisioningProfile = provisioningProfile +} + +// WriteToRequest writes these params to a swagger request +func (o *ProvisioningProfileCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.ProvisioningProfile != nil { + if err := r.SetBodyParam(o.ProvisioningProfile); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/provisioning_profile_create_responses.go b/go/client/operations/provisioning_profile_create_responses.go new file mode 100644 index 0000000..5c1ccef --- /dev/null +++ b/go/client/operations/provisioning_profile_create_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ProvisioningProfileCreateReader is a Reader for the ProvisioningProfileCreate structure. +type ProvisioningProfileCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProvisioningProfileCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewProvisioningProfileCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewProvisioningProfileCreateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewProvisioningProfileCreateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewProvisioningProfileCreateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewProvisioningProfileCreateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewProvisioningProfileCreateCreated creates a ProvisioningProfileCreateCreated with default headers values +func NewProvisioningProfileCreateCreated() *ProvisioningProfileCreateCreated { + return &ProvisioningProfileCreateCreated{} +} + +/* ProvisioningProfileCreateCreated describes a response with status code 201, with default header values. + +Created +*/ +type ProvisioningProfileCreateCreated struct { + Payload *models.V0ProvisionProfileResponseModel +} + +func (o *ProvisioningProfileCreateCreated) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/provisioning-profiles][%d] provisioningProfileCreateCreated %+v", 201, o.Payload) +} +func (o *ProvisioningProfileCreateCreated) GetPayload() *models.V0ProvisionProfileResponseModel { + return o.Payload +} + +func (o *ProvisioningProfileCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProvisionProfileResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileCreateBadRequest creates a ProvisioningProfileCreateBadRequest with default headers values +func NewProvisioningProfileCreateBadRequest() *ProvisioningProfileCreateBadRequest { + return &ProvisioningProfileCreateBadRequest{} +} + +/* ProvisioningProfileCreateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ProvisioningProfileCreateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileCreateBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/provisioning-profiles][%d] provisioningProfileCreateBadRequest %+v", 400, o.Payload) +} +func (o *ProvisioningProfileCreateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileCreateUnauthorized creates a ProvisioningProfileCreateUnauthorized with default headers values +func NewProvisioningProfileCreateUnauthorized() *ProvisioningProfileCreateUnauthorized { + return &ProvisioningProfileCreateUnauthorized{} +} + +/* ProvisioningProfileCreateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ProvisioningProfileCreateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileCreateUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/provisioning-profiles][%d] provisioningProfileCreateUnauthorized %+v", 401, o.Payload) +} +func (o *ProvisioningProfileCreateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileCreateNotFound creates a ProvisioningProfileCreateNotFound with default headers values +func NewProvisioningProfileCreateNotFound() *ProvisioningProfileCreateNotFound { + return &ProvisioningProfileCreateNotFound{} +} + +/* ProvisioningProfileCreateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ProvisioningProfileCreateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileCreateNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/provisioning-profiles][%d] provisioningProfileCreateNotFound %+v", 404, o.Payload) +} +func (o *ProvisioningProfileCreateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileCreateInternalServerError creates a ProvisioningProfileCreateInternalServerError with default headers values +func NewProvisioningProfileCreateInternalServerError() *ProvisioningProfileCreateInternalServerError { + return &ProvisioningProfileCreateInternalServerError{} +} + +/* ProvisioningProfileCreateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ProvisioningProfileCreateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileCreateInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/provisioning-profiles][%d] provisioningProfileCreateInternalServerError %+v", 500, o.Payload) +} +func (o *ProvisioningProfileCreateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/provisioning_profile_delete_parameters.go b/go/client/operations/provisioning_profile_delete_parameters.go new file mode 100644 index 0000000..cb0aeb3 --- /dev/null +++ b/go/client/operations/provisioning_profile_delete_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewProvisioningProfileDeleteParams creates a new ProvisioningProfileDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewProvisioningProfileDeleteParams() *ProvisioningProfileDeleteParams { + return &ProvisioningProfileDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewProvisioningProfileDeleteParamsWithTimeout creates a new ProvisioningProfileDeleteParams object +// with the ability to set a timeout on a request. +func NewProvisioningProfileDeleteParamsWithTimeout(timeout time.Duration) *ProvisioningProfileDeleteParams { + return &ProvisioningProfileDeleteParams{ + timeout: timeout, + } +} + +// NewProvisioningProfileDeleteParamsWithContext creates a new ProvisioningProfileDeleteParams object +// with the ability to set a context for a request. +func NewProvisioningProfileDeleteParamsWithContext(ctx context.Context) *ProvisioningProfileDeleteParams { + return &ProvisioningProfileDeleteParams{ + Context: ctx, + } +} + +// NewProvisioningProfileDeleteParamsWithHTTPClient creates a new ProvisioningProfileDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewProvisioningProfileDeleteParamsWithHTTPClient(client *http.Client) *ProvisioningProfileDeleteParams { + return &ProvisioningProfileDeleteParams{ + HTTPClient: client, + } +} + +/* ProvisioningProfileDeleteParams contains all the parameters to send to the API endpoint + for the provisioning profile delete operation. + + Typically these are written to a http.Request. +*/ +type ProvisioningProfileDeleteParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* ProvisioningProfileSlug. + + Provisioning profile slug + */ + ProvisioningProfileSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the provisioning profile delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileDeleteParams) WithDefaults() *ProvisioningProfileDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the provisioning profile delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the provisioning profile delete params +func (o *ProvisioningProfileDeleteParams) WithTimeout(timeout time.Duration) *ProvisioningProfileDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the provisioning profile delete params +func (o *ProvisioningProfileDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the provisioning profile delete params +func (o *ProvisioningProfileDeleteParams) WithContext(ctx context.Context) *ProvisioningProfileDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the provisioning profile delete params +func (o *ProvisioningProfileDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the provisioning profile delete params +func (o *ProvisioningProfileDeleteParams) WithHTTPClient(client *http.Client) *ProvisioningProfileDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the provisioning profile delete params +func (o *ProvisioningProfileDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the provisioning profile delete params +func (o *ProvisioningProfileDeleteParams) WithAppSlug(appSlug string) *ProvisioningProfileDeleteParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the provisioning profile delete params +func (o *ProvisioningProfileDeleteParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithProvisioningProfileSlug adds the provisioningProfileSlug to the provisioning profile delete params +func (o *ProvisioningProfileDeleteParams) WithProvisioningProfileSlug(provisioningProfileSlug string) *ProvisioningProfileDeleteParams { + o.SetProvisioningProfileSlug(provisioningProfileSlug) + return o +} + +// SetProvisioningProfileSlug adds the provisioningProfileSlug to the provisioning profile delete params +func (o *ProvisioningProfileDeleteParams) SetProvisioningProfileSlug(provisioningProfileSlug string) { + o.ProvisioningProfileSlug = provisioningProfileSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *ProvisioningProfileDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param provisioning-profile-slug + if err := r.SetPathParam("provisioning-profile-slug", o.ProvisioningProfileSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/provisioning_profile_delete_responses.go b/go/client/operations/provisioning_profile_delete_responses.go new file mode 100644 index 0000000..7cff86f --- /dev/null +++ b/go/client/operations/provisioning_profile_delete_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ProvisioningProfileDeleteReader is a Reader for the ProvisioningProfileDelete structure. +type ProvisioningProfileDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProvisioningProfileDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewProvisioningProfileDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewProvisioningProfileDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewProvisioningProfileDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewProvisioningProfileDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewProvisioningProfileDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewProvisioningProfileDeleteOK creates a ProvisioningProfileDeleteOK with default headers values +func NewProvisioningProfileDeleteOK() *ProvisioningProfileDeleteOK { + return &ProvisioningProfileDeleteOK{} +} + +/* ProvisioningProfileDeleteOK describes a response with status code 200, with default header values. + +OK +*/ +type ProvisioningProfileDeleteOK struct { + Payload *models.V0ProvisionProfileResponseModel +} + +func (o *ProvisioningProfileDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileDeleteOK %+v", 200, o.Payload) +} +func (o *ProvisioningProfileDeleteOK) GetPayload() *models.V0ProvisionProfileResponseModel { + return o.Payload +} + +func (o *ProvisioningProfileDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProvisionProfileResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileDeleteBadRequest creates a ProvisioningProfileDeleteBadRequest with default headers values +func NewProvisioningProfileDeleteBadRequest() *ProvisioningProfileDeleteBadRequest { + return &ProvisioningProfileDeleteBadRequest{} +} + +/* ProvisioningProfileDeleteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ProvisioningProfileDeleteBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileDeleteBadRequest) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileDeleteBadRequest %+v", 400, o.Payload) +} +func (o *ProvisioningProfileDeleteBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileDeleteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileDeleteUnauthorized creates a ProvisioningProfileDeleteUnauthorized with default headers values +func NewProvisioningProfileDeleteUnauthorized() *ProvisioningProfileDeleteUnauthorized { + return &ProvisioningProfileDeleteUnauthorized{} +} + +/* ProvisioningProfileDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ProvisioningProfileDeleteUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileDeleteUnauthorized %+v", 401, o.Payload) +} +func (o *ProvisioningProfileDeleteUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileDeleteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileDeleteNotFound creates a ProvisioningProfileDeleteNotFound with default headers values +func NewProvisioningProfileDeleteNotFound() *ProvisioningProfileDeleteNotFound { + return &ProvisioningProfileDeleteNotFound{} +} + +/* ProvisioningProfileDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ProvisioningProfileDeleteNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileDeleteNotFound %+v", 404, o.Payload) +} +func (o *ProvisioningProfileDeleteNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileDeleteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileDeleteInternalServerError creates a ProvisioningProfileDeleteInternalServerError with default headers values +func NewProvisioningProfileDeleteInternalServerError() *ProvisioningProfileDeleteInternalServerError { + return &ProvisioningProfileDeleteInternalServerError{} +} + +/* ProvisioningProfileDeleteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ProvisioningProfileDeleteInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileDeleteInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileDeleteInternalServerError %+v", 500, o.Payload) +} +func (o *ProvisioningProfileDeleteInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileDeleteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/provisioning_profile_list_parameters.go b/go/client/operations/provisioning_profile_list_parameters.go new file mode 100644 index 0000000..1eb91e2 --- /dev/null +++ b/go/client/operations/provisioning_profile_list_parameters.go @@ -0,0 +1,218 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewProvisioningProfileListParams creates a new ProvisioningProfileListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewProvisioningProfileListParams() *ProvisioningProfileListParams { + return &ProvisioningProfileListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewProvisioningProfileListParamsWithTimeout creates a new ProvisioningProfileListParams object +// with the ability to set a timeout on a request. +func NewProvisioningProfileListParamsWithTimeout(timeout time.Duration) *ProvisioningProfileListParams { + return &ProvisioningProfileListParams{ + timeout: timeout, + } +} + +// NewProvisioningProfileListParamsWithContext creates a new ProvisioningProfileListParams object +// with the ability to set a context for a request. +func NewProvisioningProfileListParamsWithContext(ctx context.Context) *ProvisioningProfileListParams { + return &ProvisioningProfileListParams{ + Context: ctx, + } +} + +// NewProvisioningProfileListParamsWithHTTPClient creates a new ProvisioningProfileListParams object +// with the ability to set a custom HTTPClient for a request. +func NewProvisioningProfileListParamsWithHTTPClient(client *http.Client) *ProvisioningProfileListParams { + return &ProvisioningProfileListParams{ + HTTPClient: client, + } +} + +/* ProvisioningProfileListParams contains all the parameters to send to the API endpoint + for the provisioning profile list operation. + + Typically these are written to a http.Request. +*/ +type ProvisioningProfileListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* Limit. + + Max number of elements per page (default: 50) + */ + Limit *int64 + + /* Next. + + Slug of the first provisioning profile in the response + */ + Next *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the provisioning profile list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileListParams) WithDefaults() *ProvisioningProfileListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the provisioning profile list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the provisioning profile list params +func (o *ProvisioningProfileListParams) WithTimeout(timeout time.Duration) *ProvisioningProfileListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the provisioning profile list params +func (o *ProvisioningProfileListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the provisioning profile list params +func (o *ProvisioningProfileListParams) WithContext(ctx context.Context) *ProvisioningProfileListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the provisioning profile list params +func (o *ProvisioningProfileListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the provisioning profile list params +func (o *ProvisioningProfileListParams) WithHTTPClient(client *http.Client) *ProvisioningProfileListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the provisioning profile list params +func (o *ProvisioningProfileListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the provisioning profile list params +func (o *ProvisioningProfileListParams) WithAppSlug(appSlug string) *ProvisioningProfileListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the provisioning profile list params +func (o *ProvisioningProfileListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithLimit adds the limit to the provisioning profile list params +func (o *ProvisioningProfileListParams) WithLimit(limit *int64) *ProvisioningProfileListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the provisioning profile list params +func (o *ProvisioningProfileListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the provisioning profile list params +func (o *ProvisioningProfileListParams) WithNext(next *string) *ProvisioningProfileListParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the provisioning profile list params +func (o *ProvisioningProfileListParams) SetNext(next *string) { + o.Next = next +} + +// WriteToRequest writes these params to a swagger request +func (o *ProvisioningProfileListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/provisioning_profile_list_responses.go b/go/client/operations/provisioning_profile_list_responses.go new file mode 100644 index 0000000..6189d80 --- /dev/null +++ b/go/client/operations/provisioning_profile_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ProvisioningProfileListReader is a Reader for the ProvisioningProfileList structure. +type ProvisioningProfileListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProvisioningProfileListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewProvisioningProfileListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewProvisioningProfileListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewProvisioningProfileListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewProvisioningProfileListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewProvisioningProfileListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewProvisioningProfileListOK creates a ProvisioningProfileListOK with default headers values +func NewProvisioningProfileListOK() *ProvisioningProfileListOK { + return &ProvisioningProfileListOK{} +} + +/* ProvisioningProfileListOK describes a response with status code 200, with default header values. + +OK +*/ +type ProvisioningProfileListOK struct { + Payload *models.V0ProvisionProfileListResponseModel +} + +func (o *ProvisioningProfileListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/provisioning-profiles][%d] provisioningProfileListOK %+v", 200, o.Payload) +} +func (o *ProvisioningProfileListOK) GetPayload() *models.V0ProvisionProfileListResponseModel { + return o.Payload +} + +func (o *ProvisioningProfileListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProvisionProfileListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileListBadRequest creates a ProvisioningProfileListBadRequest with default headers values +func NewProvisioningProfileListBadRequest() *ProvisioningProfileListBadRequest { + return &ProvisioningProfileListBadRequest{} +} + +/* ProvisioningProfileListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ProvisioningProfileListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/provisioning-profiles][%d] provisioningProfileListBadRequest %+v", 400, o.Payload) +} +func (o *ProvisioningProfileListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileListUnauthorized creates a ProvisioningProfileListUnauthorized with default headers values +func NewProvisioningProfileListUnauthorized() *ProvisioningProfileListUnauthorized { + return &ProvisioningProfileListUnauthorized{} +} + +/* ProvisioningProfileListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ProvisioningProfileListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/provisioning-profiles][%d] provisioningProfileListUnauthorized %+v", 401, o.Payload) +} +func (o *ProvisioningProfileListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileListNotFound creates a ProvisioningProfileListNotFound with default headers values +func NewProvisioningProfileListNotFound() *ProvisioningProfileListNotFound { + return &ProvisioningProfileListNotFound{} +} + +/* ProvisioningProfileListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ProvisioningProfileListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileListNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/provisioning-profiles][%d] provisioningProfileListNotFound %+v", 404, o.Payload) +} +func (o *ProvisioningProfileListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileListInternalServerError creates a ProvisioningProfileListInternalServerError with default headers values +func NewProvisioningProfileListInternalServerError() *ProvisioningProfileListInternalServerError { + return &ProvisioningProfileListInternalServerError{} +} + +/* ProvisioningProfileListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ProvisioningProfileListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/provisioning-profiles][%d] provisioningProfileListInternalServerError %+v", 500, o.Payload) +} +func (o *ProvisioningProfileListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/provisioning_profile_show_parameters.go b/go/client/operations/provisioning_profile_show_parameters.go new file mode 100644 index 0000000..14283dd --- /dev/null +++ b/go/client/operations/provisioning_profile_show_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewProvisioningProfileShowParams creates a new ProvisioningProfileShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewProvisioningProfileShowParams() *ProvisioningProfileShowParams { + return &ProvisioningProfileShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewProvisioningProfileShowParamsWithTimeout creates a new ProvisioningProfileShowParams object +// with the ability to set a timeout on a request. +func NewProvisioningProfileShowParamsWithTimeout(timeout time.Duration) *ProvisioningProfileShowParams { + return &ProvisioningProfileShowParams{ + timeout: timeout, + } +} + +// NewProvisioningProfileShowParamsWithContext creates a new ProvisioningProfileShowParams object +// with the ability to set a context for a request. +func NewProvisioningProfileShowParamsWithContext(ctx context.Context) *ProvisioningProfileShowParams { + return &ProvisioningProfileShowParams{ + Context: ctx, + } +} + +// NewProvisioningProfileShowParamsWithHTTPClient creates a new ProvisioningProfileShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewProvisioningProfileShowParamsWithHTTPClient(client *http.Client) *ProvisioningProfileShowParams { + return &ProvisioningProfileShowParams{ + HTTPClient: client, + } +} + +/* ProvisioningProfileShowParams contains all the parameters to send to the API endpoint + for the provisioning profile show operation. + + Typically these are written to a http.Request. +*/ +type ProvisioningProfileShowParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* ProvisioningProfileSlug. + + Provisioning profile slug + */ + ProvisioningProfileSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the provisioning profile show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileShowParams) WithDefaults() *ProvisioningProfileShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the provisioning profile show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the provisioning profile show params +func (o *ProvisioningProfileShowParams) WithTimeout(timeout time.Duration) *ProvisioningProfileShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the provisioning profile show params +func (o *ProvisioningProfileShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the provisioning profile show params +func (o *ProvisioningProfileShowParams) WithContext(ctx context.Context) *ProvisioningProfileShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the provisioning profile show params +func (o *ProvisioningProfileShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the provisioning profile show params +func (o *ProvisioningProfileShowParams) WithHTTPClient(client *http.Client) *ProvisioningProfileShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the provisioning profile show params +func (o *ProvisioningProfileShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the provisioning profile show params +func (o *ProvisioningProfileShowParams) WithAppSlug(appSlug string) *ProvisioningProfileShowParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the provisioning profile show params +func (o *ProvisioningProfileShowParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithProvisioningProfileSlug adds the provisioningProfileSlug to the provisioning profile show params +func (o *ProvisioningProfileShowParams) WithProvisioningProfileSlug(provisioningProfileSlug string) *ProvisioningProfileShowParams { + o.SetProvisioningProfileSlug(provisioningProfileSlug) + return o +} + +// SetProvisioningProfileSlug adds the provisioningProfileSlug to the provisioning profile show params +func (o *ProvisioningProfileShowParams) SetProvisioningProfileSlug(provisioningProfileSlug string) { + o.ProvisioningProfileSlug = provisioningProfileSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *ProvisioningProfileShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param provisioning-profile-slug + if err := r.SetPathParam("provisioning-profile-slug", o.ProvisioningProfileSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/provisioning_profile_show_responses.go b/go/client/operations/provisioning_profile_show_responses.go new file mode 100644 index 0000000..1851556 --- /dev/null +++ b/go/client/operations/provisioning_profile_show_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ProvisioningProfileShowReader is a Reader for the ProvisioningProfileShow structure. +type ProvisioningProfileShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProvisioningProfileShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewProvisioningProfileShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewProvisioningProfileShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewProvisioningProfileShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewProvisioningProfileShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewProvisioningProfileShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewProvisioningProfileShowOK creates a ProvisioningProfileShowOK with default headers values +func NewProvisioningProfileShowOK() *ProvisioningProfileShowOK { + return &ProvisioningProfileShowOK{} +} + +/* ProvisioningProfileShowOK describes a response with status code 200, with default header values. + +OK +*/ +type ProvisioningProfileShowOK struct { + Payload *models.V0ProvisionProfileResponseModel +} + +func (o *ProvisioningProfileShowOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileShowOK %+v", 200, o.Payload) +} +func (o *ProvisioningProfileShowOK) GetPayload() *models.V0ProvisionProfileResponseModel { + return o.Payload +} + +func (o *ProvisioningProfileShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProvisionProfileResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileShowBadRequest creates a ProvisioningProfileShowBadRequest with default headers values +func NewProvisioningProfileShowBadRequest() *ProvisioningProfileShowBadRequest { + return &ProvisioningProfileShowBadRequest{} +} + +/* ProvisioningProfileShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ProvisioningProfileShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileShowBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileShowBadRequest %+v", 400, o.Payload) +} +func (o *ProvisioningProfileShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileShowUnauthorized creates a ProvisioningProfileShowUnauthorized with default headers values +func NewProvisioningProfileShowUnauthorized() *ProvisioningProfileShowUnauthorized { + return &ProvisioningProfileShowUnauthorized{} +} + +/* ProvisioningProfileShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ProvisioningProfileShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileShowUnauthorized %+v", 401, o.Payload) +} +func (o *ProvisioningProfileShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileShowNotFound creates a ProvisioningProfileShowNotFound with default headers values +func NewProvisioningProfileShowNotFound() *ProvisioningProfileShowNotFound { + return &ProvisioningProfileShowNotFound{} +} + +/* ProvisioningProfileShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ProvisioningProfileShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileShowNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileShowNotFound %+v", 404, o.Payload) +} +func (o *ProvisioningProfileShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileShowInternalServerError creates a ProvisioningProfileShowInternalServerError with default headers values +func NewProvisioningProfileShowInternalServerError() *ProvisioningProfileShowInternalServerError { + return &ProvisioningProfileShowInternalServerError{} +} + +/* ProvisioningProfileShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ProvisioningProfileShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileShowInternalServerError %+v", 500, o.Payload) +} +func (o *ProvisioningProfileShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/provisioning_profile_update_parameters.go b/go/client/operations/provisioning_profile_update_parameters.go new file mode 100644 index 0000000..8458348 --- /dev/null +++ b/go/client/operations/provisioning_profile_update_parameters.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewProvisioningProfileUpdateParams creates a new ProvisioningProfileUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewProvisioningProfileUpdateParams() *ProvisioningProfileUpdateParams { + return &ProvisioningProfileUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewProvisioningProfileUpdateParamsWithTimeout creates a new ProvisioningProfileUpdateParams object +// with the ability to set a timeout on a request. +func NewProvisioningProfileUpdateParamsWithTimeout(timeout time.Duration) *ProvisioningProfileUpdateParams { + return &ProvisioningProfileUpdateParams{ + timeout: timeout, + } +} + +// NewProvisioningProfileUpdateParamsWithContext creates a new ProvisioningProfileUpdateParams object +// with the ability to set a context for a request. +func NewProvisioningProfileUpdateParamsWithContext(ctx context.Context) *ProvisioningProfileUpdateParams { + return &ProvisioningProfileUpdateParams{ + Context: ctx, + } +} + +// NewProvisioningProfileUpdateParamsWithHTTPClient creates a new ProvisioningProfileUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewProvisioningProfileUpdateParamsWithHTTPClient(client *http.Client) *ProvisioningProfileUpdateParams { + return &ProvisioningProfileUpdateParams{ + HTTPClient: client, + } +} + +/* ProvisioningProfileUpdateParams contains all the parameters to send to the API endpoint + for the provisioning profile update operation. + + Typically these are written to a http.Request. +*/ +type ProvisioningProfileUpdateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* ProvisioningProfile. + + Provisioning profile parameters + */ + ProvisioningProfile *models.V0ProvProfileDocumentUpdateParams + + /* ProvisioningProfileSlug. + + Provisioning profile slug + */ + ProvisioningProfileSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the provisioning profile update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileUpdateParams) WithDefaults() *ProvisioningProfileUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the provisioning profile update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProvisioningProfileUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) WithTimeout(timeout time.Duration) *ProvisioningProfileUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) WithContext(ctx context.Context) *ProvisioningProfileUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) WithHTTPClient(client *http.Client) *ProvisioningProfileUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) WithAppSlug(appSlug string) *ProvisioningProfileUpdateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithProvisioningProfile adds the provisioningProfile to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) WithProvisioningProfile(provisioningProfile *models.V0ProvProfileDocumentUpdateParams) *ProvisioningProfileUpdateParams { + o.SetProvisioningProfile(provisioningProfile) + return o +} + +// SetProvisioningProfile adds the provisioningProfile to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) SetProvisioningProfile(provisioningProfile *models.V0ProvProfileDocumentUpdateParams) { + o.ProvisioningProfile = provisioningProfile +} + +// WithProvisioningProfileSlug adds the provisioningProfileSlug to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) WithProvisioningProfileSlug(provisioningProfileSlug string) *ProvisioningProfileUpdateParams { + o.SetProvisioningProfileSlug(provisioningProfileSlug) + return o +} + +// SetProvisioningProfileSlug adds the provisioningProfileSlug to the provisioning profile update params +func (o *ProvisioningProfileUpdateParams) SetProvisioningProfileSlug(provisioningProfileSlug string) { + o.ProvisioningProfileSlug = provisioningProfileSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *ProvisioningProfileUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.ProvisioningProfile != nil { + if err := r.SetBodyParam(o.ProvisioningProfile); err != nil { + return err + } + } + + // path param provisioning-profile-slug + if err := r.SetPathParam("provisioning-profile-slug", o.ProvisioningProfileSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/provisioning_profile_update_responses.go b/go/client/operations/provisioning_profile_update_responses.go new file mode 100644 index 0000000..0063ee9 --- /dev/null +++ b/go/client/operations/provisioning_profile_update_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// ProvisioningProfileUpdateReader is a Reader for the ProvisioningProfileUpdate structure. +type ProvisioningProfileUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProvisioningProfileUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewProvisioningProfileUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewProvisioningProfileUpdateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewProvisioningProfileUpdateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewProvisioningProfileUpdateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewProvisioningProfileUpdateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewProvisioningProfileUpdateOK creates a ProvisioningProfileUpdateOK with default headers values +func NewProvisioningProfileUpdateOK() *ProvisioningProfileUpdateOK { + return &ProvisioningProfileUpdateOK{} +} + +/* ProvisioningProfileUpdateOK describes a response with status code 200, with default header values. + +OK +*/ +type ProvisioningProfileUpdateOK struct { + Payload *models.V0ProvisionProfileResponseModel +} + +func (o *ProvisioningProfileUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileUpdateOK %+v", 200, o.Payload) +} +func (o *ProvisioningProfileUpdateOK) GetPayload() *models.V0ProvisionProfileResponseModel { + return o.Payload +} + +func (o *ProvisioningProfileUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0ProvisionProfileResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileUpdateBadRequest creates a ProvisioningProfileUpdateBadRequest with default headers values +func NewProvisioningProfileUpdateBadRequest() *ProvisioningProfileUpdateBadRequest { + return &ProvisioningProfileUpdateBadRequest{} +} + +/* ProvisioningProfileUpdateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ProvisioningProfileUpdateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileUpdateBadRequest) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileUpdateBadRequest %+v", 400, o.Payload) +} +func (o *ProvisioningProfileUpdateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileUpdateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileUpdateUnauthorized creates a ProvisioningProfileUpdateUnauthorized with default headers values +func NewProvisioningProfileUpdateUnauthorized() *ProvisioningProfileUpdateUnauthorized { + return &ProvisioningProfileUpdateUnauthorized{} +} + +/* ProvisioningProfileUpdateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ProvisioningProfileUpdateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileUpdateUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileUpdateUnauthorized %+v", 401, o.Payload) +} +func (o *ProvisioningProfileUpdateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileUpdateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileUpdateNotFound creates a ProvisioningProfileUpdateNotFound with default headers values +func NewProvisioningProfileUpdateNotFound() *ProvisioningProfileUpdateNotFound { + return &ProvisioningProfileUpdateNotFound{} +} + +/* ProvisioningProfileUpdateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ProvisioningProfileUpdateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileUpdateNotFound) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileUpdateNotFound %+v", 404, o.Payload) +} +func (o *ProvisioningProfileUpdateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileUpdateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProvisioningProfileUpdateInternalServerError creates a ProvisioningProfileUpdateInternalServerError with default headers values +func NewProvisioningProfileUpdateInternalServerError() *ProvisioningProfileUpdateInternalServerError { + return &ProvisioningProfileUpdateInternalServerError{} +} + +/* ProvisioningProfileUpdateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ProvisioningProfileUpdateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *ProvisioningProfileUpdateInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}][%d] provisioningProfileUpdateInternalServerError %+v", 500, o.Payload) +} +func (o *ProvisioningProfileUpdateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *ProvisioningProfileUpdateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/ssh_key_create_parameters.go b/go/client/operations/ssh_key_create_parameters.go new file mode 100644 index 0000000..4f510e2 --- /dev/null +++ b/go/client/operations/ssh_key_create_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// NewSSHKeyCreateParams creates a new SSHKeyCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewSSHKeyCreateParams() *SSHKeyCreateParams { + return &SSHKeyCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewSSHKeyCreateParamsWithTimeout creates a new SSHKeyCreateParams object +// with the ability to set a timeout on a request. +func NewSSHKeyCreateParamsWithTimeout(timeout time.Duration) *SSHKeyCreateParams { + return &SSHKeyCreateParams{ + timeout: timeout, + } +} + +// NewSSHKeyCreateParamsWithContext creates a new SSHKeyCreateParams object +// with the ability to set a context for a request. +func NewSSHKeyCreateParamsWithContext(ctx context.Context) *SSHKeyCreateParams { + return &SSHKeyCreateParams{ + Context: ctx, + } +} + +// NewSSHKeyCreateParamsWithHTTPClient creates a new SSHKeyCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewSSHKeyCreateParamsWithHTTPClient(client *http.Client) *SSHKeyCreateParams { + return &SSHKeyCreateParams{ + HTTPClient: client, + } +} + +/* SSHKeyCreateParams contains all the parameters to send to the API endpoint + for the ssh key create operation. + + Typically these are written to a http.Request. +*/ +type SSHKeyCreateParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* SSHKey. + + SSH key parameters + */ + SSHKey *models.V0SSHKeyUploadParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ssh key create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *SSHKeyCreateParams) WithDefaults() *SSHKeyCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ssh key create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *SSHKeyCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ssh key create params +func (o *SSHKeyCreateParams) WithTimeout(timeout time.Duration) *SSHKeyCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ssh key create params +func (o *SSHKeyCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ssh key create params +func (o *SSHKeyCreateParams) WithContext(ctx context.Context) *SSHKeyCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ssh key create params +func (o *SSHKeyCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ssh key create params +func (o *SSHKeyCreateParams) WithHTTPClient(client *http.Client) *SSHKeyCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ssh key create params +func (o *SSHKeyCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the ssh key create params +func (o *SSHKeyCreateParams) WithAppSlug(appSlug string) *SSHKeyCreateParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the ssh key create params +func (o *SSHKeyCreateParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithSSHKey adds the sSHKey to the ssh key create params +func (o *SSHKeyCreateParams) WithSSHKey(sSHKey *models.V0SSHKeyUploadParams) *SSHKeyCreateParams { + o.SetSSHKey(sSHKey) + return o +} + +// SetSSHKey adds the sshKey to the ssh key create params +func (o *SSHKeyCreateParams) SetSSHKey(sSHKey *models.V0SSHKeyUploadParams) { + o.SSHKey = sSHKey +} + +// WriteToRequest writes these params to a swagger request +func (o *SSHKeyCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + if o.SSHKey != nil { + if err := r.SetBodyParam(o.SSHKey); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/ssh_key_create_responses.go b/go/client/operations/ssh_key_create_responses.go new file mode 100644 index 0000000..da0e048 --- /dev/null +++ b/go/client/operations/ssh_key_create_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// SSHKeyCreateReader is a Reader for the SSHKeyCreate structure. +type SSHKeyCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SSHKeyCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSSHKeyCreateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewSSHKeyCreateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewSSHKeyCreateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewSSHKeyCreateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewSSHKeyCreateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewSSHKeyCreateOK creates a SSHKeyCreateOK with default headers values +func NewSSHKeyCreateOK() *SSHKeyCreateOK { + return &SSHKeyCreateOK{} +} + +/* SSHKeyCreateOK describes a response with status code 200, with default header values. + +OK +*/ +type SSHKeyCreateOK struct { + Payload *models.V0SSHKeyRespModel +} + +func (o *SSHKeyCreateOK) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/register-ssh-key][%d] sshKeyCreateOK %+v", 200, o.Payload) +} +func (o *SSHKeyCreateOK) GetPayload() *models.V0SSHKeyRespModel { + return o.Payload +} + +func (o *SSHKeyCreateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0SSHKeyRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewSSHKeyCreateBadRequest creates a SSHKeyCreateBadRequest with default headers values +func NewSSHKeyCreateBadRequest() *SSHKeyCreateBadRequest { + return &SSHKeyCreateBadRequest{} +} + +/* SSHKeyCreateBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type SSHKeyCreateBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *SSHKeyCreateBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/register-ssh-key][%d] sshKeyCreateBadRequest %+v", 400, o.Payload) +} +func (o *SSHKeyCreateBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *SSHKeyCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewSSHKeyCreateUnauthorized creates a SSHKeyCreateUnauthorized with default headers values +func NewSSHKeyCreateUnauthorized() *SSHKeyCreateUnauthorized { + return &SSHKeyCreateUnauthorized{} +} + +/* SSHKeyCreateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type SSHKeyCreateUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *SSHKeyCreateUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/register-ssh-key][%d] sshKeyCreateUnauthorized %+v", 401, o.Payload) +} +func (o *SSHKeyCreateUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *SSHKeyCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewSSHKeyCreateNotFound creates a SSHKeyCreateNotFound with default headers values +func NewSSHKeyCreateNotFound() *SSHKeyCreateNotFound { + return &SSHKeyCreateNotFound{} +} + +/* SSHKeyCreateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type SSHKeyCreateNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *SSHKeyCreateNotFound) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/register-ssh-key][%d] sshKeyCreateNotFound %+v", 404, o.Payload) +} +func (o *SSHKeyCreateNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *SSHKeyCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewSSHKeyCreateInternalServerError creates a SSHKeyCreateInternalServerError with default headers values +func NewSSHKeyCreateInternalServerError() *SSHKeyCreateInternalServerError { + return &SSHKeyCreateInternalServerError{} +} + +/* SSHKeyCreateInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type SSHKeyCreateInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *SSHKeyCreateInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/register-ssh-key][%d] sshKeyCreateInternalServerError %+v", 500, o.Payload) +} +func (o *SSHKeyCreateInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *SSHKeyCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/test_device_list_parameters.go b/go/client/operations/test_device_list_parameters.go new file mode 100644 index 0000000..f2d0e93 --- /dev/null +++ b/go/client/operations/test_device_list_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTestDeviceListParams creates a new TestDeviceListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTestDeviceListParams() *TestDeviceListParams { + return &TestDeviceListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTestDeviceListParamsWithTimeout creates a new TestDeviceListParams object +// with the ability to set a timeout on a request. +func NewTestDeviceListParamsWithTimeout(timeout time.Duration) *TestDeviceListParams { + return &TestDeviceListParams{ + timeout: timeout, + } +} + +// NewTestDeviceListParamsWithContext creates a new TestDeviceListParams object +// with the ability to set a context for a request. +func NewTestDeviceListParamsWithContext(ctx context.Context) *TestDeviceListParams { + return &TestDeviceListParams{ + Context: ctx, + } +} + +// NewTestDeviceListParamsWithHTTPClient creates a new TestDeviceListParams object +// with the ability to set a custom HTTPClient for a request. +func NewTestDeviceListParamsWithHTTPClient(client *http.Client) *TestDeviceListParams { + return &TestDeviceListParams{ + HTTPClient: client, + } +} + +/* TestDeviceListParams contains all the parameters to send to the API endpoint + for the test device list operation. + + Typically these are written to a http.Request. +*/ +type TestDeviceListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the test device list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TestDeviceListParams) WithDefaults() *TestDeviceListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the test device list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TestDeviceListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the test device list params +func (o *TestDeviceListParams) WithTimeout(timeout time.Duration) *TestDeviceListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the test device list params +func (o *TestDeviceListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the test device list params +func (o *TestDeviceListParams) WithContext(ctx context.Context) *TestDeviceListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the test device list params +func (o *TestDeviceListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the test device list params +func (o *TestDeviceListParams) WithHTTPClient(client *http.Client) *TestDeviceListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the test device list params +func (o *TestDeviceListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the test device list params +func (o *TestDeviceListParams) WithAppSlug(appSlug string) *TestDeviceListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the test device list params +func (o *TestDeviceListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *TestDeviceListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/test_device_list_responses.go b/go/client/operations/test_device_list_responses.go new file mode 100644 index 0000000..ec28c8c --- /dev/null +++ b/go/client/operations/test_device_list_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// TestDeviceListReader is a Reader for the TestDeviceList structure. +type TestDeviceListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TestDeviceListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTestDeviceListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewTestDeviceListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewTestDeviceListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewTestDeviceListNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewTestDeviceListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTestDeviceListOK creates a TestDeviceListOK with default headers values +func NewTestDeviceListOK() *TestDeviceListOK { + return &TestDeviceListOK{} +} + +/* TestDeviceListOK describes a response with status code 200, with default header values. + +OK +*/ +type TestDeviceListOK struct { + Payload *models.V0TestDeviceListResponseModel +} + +func (o *TestDeviceListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/test-devices][%d] testDeviceListOK %+v", 200, o.Payload) +} +func (o *TestDeviceListOK) GetPayload() *models.V0TestDeviceListResponseModel { + return o.Payload +} + +func (o *TestDeviceListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0TestDeviceListResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewTestDeviceListBadRequest creates a TestDeviceListBadRequest with default headers values +func NewTestDeviceListBadRequest() *TestDeviceListBadRequest { + return &TestDeviceListBadRequest{} +} + +/* TestDeviceListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type TestDeviceListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *TestDeviceListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/test-devices][%d] testDeviceListBadRequest %+v", 400, o.Payload) +} +func (o *TestDeviceListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *TestDeviceListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewTestDeviceListUnauthorized creates a TestDeviceListUnauthorized with default headers values +func NewTestDeviceListUnauthorized() *TestDeviceListUnauthorized { + return &TestDeviceListUnauthorized{} +} + +/* TestDeviceListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type TestDeviceListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *TestDeviceListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/test-devices][%d] testDeviceListUnauthorized %+v", 401, o.Payload) +} +func (o *TestDeviceListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *TestDeviceListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewTestDeviceListNotFound creates a TestDeviceListNotFound with default headers values +func NewTestDeviceListNotFound() *TestDeviceListNotFound { + return &TestDeviceListNotFound{} +} + +/* TestDeviceListNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type TestDeviceListNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *TestDeviceListNotFound) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/test-devices][%d] testDeviceListNotFound %+v", 404, o.Payload) +} +func (o *TestDeviceListNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *TestDeviceListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewTestDeviceListInternalServerError creates a TestDeviceListInternalServerError with default headers values +func NewTestDeviceListInternalServerError() *TestDeviceListInternalServerError { + return &TestDeviceListInternalServerError{} +} + +/* TestDeviceListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type TestDeviceListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *TestDeviceListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/test-devices][%d] testDeviceListInternalServerError %+v", 500, o.Payload) +} +func (o *TestDeviceListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *TestDeviceListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/user_plan_parameters.go b/go/client/operations/user_plan_parameters.go new file mode 100644 index 0000000..6d8ca70 --- /dev/null +++ b/go/client/operations/user_plan_parameters.go @@ -0,0 +1,126 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewUserPlanParams creates a new UserPlanParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUserPlanParams() *UserPlanParams { + return &UserPlanParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUserPlanParamsWithTimeout creates a new UserPlanParams object +// with the ability to set a timeout on a request. +func NewUserPlanParamsWithTimeout(timeout time.Duration) *UserPlanParams { + return &UserPlanParams{ + timeout: timeout, + } +} + +// NewUserPlanParamsWithContext creates a new UserPlanParams object +// with the ability to set a context for a request. +func NewUserPlanParamsWithContext(ctx context.Context) *UserPlanParams { + return &UserPlanParams{ + Context: ctx, + } +} + +// NewUserPlanParamsWithHTTPClient creates a new UserPlanParams object +// with the ability to set a custom HTTPClient for a request. +func NewUserPlanParamsWithHTTPClient(client *http.Client) *UserPlanParams { + return &UserPlanParams{ + HTTPClient: client, + } +} + +/* UserPlanParams contains all the parameters to send to the API endpoint + for the user plan operation. + + Typically these are written to a http.Request. +*/ +type UserPlanParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the user plan params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UserPlanParams) WithDefaults() *UserPlanParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the user plan params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UserPlanParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the user plan params +func (o *UserPlanParams) WithTimeout(timeout time.Duration) *UserPlanParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the user plan params +func (o *UserPlanParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the user plan params +func (o *UserPlanParams) WithContext(ctx context.Context) *UserPlanParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the user plan params +func (o *UserPlanParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the user plan params +func (o *UserPlanParams) WithHTTPClient(client *http.Client) *UserPlanParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the user plan params +func (o *UserPlanParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *UserPlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/user_plan_responses.go b/go/client/operations/user_plan_responses.go new file mode 100644 index 0000000..9a56aaf --- /dev/null +++ b/go/client/operations/user_plan_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// UserPlanReader is a Reader for the UserPlan structure. +type UserPlanReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UserPlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUserPlanOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewUserPlanBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewUserPlanUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUserPlanNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUserPlanInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUserPlanOK creates a UserPlanOK with default headers values +func NewUserPlanOK() *UserPlanOK { + return &UserPlanOK{} +} + +/* UserPlanOK describes a response with status code 200, with default header values. + +OK +*/ +type UserPlanOK struct { + Payload *models.V0UserPlanRespModel +} + +func (o *UserPlanOK) Error() string { + return fmt.Sprintf("[GET /me/plan][%d] userPlanOK %+v", 200, o.Payload) +} +func (o *UserPlanOK) GetPayload() *models.V0UserPlanRespModel { + return o.Payload +} + +func (o *UserPlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0UserPlanRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserPlanBadRequest creates a UserPlanBadRequest with default headers values +func NewUserPlanBadRequest() *UserPlanBadRequest { + return &UserPlanBadRequest{} +} + +/* UserPlanBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type UserPlanBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserPlanBadRequest) Error() string { + return fmt.Sprintf("[GET /me/plan][%d] userPlanBadRequest %+v", 400, o.Payload) +} +func (o *UserPlanBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserPlanBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserPlanUnauthorized creates a UserPlanUnauthorized with default headers values +func NewUserPlanUnauthorized() *UserPlanUnauthorized { + return &UserPlanUnauthorized{} +} + +/* UserPlanUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type UserPlanUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserPlanUnauthorized) Error() string { + return fmt.Sprintf("[GET /me/plan][%d] userPlanUnauthorized %+v", 401, o.Payload) +} +func (o *UserPlanUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserPlanUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserPlanNotFound creates a UserPlanNotFound with default headers values +func NewUserPlanNotFound() *UserPlanNotFound { + return &UserPlanNotFound{} +} + +/* UserPlanNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type UserPlanNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserPlanNotFound) Error() string { + return fmt.Sprintf("[GET /me/plan][%d] userPlanNotFound %+v", 404, o.Payload) +} +func (o *UserPlanNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserPlanNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserPlanInternalServerError creates a UserPlanInternalServerError with default headers values +func NewUserPlanInternalServerError() *UserPlanInternalServerError { + return &UserPlanInternalServerError{} +} + +/* UserPlanInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type UserPlanInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserPlanInternalServerError) Error() string { + return fmt.Sprintf("[GET /me/plan][%d] userPlanInternalServerError %+v", 500, o.Payload) +} +func (o *UserPlanInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserPlanInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/user_profile_parameters.go b/go/client/operations/user_profile_parameters.go new file mode 100644 index 0000000..9a1b528 --- /dev/null +++ b/go/client/operations/user_profile_parameters.go @@ -0,0 +1,126 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewUserProfileParams creates a new UserProfileParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUserProfileParams() *UserProfileParams { + return &UserProfileParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUserProfileParamsWithTimeout creates a new UserProfileParams object +// with the ability to set a timeout on a request. +func NewUserProfileParamsWithTimeout(timeout time.Duration) *UserProfileParams { + return &UserProfileParams{ + timeout: timeout, + } +} + +// NewUserProfileParamsWithContext creates a new UserProfileParams object +// with the ability to set a context for a request. +func NewUserProfileParamsWithContext(ctx context.Context) *UserProfileParams { + return &UserProfileParams{ + Context: ctx, + } +} + +// NewUserProfileParamsWithHTTPClient creates a new UserProfileParams object +// with the ability to set a custom HTTPClient for a request. +func NewUserProfileParamsWithHTTPClient(client *http.Client) *UserProfileParams { + return &UserProfileParams{ + HTTPClient: client, + } +} + +/* UserProfileParams contains all the parameters to send to the API endpoint + for the user profile operation. + + Typically these are written to a http.Request. +*/ +type UserProfileParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the user profile params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UserProfileParams) WithDefaults() *UserProfileParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the user profile params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UserProfileParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the user profile params +func (o *UserProfileParams) WithTimeout(timeout time.Duration) *UserProfileParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the user profile params +func (o *UserProfileParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the user profile params +func (o *UserProfileParams) WithContext(ctx context.Context) *UserProfileParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the user profile params +func (o *UserProfileParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the user profile params +func (o *UserProfileParams) WithHTTPClient(client *http.Client) *UserProfileParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the user profile params +func (o *UserProfileParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *UserProfileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/user_profile_responses.go b/go/client/operations/user_profile_responses.go new file mode 100644 index 0000000..c93c193 --- /dev/null +++ b/go/client/operations/user_profile_responses.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// UserProfileReader is a Reader for the UserProfile structure. +type UserProfileReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UserProfileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUserProfileOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewUserProfileUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUserProfileNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUserProfileInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUserProfileOK creates a UserProfileOK with default headers values +func NewUserProfileOK() *UserProfileOK { + return &UserProfileOK{} +} + +/* UserProfileOK describes a response with status code 200, with default header values. + +OK +*/ +type UserProfileOK struct { + Payload *models.V0UserProfileRespModel +} + +func (o *UserProfileOK) Error() string { + return fmt.Sprintf("[GET /me][%d] userProfileOK %+v", 200, o.Payload) +} +func (o *UserProfileOK) GetPayload() *models.V0UserProfileRespModel { + return o.Payload +} + +func (o *UserProfileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0UserProfileRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserProfileUnauthorized creates a UserProfileUnauthorized with default headers values +func NewUserProfileUnauthorized() *UserProfileUnauthorized { + return &UserProfileUnauthorized{} +} + +/* UserProfileUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type UserProfileUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserProfileUnauthorized) Error() string { + return fmt.Sprintf("[GET /me][%d] userProfileUnauthorized %+v", 401, o.Payload) +} +func (o *UserProfileUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserProfileUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserProfileNotFound creates a UserProfileNotFound with default headers values +func NewUserProfileNotFound() *UserProfileNotFound { + return &UserProfileNotFound{} +} + +/* UserProfileNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type UserProfileNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserProfileNotFound) Error() string { + return fmt.Sprintf("[GET /me][%d] userProfileNotFound %+v", 404, o.Payload) +} +func (o *UserProfileNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserProfileNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserProfileInternalServerError creates a UserProfileInternalServerError with default headers values +func NewUserProfileInternalServerError() *UserProfileInternalServerError { + return &UserProfileInternalServerError{} +} + +/* UserProfileInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type UserProfileInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserProfileInternalServerError) Error() string { + return fmt.Sprintf("[GET /me][%d] userProfileInternalServerError %+v", 500, o.Payload) +} +func (o *UserProfileInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserProfileInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/user_show_parameters.go b/go/client/operations/user_show_parameters.go new file mode 100644 index 0000000..c47ff43 --- /dev/null +++ b/go/client/operations/user_show_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewUserShowParams creates a new UserShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUserShowParams() *UserShowParams { + return &UserShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUserShowParamsWithTimeout creates a new UserShowParams object +// with the ability to set a timeout on a request. +func NewUserShowParamsWithTimeout(timeout time.Duration) *UserShowParams { + return &UserShowParams{ + timeout: timeout, + } +} + +// NewUserShowParamsWithContext creates a new UserShowParams object +// with the ability to set a context for a request. +func NewUserShowParamsWithContext(ctx context.Context) *UserShowParams { + return &UserShowParams{ + Context: ctx, + } +} + +// NewUserShowParamsWithHTTPClient creates a new UserShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewUserShowParamsWithHTTPClient(client *http.Client) *UserShowParams { + return &UserShowParams{ + HTTPClient: client, + } +} + +/* UserShowParams contains all the parameters to send to the API endpoint + for the user show operation. + + Typically these are written to a http.Request. +*/ +type UserShowParams struct { + + /* UserSlug. + + User slug + */ + UserSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the user show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UserShowParams) WithDefaults() *UserShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the user show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UserShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the user show params +func (o *UserShowParams) WithTimeout(timeout time.Duration) *UserShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the user show params +func (o *UserShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the user show params +func (o *UserShowParams) WithContext(ctx context.Context) *UserShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the user show params +func (o *UserShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the user show params +func (o *UserShowParams) WithHTTPClient(client *http.Client) *UserShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the user show params +func (o *UserShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUserSlug adds the userSlug to the user show params +func (o *UserShowParams) WithUserSlug(userSlug string) *UserShowParams { + o.SetUserSlug(userSlug) + return o +} + +// SetUserSlug adds the userSlug to the user show params +func (o *UserShowParams) SetUserSlug(userSlug string) { + o.UserSlug = userSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *UserShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param user-slug + if err := r.SetPathParam("user-slug", o.UserSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/user_show_responses.go b/go/client/operations/user_show_responses.go new file mode 100644 index 0000000..76421fa --- /dev/null +++ b/go/client/operations/user_show_responses.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// UserShowReader is a Reader for the UserShow structure. +type UserShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UserShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUserShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewUserShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewUserShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUserShowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUserShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUserShowOK creates a UserShowOK with default headers values +func NewUserShowOK() *UserShowOK { + return &UserShowOK{} +} + +/* UserShowOK describes a response with status code 200, with default header values. + +OK +*/ +type UserShowOK struct { + Payload *models.V0UserProfileRespModel +} + +func (o *UserShowOK) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}][%d] userShowOK %+v", 200, o.Payload) +} +func (o *UserShowOK) GetPayload() *models.V0UserProfileRespModel { + return o.Payload +} + +func (o *UserShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0UserProfileRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserShowBadRequest creates a UserShowBadRequest with default headers values +func NewUserShowBadRequest() *UserShowBadRequest { + return &UserShowBadRequest{} +} + +/* UserShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type UserShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserShowBadRequest) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}][%d] userShowBadRequest %+v", 400, o.Payload) +} +func (o *UserShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserShowUnauthorized creates a UserShowUnauthorized with default headers values +func NewUserShowUnauthorized() *UserShowUnauthorized { + return &UserShowUnauthorized{} +} + +/* UserShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type UserShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}][%d] userShowUnauthorized %+v", 401, o.Payload) +} +func (o *UserShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserShowNotFound creates a UserShowNotFound with default headers values +func NewUserShowNotFound() *UserShowNotFound { + return &UserShowNotFound{} +} + +/* UserShowNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type UserShowNotFound struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserShowNotFound) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}][%d] userShowNotFound %+v", 404, o.Payload) +} +func (o *UserShowNotFound) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserShowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUserShowInternalServerError creates a UserShowInternalServerError with default headers values +func NewUserShowInternalServerError() *UserShowInternalServerError { + return &UserShowInternalServerError{} +} + +/* UserShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type UserShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *UserShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /users/{user-slug}][%d] userShowInternalServerError %+v", 500, o.Payload) +} +func (o *UserShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *UserShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/webhook_delivery_item_list_parameters.go b/go/client/operations/webhook_delivery_item_list_parameters.go new file mode 100644 index 0000000..d8d56a9 --- /dev/null +++ b/go/client/operations/webhook_delivery_item_list_parameters.go @@ -0,0 +1,240 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewWebhookDeliveryItemListParams creates a new WebhookDeliveryItemListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWebhookDeliveryItemListParams() *WebhookDeliveryItemListParams { + return &WebhookDeliveryItemListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWebhookDeliveryItemListParamsWithTimeout creates a new WebhookDeliveryItemListParams object +// with the ability to set a timeout on a request. +func NewWebhookDeliveryItemListParamsWithTimeout(timeout time.Duration) *WebhookDeliveryItemListParams { + return &WebhookDeliveryItemListParams{ + timeout: timeout, + } +} + +// NewWebhookDeliveryItemListParamsWithContext creates a new WebhookDeliveryItemListParams object +// with the ability to set a context for a request. +func NewWebhookDeliveryItemListParamsWithContext(ctx context.Context) *WebhookDeliveryItemListParams { + return &WebhookDeliveryItemListParams{ + Context: ctx, + } +} + +// NewWebhookDeliveryItemListParamsWithHTTPClient creates a new WebhookDeliveryItemListParams object +// with the ability to set a custom HTTPClient for a request. +func NewWebhookDeliveryItemListParamsWithHTTPClient(client *http.Client) *WebhookDeliveryItemListParams { + return &WebhookDeliveryItemListParams{ + HTTPClient: client, + } +} + +/* WebhookDeliveryItemListParams contains all the parameters to send to the API endpoint + for the webhook delivery item list operation. + + Typically these are written to a http.Request. +*/ +type WebhookDeliveryItemListParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* AppWebhookSlug. + + App webhook slug + */ + AppWebhookSlug string + + /* Limit. + + Max number of elements per page (default: 50) + */ + Limit *int64 + + /* Next. + + Slug of the first delivery item in the response + */ + Next *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the webhook delivery item list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WebhookDeliveryItemListParams) WithDefaults() *WebhookDeliveryItemListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the webhook delivery item list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WebhookDeliveryItemListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) WithTimeout(timeout time.Duration) *WebhookDeliveryItemListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) WithContext(ctx context.Context) *WebhookDeliveryItemListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) WithHTTPClient(client *http.Client) *WebhookDeliveryItemListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) WithAppSlug(appSlug string) *WebhookDeliveryItemListParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithAppWebhookSlug adds the appWebhookSlug to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) WithAppWebhookSlug(appWebhookSlug string) *WebhookDeliveryItemListParams { + o.SetAppWebhookSlug(appWebhookSlug) + return o +} + +// SetAppWebhookSlug adds the appWebhookSlug to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) SetAppWebhookSlug(appWebhookSlug string) { + o.AppWebhookSlug = appWebhookSlug +} + +// WithLimit adds the limit to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) WithLimit(limit *int64) *WebhookDeliveryItemListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNext adds the next to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) WithNext(next *string) *WebhookDeliveryItemListParams { + o.SetNext(next) + return o +} + +// SetNext adds the next to the webhook delivery item list params +func (o *WebhookDeliveryItemListParams) SetNext(next *string) { + o.Next = next +} + +// WriteToRequest writes these params to a swagger request +func (o *WebhookDeliveryItemListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param app-webhook-slug + if err := r.SetPathParam("app-webhook-slug", o.AppWebhookSlug); err != nil { + return err + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Next != nil { + + // query param next + var qrNext string + + if o.Next != nil { + qrNext = *o.Next + } + qNext := qrNext + if qNext != "" { + + if err := r.SetQueryParam("next", qNext); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/webhook_delivery_item_list_responses.go b/go/client/operations/webhook_delivery_item_list_responses.go new file mode 100644 index 0000000..64bb8e3 --- /dev/null +++ b/go/client/operations/webhook_delivery_item_list_responses.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// WebhookDeliveryItemListReader is a Reader for the WebhookDeliveryItemList structure. +type WebhookDeliveryItemListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WebhookDeliveryItemListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWebhookDeliveryItemListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewWebhookDeliveryItemListBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewWebhookDeliveryItemListUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewWebhookDeliveryItemListInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWebhookDeliveryItemListOK creates a WebhookDeliveryItemListOK with default headers values +func NewWebhookDeliveryItemListOK() *WebhookDeliveryItemListOK { + return &WebhookDeliveryItemListOK{} +} + +/* WebhookDeliveryItemListOK describes a response with status code 200, with default header values. + +OK +*/ +type WebhookDeliveryItemListOK struct { + Payload *models.V0WebhookDeliveryItemShowResponseModel +} + +func (o *WebhookDeliveryItemListOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items][%d] webhookDeliveryItemListOK %+v", 200, o.Payload) +} +func (o *WebhookDeliveryItemListOK) GetPayload() *models.V0WebhookDeliveryItemShowResponseModel { + return o.Payload +} + +func (o *WebhookDeliveryItemListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0WebhookDeliveryItemShowResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWebhookDeliveryItemListBadRequest creates a WebhookDeliveryItemListBadRequest with default headers values +func NewWebhookDeliveryItemListBadRequest() *WebhookDeliveryItemListBadRequest { + return &WebhookDeliveryItemListBadRequest{} +} + +/* WebhookDeliveryItemListBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type WebhookDeliveryItemListBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *WebhookDeliveryItemListBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items][%d] webhookDeliveryItemListBadRequest %+v", 400, o.Payload) +} +func (o *WebhookDeliveryItemListBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *WebhookDeliveryItemListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWebhookDeliveryItemListUnauthorized creates a WebhookDeliveryItemListUnauthorized with default headers values +func NewWebhookDeliveryItemListUnauthorized() *WebhookDeliveryItemListUnauthorized { + return &WebhookDeliveryItemListUnauthorized{} +} + +/* WebhookDeliveryItemListUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type WebhookDeliveryItemListUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *WebhookDeliveryItemListUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items][%d] webhookDeliveryItemListUnauthorized %+v", 401, o.Payload) +} +func (o *WebhookDeliveryItemListUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *WebhookDeliveryItemListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWebhookDeliveryItemListInternalServerError creates a WebhookDeliveryItemListInternalServerError with default headers values +func NewWebhookDeliveryItemListInternalServerError() *WebhookDeliveryItemListInternalServerError { + return &WebhookDeliveryItemListInternalServerError{} +} + +/* WebhookDeliveryItemListInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type WebhookDeliveryItemListInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *WebhookDeliveryItemListInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items][%d] webhookDeliveryItemListInternalServerError %+v", 500, o.Payload) +} +func (o *WebhookDeliveryItemListInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *WebhookDeliveryItemListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/webhook_delivery_item_redeliver_parameters.go b/go/client/operations/webhook_delivery_item_redeliver_parameters.go new file mode 100644 index 0000000..0bb44bb --- /dev/null +++ b/go/client/operations/webhook_delivery_item_redeliver_parameters.go @@ -0,0 +1,193 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewWebhookDeliveryItemRedeliverParams creates a new WebhookDeliveryItemRedeliverParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWebhookDeliveryItemRedeliverParams() *WebhookDeliveryItemRedeliverParams { + return &WebhookDeliveryItemRedeliverParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWebhookDeliveryItemRedeliverParamsWithTimeout creates a new WebhookDeliveryItemRedeliverParams object +// with the ability to set a timeout on a request. +func NewWebhookDeliveryItemRedeliverParamsWithTimeout(timeout time.Duration) *WebhookDeliveryItemRedeliverParams { + return &WebhookDeliveryItemRedeliverParams{ + timeout: timeout, + } +} + +// NewWebhookDeliveryItemRedeliverParamsWithContext creates a new WebhookDeliveryItemRedeliverParams object +// with the ability to set a context for a request. +func NewWebhookDeliveryItemRedeliverParamsWithContext(ctx context.Context) *WebhookDeliveryItemRedeliverParams { + return &WebhookDeliveryItemRedeliverParams{ + Context: ctx, + } +} + +// NewWebhookDeliveryItemRedeliverParamsWithHTTPClient creates a new WebhookDeliveryItemRedeliverParams object +// with the ability to set a custom HTTPClient for a request. +func NewWebhookDeliveryItemRedeliverParamsWithHTTPClient(client *http.Client) *WebhookDeliveryItemRedeliverParams { + return &WebhookDeliveryItemRedeliverParams{ + HTTPClient: client, + } +} + +/* WebhookDeliveryItemRedeliverParams contains all the parameters to send to the API endpoint + for the webhook delivery item redeliver operation. + + Typically these are written to a http.Request. +*/ +type WebhookDeliveryItemRedeliverParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* AppWebhookSlug. + + App webhook slug + */ + AppWebhookSlug string + + /* WebhookDeliveryItemSlug. + + Webhook delivery item slug + */ + WebhookDeliveryItemSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the webhook delivery item redeliver params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WebhookDeliveryItemRedeliverParams) WithDefaults() *WebhookDeliveryItemRedeliverParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the webhook delivery item redeliver params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WebhookDeliveryItemRedeliverParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) WithTimeout(timeout time.Duration) *WebhookDeliveryItemRedeliverParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) WithContext(ctx context.Context) *WebhookDeliveryItemRedeliverParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) WithHTTPClient(client *http.Client) *WebhookDeliveryItemRedeliverParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) WithAppSlug(appSlug string) *WebhookDeliveryItemRedeliverParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithAppWebhookSlug adds the appWebhookSlug to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) WithAppWebhookSlug(appWebhookSlug string) *WebhookDeliveryItemRedeliverParams { + o.SetAppWebhookSlug(appWebhookSlug) + return o +} + +// SetAppWebhookSlug adds the appWebhookSlug to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) SetAppWebhookSlug(appWebhookSlug string) { + o.AppWebhookSlug = appWebhookSlug +} + +// WithWebhookDeliveryItemSlug adds the webhookDeliveryItemSlug to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) WithWebhookDeliveryItemSlug(webhookDeliveryItemSlug string) *WebhookDeliveryItemRedeliverParams { + o.SetWebhookDeliveryItemSlug(webhookDeliveryItemSlug) + return o +} + +// SetWebhookDeliveryItemSlug adds the webhookDeliveryItemSlug to the webhook delivery item redeliver params +func (o *WebhookDeliveryItemRedeliverParams) SetWebhookDeliveryItemSlug(webhookDeliveryItemSlug string) { + o.WebhookDeliveryItemSlug = webhookDeliveryItemSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *WebhookDeliveryItemRedeliverParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param app-webhook-slug + if err := r.SetPathParam("app-webhook-slug", o.AppWebhookSlug); err != nil { + return err + } + + // path param webhook-delivery-item-slug + if err := r.SetPathParam("webhook-delivery-item-slug", o.WebhookDeliveryItemSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/webhook_delivery_item_redeliver_responses.go b/go/client/operations/webhook_delivery_item_redeliver_responses.go new file mode 100644 index 0000000..63d1450 --- /dev/null +++ b/go/client/operations/webhook_delivery_item_redeliver_responses.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// WebhookDeliveryItemRedeliverReader is a Reader for the WebhookDeliveryItemRedeliver structure. +type WebhookDeliveryItemRedeliverReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WebhookDeliveryItemRedeliverReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWebhookDeliveryItemRedeliverOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewWebhookDeliveryItemRedeliverBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewWebhookDeliveryItemRedeliverUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewWebhookDeliveryItemRedeliverInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWebhookDeliveryItemRedeliverOK creates a WebhookDeliveryItemRedeliverOK with default headers values +func NewWebhookDeliveryItemRedeliverOK() *WebhookDeliveryItemRedeliverOK { + return &WebhookDeliveryItemRedeliverOK{} +} + +/* WebhookDeliveryItemRedeliverOK describes a response with status code 200, with default header values. + +OK +*/ +type WebhookDeliveryItemRedeliverOK struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *WebhookDeliveryItemRedeliverOK) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}/redeliver][%d] webhookDeliveryItemRedeliverOK %+v", 200, o.Payload) +} +func (o *WebhookDeliveryItemRedeliverOK) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *WebhookDeliveryItemRedeliverOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWebhookDeliveryItemRedeliverBadRequest creates a WebhookDeliveryItemRedeliverBadRequest with default headers values +func NewWebhookDeliveryItemRedeliverBadRequest() *WebhookDeliveryItemRedeliverBadRequest { + return &WebhookDeliveryItemRedeliverBadRequest{} +} + +/* WebhookDeliveryItemRedeliverBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type WebhookDeliveryItemRedeliverBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *WebhookDeliveryItemRedeliverBadRequest) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}/redeliver][%d] webhookDeliveryItemRedeliverBadRequest %+v", 400, o.Payload) +} +func (o *WebhookDeliveryItemRedeliverBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *WebhookDeliveryItemRedeliverBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWebhookDeliveryItemRedeliverUnauthorized creates a WebhookDeliveryItemRedeliverUnauthorized with default headers values +func NewWebhookDeliveryItemRedeliverUnauthorized() *WebhookDeliveryItemRedeliverUnauthorized { + return &WebhookDeliveryItemRedeliverUnauthorized{} +} + +/* WebhookDeliveryItemRedeliverUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type WebhookDeliveryItemRedeliverUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *WebhookDeliveryItemRedeliverUnauthorized) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}/redeliver][%d] webhookDeliveryItemRedeliverUnauthorized %+v", 401, o.Payload) +} +func (o *WebhookDeliveryItemRedeliverUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *WebhookDeliveryItemRedeliverUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWebhookDeliveryItemRedeliverInternalServerError creates a WebhookDeliveryItemRedeliverInternalServerError with default headers values +func NewWebhookDeliveryItemRedeliverInternalServerError() *WebhookDeliveryItemRedeliverInternalServerError { + return &WebhookDeliveryItemRedeliverInternalServerError{} +} + +/* WebhookDeliveryItemRedeliverInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type WebhookDeliveryItemRedeliverInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *WebhookDeliveryItemRedeliverInternalServerError) Error() string { + return fmt.Sprintf("[POST /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}/redeliver][%d] webhookDeliveryItemRedeliverInternalServerError %+v", 500, o.Payload) +} +func (o *WebhookDeliveryItemRedeliverInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *WebhookDeliveryItemRedeliverInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/client/operations/webhook_delivery_item_show_parameters.go b/go/client/operations/webhook_delivery_item_show_parameters.go new file mode 100644 index 0000000..cdc9264 --- /dev/null +++ b/go/client/operations/webhook_delivery_item_show_parameters.go @@ -0,0 +1,193 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewWebhookDeliveryItemShowParams creates a new WebhookDeliveryItemShowParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWebhookDeliveryItemShowParams() *WebhookDeliveryItemShowParams { + return &WebhookDeliveryItemShowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWebhookDeliveryItemShowParamsWithTimeout creates a new WebhookDeliveryItemShowParams object +// with the ability to set a timeout on a request. +func NewWebhookDeliveryItemShowParamsWithTimeout(timeout time.Duration) *WebhookDeliveryItemShowParams { + return &WebhookDeliveryItemShowParams{ + timeout: timeout, + } +} + +// NewWebhookDeliveryItemShowParamsWithContext creates a new WebhookDeliveryItemShowParams object +// with the ability to set a context for a request. +func NewWebhookDeliveryItemShowParamsWithContext(ctx context.Context) *WebhookDeliveryItemShowParams { + return &WebhookDeliveryItemShowParams{ + Context: ctx, + } +} + +// NewWebhookDeliveryItemShowParamsWithHTTPClient creates a new WebhookDeliveryItemShowParams object +// with the ability to set a custom HTTPClient for a request. +func NewWebhookDeliveryItemShowParamsWithHTTPClient(client *http.Client) *WebhookDeliveryItemShowParams { + return &WebhookDeliveryItemShowParams{ + HTTPClient: client, + } +} + +/* WebhookDeliveryItemShowParams contains all the parameters to send to the API endpoint + for the webhook delivery item show operation. + + Typically these are written to a http.Request. +*/ +type WebhookDeliveryItemShowParams struct { + + /* AppSlug. + + App slug + */ + AppSlug string + + /* AppWebhookSlug. + + App webhook slug + */ + AppWebhookSlug string + + /* WebhookDeliveryItemSlug. + + Webhook delivery item slug + */ + WebhookDeliveryItemSlug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the webhook delivery item show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WebhookDeliveryItemShowParams) WithDefaults() *WebhookDeliveryItemShowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the webhook delivery item show params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WebhookDeliveryItemShowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) WithTimeout(timeout time.Duration) *WebhookDeliveryItemShowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) WithContext(ctx context.Context) *WebhookDeliveryItemShowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) WithHTTPClient(client *http.Client) *WebhookDeliveryItemShowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppSlug adds the appSlug to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) WithAppSlug(appSlug string) *WebhookDeliveryItemShowParams { + o.SetAppSlug(appSlug) + return o +} + +// SetAppSlug adds the appSlug to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) SetAppSlug(appSlug string) { + o.AppSlug = appSlug +} + +// WithAppWebhookSlug adds the appWebhookSlug to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) WithAppWebhookSlug(appWebhookSlug string) *WebhookDeliveryItemShowParams { + o.SetAppWebhookSlug(appWebhookSlug) + return o +} + +// SetAppWebhookSlug adds the appWebhookSlug to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) SetAppWebhookSlug(appWebhookSlug string) { + o.AppWebhookSlug = appWebhookSlug +} + +// WithWebhookDeliveryItemSlug adds the webhookDeliveryItemSlug to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) WithWebhookDeliveryItemSlug(webhookDeliveryItemSlug string) *WebhookDeliveryItemShowParams { + o.SetWebhookDeliveryItemSlug(webhookDeliveryItemSlug) + return o +} + +// SetWebhookDeliveryItemSlug adds the webhookDeliveryItemSlug to the webhook delivery item show params +func (o *WebhookDeliveryItemShowParams) SetWebhookDeliveryItemSlug(webhookDeliveryItemSlug string) { + o.WebhookDeliveryItemSlug = webhookDeliveryItemSlug +} + +// WriteToRequest writes these params to a swagger request +func (o *WebhookDeliveryItemShowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app-slug + if err := r.SetPathParam("app-slug", o.AppSlug); err != nil { + return err + } + + // path param app-webhook-slug + if err := r.SetPathParam("app-webhook-slug", o.AppWebhookSlug); err != nil { + return err + } + + // path param webhook-delivery-item-slug + if err := r.SetPathParam("webhook-delivery-item-slug", o.WebhookDeliveryItemSlug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/client/operations/webhook_delivery_item_show_responses.go b/go/client/operations/webhook_delivery_item_show_responses.go new file mode 100644 index 0000000..871d579 --- /dev/null +++ b/go/client/operations/webhook_delivery_item_show_responses.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/Staffbase/bitrise-api/go/models" +) + +// WebhookDeliveryItemShowReader is a Reader for the WebhookDeliveryItemShow structure. +type WebhookDeliveryItemShowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WebhookDeliveryItemShowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWebhookDeliveryItemShowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewWebhookDeliveryItemShowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewWebhookDeliveryItemShowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewWebhookDeliveryItemShowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWebhookDeliveryItemShowOK creates a WebhookDeliveryItemShowOK with default headers values +func NewWebhookDeliveryItemShowOK() *WebhookDeliveryItemShowOK { + return &WebhookDeliveryItemShowOK{} +} + +/* WebhookDeliveryItemShowOK describes a response with status code 200, with default header values. + +OK +*/ +type WebhookDeliveryItemShowOK struct { + Payload *models.V0WebhookDeliveryItemResponseModel +} + +func (o *WebhookDeliveryItemShowOK) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}][%d] webhookDeliveryItemShowOK %+v", 200, o.Payload) +} +func (o *WebhookDeliveryItemShowOK) GetPayload() *models.V0WebhookDeliveryItemResponseModel { + return o.Payload +} + +func (o *WebhookDeliveryItemShowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V0WebhookDeliveryItemResponseModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWebhookDeliveryItemShowBadRequest creates a WebhookDeliveryItemShowBadRequest with default headers values +func NewWebhookDeliveryItemShowBadRequest() *WebhookDeliveryItemShowBadRequest { + return &WebhookDeliveryItemShowBadRequest{} +} + +/* WebhookDeliveryItemShowBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type WebhookDeliveryItemShowBadRequest struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *WebhookDeliveryItemShowBadRequest) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}][%d] webhookDeliveryItemShowBadRequest %+v", 400, o.Payload) +} +func (o *WebhookDeliveryItemShowBadRequest) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *WebhookDeliveryItemShowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWebhookDeliveryItemShowUnauthorized creates a WebhookDeliveryItemShowUnauthorized with default headers values +func NewWebhookDeliveryItemShowUnauthorized() *WebhookDeliveryItemShowUnauthorized { + return &WebhookDeliveryItemShowUnauthorized{} +} + +/* WebhookDeliveryItemShowUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type WebhookDeliveryItemShowUnauthorized struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *WebhookDeliveryItemShowUnauthorized) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}][%d] webhookDeliveryItemShowUnauthorized %+v", 401, o.Payload) +} +func (o *WebhookDeliveryItemShowUnauthorized) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *WebhookDeliveryItemShowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWebhookDeliveryItemShowInternalServerError creates a WebhookDeliveryItemShowInternalServerError with default headers values +func NewWebhookDeliveryItemShowInternalServerError() *WebhookDeliveryItemShowInternalServerError { + return &WebhookDeliveryItemShowInternalServerError{} +} + +/* WebhookDeliveryItemShowInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type WebhookDeliveryItemShowInternalServerError struct { + Payload *models.ServiceStandardErrorRespModel +} + +func (o *WebhookDeliveryItemShowInternalServerError) Error() string { + return fmt.Sprintf("[GET /apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}][%d] webhookDeliveryItemShowInternalServerError %+v", 500, o.Payload) +} +func (o *WebhookDeliveryItemShowInternalServerError) GetPayload() *models.ServiceStandardErrorRespModel { + return o.Payload +} + +func (o *WebhookDeliveryItemShowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceStandardErrorRespModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/go/models/addons_addon.go b/go/models/addons_addon.go new file mode 100644 index 0000000..1c57278 --- /dev/null +++ b/go/models/addons_addon.go @@ -0,0 +1,249 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AddonsAddon addons addon +// +// swagger:model addons.Addon +type AddonsAddon struct { + + // banner image + BannerImage string `json:"banner_image,omitempty"` + + // card header colors + CardHeaderColors []string `json:"card_header_colors"` + + // categories + Categories []string `json:"categories"` + + // description + Description string `json:"description,omitempty"` + + // developer links + DeveloperLinks []*AddonsDeveloperLink `json:"developer_links"` + + // documentation url + DocumentationURL string `json:"documentation_url,omitempty"` + + // has ui + HasUI bool `json:"has_ui,omitempty"` + + // icon + Icon string `json:"icon,omitempty"` + + // id + ID string `json:"id,omitempty"` + + // is beta + IsBeta bool `json:"is_beta,omitempty"` + + // plans + Plans []*AddonsPlan `json:"plans"` + + // platforms + Platforms []string `json:"platforms"` + + // preview images + PreviewImages []string `json:"preview_images"` + + // setup guide + SetupGuide *AddonsSetupGuide `json:"setup_guide,omitempty"` + + // subtitle + Subtitle string `json:"subtitle,omitempty"` + + // summary + Summary string `json:"summary,omitempty"` + + // title + Title string `json:"title,omitempty"` +} + +// Validate validates this addons addon +func (m *AddonsAddon) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeveloperLinks(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlans(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSetupGuide(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AddonsAddon) validateDeveloperLinks(formats strfmt.Registry) error { + if swag.IsZero(m.DeveloperLinks) { // not required + return nil + } + + for i := 0; i < len(m.DeveloperLinks); i++ { + if swag.IsZero(m.DeveloperLinks[i]) { // not required + continue + } + + if m.DeveloperLinks[i] != nil { + if err := m.DeveloperLinks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("developer_links" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AddonsAddon) validatePlans(formats strfmt.Registry) error { + if swag.IsZero(m.Plans) { // not required + return nil + } + + for i := 0; i < len(m.Plans); i++ { + if swag.IsZero(m.Plans[i]) { // not required + continue + } + + if m.Plans[i] != nil { + if err := m.Plans[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("plans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AddonsAddon) validateSetupGuide(formats strfmt.Registry) error { + if swag.IsZero(m.SetupGuide) { // not required + return nil + } + + if m.SetupGuide != nil { + if err := m.SetupGuide.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("setup_guide") + } + return err + } + } + + return nil +} + +// ContextValidate validate this addons addon based on the context it is used +func (m *AddonsAddon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDeveloperLinks(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePlans(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSetupGuide(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AddonsAddon) contextValidateDeveloperLinks(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.DeveloperLinks); i++ { + + if m.DeveloperLinks[i] != nil { + if err := m.DeveloperLinks[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("developer_links" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AddonsAddon) contextValidatePlans(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Plans); i++ { + + if m.Plans[i] != nil { + if err := m.Plans[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("plans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AddonsAddon) contextValidateSetupGuide(ctx context.Context, formats strfmt.Registry) error { + + if m.SetupGuide != nil { + if err := m.SetupGuide.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("setup_guide") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AddonsAddon) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AddonsAddon) UnmarshalBinary(b []byte) error { + var res AddonsAddon + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/addons_developer_link.go b/go/models/addons_developer_link.go new file mode 100644 index 0000000..3c8a395 --- /dev/null +++ b/go/models/addons_developer_link.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AddonsDeveloperLink addons developer link +// +// swagger:model addons.DeveloperLink +type AddonsDeveloperLink struct { + + // title + Title string `json:"title,omitempty"` + + // url + URL string `json:"url,omitempty"` +} + +// Validate validates this addons developer link +func (m *AddonsDeveloperLink) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this addons developer link based on context it is used +func (m *AddonsDeveloperLink) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AddonsDeveloperLink) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AddonsDeveloperLink) UnmarshalBinary(b []byte) error { + var res AddonsDeveloperLink + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/addons_feature.go b/go/models/addons_feature.go new file mode 100644 index 0000000..a04572f --- /dev/null +++ b/go/models/addons_feature.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AddonsFeature addons feature +// +// swagger:model addons.Feature +type AddonsFeature struct { + + // available + Available bool `json:"available,omitempty"` + + // description + Description string `json:"description,omitempty"` + + // quantity + Quantity string `json:"quantity,omitempty"` +} + +// Validate validates this addons feature +func (m *AddonsFeature) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this addons feature based on context it is used +func (m *AddonsFeature) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AddonsFeature) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AddonsFeature) UnmarshalBinary(b []byte) error { + var res AddonsFeature + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/addons_plan.go b/go/models/addons_plan.go new file mode 100644 index 0000000..9288f39 --- /dev/null +++ b/go/models/addons_plan.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AddonsPlan addons plan +// +// swagger:model addons.Plan +type AddonsPlan struct { + + // features + Features []*AddonsFeature `json:"features"` + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // price + Price int64 `json:"price,omitempty"` +} + +// Validate validates this addons plan +func (m *AddonsPlan) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFeatures(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AddonsPlan) validateFeatures(formats strfmt.Registry) error { + if swag.IsZero(m.Features) { // not required + return nil + } + + for i := 0; i < len(m.Features); i++ { + if swag.IsZero(m.Features[i]) { // not required + continue + } + + if m.Features[i] != nil { + if err := m.Features[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("features" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this addons plan based on the context it is used +func (m *AddonsPlan) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateFeatures(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AddonsPlan) contextValidateFeatures(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Features); i++ { + + if m.Features[i] != nil { + if err := m.Features[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("features" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AddonsPlan) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AddonsPlan) UnmarshalBinary(b []byte) error { + var res AddonsPlan + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/addons_setup_guide.go b/go/models/addons_setup_guide.go new file mode 100644 index 0000000..dee6f61 --- /dev/null +++ b/go/models/addons_setup_guide.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AddonsSetupGuide addons setup guide +// +// swagger:model addons.SetupGuide +type AddonsSetupGuide struct { + + // instructions + Instructions []*AddonsSetupInstruction `json:"instructions"` + + // notification + Notification string `json:"notification,omitempty"` +} + +// Validate validates this addons setup guide +func (m *AddonsSetupGuide) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstructions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AddonsSetupGuide) validateInstructions(formats strfmt.Registry) error { + if swag.IsZero(m.Instructions) { // not required + return nil + } + + for i := 0; i < len(m.Instructions); i++ { + if swag.IsZero(m.Instructions[i]) { // not required + continue + } + + if m.Instructions[i] != nil { + if err := m.Instructions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instructions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this addons setup guide based on the context it is used +func (m *AddonsSetupGuide) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateInstructions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AddonsSetupGuide) contextValidateInstructions(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Instructions); i++ { + + if m.Instructions[i] != nil { + if err := m.Instructions[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instructions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AddonsSetupGuide) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AddonsSetupGuide) UnmarshalBinary(b []byte) error { + var res AddonsSetupGuide + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/addons_setup_instruction.go b/go/models/addons_setup_instruction.go new file mode 100644 index 0000000..332773b --- /dev/null +++ b/go/models/addons_setup_instruction.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AddonsSetupInstruction addons setup instruction +// +// swagger:model addons.SetupInstruction +type AddonsSetupInstruction struct { + + // card content + CardContent string `json:"card_content,omitempty"` + + // description + Description string `json:"description,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this addons setup instruction +func (m *AddonsSetupInstruction) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this addons setup instruction based on context it is used +func (m *AddonsSetupInstruction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AddonsSetupInstruction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AddonsSetupInstruction) UnmarshalBinary(b []byte) error { + var res AddonsSetupInstruction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/custom_bitrise_yml_model.go b/go/models/custom_bitrise_yml_model.go new file mode 100644 index 0000000..f4f353b --- /dev/null +++ b/go/models/custom_bitrise_yml_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CustomBitriseYmlModel custom bitrise yml model +// +// swagger:model custom.BitriseYmlModel +type CustomBitriseYmlModel struct { + + // app + App *CustomBitriseYmlModelApp `json:"app,omitempty"` +} + +// Validate validates this custom bitrise yml model +func (m *CustomBitriseYmlModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateApp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CustomBitriseYmlModel) validateApp(formats strfmt.Registry) error { + if swag.IsZero(m.App) { // not required + return nil + } + + if m.App != nil { + if err := m.App.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("app") + } + return err + } + } + + return nil +} + +// ContextValidate validate this custom bitrise yml model based on the context it is used +func (m *CustomBitriseYmlModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateApp(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CustomBitriseYmlModel) contextValidateApp(ctx context.Context, formats strfmt.Registry) error { + + if m.App != nil { + if err := m.App.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("app") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CustomBitriseYmlModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CustomBitriseYmlModel) UnmarshalBinary(b []byte) error { + var res CustomBitriseYmlModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/custom_bitrise_yml_model_app.go b/go/models/custom_bitrise_yml_model_app.go new file mode 100644 index 0000000..dca6bfe --- /dev/null +++ b/go/models/custom_bitrise_yml_model_app.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CustomBitriseYmlModelApp custom bitrise yml model app +// +// swagger:model customBitriseYmlModelApp +type CustomBitriseYmlModelApp struct { + + // Environment variables for the application workflows, e.g. {"env1":"val1","env2":"val2"} + Envs map[string]string `json:"envs,omitempty"` +} + +// Validate validates this custom bitrise yml model app +func (m *CustomBitriseYmlModelApp) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this custom bitrise yml model app based on context it is used +func (m *CustomBitriseYmlModelApp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CustomBitriseYmlModelApp) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CustomBitriseYmlModelApp) UnmarshalBinary(b []byte) error { + var res CustomBitriseYmlModelApp + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/nulls_int64.go b/go/models/nulls_int64.go new file mode 100644 index 0000000..61cd7f1 --- /dev/null +++ b/go/models/nulls_int64.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// NullsInt64 nulls int64 +// +// swagger:model nulls.Int64 +type NullsInt64 interface{} diff --git a/go/models/nulls_string.go b/go/models/nulls_string.go new file mode 100644 index 0000000..55323cf --- /dev/null +++ b/go/models/nulls_string.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NullsString nulls string +// +// swagger:model nulls.String +type NullsString struct { + + // string + String string `json:"string,omitempty"` + + // Valid is true if String is not NULL + Valid bool `json:"valid,omitempty"` +} + +// Validate validates this nulls string +func (m *NullsString) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this nulls string based on context it is used +func (m *NullsString) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *NullsString) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NullsString) UnmarshalBinary(b []byte) error { + var res NullsString + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/service_standard_error_resp_model.go b/go/models/service_standard_error_resp_model.go new file mode 100644 index 0000000..8cf6ca6 --- /dev/null +++ b/go/models/service_standard_error_resp_model.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ServiceStandardErrorRespModel service standard error resp model +// +// swagger:model service.StandardErrorRespModel +type ServiceStandardErrorRespModel struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this service standard error resp model +func (m *ServiceStandardErrorRespModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this service standard error resp model based on context it is used +func (m *ServiceStandardErrorRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceStandardErrorRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceStandardErrorRespModel) UnmarshalBinary(b []byte) error { + var res ServiceStandardErrorRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_activity_event_list_response_model.go b/go/models/v0_activity_event_list_response_model.go new file mode 100644 index 0000000..18913b6 --- /dev/null +++ b/go/models/v0_activity_event_list_response_model.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ActivityEventListResponseModel v0 activity event list response model +// +// swagger:model v0.ActivityEventListResponseModel +type V0ActivityEventListResponseModel struct { + + // data + Data []*V0ActivityEventResponseItemModel `json:"data"` + + // paging + Paging *V0PagingResponseModel `json:"paging,omitempty"` +} + +// Validate validates this v0 activity event list response model +func (m *V0ActivityEventListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaging(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ActivityEventListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0ActivityEventListResponseModel) validatePaging(formats strfmt.Registry) error { + if swag.IsZero(m.Paging) { // not required + return nil + } + + if m.Paging != nil { + if err := m.Paging.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 activity event list response model based on the context it is used +func (m *V0ActivityEventListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePaging(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ActivityEventListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0ActivityEventListResponseModel) contextValidatePaging(ctx context.Context, formats strfmt.Registry) error { + + if m.Paging != nil { + if err := m.Paging.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ActivityEventListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ActivityEventListResponseModel) UnmarshalBinary(b []byte) error { + var res V0ActivityEventListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_activity_event_response_item_model.go b/go/models/v0_activity_event_response_item_model.go new file mode 100644 index 0000000..0755498 --- /dev/null +++ b/go/models/v0_activity_event_response_item_model.go @@ -0,0 +1,280 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ActivityEventResponseItemModel v0 activity event response item model +// +// swagger:model v0.ActivityEventResponseItemModel +type V0ActivityEventResponseItemModel struct { + + // created at + CreatedAt string `json:"created_at,omitempty"` + + // description + Description *NullsString `json:"description,omitempty"` + + // event icon + EventIcon *NullsString `json:"event_icon,omitempty"` + + // event stype + EventStype *NullsString `json:"event_stype,omitempty"` + + // repository avatar icon url + RepositoryAvatarIconURL string `json:"repository_avatar_icon_url,omitempty"` + + // repository title + RepositoryTitle string `json:"repository_title,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // target path string + TargetPathString *NullsString `json:"target_path_string,omitempty"` + + // title + Title *NullsString `json:"title,omitempty"` +} + +// Validate validates this v0 activity event response item model +func (m *V0ActivityEventResponseItemModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEventIcon(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEventStype(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTargetPathString(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTitle(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ActivityEventResponseItemModel) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if m.Description != nil { + if err := m.Description.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("description") + } + return err + } + } + + return nil +} + +func (m *V0ActivityEventResponseItemModel) validateEventIcon(formats strfmt.Registry) error { + if swag.IsZero(m.EventIcon) { // not required + return nil + } + + if m.EventIcon != nil { + if err := m.EventIcon.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("event_icon") + } + return err + } + } + + return nil +} + +func (m *V0ActivityEventResponseItemModel) validateEventStype(formats strfmt.Registry) error { + if swag.IsZero(m.EventStype) { // not required + return nil + } + + if m.EventStype != nil { + if err := m.EventStype.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("event_stype") + } + return err + } + } + + return nil +} + +func (m *V0ActivityEventResponseItemModel) validateTargetPathString(formats strfmt.Registry) error { + if swag.IsZero(m.TargetPathString) { // not required + return nil + } + + if m.TargetPathString != nil { + if err := m.TargetPathString.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target_path_string") + } + return err + } + } + + return nil +} + +func (m *V0ActivityEventResponseItemModel) validateTitle(formats strfmt.Registry) error { + if swag.IsZero(m.Title) { // not required + return nil + } + + if m.Title != nil { + if err := m.Title.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("title") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 activity event response item model based on the context it is used +func (m *V0ActivityEventResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDescription(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateEventIcon(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateEventStype(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTargetPathString(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTitle(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ActivityEventResponseItemModel) contextValidateDescription(ctx context.Context, formats strfmt.Registry) error { + + if m.Description != nil { + if err := m.Description.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("description") + } + return err + } + } + + return nil +} + +func (m *V0ActivityEventResponseItemModel) contextValidateEventIcon(ctx context.Context, formats strfmt.Registry) error { + + if m.EventIcon != nil { + if err := m.EventIcon.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("event_icon") + } + return err + } + } + + return nil +} + +func (m *V0ActivityEventResponseItemModel) contextValidateEventStype(ctx context.Context, formats strfmt.Registry) error { + + if m.EventStype != nil { + if err := m.EventStype.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("event_stype") + } + return err + } + } + + return nil +} + +func (m *V0ActivityEventResponseItemModel) contextValidateTargetPathString(ctx context.Context, formats strfmt.Registry) error { + + if m.TargetPathString != nil { + if err := m.TargetPathString.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target_path_string") + } + return err + } + } + + return nil +} + +func (m *V0ActivityEventResponseItemModel) contextValidateTitle(ctx context.Context, formats strfmt.Registry) error { + + if m.Title != nil { + if err := m.Title.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("title") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ActivityEventResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ActivityEventResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0ActivityEventResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_add_on_app_response_item_model.go b/go/models/v0_add_on_app_response_item_model.go new file mode 100644 index 0000000..240ed81 --- /dev/null +++ b/go/models/v0_add_on_app_response_item_model.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AddOnAppResponseItemModel v0 add on app response item model +// +// swagger:model v0.AddOnAppResponseItemModel +type V0AddOnAppResponseItemModel struct { + + // icon + Icon *NullsString `json:"icon,omitempty"` + + // plan + Plan *AddonsPlan `json:"plan,omitempty"` + + // plan started at + PlanStartedAt string `json:"plan_started_at,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // title + Title string `json:"title,omitempty"` +} + +// Validate validates this v0 add on app response item model +func (m *V0AddOnAppResponseItemModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIcon(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlan(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AddOnAppResponseItemModel) validateIcon(formats strfmt.Registry) error { + if swag.IsZero(m.Icon) { // not required + return nil + } + + if m.Icon != nil { + if err := m.Icon.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("icon") + } + return err + } + } + + return nil +} + +func (m *V0AddOnAppResponseItemModel) validatePlan(formats strfmt.Registry) error { + if swag.IsZero(m.Plan) { // not required + return nil + } + + if m.Plan != nil { + if err := m.Plan.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("plan") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 add on app response item model based on the context it is used +func (m *V0AddOnAppResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateIcon(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePlan(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AddOnAppResponseItemModel) contextValidateIcon(ctx context.Context, formats strfmt.Registry) error { + + if m.Icon != nil { + if err := m.Icon.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("icon") + } + return err + } + } + + return nil +} + +func (m *V0AddOnAppResponseItemModel) contextValidatePlan(ctx context.Context, formats strfmt.Registry) error { + + if m.Plan != nil { + if err := m.Plan.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("plan") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AddOnAppResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AddOnAppResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0AddOnAppResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_addons_list_response_model.go b/go/models/v0_addons_list_response_model.go new file mode 100644 index 0000000..08f2e24 --- /dev/null +++ b/go/models/v0_addons_list_response_model.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AddonsListResponseModel v0 addons list response model +// +// swagger:model v0.AddonsListResponseModel +type V0AddonsListResponseModel struct { + + // data + Data []*AddonsAddon `json:"data"` +} + +// Validate validates this v0 addons list response model +func (m *V0AddonsListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AddonsListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 addons list response model based on the context it is used +func (m *V0AddonsListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AddonsListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AddonsListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AddonsListResponseModel) UnmarshalBinary(b []byte) error { + var res V0AddonsListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_addons_show_response_model.go b/go/models/v0_addons_show_response_model.go new file mode 100644 index 0000000..bd399d9 --- /dev/null +++ b/go/models/v0_addons_show_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AddonsShowResponseModel v0 addons show response model +// +// swagger:model v0.AddonsShowResponseModel +type V0AddonsShowResponseModel struct { + + // data + Data *AddonsAddon `json:"data,omitempty"` +} + +// Validate validates this v0 addons show response model +func (m *V0AddonsShowResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AddonsShowResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 addons show response model based on the context it is used +func (m *V0AddonsShowResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AddonsShowResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AddonsShowResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AddonsShowResponseModel) UnmarshalBinary(b []byte) error { + var res V0AddonsShowResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_android_keystore_file_upload_params.go b/go/models/v0_android_keystore_file_upload_params.go new file mode 100644 index 0000000..f973b1d --- /dev/null +++ b/go/models/v0_android_keystore_file_upload_params.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0AndroidKeystoreFileUploadParams v0 android keystore file upload params +// +// swagger:model v0.AndroidKeystoreFileUploadParams +type V0AndroidKeystoreFileUploadParams struct { + + // alias + // Required: true + Alias *string `json:"alias"` + + // password + // Required: true + Password *string `json:"password"` + + // private key password + // Required: true + PrivateKeyPassword *string `json:"private_key_password"` + + // upload file name + // Required: true + UploadFileName *string `json:"upload_file_name"` + + // upload file size + // Required: true + UploadFileSize *int64 `json:"upload_file_size"` +} + +// Validate validates this v0 android keystore file upload params +func (m *V0AndroidKeystoreFileUploadParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAlias(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePassword(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePrivateKeyPassword(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUploadFileName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUploadFileSize(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AndroidKeystoreFileUploadParams) validateAlias(formats strfmt.Registry) error { + + if err := validate.Required("alias", "body", m.Alias); err != nil { + return err + } + + return nil +} + +func (m *V0AndroidKeystoreFileUploadParams) validatePassword(formats strfmt.Registry) error { + + if err := validate.Required("password", "body", m.Password); err != nil { + return err + } + + return nil +} + +func (m *V0AndroidKeystoreFileUploadParams) validatePrivateKeyPassword(formats strfmt.Registry) error { + + if err := validate.Required("private_key_password", "body", m.PrivateKeyPassword); err != nil { + return err + } + + return nil +} + +func (m *V0AndroidKeystoreFileUploadParams) validateUploadFileName(formats strfmt.Registry) error { + + if err := validate.Required("upload_file_name", "body", m.UploadFileName); err != nil { + return err + } + + return nil +} + +func (m *V0AndroidKeystoreFileUploadParams) validateUploadFileSize(formats strfmt.Registry) error { + + if err := validate.Required("upload_file_size", "body", m.UploadFileSize); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 android keystore file upload params based on context it is used +func (m *V0AndroidKeystoreFileUploadParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AndroidKeystoreFileUploadParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AndroidKeystoreFileUploadParams) UnmarshalBinary(b []byte) error { + var res V0AndroidKeystoreFileUploadParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_add_on_response_item_model.go b/go/models/v0_app_add_on_response_item_model.go new file mode 100644 index 0000000..a09ad2b --- /dev/null +++ b/go/models/v0_app_add_on_response_item_model.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppAddOnResponseItemModel v0 app add on response item model +// +// swagger:model v0.AppAddOnResponseItemModel +type V0AppAddOnResponseItemModel struct { + + // description + Description string `json:"description,omitempty"` + + // documentation url + DocumentationURL string `json:"documentation_url,omitempty"` + + // has ui + HasUI bool `json:"has_ui,omitempty"` + + // icon + Icon string `json:"icon,omitempty"` + + // id + ID string `json:"id,omitempty"` + + // is beta + IsBeta bool `json:"is_beta,omitempty"` + + // plan + Plan *AddonsPlan `json:"plan,omitempty"` + + // setup guide + SetupGuide *AddonsSetupGuide `json:"setup_guide,omitempty"` + + // summary + Summary string `json:"summary,omitempty"` + + // title + Title string `json:"title,omitempty"` +} + +// Validate validates this v0 app add on response item model +func (m *V0AppAddOnResponseItemModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePlan(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSetupGuide(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppAddOnResponseItemModel) validatePlan(formats strfmt.Registry) error { + if swag.IsZero(m.Plan) { // not required + return nil + } + + if m.Plan != nil { + if err := m.Plan.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("plan") + } + return err + } + } + + return nil +} + +func (m *V0AppAddOnResponseItemModel) validateSetupGuide(formats strfmt.Registry) error { + if swag.IsZero(m.SetupGuide) { // not required + return nil + } + + if m.SetupGuide != nil { + if err := m.SetupGuide.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("setup_guide") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 app add on response item model based on the context it is used +func (m *V0AppAddOnResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePlan(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSetupGuide(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppAddOnResponseItemModel) contextValidatePlan(ctx context.Context, formats strfmt.Registry) error { + + if m.Plan != nil { + if err := m.Plan.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("plan") + } + return err + } + } + + return nil +} + +func (m *V0AppAddOnResponseItemModel) contextValidateSetupGuide(ctx context.Context, formats strfmt.Registry) error { + + if m.SetupGuide != nil { + if err := m.SetupGuide.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("setup_guide") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppAddOnResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppAddOnResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0AppAddOnResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_add_ons_list_response_model.go b/go/models/v0_app_add_ons_list_response_model.go new file mode 100644 index 0000000..6c1ea16 --- /dev/null +++ b/go/models/v0_app_add_ons_list_response_model.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppAddOnsListResponseModel v0 app add ons list response model +// +// swagger:model v0.AppAddOnsListResponseModel +type V0AppAddOnsListResponseModel struct { + + // data + Data []*V0AppAddOnResponseItemModel `json:"data"` +} + +// Validate validates this v0 app add ons list response model +func (m *V0AppAddOnsListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppAddOnsListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 app add ons list response model based on the context it is used +func (m *V0AppAddOnsListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppAddOnsListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppAddOnsListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppAddOnsListResponseModel) UnmarshalBinary(b []byte) error { + var res V0AppAddOnsListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_config_request_param.go b/go/models/v0_app_config_request_param.go new file mode 100644 index 0000000..5e869d5 --- /dev/null +++ b/go/models/v0_app_config_request_param.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0AppConfigRequestParam v0 app config request param +// +// swagger:model v0.AppConfigRequestParam +type V0AppConfigRequestParam struct { + + // app config datastore yaml + // Required: true + AppConfigDatastoreYaml *string `json:"app_config_datastore_yaml"` +} + +// Validate validates this v0 app config request param +func (m *V0AppConfigRequestParam) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppConfigDatastoreYaml(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppConfigRequestParam) validateAppConfigDatastoreYaml(formats strfmt.Registry) error { + + if err := validate.Required("app_config_datastore_yaml", "body", m.AppConfigDatastoreYaml); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 app config request param based on context it is used +func (m *V0AppConfigRequestParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppConfigRequestParam) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppConfigRequestParam) UnmarshalBinary(b []byte) error { + var res V0AppConfigRequestParam + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_config_resp_model.go b/go/models/v0_app_config_resp_model.go new file mode 100644 index 0000000..7a6338a --- /dev/null +++ b/go/models/v0_app_config_resp_model.go @@ -0,0 +1,27 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" +) + +// V0AppConfigRespModel v0 app config resp model +// +// swagger:model v0.AppConfigRespModel +type V0AppConfigRespModel map[string]string + +// Validate validates this v0 app config resp model +func (m V0AppConfigRespModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 app config resp model based on context it is used +func (m V0AppConfigRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/go/models/v0_app_finish_params.go b/go/models/v0_app_finish_params.go new file mode 100644 index 0000000..117ede1 --- /dev/null +++ b/go/models/v0_app_finish_params.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0AppFinishParams v0 app finish params +// +// swagger:model v0.AppFinishParams +type V0AppFinishParams struct { + + // Which config to use `default-android-config`, `default-cordova-config`, `default-fastlane-config`, `default-ionic-config`, `default-ios-config`,`default-macos-config`, `default-react-native-config`, `default-xamarin-config`, `other-config` (default if parameter is not speficied) + Config string `json:"config,omitempty"` + + // Environment variables for the application workflows, e.g. {"env1":"val1","env2":"val2"} + Envs map[string]string `json:"envs,omitempty"` + + // config specification mode, has to be specified with `manual` value + Mode string `json:"mode,omitempty"` + + // The slug of the organization, who will be the owner of the application, if it's not specified, then the authenticated user will be the owner + OrganizationSlug string `json:"organization_slug,omitempty"` + + // The type of your project (`android`, `ios`, `cordova`, `other`, `xamarin`, `macos`, `ionic`, `react-native`, `fastlane`, null) + // Required: true + ProjectType *string `json:"project_type"` + + // The id of the stack the application will be built (these can be found in the [system report](https://github.com/bitrise-io/bitrise.io/tree/master/system_reports) file names) + // Required: true + StackID *string `json:"stack_id"` +} + +// Validate validates this v0 app finish params +func (m *V0AppFinishParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProjectType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStackID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppFinishParams) validateProjectType(formats strfmt.Registry) error { + + if err := validate.Required("project_type", "body", m.ProjectType); err != nil { + return err + } + + return nil +} + +func (m *V0AppFinishParams) validateStackID(formats strfmt.Registry) error { + + if err := validate.Required("stack_id", "body", m.StackID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 app finish params based on context it is used +func (m *V0AppFinishParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppFinishParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppFinishParams) UnmarshalBinary(b []byte) error { + var res V0AppFinishParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_finish_resp_model.go b/go/models/v0_app_finish_resp_model.go new file mode 100644 index 0000000..1ab8379 --- /dev/null +++ b/go/models/v0_app_finish_resp_model.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppFinishRespModel v0 app finish resp model +// +// swagger:model v0.AppFinishRespModel +type V0AppFinishRespModel struct { + + // branch name + BranchName string `json:"branch_name,omitempty"` + + // build trigger token + BuildTriggerToken string `json:"build_trigger_token,omitempty"` + + // is webhook auto reg supported + IsWebhookAutoRegSupported bool `json:"is_webhook_auto_reg_supported,omitempty"` + + // status + Status string `json:"status,omitempty"` +} + +// Validate validates this v0 app finish resp model +func (m *V0AppFinishRespModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 app finish resp model based on context it is used +func (m *V0AppFinishRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppFinishRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppFinishRespModel) UnmarshalBinary(b []byte) error { + var res V0AppFinishRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_list_response_model.go b/go/models/v0_app_list_response_model.go new file mode 100644 index 0000000..d687eb8 --- /dev/null +++ b/go/models/v0_app_list_response_model.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppListResponseModel v0 app list response model +// +// swagger:model v0.AppListResponseModel +type V0AppListResponseModel struct { + + // data + Data []*V0AppResponseItemModel `json:"data"` + + // pagination + Paging *V0PagingResponseModel `json:"paging,omitempty"` +} + +// Validate validates this v0 app list response model +func (m *V0AppListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaging(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0AppListResponseModel) validatePaging(formats strfmt.Registry) error { + if swag.IsZero(m.Paging) { // not required + return nil + } + + if m.Paging != nil { + if err := m.Paging.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 app list response model based on the context it is used +func (m *V0AppListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePaging(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0AppListResponseModel) contextValidatePaging(ctx context.Context, formats strfmt.Registry) error { + + if m.Paging != nil { + if err := m.Paging.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppListResponseModel) UnmarshalBinary(b []byte) error { + var res V0AppListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_resp_model.go b/go/models/v0_app_resp_model.go new file mode 100644 index 0000000..511a1a4 --- /dev/null +++ b/go/models/v0_app_resp_model.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppRespModel v0 app resp model +// +// swagger:model v0.AppRespModel +type V0AppRespModel struct { + + // slug + Slug string `json:"slug,omitempty"` + + // status + Status string `json:"status,omitempty"` +} + +// Validate validates this v0 app resp model +func (m *V0AppRespModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 app resp model based on context it is used +func (m *V0AppRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppRespModel) UnmarshalBinary(b []byte) error { + var res V0AppRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_response_item_model.go b/go/models/v0_app_response_item_model.go new file mode 100644 index 0000000..f1ade36 --- /dev/null +++ b/go/models/v0_app_response_item_model.go @@ -0,0 +1,367 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppResponseItemModel v0 app response item model +// +// swagger:model v0.AppResponseItemModel +type V0AppResponseItemModel struct { + + // avatar url + AvatarURL *NullsString `json:"avatar_url,omitempty"` + + // is disabled + IsDisabled bool `json:"is_disabled,omitempty"` + + // is public + IsPublic bool `json:"is_public,omitempty"` + + // owner + Owner *V0OwnerAccountResponseModel `json:"owner,omitempty"` + + // project type + ProjectType *NullsString `json:"project_type,omitempty"` + + // provider + Provider *NullsString `json:"provider,omitempty"` + + // repo owner + RepoOwner *NullsString `json:"repo_owner,omitempty"` + + // repo slug + RepoSlug *NullsString `json:"repo_slug,omitempty"` + + // repo url + RepoURL *NullsString `json:"repo_url,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // status + Status int64 `json:"status,omitempty"` + + // title + Title string `json:"title,omitempty"` +} + +// Validate validates this v0 app response item model +func (m *V0AppResponseItemModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAvatarURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOwner(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjectType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProvider(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRepoOwner(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRepoSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRepoURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppResponseItemModel) validateAvatarURL(formats strfmt.Registry) error { + if swag.IsZero(m.AvatarURL) { // not required + return nil + } + + if m.AvatarURL != nil { + if err := m.AvatarURL.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("avatar_url") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) validateOwner(formats strfmt.Registry) error { + if swag.IsZero(m.Owner) { // not required + return nil + } + + if m.Owner != nil { + if err := m.Owner.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("owner") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) validateProjectType(formats strfmt.Registry) error { + if swag.IsZero(m.ProjectType) { // not required + return nil + } + + if m.ProjectType != nil { + if err := m.ProjectType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("project_type") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) validateProvider(formats strfmt.Registry) error { + if swag.IsZero(m.Provider) { // not required + return nil + } + + if m.Provider != nil { + if err := m.Provider.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("provider") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) validateRepoOwner(formats strfmt.Registry) error { + if swag.IsZero(m.RepoOwner) { // not required + return nil + } + + if m.RepoOwner != nil { + if err := m.RepoOwner.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repo_owner") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) validateRepoSlug(formats strfmt.Registry) error { + if swag.IsZero(m.RepoSlug) { // not required + return nil + } + + if m.RepoSlug != nil { + if err := m.RepoSlug.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repo_slug") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) validateRepoURL(formats strfmt.Registry) error { + if swag.IsZero(m.RepoURL) { // not required + return nil + } + + if m.RepoURL != nil { + if err := m.RepoURL.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repo_url") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 app response item model based on the context it is used +func (m *V0AppResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAvatarURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOwner(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProjectType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProvider(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRepoOwner(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRepoSlug(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRepoURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppResponseItemModel) contextValidateAvatarURL(ctx context.Context, formats strfmt.Registry) error { + + if m.AvatarURL != nil { + if err := m.AvatarURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("avatar_url") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) contextValidateOwner(ctx context.Context, formats strfmt.Registry) error { + + if m.Owner != nil { + if err := m.Owner.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("owner") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) contextValidateProjectType(ctx context.Context, formats strfmt.Registry) error { + + if m.ProjectType != nil { + if err := m.ProjectType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("project_type") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) contextValidateProvider(ctx context.Context, formats strfmt.Registry) error { + + if m.Provider != nil { + if err := m.Provider.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("provider") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) contextValidateRepoOwner(ctx context.Context, formats strfmt.Registry) error { + + if m.RepoOwner != nil { + if err := m.RepoOwner.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repo_owner") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) contextValidateRepoSlug(ctx context.Context, formats strfmt.Registry) error { + + if m.RepoSlug != nil { + if err := m.RepoSlug.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repo_slug") + } + return err + } + } + + return nil +} + +func (m *V0AppResponseItemModel) contextValidateRepoURL(ctx context.Context, formats strfmt.Registry) error { + + if m.RepoURL != nil { + if err := m.RepoURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repo_url") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0AppResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_show_response_model.go b/go/models/v0_app_show_response_model.go new file mode 100644 index 0000000..af9eee1 --- /dev/null +++ b/go/models/v0_app_show_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppShowResponseModel v0 app show response model +// +// swagger:model v0.AppShowResponseModel +type V0AppShowResponseModel struct { + + // data + Data *V0AppResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 app show response model +func (m *V0AppShowResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppShowResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 app show response model based on the context it is used +func (m *V0AppShowResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppShowResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppShowResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppShowResponseModel) UnmarshalBinary(b []byte) error { + var res V0AppShowResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_upload_params.go b/go/models/v0_app_upload_params.go new file mode 100644 index 0000000..7509c5d --- /dev/null +++ b/go/models/v0_app_upload_params.go @@ -0,0 +1,159 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0AppUploadParams v0 app upload params +// +// swagger:model v0.AppUploadParams +type V0AppUploadParams struct { + + // The slug of the owner of the repository at the git provider + // Required: true + GitOwner *string `json:"git_owner"` + + // The slug of the repository at the git provider + // Required: true + GitRepoSlug *string `json:"git_repo_slug"` + + // If `true` then the repository visibility setting will be public, in case of `false` it will be private + // Required: true + IsPublic *bool `json:"is_public"` + + // Property added by SouthPark as this is missing within open-api spec. This can be removed/ should be here on (re-)download when bitrise has fixed it + OrganizationSlug string `json:"organization_slug,omitempty"` + + // The git provider you are using, it can be `github`, `bitbucket`, `gitlab`, `gitlab-self-hosted` or `custom` + // Required: true + Provider *string `json:"provider"` + + // The URL of your repository + // Required: true + RepoURL *string `json:"repo_url"` + + // It has to be provided by legacy reasons and has to have the `git` value + // Required: true + Type *string `json:"type"` +} + +// Validate validates this v0 app upload params +func (m *V0AppUploadParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGitOwner(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGitRepoSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIsPublic(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProvider(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRepoURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppUploadParams) validateGitOwner(formats strfmt.Registry) error { + + if err := validate.Required("git_owner", "body", m.GitOwner); err != nil { + return err + } + + return nil +} + +func (m *V0AppUploadParams) validateGitRepoSlug(formats strfmt.Registry) error { + + if err := validate.Required("git_repo_slug", "body", m.GitRepoSlug); err != nil { + return err + } + + return nil +} + +func (m *V0AppUploadParams) validateIsPublic(formats strfmt.Registry) error { + + if err := validate.Required("is_public", "body", m.IsPublic); err != nil { + return err + } + + return nil +} + +func (m *V0AppUploadParams) validateProvider(formats strfmt.Registry) error { + + if err := validate.Required("provider", "body", m.Provider); err != nil { + return err + } + + return nil +} + +func (m *V0AppUploadParams) validateRepoURL(formats strfmt.Registry) error { + + if err := validate.Required("repo_url", "body", m.RepoURL); err != nil { + return err + } + + return nil +} + +func (m *V0AppUploadParams) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 app upload params based on context it is used +func (m *V0AppUploadParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppUploadParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppUploadParams) UnmarshalBinary(b []byte) error { + var res V0AppUploadParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_webhook_create_params.go b/go/models/v0_app_webhook_create_params.go new file mode 100644 index 0000000..44e8440 --- /dev/null +++ b/go/models/v0_app_webhook_create_params.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0AppWebhookCreateParams v0 app webhook create params +// +// swagger:model v0.AppWebhookCreateParams +type V0AppWebhookCreateParams struct { + + // events + // Required: true + Events []string `json:"events"` + + // headers + Headers []int64 `json:"headers"` + + // secret + // Required: true + Secret *string `json:"secret"` + + // url + // Required: true + URL *string `json:"url"` +} + +// Validate validates this v0 app webhook create params +func (m *V0AppWebhookCreateParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEvents(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecret(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppWebhookCreateParams) validateEvents(formats strfmt.Registry) error { + + if err := validate.Required("events", "body", m.Events); err != nil { + return err + } + + return nil +} + +func (m *V0AppWebhookCreateParams) validateSecret(formats strfmt.Registry) error { + + if err := validate.Required("secret", "body", m.Secret); err != nil { + return err + } + + return nil +} + +func (m *V0AppWebhookCreateParams) validateURL(formats strfmt.Registry) error { + + if err := validate.Required("url", "body", m.URL); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 app webhook create params based on context it is used +func (m *V0AppWebhookCreateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppWebhookCreateParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppWebhookCreateParams) UnmarshalBinary(b []byte) error { + var res V0AppWebhookCreateParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_webhook_created_response_model.go b/go/models/v0_app_webhook_created_response_model.go new file mode 100644 index 0000000..9e5d6bd --- /dev/null +++ b/go/models/v0_app_webhook_created_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppWebhookCreatedResponseModel v0 app webhook created response model +// +// swagger:model v0.AppWebhookCreatedResponseModel +type V0AppWebhookCreatedResponseModel struct { + + // data + Data *V0AppWebhookResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 app webhook created response model +func (m *V0AppWebhookCreatedResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppWebhookCreatedResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 app webhook created response model based on the context it is used +func (m *V0AppWebhookCreatedResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppWebhookCreatedResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppWebhookCreatedResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppWebhookCreatedResponseModel) UnmarshalBinary(b []byte) error { + var res V0AppWebhookCreatedResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_webhook_deleted_response_model.go b/go/models/v0_app_webhook_deleted_response_model.go new file mode 100644 index 0000000..5bc9e28 --- /dev/null +++ b/go/models/v0_app_webhook_deleted_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppWebhookDeletedResponseModel v0 app webhook deleted response model +// +// swagger:model v0.AppWebhookDeletedResponseModel +type V0AppWebhookDeletedResponseModel struct { + + // data + Data *V0AppWebhookResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 app webhook deleted response model +func (m *V0AppWebhookDeletedResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppWebhookDeletedResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 app webhook deleted response model based on the context it is used +func (m *V0AppWebhookDeletedResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppWebhookDeletedResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppWebhookDeletedResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppWebhookDeletedResponseModel) UnmarshalBinary(b []byte) error { + var res V0AppWebhookDeletedResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_webhook_list_response_model.go b/go/models/v0_app_webhook_list_response_model.go new file mode 100644 index 0000000..e6f3230 --- /dev/null +++ b/go/models/v0_app_webhook_list_response_model.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppWebhookListResponseModel v0 app webhook list response model +// +// swagger:model v0.AppWebhookListResponseModel +type V0AppWebhookListResponseModel struct { + + // data + Data []*V0AppWebhookResponseItemModel `json:"data"` + + // pagination + Paging *V0PagingResponseModel `json:"paging,omitempty"` +} + +// Validate validates this v0 app webhook list response model +func (m *V0AppWebhookListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaging(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppWebhookListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0AppWebhookListResponseModel) validatePaging(formats strfmt.Registry) error { + if swag.IsZero(m.Paging) { // not required + return nil + } + + if m.Paging != nil { + if err := m.Paging.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 app webhook list response model based on the context it is used +func (m *V0AppWebhookListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePaging(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppWebhookListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0AppWebhookListResponseModel) contextValidatePaging(ctx context.Context, formats strfmt.Registry) error { + + if m.Paging != nil { + if err := m.Paging.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppWebhookListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppWebhookListResponseModel) UnmarshalBinary(b []byte) error { + var res V0AppWebhookListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_webhook_response_item_model.go b/go/models/v0_app_webhook_response_item_model.go new file mode 100644 index 0000000..f914bf2 --- /dev/null +++ b/go/models/v0_app_webhook_response_item_model.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppWebhookResponseItemModel v0 app webhook response item model +// +// swagger:model v0.AppWebhookResponseItemModel +type V0AppWebhookResponseItemModel struct { + + // created at + CreatedAt string `json:"created_at,omitempty"` + + // events + Events []string `json:"events"` + + // headers + Headers []int64 `json:"headers"` + + // registered by addon + RegisteredByAddon bool `json:"registered_by_addon,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // updated at + UpdatedAt string `json:"updated_at,omitempty"` + + // url + URL string `json:"url,omitempty"` +} + +// Validate validates this v0 app webhook response item model +func (m *V0AppWebhookResponseItemModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 app webhook response item model based on context it is used +func (m *V0AppWebhookResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppWebhookResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppWebhookResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0AppWebhookResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_webhook_response_model.go b/go/models/v0_app_webhook_response_model.go new file mode 100644 index 0000000..4923170 --- /dev/null +++ b/go/models/v0_app_webhook_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppWebhookResponseModel v0 app webhook response model +// +// swagger:model v0.AppWebhookResponseModel +type V0AppWebhookResponseModel struct { + + // data + Data *V0AppWebhookResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 app webhook response model +func (m *V0AppWebhookResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppWebhookResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 app webhook response model based on the context it is used +func (m *V0AppWebhookResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppWebhookResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppWebhookResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppWebhookResponseModel) UnmarshalBinary(b []byte) error { + var res V0AppWebhookResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_app_webhook_update_params.go b/go/models/v0_app_webhook_update_params.go new file mode 100644 index 0000000..e4b2d96 --- /dev/null +++ b/go/models/v0_app_webhook_update_params.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0AppWebhookUpdateParams v0 app webhook update params +// +// swagger:model v0.AppWebhookUpdateParams +type V0AppWebhookUpdateParams struct { + + // events + // Required: true + Events []string `json:"events"` + + // headers + Headers []int64 `json:"headers"` + + // url + // Required: true + URL *string `json:"url"` +} + +// Validate validates this v0 app webhook update params +func (m *V0AppWebhookUpdateParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEvents(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppWebhookUpdateParams) validateEvents(formats strfmt.Registry) error { + + if err := validate.Required("events", "body", m.Events); err != nil { + return err + } + + return nil +} + +func (m *V0AppWebhookUpdateParams) validateURL(formats strfmt.Registry) error { + + if err := validate.Required("url", "body", m.URL); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 app webhook update params based on context it is used +func (m *V0AppWebhookUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppWebhookUpdateParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppWebhookUpdateParams) UnmarshalBinary(b []byte) error { + var res V0AppWebhookUpdateParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_apple_api_credential_response_item.go b/go/models/v0_apple_api_credential_response_item.go new file mode 100644 index 0000000..8d8d440 --- /dev/null +++ b/go/models/v0_apple_api_credential_response_item.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppleAPICredentialResponseItem v0 apple API credential response item +// +// swagger:model v0.AppleAPICredentialResponseItem +type V0AppleAPICredentialResponseItem struct { + + // created at + CreatedAt string `json:"created_at,omitempty"` + + // issuer id + IssuerID string `json:"issuer_id,omitempty"` + + // key id + KeyID string `json:"key_id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // updated at + UpdatedAt string `json:"updated_at,omitempty"` +} + +// Validate validates this v0 apple API credential response item +func (m *V0AppleAPICredentialResponseItem) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 apple API credential response item based on context it is used +func (m *V0AppleAPICredentialResponseItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppleAPICredentialResponseItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppleAPICredentialResponseItem) UnmarshalBinary(b []byte) error { + var res V0AppleAPICredentialResponseItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_apple_api_credentials_list_response.go b/go/models/v0_apple_api_credentials_list_response.go new file mode 100644 index 0000000..5fe384b --- /dev/null +++ b/go/models/v0_apple_api_credentials_list_response.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AppleAPICredentialsListResponse v0 apple API credentials list response +// +// swagger:model v0.AppleAPICredentialsListResponse +type V0AppleAPICredentialsListResponse struct { + + // data + Data []*V0AppleAPICredentialResponseItem `json:"data"` +} + +// Validate validates this v0 apple API credentials list response +func (m *V0AppleAPICredentialsListResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppleAPICredentialsListResponse) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 apple API credentials list response based on the context it is used +func (m *V0AppleAPICredentialsListResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AppleAPICredentialsListResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AppleAPICredentialsListResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AppleAPICredentialsListResponse) UnmarshalBinary(b []byte) error { + var res V0AppleAPICredentialsListResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_artifact_delete_response_model.go b/go/models/v0_artifact_delete_response_model.go new file mode 100644 index 0000000..cd2b35e --- /dev/null +++ b/go/models/v0_artifact_delete_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ArtifactDeleteResponseModel v0 artifact delete response model +// +// swagger:model v0.ArtifactDeleteResponseModel +type V0ArtifactDeleteResponseModel struct { + + // data + Data *V0ArtifactResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 artifact delete response model +func (m *V0ArtifactDeleteResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactDeleteResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 artifact delete response model based on the context it is used +func (m *V0ArtifactDeleteResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactDeleteResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ArtifactDeleteResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ArtifactDeleteResponseModel) UnmarshalBinary(b []byte) error { + var res V0ArtifactDeleteResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_artifact_list_element_response_model.go b/go/models/v0_artifact_list_element_response_model.go new file mode 100644 index 0000000..e83c393 --- /dev/null +++ b/go/models/v0_artifact_list_element_response_model.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ArtifactListElementResponseModel v0 artifact list element response model +// +// swagger:model v0.ArtifactListElementResponseModel +type V0ArtifactListElementResponseModel struct { + + // artifact meta + ArtifactMeta []int64 `json:"artifact_meta"` + + // artifact type + ArtifactType *NullsString `json:"artifact_type,omitempty"` + + // file size bytes + FileSizeBytes int64 `json:"file_size_bytes,omitempty"` + + // is public page enabled + IsPublicPageEnabled bool `json:"is_public_page_enabled,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // title + Title *NullsString `json:"title,omitempty"` +} + +// Validate validates this v0 artifact list element response model +func (m *V0ArtifactListElementResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArtifactType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTitle(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactListElementResponseModel) validateArtifactType(formats strfmt.Registry) error { + if swag.IsZero(m.ArtifactType) { // not required + return nil + } + + if m.ArtifactType != nil { + if err := m.ArtifactType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("artifact_type") + } + return err + } + } + + return nil +} + +func (m *V0ArtifactListElementResponseModel) validateTitle(formats strfmt.Registry) error { + if swag.IsZero(m.Title) { // not required + return nil + } + + if m.Title != nil { + if err := m.Title.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("title") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 artifact list element response model based on the context it is used +func (m *V0ArtifactListElementResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateArtifactType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTitle(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactListElementResponseModel) contextValidateArtifactType(ctx context.Context, formats strfmt.Registry) error { + + if m.ArtifactType != nil { + if err := m.ArtifactType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("artifact_type") + } + return err + } + } + + return nil +} + +func (m *V0ArtifactListElementResponseModel) contextValidateTitle(ctx context.Context, formats strfmt.Registry) error { + + if m.Title != nil { + if err := m.Title.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("title") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ArtifactListElementResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ArtifactListElementResponseModel) UnmarshalBinary(b []byte) error { + var res V0ArtifactListElementResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_artifact_list_response_model.go b/go/models/v0_artifact_list_response_model.go new file mode 100644 index 0000000..fa01108 --- /dev/null +++ b/go/models/v0_artifact_list_response_model.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ArtifactListResponseModel v0 artifact list response model +// +// swagger:model v0.ArtifactListResponseModel +type V0ArtifactListResponseModel struct { + + // data + Data []*V0ArtifactListElementResponseModel `json:"data"` + + // pagination + Paging *V0PagingResponseModel `json:"paging,omitempty"` +} + +// Validate validates this v0 artifact list response model +func (m *V0ArtifactListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaging(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0ArtifactListResponseModel) validatePaging(formats strfmt.Registry) error { + if swag.IsZero(m.Paging) { // not required + return nil + } + + if m.Paging != nil { + if err := m.Paging.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 artifact list response model based on the context it is used +func (m *V0ArtifactListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePaging(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0ArtifactListResponseModel) contextValidatePaging(ctx context.Context, formats strfmt.Registry) error { + + if m.Paging != nil { + if err := m.Paging.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ArtifactListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ArtifactListResponseModel) UnmarshalBinary(b []byte) error { + var res V0ArtifactListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_artifact_response_item_model.go b/go/models/v0_artifact_response_item_model.go new file mode 100644 index 0000000..1bf0034 --- /dev/null +++ b/go/models/v0_artifact_response_item_model.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ArtifactResponseItemModel v0 artifact response item model +// +// swagger:model v0.ArtifactResponseItemModel +type V0ArtifactResponseItemModel struct { + + // artifact meta + ArtifactMeta []int64 `json:"artifact_meta"` + + // artifact type + ArtifactType *NullsString `json:"artifact_type,omitempty"` + + // expiring download url + ExpiringDownloadURL string `json:"expiring_download_url,omitempty"` + + // file size bytes + FileSizeBytes int64 `json:"file_size_bytes,omitempty"` + + // is public page enabled + IsPublicPageEnabled bool `json:"is_public_page_enabled,omitempty"` + + // public install page url + PublicInstallPageURL string `json:"public_install_page_url,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // title + Title *NullsString `json:"title,omitempty"` +} + +// Validate validates this v0 artifact response item model +func (m *V0ArtifactResponseItemModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArtifactType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTitle(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactResponseItemModel) validateArtifactType(formats strfmt.Registry) error { + if swag.IsZero(m.ArtifactType) { // not required + return nil + } + + if m.ArtifactType != nil { + if err := m.ArtifactType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("artifact_type") + } + return err + } + } + + return nil +} + +func (m *V0ArtifactResponseItemModel) validateTitle(formats strfmt.Registry) error { + if swag.IsZero(m.Title) { // not required + return nil + } + + if m.Title != nil { + if err := m.Title.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("title") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 artifact response item model based on the context it is used +func (m *V0ArtifactResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateArtifactType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTitle(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactResponseItemModel) contextValidateArtifactType(ctx context.Context, formats strfmt.Registry) error { + + if m.ArtifactType != nil { + if err := m.ArtifactType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("artifact_type") + } + return err + } + } + + return nil +} + +func (m *V0ArtifactResponseItemModel) contextValidateTitle(ctx context.Context, formats strfmt.Registry) error { + + if m.Title != nil { + if err := m.Title.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("title") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ArtifactResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ArtifactResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0ArtifactResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_artifact_show_response_model.go b/go/models/v0_artifact_show_response_model.go new file mode 100644 index 0000000..caeacba --- /dev/null +++ b/go/models/v0_artifact_show_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ArtifactShowResponseModel v0 artifact show response model +// +// swagger:model v0.ArtifactShowResponseModel +type V0ArtifactShowResponseModel struct { + + // data + Data *V0ArtifactResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 artifact show response model +func (m *V0ArtifactShowResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactShowResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 artifact show response model based on the context it is used +func (m *V0ArtifactShowResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactShowResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ArtifactShowResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ArtifactShowResponseModel) UnmarshalBinary(b []byte) error { + var res V0ArtifactShowResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_artifact_update_params.go b/go/models/v0_artifact_update_params.go new file mode 100644 index 0000000..291ef2f --- /dev/null +++ b/go/models/v0_artifact_update_params.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0ArtifactUpdateParams v0 artifact update params +// +// swagger:model v0.ArtifactUpdateParams +type V0ArtifactUpdateParams struct { + + // is public page enabled + // Required: true + IsPublicPageEnabled *bool `json:"is_public_page_enabled"` +} + +// Validate validates this v0 artifact update params +func (m *V0ArtifactUpdateParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIsPublicPageEnabled(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ArtifactUpdateParams) validateIsPublicPageEnabled(formats strfmt.Registry) error { + + if err := validate.Required("is_public_page_enabled", "body", m.IsPublicPageEnabled); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 artifact update params based on context it is used +func (m *V0ArtifactUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0ArtifactUpdateParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ArtifactUpdateParams) UnmarshalBinary(b []byte) error { + var res V0ArtifactUpdateParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_avatar_candidate_create_bulk_params.go b/go/models/v0_avatar_candidate_create_bulk_params.go new file mode 100644 index 0000000..ad50b4f --- /dev/null +++ b/go/models/v0_avatar_candidate_create_bulk_params.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AvatarCandidateCreateBulkParams v0 avatar candidate create bulk params +// +// swagger:model v0.AvatarCandidateCreateBulkParams +type V0AvatarCandidateCreateBulkParams []*V0AvatarCandidateCreateParams + +// Validate validates this v0 avatar candidate create bulk params +func (m V0AvatarCandidateCreateBulkParams) Validate(formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validate this v0 avatar candidate create bulk params based on the context it is used +func (m V0AvatarCandidateCreateBulkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + + if m[i] != nil { + if err := m[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/models/v0_avatar_candidate_create_params.go b/go/models/v0_avatar_candidate_create_params.go new file mode 100644 index 0000000..9000df4 --- /dev/null +++ b/go/models/v0_avatar_candidate_create_params.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0AvatarCandidateCreateParams v0 avatar candidate create params +// +// swagger:model v0.AvatarCandidateCreateParams +type V0AvatarCandidateCreateParams struct { + + // filename + // Required: true + Filename *string `json:"filename"` + + // filesize + // Required: true + Filesize *int64 `json:"filesize"` +} + +// Validate validates this v0 avatar candidate create params +func (m *V0AvatarCandidateCreateParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilename(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFilesize(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AvatarCandidateCreateParams) validateFilename(formats strfmt.Registry) error { + + if err := validate.Required("filename", "body", m.Filename); err != nil { + return err + } + + return nil +} + +func (m *V0AvatarCandidateCreateParams) validateFilesize(formats strfmt.Registry) error { + + if err := validate.Required("filesize", "body", m.Filesize); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 avatar candidate create params based on context it is used +func (m *V0AvatarCandidateCreateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AvatarCandidateCreateParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AvatarCandidateCreateParams) UnmarshalBinary(b []byte) error { + var res V0AvatarCandidateCreateParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_avatar_candidate_create_response_item.go b/go/models/v0_avatar_candidate_create_response_item.go new file mode 100644 index 0000000..daefa87 --- /dev/null +++ b/go/models/v0_avatar_candidate_create_response_item.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AvatarCandidateCreateResponseItem v0 avatar candidate create response item +// +// swagger:model v0.AvatarCandidateCreateResponseItem +type V0AvatarCandidateCreateResponseItem struct { + + // filename + Filename string `json:"filename,omitempty"` + + // filesize + Filesize int64 `json:"filesize,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // upload url + UploadURL string `json:"upload_url,omitempty"` +} + +// Validate validates this v0 avatar candidate create response item +func (m *V0AvatarCandidateCreateResponseItem) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 avatar candidate create response item based on context it is used +func (m *V0AvatarCandidateCreateResponseItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AvatarCandidateCreateResponseItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AvatarCandidateCreateResponseItem) UnmarshalBinary(b []byte) error { + var res V0AvatarCandidateCreateResponseItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_avatar_candidate_create_response_items.go b/go/models/v0_avatar_candidate_create_response_items.go new file mode 100644 index 0000000..9bc70fc --- /dev/null +++ b/go/models/v0_avatar_candidate_create_response_items.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AvatarCandidateCreateResponseItems v0 avatar candidate create response items +// +// swagger:model v0.AvatarCandidateCreateResponseItems +type V0AvatarCandidateCreateResponseItems []*V0AvatarCandidateCreateResponseItem + +// Validate validates this v0 avatar candidate create response items +func (m V0AvatarCandidateCreateResponseItems) Validate(formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validate this v0 avatar candidate create response items based on the context it is used +func (m V0AvatarCandidateCreateResponseItems) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + + if m[i] != nil { + if err := m[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/models/v0_avatar_promote_params.go b/go/models/v0_avatar_promote_params.go new file mode 100644 index 0000000..05f9fdc --- /dev/null +++ b/go/models/v0_avatar_promote_params.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0AvatarPromoteParams v0 avatar promote params +// +// swagger:model v0.AvatarPromoteParams +type V0AvatarPromoteParams struct { + + // is promoted + // Required: true + IsPromoted *bool `json:"is_promoted"` +} + +// Validate validates this v0 avatar promote params +func (m *V0AvatarPromoteParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIsPromoted(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AvatarPromoteParams) validateIsPromoted(formats strfmt.Registry) error { + + if err := validate.Required("is_promoted", "body", m.IsPromoted); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 avatar promote params based on context it is used +func (m *V0AvatarPromoteParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AvatarPromoteParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AvatarPromoteParams) UnmarshalBinary(b []byte) error { + var res V0AvatarPromoteParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_avatar_promote_response_item_model.go b/go/models/v0_avatar_promote_response_item_model.go new file mode 100644 index 0000000..aab005d --- /dev/null +++ b/go/models/v0_avatar_promote_response_item_model.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AvatarPromoteResponseItemModel v0 avatar promote response item model +// +// swagger:model v0.AvatarPromoteResponseItemModel +type V0AvatarPromoteResponseItemModel struct { + + // is candidate + IsCandidate bool `json:"is_candidate,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // upload file name + UploadFileName string `json:"upload_file_name,omitempty"` + + // upload file size + UploadFileSize int64 `json:"upload_file_size,omitempty"` +} + +// Validate validates this v0 avatar promote response item model +func (m *V0AvatarPromoteResponseItemModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 avatar promote response item model based on context it is used +func (m *V0AvatarPromoteResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0AvatarPromoteResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AvatarPromoteResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0AvatarPromoteResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_avatar_promote_response_model.go b/go/models/v0_avatar_promote_response_model.go new file mode 100644 index 0000000..fa5a0dc --- /dev/null +++ b/go/models/v0_avatar_promote_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0AvatarPromoteResponseModel v0 avatar promote response model +// +// swagger:model v0.AvatarPromoteResponseModel +type V0AvatarPromoteResponseModel struct { + + // data + Data *V0AvatarPromoteResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 avatar promote response model +func (m *V0AvatarPromoteResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AvatarPromoteResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 avatar promote response model based on the context it is used +func (m *V0AvatarPromoteResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0AvatarPromoteResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0AvatarPromoteResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0AvatarPromoteResponseModel) UnmarshalBinary(b []byte) error { + var res V0AvatarPromoteResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_branch_list_response_model.go b/go/models/v0_branch_list_response_model.go new file mode 100644 index 0000000..0ef31c7 --- /dev/null +++ b/go/models/v0_branch_list_response_model.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BranchListResponseModel v0 branch list response model +// +// swagger:model v0.BranchListResponseModel +type V0BranchListResponseModel struct { + + // data + Data []string `json:"data"` +} + +// Validate validates this v0 branch list response model +func (m *V0BranchListResponseModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 branch list response model based on context it is used +func (m *V0BranchListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BranchListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BranchListResponseModel) UnmarshalBinary(b []byte) error { + var res V0BranchListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_abort_params.go b/go/models/v0_build_abort_params.go new file mode 100644 index 0000000..7d88f13 --- /dev/null +++ b/go/models/v0_build_abort_params.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0BuildAbortParams v0 build abort params +// +// swagger:model v0.BuildAbortParams +type V0BuildAbortParams struct { + + // abort reason + // Required: true + AbortReason *string `json:"abort_reason"` + + // abort with success + // Required: true + AbortWithSuccess *bool `json:"abort_with_success"` + + // skip notifications + // Required: true + SkipNotifications *bool `json:"skip_notifications"` +} + +// Validate validates this v0 build abort params +func (m *V0BuildAbortParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAbortReason(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAbortWithSuccess(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSkipNotifications(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildAbortParams) validateAbortReason(formats strfmt.Registry) error { + + if err := validate.Required("abort_reason", "body", m.AbortReason); err != nil { + return err + } + + return nil +} + +func (m *V0BuildAbortParams) validateAbortWithSuccess(formats strfmt.Registry) error { + + if err := validate.Required("abort_with_success", "body", m.AbortWithSuccess); err != nil { + return err + } + + return nil +} + +func (m *V0BuildAbortParams) validateSkipNotifications(formats strfmt.Registry) error { + + if err := validate.Required("skip_notifications", "body", m.SkipNotifications); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 build abort params based on context it is used +func (m *V0BuildAbortParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildAbortParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildAbortParams) UnmarshalBinary(b []byte) error { + var res V0BuildAbortParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_abort_response_model.go b/go/models/v0_build_abort_response_model.go new file mode 100644 index 0000000..5387f79 --- /dev/null +++ b/go/models/v0_build_abort_response_model.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildAbortResponseModel v0 build abort response model +// +// swagger:model v0.BuildAbortResponseModel +type V0BuildAbortResponseModel struct { + + // status + Status string `json:"status,omitempty"` +} + +// Validate validates this v0 build abort response model +func (m *V0BuildAbortResponseModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 build abort response model based on context it is used +func (m *V0BuildAbortResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildAbortResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildAbortResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildAbortResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_certificate_list_response_model.go b/go/models/v0_build_certificate_list_response_model.go new file mode 100644 index 0000000..5955c06 --- /dev/null +++ b/go/models/v0_build_certificate_list_response_model.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildCertificateListResponseModel v0 build certificate list response model +// +// swagger:model v0.BuildCertificateListResponseModel +type V0BuildCertificateListResponseModel struct { + + // data + Data []*V0BuildCertificateResponseItemModel `json:"data"` + + // pagination + Paging *V0PagingResponseModel `json:"paging,omitempty"` +} + +// Validate validates this v0 build certificate list response model +func (m *V0BuildCertificateListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaging(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildCertificateListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0BuildCertificateListResponseModel) validatePaging(formats strfmt.Registry) error { + if swag.IsZero(m.Paging) { // not required + return nil + } + + if m.Paging != nil { + if err := m.Paging.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 build certificate list response model based on the context it is used +func (m *V0BuildCertificateListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePaging(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildCertificateListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0BuildCertificateListResponseModel) contextValidatePaging(ctx context.Context, formats strfmt.Registry) error { + + if m.Paging != nil { + if err := m.Paging.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildCertificateListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildCertificateListResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildCertificateListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_certificate_response_item_model.go b/go/models/v0_build_certificate_response_item_model.go new file mode 100644 index 0000000..5cfb0c3 --- /dev/null +++ b/go/models/v0_build_certificate_response_item_model.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildCertificateResponseItemModel v0 build certificate response item model +// +// swagger:model v0.BuildCertificateResponseItemModel +type V0BuildCertificateResponseItemModel struct { + + // certificate password + CertificatePassword string `json:"certificate_password,omitempty"` + + // download url + DownloadURL string `json:"download_url,omitempty"` + + // is expose + IsExpose bool `json:"is_expose,omitempty"` + + // is protected + IsProtected bool `json:"is_protected,omitempty"` + + // processed + Processed bool `json:"processed,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // upload file name + UploadFileName string `json:"upload_file_name,omitempty"` + + // upload file size + UploadFileSize int64 `json:"upload_file_size,omitempty"` + + // upload url + UploadURL string `json:"upload_url,omitempty"` +} + +// Validate validates this v0 build certificate response item model +func (m *V0BuildCertificateResponseItemModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 build certificate response item model based on context it is used +func (m *V0BuildCertificateResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildCertificateResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildCertificateResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0BuildCertificateResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_certificate_response_model.go b/go/models/v0_build_certificate_response_model.go new file mode 100644 index 0000000..6d666d9 --- /dev/null +++ b/go/models/v0_build_certificate_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildCertificateResponseModel v0 build certificate response model +// +// swagger:model v0.BuildCertificateResponseModel +type V0BuildCertificateResponseModel struct { + + // data + Data *V0BuildCertificateResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 build certificate response model +func (m *V0BuildCertificateResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildCertificateResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 build certificate response model based on the context it is used +func (m *V0BuildCertificateResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildCertificateResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildCertificateResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildCertificateResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildCertificateResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_certificate_update_params.go b/go/models/v0_build_certificate_update_params.go new file mode 100644 index 0000000..b342e6f --- /dev/null +++ b/go/models/v0_build_certificate_update_params.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildCertificateUpdateParams v0 build certificate update params +// +// swagger:model v0.BuildCertificateUpdateParams +type V0BuildCertificateUpdateParams struct { + + // certificate password + CertificatePassword string `json:"certificate_password,omitempty"` + + // is expose + IsExpose bool `json:"is_expose,omitempty"` + + // is protected + IsProtected bool `json:"is_protected,omitempty"` + + // processed + Processed bool `json:"processed,omitempty"` +} + +// Validate validates this v0 build certificate update params +func (m *V0BuildCertificateUpdateParams) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 build certificate update params based on context it is used +func (m *V0BuildCertificateUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildCertificateUpdateParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildCertificateUpdateParams) UnmarshalBinary(b []byte) error { + var res V0BuildCertificateUpdateParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_certificate_upload_params.go b/go/models/v0_build_certificate_upload_params.go new file mode 100644 index 0000000..c4b2978 --- /dev/null +++ b/go/models/v0_build_certificate_upload_params.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0BuildCertificateUploadParams v0 build certificate upload params +// +// swagger:model v0.BuildCertificateUploadParams +type V0BuildCertificateUploadParams struct { + + // upload file name + // Required: true + UploadFileName *string `json:"upload_file_name"` + + // upload file size + // Required: true + UploadFileSize *int64 `json:"upload_file_size"` +} + +// Validate validates this v0 build certificate upload params +func (m *V0BuildCertificateUploadParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUploadFileName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUploadFileSize(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildCertificateUploadParams) validateUploadFileName(formats strfmt.Registry) error { + + if err := validate.Required("upload_file_name", "body", m.UploadFileName); err != nil { + return err + } + + return nil +} + +func (m *V0BuildCertificateUploadParams) validateUploadFileSize(formats strfmt.Registry) error { + + if err := validate.Required("upload_file_size", "body", m.UploadFileSize); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 build certificate upload params based on context it is used +func (m *V0BuildCertificateUploadParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildCertificateUploadParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildCertificateUploadParams) UnmarshalBinary(b []byte) error { + var res V0BuildCertificateUploadParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_list_all_response_item_model.go b/go/models/v0_build_list_all_response_item_model.go new file mode 100644 index 0000000..43cf846 --- /dev/null +++ b/go/models/v0_build_list_all_response_item_model.go @@ -0,0 +1,598 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildListAllResponseItemModel v0 build list all response item model +// +// swagger:model v0.BuildListAllResponseItemModel +type V0BuildListAllResponseItemModel struct { + + // abort reason + AbortReason *NullsString `json:"abort_reason,omitempty"` + + // branch + Branch *NullsString `json:"branch,omitempty"` + + // build number + BuildNumber int64 `json:"build_number,omitempty"` + + // commit hash + CommitHash *NullsString `json:"commit_hash,omitempty"` + + // commit message + CommitMessage *NullsString `json:"commit_message,omitempty"` + + // commit view url + CommitViewURL *NullsString `json:"commit_view_url,omitempty"` + + // environment prepare finished at + EnvironmentPrepareFinishedAt string `json:"environment_prepare_finished_at,omitempty"` + + // finished at + FinishedAt string `json:"finished_at,omitempty"` + + // is on hold + IsOnHold bool `json:"is_on_hold,omitempty"` + + // machine type id + MachineTypeID *NullsString `json:"machine_type_id,omitempty"` + + // original build params + OriginalBuildParams []int64 `json:"original_build_params"` + + // pull request id + PullRequestID int64 `json:"pull_request_id,omitempty"` + + // pull request target branch + PullRequestTargetBranch *NullsString `json:"pull_request_target_branch,omitempty"` + + // pull request view url + PullRequestViewURL *NullsString `json:"pull_request_view_url,omitempty"` + + // repository + Repository *V0AppResponseItemModel `json:"repository,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // stack identifier + StackIdentifier *NullsString `json:"stack_identifier,omitempty"` + + // started on worker at + StartedOnWorkerAt string `json:"started_on_worker_at,omitempty"` + + // status + Status int64 `json:"status,omitempty"` + + // status text + StatusText string `json:"status_text,omitempty"` + + // tag + Tag *NullsString `json:"tag,omitempty"` + + // triggered at + TriggeredAt string `json:"triggered_at,omitempty"` + + // triggered by + TriggeredBy *NullsString `json:"triggered_by,omitempty"` + + // triggered workflow + TriggeredWorkflow string `json:"triggered_workflow,omitempty"` +} + +// Validate validates this v0 build list all response item model +func (m *V0BuildListAllResponseItemModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAbortReason(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBranch(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCommitHash(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCommitMessage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCommitViewURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachineTypeID(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePullRequestTargetBranch(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePullRequestViewURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRepository(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStackIdentifier(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTag(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTriggeredBy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildListAllResponseItemModel) validateAbortReason(formats strfmt.Registry) error { + if swag.IsZero(m.AbortReason) { // not required + return nil + } + + if m.AbortReason != nil { + if err := m.AbortReason.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("abort_reason") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validateBranch(formats strfmt.Registry) error { + if swag.IsZero(m.Branch) { // not required + return nil + } + + if m.Branch != nil { + if err := m.Branch.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("branch") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validateCommitHash(formats strfmt.Registry) error { + if swag.IsZero(m.CommitHash) { // not required + return nil + } + + if m.CommitHash != nil { + if err := m.CommitHash.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_hash") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validateCommitMessage(formats strfmt.Registry) error { + if swag.IsZero(m.CommitMessage) { // not required + return nil + } + + if m.CommitMessage != nil { + if err := m.CommitMessage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_message") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validateCommitViewURL(formats strfmt.Registry) error { + if swag.IsZero(m.CommitViewURL) { // not required + return nil + } + + if m.CommitViewURL != nil { + if err := m.CommitViewURL.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_view_url") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validateMachineTypeID(formats strfmt.Registry) error { + if swag.IsZero(m.MachineTypeID) { // not required + return nil + } + + if m.MachineTypeID != nil { + if err := m.MachineTypeID.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machine_type_id") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validatePullRequestTargetBranch(formats strfmt.Registry) error { + if swag.IsZero(m.PullRequestTargetBranch) { // not required + return nil + } + + if m.PullRequestTargetBranch != nil { + if err := m.PullRequestTargetBranch.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pull_request_target_branch") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validatePullRequestViewURL(formats strfmt.Registry) error { + if swag.IsZero(m.PullRequestViewURL) { // not required + return nil + } + + if m.PullRequestViewURL != nil { + if err := m.PullRequestViewURL.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pull_request_view_url") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validateRepository(formats strfmt.Registry) error { + if swag.IsZero(m.Repository) { // not required + return nil + } + + if m.Repository != nil { + if err := m.Repository.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repository") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validateStackIdentifier(formats strfmt.Registry) error { + if swag.IsZero(m.StackIdentifier) { // not required + return nil + } + + if m.StackIdentifier != nil { + if err := m.StackIdentifier.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("stack_identifier") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validateTag(formats strfmt.Registry) error { + if swag.IsZero(m.Tag) { // not required + return nil + } + + if m.Tag != nil { + if err := m.Tag.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tag") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) validateTriggeredBy(formats strfmt.Registry) error { + if swag.IsZero(m.TriggeredBy) { // not required + return nil + } + + if m.TriggeredBy != nil { + if err := m.TriggeredBy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("triggered_by") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 build list all response item model based on the context it is used +func (m *V0BuildListAllResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAbortReason(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateBranch(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCommitHash(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCommitMessage(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCommitViewURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMachineTypeID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePullRequestTargetBranch(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePullRequestViewURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRepository(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStackIdentifier(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTag(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTriggeredBy(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidateAbortReason(ctx context.Context, formats strfmt.Registry) error { + + if m.AbortReason != nil { + if err := m.AbortReason.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("abort_reason") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidateBranch(ctx context.Context, formats strfmt.Registry) error { + + if m.Branch != nil { + if err := m.Branch.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("branch") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidateCommitHash(ctx context.Context, formats strfmt.Registry) error { + + if m.CommitHash != nil { + if err := m.CommitHash.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_hash") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidateCommitMessage(ctx context.Context, formats strfmt.Registry) error { + + if m.CommitMessage != nil { + if err := m.CommitMessage.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_message") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidateCommitViewURL(ctx context.Context, formats strfmt.Registry) error { + + if m.CommitViewURL != nil { + if err := m.CommitViewURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_view_url") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidateMachineTypeID(ctx context.Context, formats strfmt.Registry) error { + + if m.MachineTypeID != nil { + if err := m.MachineTypeID.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machine_type_id") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidatePullRequestTargetBranch(ctx context.Context, formats strfmt.Registry) error { + + if m.PullRequestTargetBranch != nil { + if err := m.PullRequestTargetBranch.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pull_request_target_branch") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidatePullRequestViewURL(ctx context.Context, formats strfmt.Registry) error { + + if m.PullRequestViewURL != nil { + if err := m.PullRequestViewURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pull_request_view_url") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidateRepository(ctx context.Context, formats strfmt.Registry) error { + + if m.Repository != nil { + if err := m.Repository.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repository") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidateStackIdentifier(ctx context.Context, formats strfmt.Registry) error { + + if m.StackIdentifier != nil { + if err := m.StackIdentifier.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("stack_identifier") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidateTag(ctx context.Context, formats strfmt.Registry) error { + + if m.Tag != nil { + if err := m.Tag.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tag") + } + return err + } + } + + return nil +} + +func (m *V0BuildListAllResponseItemModel) contextValidateTriggeredBy(ctx context.Context, formats strfmt.Registry) error { + + if m.TriggeredBy != nil { + if err := m.TriggeredBy.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("triggered_by") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildListAllResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildListAllResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0BuildListAllResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_list_all_response_model.go b/go/models/v0_build_list_all_response_model.go new file mode 100644 index 0000000..76ebde4 --- /dev/null +++ b/go/models/v0_build_list_all_response_model.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildListAllResponseModel v0 build list all response model +// +// swagger:model v0.BuildListAllResponseModel +type V0BuildListAllResponseModel struct { + + // data + Data []*V0BuildListAllResponseItemModel `json:"data"` + + // pagination + Paging *V0PagingResponseModel `json:"paging,omitempty"` +} + +// Validate validates this v0 build list all response model +func (m *V0BuildListAllResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaging(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildListAllResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0BuildListAllResponseModel) validatePaging(formats strfmt.Registry) error { + if swag.IsZero(m.Paging) { // not required + return nil + } + + if m.Paging != nil { + if err := m.Paging.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 build list all response model based on the context it is used +func (m *V0BuildListAllResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePaging(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildListAllResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0BuildListAllResponseModel) contextValidatePaging(ctx context.Context, formats strfmt.Registry) error { + + if m.Paging != nil { + if err := m.Paging.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildListAllResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildListAllResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildListAllResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_list_response_model.go b/go/models/v0_build_list_response_model.go new file mode 100644 index 0000000..fb3cfcc --- /dev/null +++ b/go/models/v0_build_list_response_model.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildListResponseModel v0 build list response model +// +// swagger:model v0.BuildListResponseModel +type V0BuildListResponseModel struct { + + // data + Data []*V0BuildResponseItemModel `json:"data"` + + // pagination + Paging *V0PagingResponseModel `json:"paging,omitempty"` +} + +// Validate validates this v0 build list response model +func (m *V0BuildListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaging(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0BuildListResponseModel) validatePaging(formats strfmt.Registry) error { + if swag.IsZero(m.Paging) { // not required + return nil + } + + if m.Paging != nil { + if err := m.Paging.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 build list response model based on the context it is used +func (m *V0BuildListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePaging(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0BuildListResponseModel) contextValidatePaging(ctx context.Context, formats strfmt.Registry) error { + + if m.Paging != nil { + if err := m.Paging.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildListResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_log_chunk_item_response_model.go b/go/models/v0_build_log_chunk_item_response_model.go new file mode 100644 index 0000000..13d11a3 --- /dev/null +++ b/go/models/v0_build_log_chunk_item_response_model.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildLogChunkItemResponseModel v0 build log chunk item response model +// +// swagger:model v0.BuildLogChunkItemResponseModel +type V0BuildLogChunkItemResponseModel struct { + + // chunk + Chunk string `json:"chunk,omitempty"` + + // position + Position int64 `json:"position,omitempty"` +} + +// Validate validates this v0 build log chunk item response model +func (m *V0BuildLogChunkItemResponseModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 build log chunk item response model based on context it is used +func (m *V0BuildLogChunkItemResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildLogChunkItemResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildLogChunkItemResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildLogChunkItemResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_log_info_response_model.go b/go/models/v0_build_log_info_response_model.go new file mode 100644 index 0000000..a1551d3 --- /dev/null +++ b/go/models/v0_build_log_info_response_model.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildLogInfoResponseModel v0 build log info response model +// +// swagger:model v0.BuildLogInfoResponseModel +type V0BuildLogInfoResponseModel struct { + + // expiring raw log url + ExpiringRawLogURL string `json:"expiring_raw_log_url,omitempty"` + + // generated log chunks num + GeneratedLogChunksNum int64 `json:"generated_log_chunks_num,omitempty"` + + // is archived + IsArchived bool `json:"is_archived,omitempty"` + + // log chunks + LogChunks []*V0BuildLogChunkItemResponseModel `json:"log_chunks"` + + // timestamp + Timestamp *NullsString `json:"timestamp,omitempty"` +} + +// Validate validates this v0 build log info response model +func (m *V0BuildLogInfoResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLogChunks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildLogInfoResponseModel) validateLogChunks(formats strfmt.Registry) error { + if swag.IsZero(m.LogChunks) { // not required + return nil + } + + for i := 0; i < len(m.LogChunks); i++ { + if swag.IsZero(m.LogChunks[i]) { // not required + continue + } + + if m.LogChunks[i] != nil { + if err := m.LogChunks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("log_chunks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0BuildLogInfoResponseModel) validateTimestamp(formats strfmt.Registry) error { + if swag.IsZero(m.Timestamp) { // not required + return nil + } + + if m.Timestamp != nil { + if err := m.Timestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timestamp") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 build log info response model based on the context it is used +func (m *V0BuildLogInfoResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLogChunks(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTimestamp(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildLogInfoResponseModel) contextValidateLogChunks(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.LogChunks); i++ { + + if m.LogChunks[i] != nil { + if err := m.LogChunks[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("log_chunks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0BuildLogInfoResponseModel) contextValidateTimestamp(ctx context.Context, formats strfmt.Registry) error { + + if m.Timestamp != nil { + if err := m.Timestamp.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timestamp") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildLogInfoResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildLogInfoResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildLogInfoResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_params_environment.go b/go/models/v0_build_params_environment.go new file mode 100644 index 0000000..4ac1d6a --- /dev/null +++ b/go/models/v0_build_params_environment.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildParamsEnvironment v0 build params environment +// +// swagger:model v0.BuildParamsEnvironment +type V0BuildParamsEnvironment struct { + + // is expand + IsExpand bool `json:"is_expand,omitempty"` + + // mapped to + MappedTo string `json:"mapped_to,omitempty"` + + // value + Value string `json:"value,omitempty"` +} + +// Validate validates this v0 build params environment +func (m *V0BuildParamsEnvironment) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 build params environment based on context it is used +func (m *V0BuildParamsEnvironment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildParamsEnvironment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildParamsEnvironment) UnmarshalBinary(b []byte) error { + var res V0BuildParamsEnvironment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_request_list_response_model.go b/go/models/v0_build_request_list_response_model.go new file mode 100644 index 0000000..5e7c566 --- /dev/null +++ b/go/models/v0_build_request_list_response_model.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildRequestListResponseModel v0 build request list response model +// +// swagger:model v0.BuildRequestListResponseModel +type V0BuildRequestListResponseModel struct { + + // data + Data []*V0BuildRequestResponseItemModel `json:"data"` +} + +// Validate validates this v0 build request list response model +func (m *V0BuildRequestListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildRequestListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 build request list response model based on the context it is used +func (m *V0BuildRequestListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildRequestListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildRequestListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildRequestListResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildRequestListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_request_response_item_model.go b/go/models/v0_build_request_response_item_model.go new file mode 100644 index 0000000..cce7213 --- /dev/null +++ b/go/models/v0_build_request_response_item_model.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildRequestResponseItemModel v0 build request response item model +// +// swagger:model v0.BuildRequestResponseItemModel +type V0BuildRequestResponseItemModel struct { + + // build params + BuildParams []int64 `json:"build_params"` + + // created at + CreatedAt string `json:"created_at,omitempty"` + + // pull request url + PullRequestURL string `json:"pull_request_url,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` +} + +// Validate validates this v0 build request response item model +func (m *V0BuildRequestResponseItemModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 build request response item model based on context it is used +func (m *V0BuildRequestResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildRequestResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildRequestResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0BuildRequestResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_request_update_params.go b/go/models/v0_build_request_update_params.go new file mode 100644 index 0000000..fe4442c --- /dev/null +++ b/go/models/v0_build_request_update_params.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0BuildRequestUpdateParams v0 build request update params +// +// swagger:model v0.BuildRequestUpdateParams +type V0BuildRequestUpdateParams struct { + + // is approved + // Required: true + IsApproved *bool `json:"is_approved"` +} + +// Validate validates this v0 build request update params +func (m *V0BuildRequestUpdateParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIsApproved(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildRequestUpdateParams) validateIsApproved(formats strfmt.Registry) error { + + if err := validate.Required("is_approved", "body", m.IsApproved); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 build request update params based on context it is used +func (m *V0BuildRequestUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildRequestUpdateParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildRequestUpdateParams) UnmarshalBinary(b []byte) error { + var res V0BuildRequestUpdateParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_request_update_response_model.go b/go/models/v0_build_request_update_response_model.go new file mode 100644 index 0000000..b33a15b --- /dev/null +++ b/go/models/v0_build_request_update_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildRequestUpdateResponseModel v0 build request update response model +// +// swagger:model v0.BuildRequestUpdateResponseModel +type V0BuildRequestUpdateResponseModel struct { + + // data + Data *V0BuildRequestResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 build request update response model +func (m *V0BuildRequestUpdateResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildRequestUpdateResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 build request update response model based on the context it is used +func (m *V0BuildRequestUpdateResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildRequestUpdateResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildRequestUpdateResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildRequestUpdateResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildRequestUpdateResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_response_item_model.go b/go/models/v0_build_response_item_model.go new file mode 100644 index 0000000..625773c --- /dev/null +++ b/go/models/v0_build_response_item_model.go @@ -0,0 +1,556 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildResponseItemModel v0 build response item model +// +// swagger:model v0.BuildResponseItemModel +type V0BuildResponseItemModel struct { + + // abort reason + AbortReason *NullsString `json:"abort_reason,omitempty"` + + // branch + Branch *NullsString `json:"branch,omitempty"` + + // build number + BuildNumber int64 `json:"build_number,omitempty"` + + // commit hash + CommitHash *NullsString `json:"commit_hash,omitempty"` + + // commit message + CommitMessage *NullsString `json:"commit_message,omitempty"` + + // commit view url + CommitViewURL *NullsString `json:"commit_view_url,omitempty"` + + // environment prepare finished at + EnvironmentPrepareFinishedAt string `json:"environment_prepare_finished_at,omitempty"` + + // finished at + FinishedAt string `json:"finished_at,omitempty"` + + // is on hold + IsOnHold bool `json:"is_on_hold,omitempty"` + + // machine type id + MachineTypeID *NullsString `json:"machine_type_id,omitempty"` + + // original build params + OriginalBuildParams []int64 `json:"original_build_params"` + + // pull request id + PullRequestID int64 `json:"pull_request_id,omitempty"` + + // pull request target branch + PullRequestTargetBranch *NullsString `json:"pull_request_target_branch,omitempty"` + + // pull request view url + PullRequestViewURL *NullsString `json:"pull_request_view_url,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // stack identifier + StackIdentifier *NullsString `json:"stack_identifier,omitempty"` + + // started on worker at + StartedOnWorkerAt string `json:"started_on_worker_at,omitempty"` + + // status + Status int64 `json:"status,omitempty"` + + // status text + StatusText string `json:"status_text,omitempty"` + + // tag + Tag *NullsString `json:"tag,omitempty"` + + // triggered at + TriggeredAt string `json:"triggered_at,omitempty"` + + // triggered by + TriggeredBy *NullsString `json:"triggered_by,omitempty"` + + // triggered workflow + TriggeredWorkflow string `json:"triggered_workflow,omitempty"` +} + +// Validate validates this v0 build response item model +func (m *V0BuildResponseItemModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAbortReason(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBranch(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCommitHash(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCommitMessage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCommitViewURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachineTypeID(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePullRequestTargetBranch(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePullRequestViewURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStackIdentifier(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTag(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTriggeredBy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildResponseItemModel) validateAbortReason(formats strfmt.Registry) error { + if swag.IsZero(m.AbortReason) { // not required + return nil + } + + if m.AbortReason != nil { + if err := m.AbortReason.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("abort_reason") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) validateBranch(formats strfmt.Registry) error { + if swag.IsZero(m.Branch) { // not required + return nil + } + + if m.Branch != nil { + if err := m.Branch.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("branch") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) validateCommitHash(formats strfmt.Registry) error { + if swag.IsZero(m.CommitHash) { // not required + return nil + } + + if m.CommitHash != nil { + if err := m.CommitHash.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_hash") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) validateCommitMessage(formats strfmt.Registry) error { + if swag.IsZero(m.CommitMessage) { // not required + return nil + } + + if m.CommitMessage != nil { + if err := m.CommitMessage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_message") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) validateCommitViewURL(formats strfmt.Registry) error { + if swag.IsZero(m.CommitViewURL) { // not required + return nil + } + + if m.CommitViewURL != nil { + if err := m.CommitViewURL.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_view_url") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) validateMachineTypeID(formats strfmt.Registry) error { + if swag.IsZero(m.MachineTypeID) { // not required + return nil + } + + if m.MachineTypeID != nil { + if err := m.MachineTypeID.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machine_type_id") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) validatePullRequestTargetBranch(formats strfmt.Registry) error { + if swag.IsZero(m.PullRequestTargetBranch) { // not required + return nil + } + + if m.PullRequestTargetBranch != nil { + if err := m.PullRequestTargetBranch.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pull_request_target_branch") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) validatePullRequestViewURL(formats strfmt.Registry) error { + if swag.IsZero(m.PullRequestViewURL) { // not required + return nil + } + + if m.PullRequestViewURL != nil { + if err := m.PullRequestViewURL.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pull_request_view_url") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) validateStackIdentifier(formats strfmt.Registry) error { + if swag.IsZero(m.StackIdentifier) { // not required + return nil + } + + if m.StackIdentifier != nil { + if err := m.StackIdentifier.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("stack_identifier") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) validateTag(formats strfmt.Registry) error { + if swag.IsZero(m.Tag) { // not required + return nil + } + + if m.Tag != nil { + if err := m.Tag.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tag") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) validateTriggeredBy(formats strfmt.Registry) error { + if swag.IsZero(m.TriggeredBy) { // not required + return nil + } + + if m.TriggeredBy != nil { + if err := m.TriggeredBy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("triggered_by") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 build response item model based on the context it is used +func (m *V0BuildResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAbortReason(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateBranch(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCommitHash(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCommitMessage(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCommitViewURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMachineTypeID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePullRequestTargetBranch(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePullRequestViewURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStackIdentifier(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTag(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTriggeredBy(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildResponseItemModel) contextValidateAbortReason(ctx context.Context, formats strfmt.Registry) error { + + if m.AbortReason != nil { + if err := m.AbortReason.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("abort_reason") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) contextValidateBranch(ctx context.Context, formats strfmt.Registry) error { + + if m.Branch != nil { + if err := m.Branch.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("branch") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) contextValidateCommitHash(ctx context.Context, formats strfmt.Registry) error { + + if m.CommitHash != nil { + if err := m.CommitHash.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_hash") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) contextValidateCommitMessage(ctx context.Context, formats strfmt.Registry) error { + + if m.CommitMessage != nil { + if err := m.CommitMessage.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_message") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) contextValidateCommitViewURL(ctx context.Context, formats strfmt.Registry) error { + + if m.CommitViewURL != nil { + if err := m.CommitViewURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_view_url") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) contextValidateMachineTypeID(ctx context.Context, formats strfmt.Registry) error { + + if m.MachineTypeID != nil { + if err := m.MachineTypeID.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machine_type_id") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) contextValidatePullRequestTargetBranch(ctx context.Context, formats strfmt.Registry) error { + + if m.PullRequestTargetBranch != nil { + if err := m.PullRequestTargetBranch.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pull_request_target_branch") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) contextValidatePullRequestViewURL(ctx context.Context, formats strfmt.Registry) error { + + if m.PullRequestViewURL != nil { + if err := m.PullRequestViewURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pull_request_view_url") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) contextValidateStackIdentifier(ctx context.Context, formats strfmt.Registry) error { + + if m.StackIdentifier != nil { + if err := m.StackIdentifier.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("stack_identifier") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) contextValidateTag(ctx context.Context, formats strfmt.Registry) error { + + if m.Tag != nil { + if err := m.Tag.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tag") + } + return err + } + } + + return nil +} + +func (m *V0BuildResponseItemModel) contextValidateTriggeredBy(ctx context.Context, formats strfmt.Registry) error { + + if m.TriggeredBy != nil { + if err := m.TriggeredBy.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("triggered_by") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0BuildResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_show_response_model.go b/go/models/v0_build_show_response_model.go new file mode 100644 index 0000000..13e314c --- /dev/null +++ b/go/models/v0_build_show_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildShowResponseModel v0 build show response model +// +// swagger:model v0.BuildShowResponseModel +type V0BuildShowResponseModel struct { + + // data + Data *V0BuildResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 build show response model +func (m *V0BuildShowResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildShowResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 build show response model based on the context it is used +func (m *V0BuildShowResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildShowResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildShowResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildShowResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildShowResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_trigger_params.go b/go/models/v0_build_trigger_params.go new file mode 100644 index 0000000..b3551ed --- /dev/null +++ b/go/models/v0_build_trigger_params.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildTriggerParams v0 build trigger params +// +// swagger:model v0.BuildTriggerParams +type V0BuildTriggerParams struct { + + // The public part of the SSH key you would like to use + BuildParams *V0BuildTriggerParamsBuildParams `json:"build_params,omitempty"` + + // hook info + HookInfo *V0BuildTriggerParamsHookInfo `json:"hook_info,omitempty"` +} + +// Validate validates this v0 build trigger params +func (m *V0BuildTriggerParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBuildParams(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHookInfo(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildTriggerParams) validateBuildParams(formats strfmt.Registry) error { + if swag.IsZero(m.BuildParams) { // not required + return nil + } + + if m.BuildParams != nil { + if err := m.BuildParams.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("build_params") + } + return err + } + } + + return nil +} + +func (m *V0BuildTriggerParams) validateHookInfo(formats strfmt.Registry) error { + if swag.IsZero(m.HookInfo) { // not required + return nil + } + + if m.HookInfo != nil { + if err := m.HookInfo.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hook_info") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 build trigger params based on the context it is used +func (m *V0BuildTriggerParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateBuildParams(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateHookInfo(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildTriggerParams) contextValidateBuildParams(ctx context.Context, formats strfmt.Registry) error { + + if m.BuildParams != nil { + if err := m.BuildParams.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("build_params") + } + return err + } + } + + return nil +} + +func (m *V0BuildTriggerParams) contextValidateHookInfo(ctx context.Context, formats strfmt.Registry) error { + + if m.HookInfo != nil { + if err := m.HookInfo.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hook_info") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildTriggerParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildTriggerParams) UnmarshalBinary(b []byte) error { + var res V0BuildTriggerParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_trigger_params_build_params.go b/go/models/v0_build_trigger_params_build_params.go new file mode 100644 index 0000000..29f0068 --- /dev/null +++ b/go/models/v0_build_trigger_params_build_params.go @@ -0,0 +1,213 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildTriggerParamsBuildParams v0 build trigger params build params +// +// swagger:model v0.BuildTriggerParamsBuildParams +type V0BuildTriggerParamsBuildParams struct { + + // branch + Branch string `json:"branch,omitempty"` + + // branch dest + BranchDest string `json:"branch_dest,omitempty"` + + // branch dest repo owner + BranchDestRepoOwner string `json:"branch_dest_repo_owner,omitempty"` + + // branch repo owner + BranchRepoOwner string `json:"branch_repo_owner,omitempty"` + + // build request slug + BuildRequestSlug string `json:"build_request_slug,omitempty"` + + // commit hash + CommitHash string `json:"commit_hash,omitempty"` + + // commit message + CommitMessage string `json:"commit_message,omitempty"` + + // commit paths + CommitPaths []*V0CommitPaths `json:"commit_paths"` + + // diff url + DiffURL string `json:"diff_url,omitempty"` + + // environments + Environments []*V0BuildParamsEnvironment `json:"environments"` + + // pull request author + PullRequestAuthor string `json:"pull_request_author,omitempty"` + + // pull request head branch + PullRequestHeadBranch string `json:"pull_request_head_branch,omitempty"` + + // pull request id + PullRequestID interface{} `json:"pull_request_id,omitempty"` + + // pull request merge branch + PullRequestMergeBranch string `json:"pull_request_merge_branch,omitempty"` + + // pull request repository url + PullRequestRepositoryURL string `json:"pull_request_repository_url,omitempty"` + + // skip git status report + SkipGitStatusReport bool `json:"skip_git_status_report,omitempty"` + + // tag + Tag string `json:"tag,omitempty"` + + // workflow id + WorkflowID string `json:"workflow_id,omitempty"` +} + +// Validate validates this v0 build trigger params build params +func (m *V0BuildTriggerParamsBuildParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCommitPaths(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEnvironments(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildTriggerParamsBuildParams) validateCommitPaths(formats strfmt.Registry) error { + if swag.IsZero(m.CommitPaths) { // not required + return nil + } + + for i := 0; i < len(m.CommitPaths); i++ { + if swag.IsZero(m.CommitPaths[i]) { // not required + continue + } + + if m.CommitPaths[i] != nil { + if err := m.CommitPaths[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_paths" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0BuildTriggerParamsBuildParams) validateEnvironments(formats strfmt.Registry) error { + if swag.IsZero(m.Environments) { // not required + return nil + } + + for i := 0; i < len(m.Environments); i++ { + if swag.IsZero(m.Environments[i]) { // not required + continue + } + + if m.Environments[i] != nil { + if err := m.Environments[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("environments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 build trigger params build params based on the context it is used +func (m *V0BuildTriggerParamsBuildParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCommitPaths(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateEnvironments(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0BuildTriggerParamsBuildParams) contextValidateCommitPaths(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.CommitPaths); i++ { + + if m.CommitPaths[i] != nil { + if err := m.CommitPaths[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("commit_paths" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0BuildTriggerParamsBuildParams) contextValidateEnvironments(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Environments); i++ { + + if m.Environments[i] != nil { + if err := m.Environments[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("environments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildTriggerParamsBuildParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildTriggerParamsBuildParams) UnmarshalBinary(b []byte) error { + var res V0BuildTriggerParamsBuildParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_trigger_params_hook_info.go b/go/models/v0_build_trigger_params_hook_info.go new file mode 100644 index 0000000..bac2aec --- /dev/null +++ b/go/models/v0_build_trigger_params_hook_info.go @@ -0,0 +1,51 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildTriggerParamsHookInfo v0 build trigger params hook info +// +// swagger:model v0.BuildTriggerParamsHookInfo +type V0BuildTriggerParamsHookInfo struct { + + // Should be "bitrise" + // Example: bitrise + Type string `json:"type,omitempty"` +} + +// Validate validates this v0 build trigger params hook info +func (m *V0BuildTriggerParamsHookInfo) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 build trigger params hook info based on context it is used +func (m *V0BuildTriggerParamsHookInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildTriggerParamsHookInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildTriggerParamsHookInfo) UnmarshalBinary(b []byte) error { + var res V0BuildTriggerParamsHookInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_trigger_resp_model.go b/go/models/v0_build_trigger_resp_model.go new file mode 100644 index 0000000..cba6ed5 --- /dev/null +++ b/go/models/v0_build_trigger_resp_model.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildTriggerRespModel v0 build trigger resp model +// +// swagger:model v0.BuildTriggerRespModel +type V0BuildTriggerRespModel struct { + + // build number + BuildNumber int64 `json:"build_number,omitempty"` + + // build slug + BuildSlug string `json:"build_slug,omitempty"` + + // build url + BuildURL string `json:"build_url,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // service + Service string `json:"service,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // status + Status string `json:"status,omitempty"` + + // triggered workflow + TriggeredWorkflow string `json:"triggered_workflow,omitempty"` +} + +// Validate validates this v0 build trigger resp model +func (m *V0BuildTriggerRespModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 build trigger resp model based on context it is used +func (m *V0BuildTriggerRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildTriggerRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildTriggerRespModel) UnmarshalBinary(b []byte) error { + var res V0BuildTriggerRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_build_workflow_list_response_model.go b/go/models/v0_build_workflow_list_response_model.go new file mode 100644 index 0000000..c880ce6 --- /dev/null +++ b/go/models/v0_build_workflow_list_response_model.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0BuildWorkflowListResponseModel v0 build workflow list response model +// +// swagger:model v0.BuildWorkflowListResponseModel +type V0BuildWorkflowListResponseModel struct { + + // data + Data []string `json:"data"` +} + +// Validate validates this v0 build workflow list response model +func (m *V0BuildWorkflowListResponseModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 build workflow list response model based on context it is used +func (m *V0BuildWorkflowListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0BuildWorkflowListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0BuildWorkflowListResponseModel) UnmarshalBinary(b []byte) error { + var res V0BuildWorkflowListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_commit_paths.go b/go/models/v0_commit_paths.go new file mode 100644 index 0000000..7f505fc --- /dev/null +++ b/go/models/v0_commit_paths.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0CommitPaths v0 commit paths +// +// swagger:model v0.CommitPaths +type V0CommitPaths struct { + + // added + Added []string `json:"added"` + + // modified + Modified []string `json:"modified"` + + // removed + Removed []string `json:"removed"` +} + +// Validate validates this v0 commit paths +func (m *V0CommitPaths) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 commit paths based on context it is used +func (m *V0CommitPaths) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0CommitPaths) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0CommitPaths) UnmarshalBinary(b []byte) error { + var res V0CommitPaths + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_find_avatar_candidate_response.go b/go/models/v0_find_avatar_candidate_response.go new file mode 100644 index 0000000..7a1aef7 --- /dev/null +++ b/go/models/v0_find_avatar_candidate_response.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0FindAvatarCandidateResponse v0 find avatar candidate response +// +// swagger:model v0.FindAvatarCandidateResponse +type V0FindAvatarCandidateResponse struct { + + // data + Data []*V0FindAvatarCandidateResponseItem `json:"data"` +} + +// Validate validates this v0 find avatar candidate response +func (m *V0FindAvatarCandidateResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0FindAvatarCandidateResponse) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 find avatar candidate response based on the context it is used +func (m *V0FindAvatarCandidateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0FindAvatarCandidateResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0FindAvatarCandidateResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0FindAvatarCandidateResponse) UnmarshalBinary(b []byte) error { + var res V0FindAvatarCandidateResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_find_avatar_candidate_response_item.go b/go/models/v0_find_avatar_candidate_response_item.go new file mode 100644 index 0000000..1909f67 --- /dev/null +++ b/go/models/v0_find_avatar_candidate_response_item.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0FindAvatarCandidateResponseItem v0 find avatar candidate response item +// +// swagger:model v0.FindAvatarCandidateResponseItem +type V0FindAvatarCandidateResponseItem struct { + + // download url + DownloadURL string `json:"download_url,omitempty"` + + // filename + Filename string `json:"filename,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` +} + +// Validate validates this v0 find avatar candidate response item +func (m *V0FindAvatarCandidateResponseItem) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 find avatar candidate response item based on context it is used +func (m *V0FindAvatarCandidateResponseItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0FindAvatarCandidateResponseItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0FindAvatarCandidateResponseItem) UnmarshalBinary(b []byte) error { + var res V0FindAvatarCandidateResponseItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_organization_data_model.go b/go/models/v0_organization_data_model.go new file mode 100644 index 0000000..01ba4c8 --- /dev/null +++ b/go/models/v0_organization_data_model.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0OrganizationDataModel v0 organization data model +// +// swagger:model v0.OrganizationDataModel +type V0OrganizationDataModel struct { + + // avatar icon url + AvatarIconURL *NullsString `json:"avatar_icon_url,omitempty"` + + // concurrency count + ConcurrencyCount int64 `json:"concurrency_count,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // owners + Owners []*V0OrganizationOwner `json:"owners"` + + // slug + Slug string `json:"slug,omitempty"` +} + +// Validate validates this v0 organization data model +func (m *V0OrganizationDataModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAvatarIconURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOwners(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0OrganizationDataModel) validateAvatarIconURL(formats strfmt.Registry) error { + if swag.IsZero(m.AvatarIconURL) { // not required + return nil + } + + if m.AvatarIconURL != nil { + if err := m.AvatarIconURL.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("avatar_icon_url") + } + return err + } + } + + return nil +} + +func (m *V0OrganizationDataModel) validateOwners(formats strfmt.Registry) error { + if swag.IsZero(m.Owners) { // not required + return nil + } + + for i := 0; i < len(m.Owners); i++ { + if swag.IsZero(m.Owners[i]) { // not required + continue + } + + if m.Owners[i] != nil { + if err := m.Owners[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("owners" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 organization data model based on the context it is used +func (m *V0OrganizationDataModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAvatarIconURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOwners(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0OrganizationDataModel) contextValidateAvatarIconURL(ctx context.Context, formats strfmt.Registry) error { + + if m.AvatarIconURL != nil { + if err := m.AvatarIconURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("avatar_icon_url") + } + return err + } + } + + return nil +} + +func (m *V0OrganizationDataModel) contextValidateOwners(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Owners); i++ { + + if m.Owners[i] != nil { + if err := m.Owners[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("owners" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0OrganizationDataModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0OrganizationDataModel) UnmarshalBinary(b []byte) error { + var res V0OrganizationDataModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_organization_list_resp_model.go b/go/models/v0_organization_list_resp_model.go new file mode 100644 index 0000000..f065249 --- /dev/null +++ b/go/models/v0_organization_list_resp_model.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0OrganizationListRespModel v0 organization list resp model +// +// swagger:model v0.OrganizationListRespModel +type V0OrganizationListRespModel struct { + + // data + Data []*V0OrganizationDataModel `json:"data"` +} + +// Validate validates this v0 organization list resp model +func (m *V0OrganizationListRespModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0OrganizationListRespModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 organization list resp model based on the context it is used +func (m *V0OrganizationListRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0OrganizationListRespModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0OrganizationListRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0OrganizationListRespModel) UnmarshalBinary(b []byte) error { + var res V0OrganizationListRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_organization_owner.go b/go/models/v0_organization_owner.go new file mode 100644 index 0000000..0e2a8be --- /dev/null +++ b/go/models/v0_organization_owner.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0OrganizationOwner v0 organization owner +// +// swagger:model v0.OrganizationOwner +type V0OrganizationOwner struct { + + // email + Email string `json:"email,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // username + Username string `json:"username,omitempty"` +} + +// Validate validates this v0 organization owner +func (m *V0OrganizationOwner) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 organization owner based on context it is used +func (m *V0OrganizationOwner) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0OrganizationOwner) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0OrganizationOwner) UnmarshalBinary(b []byte) error { + var res V0OrganizationOwner + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_organization_resp_model.go b/go/models/v0_organization_resp_model.go new file mode 100644 index 0000000..767e624 --- /dev/null +++ b/go/models/v0_organization_resp_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0OrganizationRespModel v0 organization resp model +// +// swagger:model v0.OrganizationRespModel +type V0OrganizationRespModel struct { + + // data + Data *V0OrganizationDataModel `json:"data,omitempty"` +} + +// Validate validates this v0 organization resp model +func (m *V0OrganizationRespModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0OrganizationRespModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 organization resp model based on the context it is used +func (m *V0OrganizationRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0OrganizationRespModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0OrganizationRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0OrganizationRespModel) UnmarshalBinary(b []byte) error { + var res V0OrganizationRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_owner_account_response_model.go b/go/models/v0_owner_account_response_model.go new file mode 100644 index 0000000..6fd0a2c --- /dev/null +++ b/go/models/v0_owner_account_response_model.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0OwnerAccountResponseModel v0 owner account response model +// +// swagger:model v0.OwnerAccountResponseModel +type V0OwnerAccountResponseModel struct { + + // account type + AccountType string `json:"account_type,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` +} + +// Validate validates this v0 owner account response model +func (m *V0OwnerAccountResponseModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 owner account response model based on context it is used +func (m *V0OwnerAccountResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0OwnerAccountResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0OwnerAccountResponseModel) UnmarshalBinary(b []byte) error { + var res V0OwnerAccountResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_owner_add_on_response_item_model.go b/go/models/v0_owner_add_on_response_item_model.go new file mode 100644 index 0000000..5116ac7 --- /dev/null +++ b/go/models/v0_owner_add_on_response_item_model.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0OwnerAddOnResponseItemModel v0 owner add on response item model +// +// swagger:model v0.OwnerAddOnResponseItemModel +type V0OwnerAddOnResponseItemModel struct { + + // apps + Apps []*V0AddOnAppResponseItemModel `json:"apps"` + + // documentation url + DocumentationURL string `json:"documentation_url,omitempty"` + + // has ui + HasUI bool `json:"has_ui,omitempty"` + + // icon + Icon string `json:"icon,omitempty"` + + // id + ID string `json:"id,omitempty"` + + // is beta + IsBeta bool `json:"is_beta,omitempty"` + + // summary + Summary string `json:"summary,omitempty"` + + // title + Title string `json:"title,omitempty"` +} + +// Validate validates this v0 owner add on response item model +func (m *V0OwnerAddOnResponseItemModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateApps(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0OwnerAddOnResponseItemModel) validateApps(formats strfmt.Registry) error { + if swag.IsZero(m.Apps) { // not required + return nil + } + + for i := 0; i < len(m.Apps); i++ { + if swag.IsZero(m.Apps[i]) { // not required + continue + } + + if m.Apps[i] != nil { + if err := m.Apps[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("apps" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 owner add on response item model based on the context it is used +func (m *V0OwnerAddOnResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateApps(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0OwnerAddOnResponseItemModel) contextValidateApps(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Apps); i++ { + + if m.Apps[i] != nil { + if err := m.Apps[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("apps" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0OwnerAddOnResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0OwnerAddOnResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0OwnerAddOnResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_owner_add_ons_list_response_model.go b/go/models/v0_owner_add_ons_list_response_model.go new file mode 100644 index 0000000..7debda2 --- /dev/null +++ b/go/models/v0_owner_add_ons_list_response_model.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0OwnerAddOnsListResponseModel v0 owner add ons list response model +// +// swagger:model v0.OwnerAddOnsListResponseModel +type V0OwnerAddOnsListResponseModel struct { + + // data + Data []*V0OwnerAddOnResponseItemModel `json:"data"` +} + +// Validate validates this v0 owner add ons list response model +func (m *V0OwnerAddOnsListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0OwnerAddOnsListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 owner add ons list response model based on the context it is used +func (m *V0OwnerAddOnsListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0OwnerAddOnsListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0OwnerAddOnsListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0OwnerAddOnsListResponseModel) UnmarshalBinary(b []byte) error { + var res V0OwnerAddOnsListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_paging_response_model.go b/go/models/v0_paging_response_model.go new file mode 100644 index 0000000..075ba45 --- /dev/null +++ b/go/models/v0_paging_response_model.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0PagingResponseModel v0 paging response model +// +// swagger:model v0.PagingResponseModel +type V0PagingResponseModel struct { + + // Next is the "anchor" for pagination. This value should be passed to the same endpoint + // to get the next page. Empty/not included if there's no "next" page. + // Stop paging when there's no "Next" item in the response! + Next string `json:"next,omitempty"` + + // PageItemLimit - per-page item count. A given page might include + // less items if there's not enough items. This value is the "max item count per page". + PageItemLimit int64 `json:"page_item_limit,omitempty"` + + // TotalItemCount - total item count, through "all pages" + TotalItemCount int64 `json:"total_item_count,omitempty"` +} + +// Validate validates this v0 paging response model +func (m *V0PagingResponseModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 paging response model based on context it is used +func (m *V0PagingResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0PagingResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0PagingResponseModel) UnmarshalBinary(b []byte) error { + var res V0PagingResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_plan_data_model.go b/go/models/v0_plan_data_model.go new file mode 100644 index 0000000..3f6414a --- /dev/null +++ b/go/models/v0_plan_data_model.go @@ -0,0 +1,62 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0PlanDataModel v0 plan data model +// +// swagger:model v0.PlanDataModel +type V0PlanDataModel struct { + + // container count + ContainerCount int64 `json:"container_count,omitempty"` + + // expires at + ExpiresAt string `json:"expires_at,omitempty"` + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // price + Price NullsInt64 `json:"price,omitempty"` +} + +// Validate validates this v0 plan data model +func (m *V0PlanDataModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 plan data model based on context it is used +func (m *V0PlanDataModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0PlanDataModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0PlanDataModel) UnmarshalBinary(b []byte) error { + var res V0PlanDataModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_project_file_storage_document_update_params.go b/go/models/v0_project_file_storage_document_update_params.go new file mode 100644 index 0000000..75e1046 --- /dev/null +++ b/go/models/v0_project_file_storage_document_update_params.go @@ -0,0 +1,62 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ProjectFileStorageDocumentUpdateParams v0 project file storage document update params +// +// swagger:model v0.ProjectFileStorageDocumentUpdateParams +type V0ProjectFileStorageDocumentUpdateParams struct { + + // exposed meta datastore + ExposedMetaDatastore []int64 `json:"exposed_meta_datastore"` + + // is expose + IsExpose bool `json:"is_expose,omitempty"` + + // is protected + IsProtected bool `json:"is_protected,omitempty"` + + // processed + Processed bool `json:"processed,omitempty"` + + // user env key + UserEnvKey string `json:"user_env_key,omitempty"` +} + +// Validate validates this v0 project file storage document update params +func (m *V0ProjectFileStorageDocumentUpdateParams) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 project file storage document update params based on context it is used +func (m *V0ProjectFileStorageDocumentUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProjectFileStorageDocumentUpdateParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProjectFileStorageDocumentUpdateParams) UnmarshalBinary(b []byte) error { + var res V0ProjectFileStorageDocumentUpdateParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_project_file_storage_list_response_model.go b/go/models/v0_project_file_storage_list_response_model.go new file mode 100644 index 0000000..cd2f509 --- /dev/null +++ b/go/models/v0_project_file_storage_list_response_model.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ProjectFileStorageListResponseModel v0 project file storage list response model +// +// swagger:model v0.ProjectFileStorageListResponseModel +type V0ProjectFileStorageListResponseModel struct { + + // data + Data []*V0ProjectFileStorageResponseItemModel `json:"data"` + + // pagination + Paging *V0PagingResponseModel `json:"paging,omitempty"` +} + +// Validate validates this v0 project file storage list response model +func (m *V0ProjectFileStorageListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaging(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ProjectFileStorageListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0ProjectFileStorageListResponseModel) validatePaging(formats strfmt.Registry) error { + if swag.IsZero(m.Paging) { // not required + return nil + } + + if m.Paging != nil { + if err := m.Paging.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 project file storage list response model based on the context it is used +func (m *V0ProjectFileStorageListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePaging(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ProjectFileStorageListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0ProjectFileStorageListResponseModel) contextValidatePaging(ctx context.Context, formats strfmt.Registry) error { + + if m.Paging != nil { + if err := m.Paging.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProjectFileStorageListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProjectFileStorageListResponseModel) UnmarshalBinary(b []byte) error { + var res V0ProjectFileStorageListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_project_file_storage_response_item_model.go b/go/models/v0_project_file_storage_response_item_model.go new file mode 100644 index 0000000..91c4c3f --- /dev/null +++ b/go/models/v0_project_file_storage_response_item_model.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ProjectFileStorageResponseItemModel v0 project file storage response item model +// +// swagger:model v0.ProjectFileStorageResponseItemModel +type V0ProjectFileStorageResponseItemModel struct { + + // download url + DownloadURL string `json:"download_url,omitempty"` + + // exposed meta datastore + ExposedMetaDatastore []int64 `json:"exposed_meta_datastore"` + + // is expose + IsExpose bool `json:"is_expose,omitempty"` + + // is protected + IsProtected bool `json:"is_protected,omitempty"` + + // processed + Processed bool `json:"processed,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // upload file name + UploadFileName string `json:"upload_file_name,omitempty"` + + // upload file size + UploadFileSize int64 `json:"upload_file_size,omitempty"` + + // upload url + UploadURL string `json:"upload_url,omitempty"` + + // user env key + UserEnvKey string `json:"user_env_key,omitempty"` +} + +// Validate validates this v0 project file storage response item model +func (m *V0ProjectFileStorageResponseItemModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 project file storage response item model based on context it is used +func (m *V0ProjectFileStorageResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProjectFileStorageResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProjectFileStorageResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0ProjectFileStorageResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_project_file_storage_response_model.go b/go/models/v0_project_file_storage_response_model.go new file mode 100644 index 0000000..ad61d3b --- /dev/null +++ b/go/models/v0_project_file_storage_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ProjectFileStorageResponseModel v0 project file storage response model +// +// swagger:model v0.ProjectFileStorageResponseModel +type V0ProjectFileStorageResponseModel struct { + + // data + Data *V0ProjectFileStorageResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 project file storage response model +func (m *V0ProjectFileStorageResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ProjectFileStorageResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 project file storage response model based on the context it is used +func (m *V0ProjectFileStorageResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ProjectFileStorageResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProjectFileStorageResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProjectFileStorageResponseModel) UnmarshalBinary(b []byte) error { + var res V0ProjectFileStorageResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_project_file_storage_upload_params.go b/go/models/v0_project_file_storage_upload_params.go new file mode 100644 index 0000000..9735fe2 --- /dev/null +++ b/go/models/v0_project_file_storage_upload_params.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0ProjectFileStorageUploadParams v0 project file storage upload params +// +// swagger:model v0.ProjectFileStorageUploadParams +type V0ProjectFileStorageUploadParams struct { + + // upload file name + // Required: true + UploadFileName *string `json:"upload_file_name"` + + // upload file size + // Required: true + UploadFileSize *int64 `json:"upload_file_size"` + + // user env key + // Required: true + UserEnvKey *string `json:"user_env_key"` +} + +// Validate validates this v0 project file storage upload params +func (m *V0ProjectFileStorageUploadParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUploadFileName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUploadFileSize(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUserEnvKey(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ProjectFileStorageUploadParams) validateUploadFileName(formats strfmt.Registry) error { + + if err := validate.Required("upload_file_name", "body", m.UploadFileName); err != nil { + return err + } + + return nil +} + +func (m *V0ProjectFileStorageUploadParams) validateUploadFileSize(formats strfmt.Registry) error { + + if err := validate.Required("upload_file_size", "body", m.UploadFileSize); err != nil { + return err + } + + return nil +} + +func (m *V0ProjectFileStorageUploadParams) validateUserEnvKey(formats strfmt.Registry) error { + + if err := validate.Required("user_env_key", "body", m.UserEnvKey); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 project file storage upload params based on context it is used +func (m *V0ProjectFileStorageUploadParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProjectFileStorageUploadParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProjectFileStorageUploadParams) UnmarshalBinary(b []byte) error { + var res V0ProjectFileStorageUploadParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_prov_profile_document_update_params.go b/go/models/v0_prov_profile_document_update_params.go new file mode 100644 index 0000000..db4556b --- /dev/null +++ b/go/models/v0_prov_profile_document_update_params.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ProvProfileDocumentUpdateParams v0 prov profile document update params +// +// swagger:model v0.ProvProfileDocumentUpdateParams +type V0ProvProfileDocumentUpdateParams struct { + + // is expose + IsExpose bool `json:"is_expose,omitempty"` + + // is protected + IsProtected bool `json:"is_protected,omitempty"` + + // processed + Processed bool `json:"processed,omitempty"` +} + +// Validate validates this v0 prov profile document update params +func (m *V0ProvProfileDocumentUpdateParams) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 prov profile document update params based on context it is used +func (m *V0ProvProfileDocumentUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProvProfileDocumentUpdateParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProvProfileDocumentUpdateParams) UnmarshalBinary(b []byte) error { + var res V0ProvProfileDocumentUpdateParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_provision_profile_list_response_model.go b/go/models/v0_provision_profile_list_response_model.go new file mode 100644 index 0000000..3b42df1 --- /dev/null +++ b/go/models/v0_provision_profile_list_response_model.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ProvisionProfileListResponseModel v0 provision profile list response model +// +// swagger:model v0.ProvisionProfileListResponseModel +type V0ProvisionProfileListResponseModel struct { + + // data + Data []*V0ProvisionProfileResponseItemModel `json:"data"` + + // pagination + Paging *V0PagingResponseModel `json:"paging,omitempty"` +} + +// Validate validates this v0 provision profile list response model +func (m *V0ProvisionProfileListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaging(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ProvisionProfileListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0ProvisionProfileListResponseModel) validatePaging(formats strfmt.Registry) error { + if swag.IsZero(m.Paging) { // not required + return nil + } + + if m.Paging != nil { + if err := m.Paging.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 provision profile list response model based on the context it is used +func (m *V0ProvisionProfileListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePaging(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ProvisionProfileListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V0ProvisionProfileListResponseModel) contextValidatePaging(ctx context.Context, formats strfmt.Registry) error { + + if m.Paging != nil { + if err := m.Paging.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProvisionProfileListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProvisionProfileListResponseModel) UnmarshalBinary(b []byte) error { + var res V0ProvisionProfileListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_provision_profile_response_item_model.go b/go/models/v0_provision_profile_response_item_model.go new file mode 100644 index 0000000..ca87457 --- /dev/null +++ b/go/models/v0_provision_profile_response_item_model.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ProvisionProfileResponseItemModel v0 provision profile response item model +// +// swagger:model v0.ProvisionProfileResponseItemModel +type V0ProvisionProfileResponseItemModel struct { + + // download url + DownloadURL string `json:"download_url,omitempty"` + + // is expose + IsExpose bool `json:"is_expose,omitempty"` + + // is protected + IsProtected bool `json:"is_protected,omitempty"` + + // processed + Processed bool `json:"processed,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // upload file name + UploadFileName string `json:"upload_file_name,omitempty"` + + // upload file size + UploadFileSize int64 `json:"upload_file_size,omitempty"` + + // upload url + UploadURL string `json:"upload_url,omitempty"` +} + +// Validate validates this v0 provision profile response item model +func (m *V0ProvisionProfileResponseItemModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 provision profile response item model based on context it is used +func (m *V0ProvisionProfileResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProvisionProfileResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProvisionProfileResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0ProvisionProfileResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_provision_profile_response_model.go b/go/models/v0_provision_profile_response_model.go new file mode 100644 index 0000000..fcb16d8 --- /dev/null +++ b/go/models/v0_provision_profile_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ProvisionProfileResponseModel v0 provision profile response model +// +// swagger:model v0.ProvisionProfileResponseModel +type V0ProvisionProfileResponseModel struct { + + // data + Data *V0ProvisionProfileResponseItemModel `json:"data,omitempty"` +} + +// Validate validates this v0 provision profile response model +func (m *V0ProvisionProfileResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ProvisionProfileResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 provision profile response model based on the context it is used +func (m *V0ProvisionProfileResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ProvisionProfileResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProvisionProfileResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProvisionProfileResponseModel) UnmarshalBinary(b []byte) error { + var res V0ProvisionProfileResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_provision_profile_upload_params.go b/go/models/v0_provision_profile_upload_params.go new file mode 100644 index 0000000..22ceb18 --- /dev/null +++ b/go/models/v0_provision_profile_upload_params.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0ProvisionProfileUploadParams v0 provision profile upload params +// +// swagger:model v0.ProvisionProfileUploadParams +type V0ProvisionProfileUploadParams struct { + + // upload file name + // Required: true + UploadFileName *string `json:"upload_file_name"` + + // upload file size + // Required: true + UploadFileSize *int64 `json:"upload_file_size"` +} + +// Validate validates this v0 provision profile upload params +func (m *V0ProvisionProfileUploadParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUploadFileName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUploadFileSize(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0ProvisionProfileUploadParams) validateUploadFileName(formats strfmt.Registry) error { + + if err := validate.Required("upload_file_name", "body", m.UploadFileName); err != nil { + return err + } + + return nil +} + +func (m *V0ProvisionProfileUploadParams) validateUploadFileSize(formats strfmt.Registry) error { + + if err := validate.Required("upload_file_size", "body", m.UploadFileSize); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 provision profile upload params based on context it is used +func (m *V0ProvisionProfileUploadParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProvisionProfileUploadParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProvisionProfileUploadParams) UnmarshalBinary(b []byte) error { + var res V0ProvisionProfileUploadParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_proxy_error_resp_model.go b/go/models/v0_proxy_error_resp_model.go new file mode 100644 index 0000000..6c756f7 --- /dev/null +++ b/go/models/v0_proxy_error_resp_model.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0ProxyErrorRespModel v0 proxy error resp model +// +// swagger:model v0.ProxyErrorRespModel +type V0ProxyErrorRespModel struct { + + // error msg + ErrorMsg string `json:"error_msg,omitempty"` +} + +// Validate validates this v0 proxy error resp model +func (m *V0ProxyErrorRespModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 proxy error resp model based on context it is used +func (m *V0ProxyErrorRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0ProxyErrorRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0ProxyErrorRespModel) UnmarshalBinary(b []byte) error { + var res V0ProxyErrorRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_ssh_key_resp_model.go b/go/models/v0_ssh_key_resp_model.go new file mode 100644 index 0000000..1777586 --- /dev/null +++ b/go/models/v0_ssh_key_resp_model.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0SSHKeyRespModel v0 SSH key resp model +// +// swagger:model v0.SSHKeyRespModel +type V0SSHKeyRespModel struct { + + // status + Status string `json:"status,omitempty"` +} + +// Validate validates this v0 SSH key resp model +func (m *V0SSHKeyRespModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 SSH key resp model based on context it is used +func (m *V0SSHKeyRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0SSHKeyRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0SSHKeyRespModel) UnmarshalBinary(b []byte) error { + var res V0SSHKeyRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_ssh_key_upload_params.go b/go/models/v0_ssh_key_upload_params.go new file mode 100644 index 0000000..cda64c6 --- /dev/null +++ b/go/models/v0_ssh_key_upload_params.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V0SSHKeyUploadParams v0 SSH key upload params +// +// swagger:model v0.SSHKeyUploadParams +type V0SSHKeyUploadParams struct { + + // The private part of the SSH key you would like to use + // Required: true + AuthSSHPrivateKey *string `json:"auth_ssh_private_key"` + + // The public part of the SSH key you would like to use + // Required: true + AuthSSHPublicKey *string `json:"auth_ssh_public_key"` + + // If it's set to true, the provided SSH key will be registered at the provider of the application + IsRegisterKeyIntoProviderService bool `json:"is_register_key_into_provider_service,omitempty"` +} + +// Validate validates this v0 SSH key upload params +func (m *V0SSHKeyUploadParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthSSHPrivateKey(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAuthSSHPublicKey(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0SSHKeyUploadParams) validateAuthSSHPrivateKey(formats strfmt.Registry) error { + + if err := validate.Required("auth_ssh_private_key", "body", m.AuthSSHPrivateKey); err != nil { + return err + } + + return nil +} + +func (m *V0SSHKeyUploadParams) validateAuthSSHPublicKey(formats strfmt.Registry) error { + + if err := validate.Required("auth_ssh_public_key", "body", m.AuthSSHPublicKey); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v0 SSH key upload params based on context it is used +func (m *V0SSHKeyUploadParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0SSHKeyUploadParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0SSHKeyUploadParams) UnmarshalBinary(b []byte) error { + var res V0SSHKeyUploadParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_test_device_list_response_model.go b/go/models/v0_test_device_list_response_model.go new file mode 100644 index 0000000..cdfd0cf --- /dev/null +++ b/go/models/v0_test_device_list_response_model.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0TestDeviceListResponseModel v0 test device list response model +// +// swagger:model v0.TestDeviceListResponseModel +type V0TestDeviceListResponseModel struct { + + // data + Data []*V0TestDeviceResponseItemModel `json:"data"` +} + +// Validate validates this v0 test device list response model +func (m *V0TestDeviceListResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0TestDeviceListResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v0 test device list response model based on the context it is used +func (m *V0TestDeviceListResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0TestDeviceListResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0TestDeviceListResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0TestDeviceListResponseModel) UnmarshalBinary(b []byte) error { + var res V0TestDeviceListResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_test_device_response_item_model.go b/go/models/v0_test_device_response_item_model.go new file mode 100644 index 0000000..7f05702 --- /dev/null +++ b/go/models/v0_test_device_response_item_model.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0TestDeviceResponseItemModel v0 test device response item model +// +// swagger:model v0.TestDeviceResponseItemModel +type V0TestDeviceResponseItemModel struct { + + // device id + DeviceID string `json:"device_id,omitempty"` + + // device type + DeviceType string `json:"device_type,omitempty"` + + // owner + Owner string `json:"owner,omitempty"` +} + +// Validate validates this v0 test device response item model +func (m *V0TestDeviceResponseItemModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 test device response item model based on context it is used +func (m *V0TestDeviceResponseItemModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0TestDeviceResponseItemModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0TestDeviceResponseItemModel) UnmarshalBinary(b []byte) error { + var res V0TestDeviceResponseItemModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_user_plan_data_model.go b/go/models/v0_user_plan_data_model.go new file mode 100644 index 0000000..f755af0 --- /dev/null +++ b/go/models/v0_user_plan_data_model.go @@ -0,0 +1,145 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0UserPlanDataModel v0 user plan data model +// +// swagger:model v0.UserPlanDataModel +type V0UserPlanDataModel struct { + + // current plan + CurrentPlan *V0PlanDataModel `json:"current_plan,omitempty"` + + // pending plan + PendingPlan *V0PlanDataModel `json:"pending_plan,omitempty"` + + // trial expires at + TrialExpiresAt string `json:"trial_expires_at,omitempty"` +} + +// Validate validates this v0 user plan data model +func (m *V0UserPlanDataModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCurrentPlan(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePendingPlan(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0UserPlanDataModel) validateCurrentPlan(formats strfmt.Registry) error { + if swag.IsZero(m.CurrentPlan) { // not required + return nil + } + + if m.CurrentPlan != nil { + if err := m.CurrentPlan.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("current_plan") + } + return err + } + } + + return nil +} + +func (m *V0UserPlanDataModel) validatePendingPlan(formats strfmt.Registry) error { + if swag.IsZero(m.PendingPlan) { // not required + return nil + } + + if m.PendingPlan != nil { + if err := m.PendingPlan.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pending_plan") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 user plan data model based on the context it is used +func (m *V0UserPlanDataModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCurrentPlan(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePendingPlan(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0UserPlanDataModel) contextValidateCurrentPlan(ctx context.Context, formats strfmt.Registry) error { + + if m.CurrentPlan != nil { + if err := m.CurrentPlan.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("current_plan") + } + return err + } + } + + return nil +} + +func (m *V0UserPlanDataModel) contextValidatePendingPlan(ctx context.Context, formats strfmt.Registry) error { + + if m.PendingPlan != nil { + if err := m.PendingPlan.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pending_plan") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0UserPlanDataModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0UserPlanDataModel) UnmarshalBinary(b []byte) error { + var res V0UserPlanDataModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_user_plan_resp_model.go b/go/models/v0_user_plan_resp_model.go new file mode 100644 index 0000000..aba9355 --- /dev/null +++ b/go/models/v0_user_plan_resp_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0UserPlanRespModel v0 user plan resp model +// +// swagger:model v0.UserPlanRespModel +type V0UserPlanRespModel struct { + + // data + Data *V0UserPlanDataModel `json:"data,omitempty"` +} + +// Validate validates this v0 user plan resp model +func (m *V0UserPlanRespModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0UserPlanRespModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 user plan resp model based on the context it is used +func (m *V0UserPlanRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0UserPlanRespModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0UserPlanRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0UserPlanRespModel) UnmarshalBinary(b []byte) error { + var res V0UserPlanRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_user_profile_data_model.go b/go/models/v0_user_profile_data_model.go new file mode 100644 index 0000000..f6ecfb5 --- /dev/null +++ b/go/models/v0_user_profile_data_model.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0UserProfileDataModel v0 user profile data model +// +// swagger:model v0.UserProfileDataModel +type V0UserProfileDataModel struct { + + // avatar url + AvatarURL string `json:"avatar_url,omitempty"` + + // created at + CreatedAt string `json:"created_at,omitempty"` + + // data id + DataID int64 `json:"data_id,omitempty"` + + // email + Email string `json:"email,omitempty"` + + // has used organization trial + HasUsedOrganizationTrial bool `json:"has_used_organization_trial,omitempty"` + + // payment processor + PaymentProcessor string `json:"payment_processor,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // unconfirmed email + UnconfirmedEmail string `json:"unconfirmed_email,omitempty"` + + // username + Username string `json:"username,omitempty"` +} + +// Validate validates this v0 user profile data model +func (m *V0UserProfileDataModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 user profile data model based on context it is used +func (m *V0UserProfileDataModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0UserProfileDataModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0UserProfileDataModel) UnmarshalBinary(b []byte) error { + var res V0UserProfileDataModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_user_profile_resp_model.go b/go/models/v0_user_profile_resp_model.go new file mode 100644 index 0000000..d71dafd --- /dev/null +++ b/go/models/v0_user_profile_resp_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0UserProfileRespModel v0 user profile resp model +// +// swagger:model v0.UserProfileRespModel +type V0UserProfileRespModel struct { + + // data + Data *V0UserProfileDataModel `json:"data,omitempty"` +} + +// Validate validates this v0 user profile resp model +func (m *V0UserProfileRespModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0UserProfileRespModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 user profile resp model based on the context it is used +func (m *V0UserProfileRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0UserProfileRespModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0UserProfileRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0UserProfileRespModel) UnmarshalBinary(b []byte) error { + var res V0UserProfileRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_webhook_delivery_item_response_model.go b/go/models/v0_webhook_delivery_item_response_model.go new file mode 100644 index 0000000..1a98421 --- /dev/null +++ b/go/models/v0_webhook_delivery_item_response_model.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0WebhookDeliveryItemResponseModel v0 webhook delivery item response model +// +// swagger:model v0.WebhookDeliveryItemResponseModel +type V0WebhookDeliveryItemResponseModel struct { + + // created at + CreatedAt string `json:"created_at,omitempty"` + + // request headers + RequestHeaders string `json:"request_headers,omitempty"` + + // request payload + RequestPayload string `json:"request_payload,omitempty"` + + // request url + RequestURL string `json:"request_url,omitempty"` + + // response body + ResponseBody *NullsString `json:"response_body,omitempty"` + + // response headers + ResponseHeaders *NullsString `json:"response_headers,omitempty"` + + // response http status + ResponseHTTPStatus NullsInt64 `json:"response_http_status,omitempty"` + + // response seconds + ResponseSeconds NullsInt64 `json:"response_seconds,omitempty"` + + // slug + Slug string `json:"slug,omitempty"` + + // updated at + UpdatedAt string `json:"updated_at,omitempty"` +} + +// Validate validates this v0 webhook delivery item response model +func (m *V0WebhookDeliveryItemResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResponseBody(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResponseHeaders(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0WebhookDeliveryItemResponseModel) validateResponseBody(formats strfmt.Registry) error { + if swag.IsZero(m.ResponseBody) { // not required + return nil + } + + if m.ResponseBody != nil { + if err := m.ResponseBody.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("response_body") + } + return err + } + } + + return nil +} + +func (m *V0WebhookDeliveryItemResponseModel) validateResponseHeaders(formats strfmt.Registry) error { + if swag.IsZero(m.ResponseHeaders) { // not required + return nil + } + + if m.ResponseHeaders != nil { + if err := m.ResponseHeaders.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("response_headers") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 webhook delivery item response model based on the context it is used +func (m *V0WebhookDeliveryItemResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResponseBody(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResponseHeaders(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0WebhookDeliveryItemResponseModel) contextValidateResponseBody(ctx context.Context, formats strfmt.Registry) error { + + if m.ResponseBody != nil { + if err := m.ResponseBody.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("response_body") + } + return err + } + } + + return nil +} + +func (m *V0WebhookDeliveryItemResponseModel) contextValidateResponseHeaders(ctx context.Context, formats strfmt.Registry) error { + + if m.ResponseHeaders != nil { + if err := m.ResponseHeaders.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("response_headers") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0WebhookDeliveryItemResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0WebhookDeliveryItemResponseModel) UnmarshalBinary(b []byte) error { + var res V0WebhookDeliveryItemResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_webhook_delivery_item_show_response_model.go b/go/models/v0_webhook_delivery_item_show_response_model.go new file mode 100644 index 0000000..d70c41e --- /dev/null +++ b/go/models/v0_webhook_delivery_item_show_response_model.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0WebhookDeliveryItemShowResponseModel v0 webhook delivery item show response model +// +// swagger:model v0.WebhookDeliveryItemShowResponseModel +type V0WebhookDeliveryItemShowResponseModel struct { + + // data + Data *V0WebhookDeliveryItemResponseModel `json:"data,omitempty"` +} + +// Validate validates this v0 webhook delivery item show response model +func (m *V0WebhookDeliveryItemShowResponseModel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0WebhookDeliveryItemShowResponseModel) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + if m.Data != nil { + if err := m.Data.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v0 webhook delivery item show response model based on the context it is used +func (m *V0WebhookDeliveryItemShowResponseModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateData(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V0WebhookDeliveryItemShowResponseModel) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + if m.Data != nil { + if err := m.Data.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V0WebhookDeliveryItemShowResponseModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0WebhookDeliveryItemShowResponseModel) UnmarshalBinary(b []byte) error { + var res V0WebhookDeliveryItemShowResponseModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/models/v0_webhook_resp_model.go b/go/models/v0_webhook_resp_model.go new file mode 100644 index 0000000..9489bf3 --- /dev/null +++ b/go/models/v0_webhook_resp_model.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V0WebhookRespModel v0 webhook resp model +// +// swagger:model v0.WebhookRespModel +type V0WebhookRespModel struct { + + // status + Status string `json:"status,omitempty"` +} + +// Validate validates this v0 webhook resp model +func (m *V0WebhookRespModel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v0 webhook resp model based on context it is used +func (m *V0WebhookRespModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V0WebhookRespModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V0WebhookRespModel) UnmarshalBinary(b []byte) error { + var res V0WebhookRespModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/staffbase.patch b/staffbase.patch new file mode 100644 index 0000000..cc467f0 --- /dev/null +++ b/staffbase.patch @@ -0,0 +1,22 @@ +--- swagger.json 2021-03-01 12:52:57.000000000 +0100 ++++ swagger_patched.json 2021-03-01 14:19:36.202586579 +0100 +@@ -1683,7 +1683,7 @@ + } + ], + "responses": { +- "200": { ++ "201": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildTriggerRespModel" +@@ -5233,6 +5233,10 @@ + "type": { + "description": "It has to be provided by legacy reasons and has to have the `git` value", + "type": "string" ++ }, ++ "organization_slug": { ++ "description": "Property added by SouthPark as this is missing within open-api spec. This can be removed/ should be here on (re-)download when bitrise has fixed it", ++ "type": "string" + } + } + }, diff --git a/swagger.json b/swagger.json new file mode 100644 index 0000000..ae7a12e --- /dev/null +++ b/swagger.json @@ -0,0 +1,6688 @@ +{ + "schemes": [ + "https" + ], + "swagger": "2.0", + "info": { + "description": "Official REST API for Bitrise.io", + "title": "Bitrise API", + "contact": { + "name": "Bitrise Support", + "url": "https://www.bitrise.io/contact", + "email": "letsconnect@bitrise.io" + }, + "license": { + "name": "MIT" + }, + "version": "0.1" + }, + "host": "api.bitrise.io", + "basePath": "/v0.1", + "paths": { + "/addons": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the available Bitrise addons", + "produces": [ + "application/json" + ], + "tags": [ + "addons" + ], + "summary": "Get list of available Bitrise addons", + "operationId": "addons-list", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AddonsListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/addons/{addon-id}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Show details of a specific Bitrise addon", + "produces": [ + "application/json" + ], + "tags": [ + "addons" + ], + "summary": "Get a specific Bitrise addon", + "operationId": "addons-show", + "parameters": [ + { + "type": "string", + "description": "Addon ID", + "name": "addon-id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AddonsShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the apps available for the authenticated account, including those that are owned by other users or Organizations.", + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Get list of the apps", + "operationId": "app-list", + "parameters": [ + { + "enum": [ + "last_build_at", + "created_at" + ], + "type": "string", + "description": "Order of the applications: sort them based on when they were created or the time of their last build", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "Slug of the first app in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/register": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Add a new app to Bitrise. This is the first step of the app registration process. To successfully set it up, you need to provide the required app parameters: your git provider, the repository URL, the slug of the repository as it appears at the provider, and the slug of the owner of the repository. Read more about the app creation process in our [detailed guide](https://devcenter.bitrise.io/api/adding-and-managing-apps/#adding-a-new-app).", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Add a new app", + "operationId": "app-create", + "parameters": [ + { + "description": "App parameters", + "name": "app", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppUploadParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Get the details of a specific app by providing the app slug. You can get the app slug by calling the [/apps](https://api-docs.bitrise.io/#/application/app-list) endpoint or by opening the app on bitrise.io and copying the slug from the URL.", + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Get a specific app", + "operationId": "app-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/addons": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the provisioned addons for the authorized apps", + "produces": [ + "application/json" + ], + "tags": [ + "addons" + ], + "summary": "Get list of the addons for apps", + "operationId": "addon-list-by-app", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppAddOnsListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/android-keystore-files": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the android keystore files that have been uploaded to a specific app.", + "produces": [ + "application/json" + ], + "tags": [ + "android-keystore-file" + ], + "summary": "Get a list of the android keystore files", + "operationId": "android-keystore-file-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first android keystore file in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of build certificates per page is 50.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Add a new Android keystore file to an app", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "android-keystore-file" + ], + "summary": "Create an Android keystore file", + "operationId": "android-keystore-file-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Android keystore file parameters", + "name": "android-keystore-file", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AndroidKeystoreFileUploadParams" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/avatar-candidates": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Add new avatar candidates to a specific app", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "avatar-candidate" + ], + "summary": "Create avatar candidates", + "operationId": "avatar-candidate-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Avatar candidate parameters", + "name": "avatar-candidate", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AvatarCandidateCreateParams" + } + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AvatarCandidateCreateResponseItem" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/avatar-candidates/{avatar-slug}": { + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Promotes an avatar candidate for an app", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "avatar-candidate" + ], + "summary": "Promote an avatar candidate", + "operationId": "avatar-candidate-promote", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Avatar candidate slug", + "name": "avatar-slug", + "in": "path", + "required": true + }, + { + "description": "Avatar promote parameters", + "name": "avatar-promote-params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AvatarPromoteParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AvatarPromoteResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/bitrise.yml": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Get the full `bitrise.yml` configuration of an application, by providing the app slug. It returns the current `bitrise.yml` that is stored on bitrise.io in full, including the trigger map, the different workflows and the Steps.", + "produces": [ + "text/plain" + ], + "tags": [ + "application" + ], + "summary": "Get bitrise.yml of a specific app", + "operationId": "app-config-datastore-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{the bitrise.yml in yml format}", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Upload a new bitrise.yml for your application.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Upload a new bitrise.yml for your application.", + "operationId": "app-config-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "App config parameters", + "name": "app-config", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppConfigRequestParam" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppConfigRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/v0.ProxyErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/branches": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Lists only those branches of a specified Bitrise app that have existing builds.", + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "List the branches with existing builds of an app's repository", + "operationId": "branch-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BranchListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-certificates": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the build certificates that have been uploaded to a specific app. Read more in our [Listing the uploaded iOS code signing files of an app](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#listing-the-uploaded-ios-code-signing-files-of-an-app) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Get a list of the build certificates", + "operationId": "build-certificate-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first build certificate in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of build certificates per page is 50.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Create a temporary pre-signed upload URL for the build certificate and upload the file to AWS with a simple `curl` request. To complete the uploading process and view your files on the Code Signing tab of your app, continue with the [POST /apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded](https://api-docs.bitrise.io/#/build-certificate/build-certificate-confirm) endpoint. Read more in our [Creating and uploading an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#creating--uploading-an-ios-code-signing-file) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Create a build certificate", + "operationId": "build-certificate-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Build certificate parameters such as file name and its file size", + "name": "build-certificate", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BuildCertificateUploadParams" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-certificates/{build-certificate-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Retrieve data of a specific build certificate. You can fetch the build certificate slug for this endpoint if you first call the [GET /apps/{app-slug}/build-certificates](https://api-docs.bitrise.io/#/build-certificate/build-certificate-list) endpoint to list all available build certificates of an app. Read more in our [Getting a specific iOS code signing file's data](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#getting-a-specific-ios-code-signing-files-data) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Get a specific build certificate", + "operationId": "build-certificate-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build certificate slug", + "name": "build-certificate-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Delete an app's build certificate. You can fetch the build certificate slug for this endpoint if you first call the [GET /apps/{app-slug}/build-certificates](https://api-docs.bitrise.io/#/build-certificate/build-certificate-list) endpoint to list all available build certificates of an app. Read more in our [Deleting an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#deleting-an-ios-code-signing-file) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Delete a build certificate", + "operationId": "build-certificate-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build certificate slug", + "name": "build-certificate-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update an uploaded build certificate's attributes. You can fetch the build certificate slug for this endpoint if you first call the [GET /apps/{app-slug}/build-certificates](https://api-docs.bitrise.io/#/build-certificate/build-certificate-list) endpoint. Read more in our [Updating an uploaded iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Update a build certificate", + "operationId": "build-certificate-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build certificate slug", + "name": "build-certificate-slug", + "in": "path", + "required": true + }, + { + "description": "Build certificate parameters", + "name": "build-certificate", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BuildCertificateUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "This is the last step of uploading a build certificate to Bitrise. Confirm the build certificate upload and view the file on the Code Signing tab of a specific app. Read more in our [Confirming the iOS code signing file upload](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Confirm a build certificate upload", + "operationId": "build-certificate-confirm", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build certificate slug", + "name": "build-certificate-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-requests": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List the existing open build requests of a specified Bitrise app", + "produces": [ + "application/json" + ], + "tags": [ + "build-request" + ], + "summary": "List the open build requests for an app", + "operationId": "build-request-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildRequestListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-requests/{build-request-slug}": { + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update a specific build request of a specific app", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "build-request" + ], + "summary": "Update a build request", + "operationId": "build-request-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build request slug", + "name": "build-request-slug", + "in": "path", + "required": true + }, + { + "description": "Build request parameters", + "name": "build-request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BuildRequestUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildRequestUpdateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-workflows": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List the workflows that were triggered at any time for a given Bitrise app. Note that it might list workflows that are currently not defined in the app's `bitrise.yml` configuration - and conversely, workflows that were never triggered will not be listed even if they are defined in the `bitrise.yml` file.", + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "List the workflows of an app", + "operationId": "build-workflow-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildWorkflowListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the builds of a specified Bitrise app. Set parameters to filter builds: for example, you can search for builds run with a given workflow or all builds that were triggered by Pull Requests. It returns all the relevant data of the build.", + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "List all builds of an app", + "operationId": "build-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "enum": [ + "running_first", + "created_at" + ], + "type": "string", + "description": "Order of builds: sort them based on when they were created or the time when they were triggered", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "The branch which was built", + "name": "branch", + "in": "query" + }, + { + "type": "string", + "description": "The name of the workflow used for the build", + "name": "workflow", + "in": "query" + }, + { + "type": "string", + "description": "The commit message of the build", + "name": "commit_message", + "in": "query" + }, + { + "type": "string", + "description": "The event that triggered the build (push, pull-request, tag)", + "name": "trigger_event_type", + "in": "query" + }, + { + "type": "integer", + "description": "The id of the pull request that triggered the build", + "name": "pull_request_id", + "in": "query" + }, + { + "type": "integer", + "description": "The build number", + "name": "build_number", + "in": "query" + }, + { + "type": "integer", + "description": "List builds run after a given date (Unix Timestamp)", + "name": "after", + "in": "query" + }, + { + "type": "integer", + "description": "List builds run before a given date (Unix Timestamp)", + "name": "before", + "in": "query" + }, + { + "maximum": 4, + "type": "integer", + "description": "The status of the build: not finished (0), successful (1), failed (2), aborted with failure (3), aborted with success (4)", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "Slug of the first build in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Trigger a new build. Specify an app slug and at least one parameter out of three: a git tag or git commit hash, a branch, or a workflow ID. You can also set specific parameters for Pull Request builds and define additional environment variables for your build. [Check out our detailed guide](https://devcenter.bitrise.io/api/build-trigger/).", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "Trigger a new build", + "operationId": "build-trigger", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Build trigger parameters", + "name": "build_params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BuildTriggerParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildTriggerRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Get the specified build of a given Bitrise app. You need to provide both an app slug and a build slug. You can get the build slug either by calling the [/builds](https://api-docs.bitrise.io/#/builds/build-list) endpoint or by clicking on the build on bitrise.io and copying the slug from the URL. The endpoint returns all the relevant data of the build.", + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "Get a build of a given app", + "operationId": "build-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}/abort": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Abort a specific build. Set an abort reason with the `abort_reason` parameter. Use the `abort_with_success` parameter to abort a build but still count it as a successful one.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "Abort a specific build", + "operationId": "build-abort", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + }, + { + "description": "Build abort parameters", + "name": "build-abort-params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BuildAbortParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildAbortResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}/artifacts": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all build artifacts that have been generated for an app's build. You can use the created build artifact slugs from the response output to retrieve data of a specific build artifact with the [GET/apps/](https://api-docs.bitrise.io/#/build-artifact/artifact-show) endpoint or update a build artifact with the [PATCH/apps](https://api-docs.bitrise.io/#/build-artifact/artifact-update) endpoint.", + "produces": [ + "application/json" + ], + "tags": [ + "build-artifact" + ], + "summary": "Get a list of all build artifacts", + "operationId": "artifact-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first build artifact in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of build artifacts per page is 50.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ArtifactListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Retrieve data of a specific build artifact. The response output contains a time-limited download url (expires in 10 minutes) and a public install page URL. You can view the build artifact with both URLs, but the public install page url will not work unless you [enable it](https://devcenter.bitrise.io/tutorials/deploy/bitrise-app-deployment/#enabling-public-page-for-the-app).", + "produces": [ + "application/json" + ], + "tags": [ + "build-artifact" + ], + "summary": "Get a specific build artifact", + "operationId": "artifact-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Artifact slug", + "name": "artifact-slug", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Setting this will result in a redirect to the artifact download location", + "name": "download", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ArtifactShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Delete a build artifact of an app's build. The required parameters are app slug, build slug and artifact slug. You can fetch the build artifact slug if you first list all build artifacts of an app with the [/apps/](https://api-docs.bitrise.io/#/build-artifact/artifact-list) endpoint.", + "produces": [ + "application/json" + ], + "tags": [ + "build-artifact" + ], + "summary": "Delete a build artifact", + "operationId": "artifact-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Artifact slug", + "name": "artifact-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ArtifactDeleteResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update the `is_public_page_enabled` attribute of your app's build. The required parameters are app slug, build slug and artifact slug. You can fetch the build artifact slug if you first list all build artifacts of an app with the [GET /apps/](https://api-docs.bitrise.io/#/build-artifact/artifact-list) endpoint.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "build-artifact" + ], + "summary": "Update a build artifact", + "operationId": "artifact-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Artifact slug", + "name": "artifact-slug", + "in": "path", + "required": true + }, + { + "description": "Artifact parameters", + "name": "artifact-params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.ArtifactUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ArtifactShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}/bitrise.yml": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Get the bitrise.yml file of one of the builds of a given app. This will return the `bitrise.yml` configuration with which the build ran. You can compare it to [the current bitrise.yml configuration](https://api-docs.bitrise.io/#/application/app-config-datastore-show) of the app.", + "produces": [ + "text/plain" + ], + "tags": [ + "builds" + ], + "summary": "Get the bitrise.yml of a build", + "operationId": "build-bitrise-yml-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{the bitrise.yml in yml format}", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}/log": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Get the build log of a specified build of a Bitrise app. You can get the build slug either by calling the [/builds](https://api-docs.bitrise.io/#/builds/build-list) endpoint or by clicking on the build on bitrise.io and copying the slug from the URL.", + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "Get the build log of a build", + "operationId": "build-log", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildLogInfoResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/finish": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Save the application after registering it on Bitrise and registering an SSH key (and, optionally, adding a webhook). With this endpoint you can define the initial configuration, define application-level environment variables, determine the project type, and set an Organization to be the owner of the app. Read more about the app registration process in our [detailed guide](https://devcenter.bitrise.io/api/adding-and-managing-apps/#adding-a-new-app).", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Save the application at the end of the app registration process", + "operationId": "app-finish", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "App finish parameters", + "name": "app", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppFinishParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppFinishRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/generic-project-files": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the generic project files that have been uploaded to a specific app. Read more in our [Listing the uploaded files of an app](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#listing-the-uploaded-files-of-an-app) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Get a list of the generic project files", + "operationId": "generic-project-file-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first generic project file in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of build certificates per page is 50.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Create a temporary pre-signed upload URL (expires in 10 minutes) for the generic project file and upload it to AWS with a simple `curl` request. To complete the uploading process and view your files on the Code Signing tab of your app, continue with the [POST /apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-confirm) endpoint. Read more in our [Creating and uploading files to Generic File Storage](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#creating-and-uploading-files-to-generic-file-storage) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Create a generic project file", + "operationId": "generic-project-files-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Generic project file parameters", + "name": "generic-project-file", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageUploadParams" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/generic-project-files/{generic-project-file-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Retrieve data of a specific generic project file to check its attributes and optionally modify them with the [PATCH /apps/](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-update) endpoint. Read more in our [Retrieving a specific file's data](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#retrieving-a-specific-files-data) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Get a specific generic project file", + "operationId": "generic-project-file-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Generic project file slug", + "name": "generic-project-file-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Delete an app's generic project file. You can fetch an app's generic project file slug if you first list all the uploaded files with the [GET /apps/{app-slug}/generic-project-files](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-list) endpoint. Read more in our [Deleting a file](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#deleting-a-file) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Delete a generic project file", + "operationId": "generic-project-file-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Generic project file slug", + "name": "generic-project-file-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update a generic project file's attributes. You can fetch an app's generic project file slug if you first list all the uploaded files with the [GET /apps/{app-slug}/generic-project-files](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-list) endpoint. Read more in our [Updating an uploaded file](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#updating-an-uploaded-file) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Update a generic project file", + "operationId": "generic-project-file-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Generic project file slug", + "name": "generic-project-file-slug", + "in": "path", + "required": true + }, + { + "description": "Generic project file parameters", + "name": "generic-project-file", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageDocumentUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "This is the last step of uploading a generic project file to Bitrise. Confirm the generic project file upload and view the file on the Code Signing tab of a specific app. Read more in our [Confirming the upload](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#confirming-the-file-upload) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Confirm a generic project file upload", + "operationId": "generic-project-file-confirm", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Generic project file slug", + "name": "generic-project-file-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/outgoing-webhooks": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the outgoing webhooks registered for a specified Bitrise app. This returns all the relevant data of the webhook, including the slug of the webhook and its URL.", + "produces": [ + "application/json" + ], + "tags": [ + "outgoing-webhook" + ], + "summary": "List the outgoing webhooks of an app", + "operationId": "outgoing-webhook-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first webhook in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppWebhookListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Create an outgoing webhook for a specified Bitrise app: this can be used to send build events to a specified URL with custom headers. Currently, only build events can trigger outgoing webhooks.", + "produces": [ + "application/json" + ], + "tags": [ + "outgoing-webhook" + ], + "summary": "Create an outgoing webhook for an app", + "operationId": "outgoing-webhook-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "App webhook creation params", + "name": "app-webhook-create-params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppWebhookCreateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppWebhookCreatedResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}": { + "put": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update an existing outgoing webhook (URL, events, secrets and headers) for a specified Bitrise app. Even if you do not want to change one of the parameters, you still have to provide that parameter as well: simply use its existing value.", + "produces": [ + "application/json" + ], + "tags": [ + "outgoing-webhook" + ], + "summary": "Update an outgoing webhook of an app", + "operationId": "outgoing-webhook-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App webhook slug", + "name": "app-webhook-slug", + "in": "path", + "required": true + }, + { + "description": "App webhook update params", + "name": "app-webhook-update-params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppWebhookUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppWebhookResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Delete an existing outgoing webhook for a specified Bitrise app.", + "produces": [ + "application/json" + ], + "tags": [ + "outgoing-webhook" + ], + "summary": "Delete an outgoing webhook of an app", + "operationId": "outgoing-webhook-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App webhook slug", + "name": "app-webhook-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppWebhookDeletedResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the delivery items of an outgoing webhook of a Bitrise application", + "produces": [ + "application/json" + ], + "tags": [ + "webhook-delivery-item" + ], + "summary": "List the webhook delivery items of an app", + "operationId": "webhook-delivery-item-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App webhook slug", + "name": "app-webhook-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first delivery item in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.WebhookDeliveryItemShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Get the specified delivery item of an outgoing webhook of a Bitrise application", + "produces": [ + "application/json" + ], + "tags": [ + "webhook-delivery-item" + ], + "summary": "Get a specific delivery item of a webhook", + "operationId": "webhook-delivery-item-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App webhook slug", + "name": "app-webhook-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Webhook delivery item slug", + "name": "webhook-delivery-item-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.WebhookDeliveryItemResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}/redeliver": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Re-deliver the delivery item of a specified webhook of a Bitrise application", + "produces": [ + "application/json" + ], + "tags": [ + "webhook-delivery-item" + ], + "summary": "Re-deliver the webhook delivery items of an app", + "operationId": "webhook-delivery-item-redeliver", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App webhook slug", + "name": "app-webhook-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Webhook delivery item slug", + "name": "webhook-delivery-item-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/provisioning-profiles": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the provisioning profiles that have been uploaded to a specific app. Read more in our [Listing the uploaded iOS code signing files of an app](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#listing-the-uploaded-ios-code-signing-files-of-an-app) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Get a list of the provisioning profiles", + "operationId": "provisioning-profile-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first provisioning profile in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Create a temporary pre-signed upload URL (expires in 10 minutes) for the provisioning profile and upload it to AWS with a simple `curl` request. To complete the upload process, continue with the [POST /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-confirm) endpoint. Read more in our [Creating and uploading an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#creating--uploading-an-ios-code-signing-file) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Create a provisioning profile", + "operationId": "provisioning-profile-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Provisioning profile parameters such as file name and file size", + "name": "provisioning-profile", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileUploadParams" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Retrieve data of a specific provisioning profile. You can fetch the provisioning profile's slug if you call the [GET /apps/{app-slug}/provisioning-profiles](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-list) endpoint. Read more in our [Getting a specific iOS code signing file's data](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#getting-a-specific-ios-code-signing-files-data) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Get a specific provisioning profile", + "operationId": "provisioning-profile-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Provisioning profile slug", + "name": "provisioning-profile-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Delete an app's provisioning profile. You can fetch the provisioning profile's slug if you call the [GET /apps/{app-slug}/provisioning-profiles](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-list) endpoint. Read more in our [Deleting an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#deleting-an-ios-code-signing-file) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Delete a provisioning profile", + "operationId": "provisioning-profile-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Provisioning profile slug", + "name": "provisioning-profile-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update an uploaded provisioning profile's attributes. You can fetch the provisioning profile's slug if you call the [GET /apps/{app-slug}/provisioning-profiles](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-list) endpoint. Read more in our [Updating an uploaded iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Update a provisioning profile", + "operationId": "provisioning-profile-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Provisioning profile slug", + "name": "provisioning-profile-slug", + "in": "path", + "required": true + }, + { + "description": "Provisioning profile parameters", + "name": "provisioning-profile", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.ProvProfileDocumentUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "This is the last step of the upload process. Confirm the provisioning profile upload and view the file on the Code Signing tab of a specific app. Read more in our [Confirming the iOS code signing file upload](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Confirm a provisioning profile upload", + "operationId": "provisioning-profile-confirm", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Provisioning profile slug", + "name": "provisioning-profile-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/register-ssh-key": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Add an SSH-key to a specific app. After creating an app, you need to register the SSH key so that Bitrise will be able to access and clone your repository during the build process. This requires the app slug of your newly created app.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Add an SSH-key to a specific app", + "operationId": "ssh-key-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "SSH key parameters", + "name": "ssh-key", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.SSHKeyUploadParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.SSHKeyRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/register-webhook": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "[Register an incoming webhook](https://devcenter.bitrise.io/api/incoming-and-outgoing-webhooks/#incoming-webhooks) for a specific application. You can do this during the app registration process or at any other time in an app's life. When calling this endpoint, a webhook is registered at your git provider: this is necessary to automatically trigger builds on Bitrise.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Register an incoming webhook for a specific application", + "operationId": "app-webhook-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.WebhookRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/test-devices": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List registered test devices of all members of a specified Bitrise app", + "produces": [ + "application/json" + ], + "tags": [ + "test-devices" + ], + "summary": "List the test devices for an app", + "operationId": "test-device-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.TestDeviceListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/builds": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the Bitrise builds that can be accessed with the authenticated account. Filter builds based on their owner, using the owner slug, or the status of the build.", + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "List all builds", + "operationId": "build-list-all", + "parameters": [ + { + "type": "string", + "description": "The slug of the owner of the app or apps", + "name": "owner_slug", + "in": "query" + }, + { + "type": "boolean", + "description": "Indicates whether the build has started yet (true: the build hasn't started)", + "name": "is_on_hold", + "in": "query" + }, + { + "maximum": 4, + "type": "integer", + "description": "The status of the build: not finished (0), successful (1), failed (2), aborted with failure (3), aborted with success (4)", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "Slug of the first build in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildListAllResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/me": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Shows the authenticated users profile data", + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get your profile data", + "operationId": "user-profile", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.UserProfileRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/me/activities": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the Bitrise activity events", + "produces": [ + "application/json" + ], + "tags": [ + "activity" + ], + "summary": "Get list of Bitrise activity events", + "operationId": "activity-list", + "parameters": [ + { + "type": "string", + "description": "Slug of the first activity event in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ActivityEventListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/me/plan": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Get the subscription of the user: the current plan, any pending plans, and the duration of a trial period if applicable", + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "The subscription plan of the user", + "operationId": "user-plan", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.UserPlanRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/organizations": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all Bitrise organizations that the user is part of", + "produces": [ + "application/json" + ], + "tags": [ + "organizations" + ], + "summary": "List the organizations that the user is part of", + "operationId": "org-list", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.OrganizationListRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/organizations/{org-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Get a specified Bitrise organization that the user is part of.", + "produces": [ + "application/json" + ], + "tags": [ + "organizations" + ], + "summary": "Get a specified organization.", + "operationId": "org-show", + "parameters": [ + { + "type": "string", + "description": "The organization slug", + "name": "org-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.OrganizationRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/organizations/{org-slug}/apps": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the available apps owned by a given organization. [Find the organization URL](https://devcenter.bitrise.io/team-management/organizations/org-url/) of the organisations you are part of; be aware that the endpoint will not return any apps if the authenticated account is not a member of the given organisation.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Get list of the apps for an organization", + "operationId": "app-list-by-organization", + "parameters": [ + { + "type": "string", + "description": "Organization slug", + "name": "org-slug", + "in": "path", + "required": true + }, + { + "enum": [ + "last_build_at", + "created_at" + ], + "type": "string", + "description": "Order of applications: sort them based on when they were created or the time of their last build", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "Slug of the first app in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/organizations/{organization-slug}/addons": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the provisioned addons for organization", + "produces": [ + "application/json" + ], + "tags": [ + "addons" + ], + "summary": "Get list of the addons for organization", + "operationId": "addon-list-by-organization", + "parameters": [ + { + "type": "string", + "description": "Organization slug", + "name": "organization-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.OwnerAddOnsListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/users/{user-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Show information about a specific user", + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a specific user", + "operationId": "user-show", + "parameters": [ + { + "type": "string", + "description": "User slug", + "name": "user-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.UserProfileRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/users/{user-slug}/addons": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the provisioned addons for the authenticated user", + "produces": [ + "application/json" + ], + "tags": [ + "addons" + ], + "summary": "Get list of the addons for user", + "operationId": "addon-list-by-user", + "parameters": [ + { + "type": "string", + "description": "User slug", + "name": "user-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.OwnerAddOnsListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/users/{user-slug}/apple-api-credentials": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List Apple API credentials for a specific Bitrise user", + "produces": [ + "application/json" + ], + "tags": [ + "apple-api-credentials" + ], + "summary": "List Apple API credentials for a specific user", + "operationId": "apple-api-credential-list", + "parameters": [ + { + "type": "string", + "description": "User slug", + "name": "user-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppleAPICredentialsListResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/users/{user-slug}/apps": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the available apps for the given user. It needs the user slug that you can get from the [GET /me](https://api-docs.bitrise.io/#/user/user-profile) endpoint.", + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Get list of the apps for a user", + "operationId": "app-list-by-user", + "parameters": [ + { + "type": "string", + "description": "User slug", + "name": "user-slug", + "in": "path", + "required": true + }, + { + "enum": [ + "last_build_at", + "created_at" + ], + "type": "string", + "description": "Order of applications", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "Slug of the first app in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/v0.1/apps/{app-slug}/avatar-candidates": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all available avatar candidates for an application", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "avatar-candidate" + ], + "summary": "Get list of the avatar candidates", + "operationId": "avatar-candidate-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.FindAvatarCandidateResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + } + }, + "definitions": { + "addons.Addon": { + "type": "object", + "properties": { + "banner_image": { + "type": "string" + }, + "card_header_colors": { + "type": "array", + "items": { + "type": "string" + } + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "developer_links": { + "type": "array", + "items": { + "$ref": "#/definitions/addons.DeveloperLink" + } + }, + "documentation_url": { + "type": "string" + }, + "has_ui": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_beta": { + "type": "boolean" + }, + "plans": { + "type": "array", + "items": { + "$ref": "#/definitions/addons.Plan" + } + }, + "platforms": { + "type": "array", + "items": { + "type": "string" + } + }, + "preview_images": { + "type": "array", + "items": { + "type": "string" + } + }, + "setup_guide": { + "$ref": "#/definitions/addons.SetupGuide" + }, + "subtitle": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "addons.DeveloperLink": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "addons.Feature": { + "type": "object", + "properties": { + "available": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "quantity": { + "type": "string" + } + } + }, + "addons.Plan": { + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "$ref": "#/definitions/addons.Feature" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "price": { + "type": "integer" + } + } + }, + "addons.SetupGuide": { + "type": "object", + "properties": { + "instructions": { + "type": "array", + "items": { + "$ref": "#/definitions/addons.SetupInstruction" + } + }, + "notification": { + "type": "string" + } + } + }, + "addons.SetupInstruction": { + "type": "object", + "properties": { + "card_content": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "nulls.Int64": { + "type": "object" + }, + "nulls.String": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "valid": { + "description": "Valid is true if String is not NULL", + "type": "boolean" + } + } + }, + "service.StandardErrorRespModel": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "v0.ActivityEventListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.ActivityEventResponseItemModel" + } + }, + "paging": { + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.ActivityEventResponseItemModel": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "description": { + "$ref": "#/definitions/nulls.String" + }, + "event_icon": { + "$ref": "#/definitions/nulls.String" + }, + "event_stype": { + "$ref": "#/definitions/nulls.String" + }, + "repository_avatar_icon_url": { + "type": "string" + }, + "repository_title": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "target_path_string": { + "$ref": "#/definitions/nulls.String" + }, + "title": { + "$ref": "#/definitions/nulls.String" + } + } + }, + "v0.AddOnAppResponseItemModel": { + "type": "object", + "properties": { + "icon": { + "$ref": "#/definitions/nulls.String" + }, + "plan": { + "$ref": "#/definitions/addons.Plan" + }, + "plan_started_at": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "v0.AddonsListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/addons.Addon" + } + } + } + }, + "v0.AddonsShowResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/addons.Addon" + } + } + }, + "v0.AndroidKeystoreFileUploadParams": { + "type": "object", + "required": [ + "alias", + "password", + "private_key_password", + "upload_file_name", + "upload_file_size" + ], + "properties": { + "alias": { + "type": "string" + }, + "password": { + "type": "string" + }, + "private_key_password": { + "type": "string" + }, + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + } + } + }, + "v0.AppAddOnResponseItemModel": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "has_ui": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_beta": { + "type": "boolean" + }, + "plan": { + "$ref": "#/definitions/addons.Plan" + }, + "setup_guide": { + "$ref": "#/definitions/addons.SetupGuide" + }, + "summary": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "v0.AppAddOnsListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AppAddOnResponseItemModel" + } + } + } + }, + "v0.AppConfigRequestParam": { + "type": "object", + "required": [ + "app_config_datastore_yaml" + ], + "properties": { + "app_config_datastore_yaml": { + "type": "string" + } + } + }, + "v0.AppConfigRespModel": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "v0.AppFinishParams": { + "type": "object", + "required": [ + "project_type", + "stack_id" + ], + "properties": { + "config": { + "description": "Which config to use `default-android-config`, `default-cordova-config`, `default-fastlane-config`, `default-ionic-config`, `default-ios-config`,`default-macos-config`, `default-react-native-config`, `default-xamarin-config`, `other-config` (default if parameter is not speficied)", + "type": "string" + }, + "envs": { + "description": "Environment variables for the application workflows, e.g. {\"env1\":\"val1\",\"env2\":\"val2\"}", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "mode": { + "description": "config specification mode, has to be specified with `manual` value", + "type": "string" + }, + "organization_slug": { + "description": "The slug of the organization, who will be the owner of the application, if it's not specified, then the authenticated user will be the owner", + "type": "string" + }, + "project_type": { + "description": "The type of your project (`android`, `ios`, `cordova`, `other`, `xamarin`, `macos`, `ionic`, `react-native`, `fastlane`, null)", + "type": "string" + }, + "stack_id": { + "description": "The id of the stack the application will be built (these can be found in the [system report](https://github.com/bitrise-io/bitrise.io/tree/master/system_reports) file names)", + "type": "string" + } + } + }, + "v0.AppFinishRespModel": { + "type": "object", + "properties": { + "branch_name": { + "type": "string" + }, + "build_trigger_token": { + "type": "string" + }, + "is_webhook_auto_reg_supported": { + "type": "boolean" + }, + "status": { + "type": "string" + } + } + }, + "v0.AppListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AppResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.AppRespModel": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "status": { + "type": "string" + } + } + }, + "v0.AppResponseItemModel": { + "type": "object", + "properties": { + "avatar_url": { + "$ref": "#/definitions/nulls.String" + }, + "is_disabled": { + "type": "boolean" + }, + "is_public": { + "type": "boolean" + }, + "owner": { + "$ref": "#/definitions/v0.OwnerAccountResponseModel" + }, + "project_type": { + "$ref": "#/definitions/nulls.String" + }, + "provider": { + "$ref": "#/definitions/nulls.String" + }, + "repo_owner": { + "$ref": "#/definitions/nulls.String" + }, + "repo_slug": { + "$ref": "#/definitions/nulls.String" + }, + "repo_url": { + "$ref": "#/definitions/nulls.String" + }, + "slug": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, + "v0.AppShowResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.AppResponseItemModel" + } + } + }, + "v0.AppUploadParams": { + "type": "object", + "required": [ + "git_owner", + "git_repo_slug", + "is_public", + "provider", + "repo_url", + "type" + ], + "properties": { + "git_owner": { + "description": "The slug of the owner of the repository at the git provider", + "type": "string" + }, + "git_repo_slug": { + "description": "The slug of the repository at the git provider", + "type": "string" + }, + "is_public": { + "description": "If `true` then the repository visibility setting will be public, in case of `false` it will be private", + "type": "boolean" + }, + "provider": { + "description": "The git provider you are using, it can be `github`, `bitbucket`, `gitlab`, `gitlab-self-hosted` or `custom`", + "type": "string" + }, + "repo_url": { + "description": "The URL of your repository", + "type": "string" + }, + "type": { + "description": "It has to be provided by legacy reasons and has to have the `git` value", + "type": "string" + } + } + }, + "v0.AppWebhookCreateParams": { + "type": "object", + "required": [ + "events", + "secret", + "url" + ], + "properties": { + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": { + "type": "array", + "items": { + "type": "integer" + } + }, + "secret": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "v0.AppWebhookCreatedResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.AppWebhookResponseItemModel" + } + } + }, + "v0.AppWebhookDeletedResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.AppWebhookResponseItemModel" + } + } + }, + "v0.AppWebhookListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AppWebhookResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.AppWebhookResponseItemModel": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": { + "type": "array", + "items": { + "type": "integer" + } + }, + "registered_by_addon": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "v0.AppWebhookResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.AppWebhookResponseItemModel" + } + } + }, + "v0.AppWebhookUpdateParams": { + "type": "object", + "required": [ + "events", + "url" + ], + "properties": { + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": { + "type": "array", + "items": { + "type": "integer" + } + }, + "url": { + "type": "string" + } + } + }, + "v0.AppleAPICredentialResponseItem": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "issuer_id": { + "type": "string" + }, + "key_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "v0.AppleAPICredentialsListResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AppleAPICredentialResponseItem" + } + } + } + }, + "v0.ArtifactDeleteResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.ArtifactResponseItemModel" + } + } + }, + "v0.ArtifactListElementResponseModel": { + "type": "object", + "properties": { + "artifact_meta": { + "type": "array", + "items": { + "type": "integer" + } + }, + "artifact_type": { + "$ref": "#/definitions/nulls.String" + }, + "file_size_bytes": { + "type": "integer" + }, + "is_public_page_enabled": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "title": { + "$ref": "#/definitions/nulls.String" + } + } + }, + "v0.ArtifactListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.ArtifactListElementResponseModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.ArtifactResponseItemModel": { + "type": "object", + "properties": { + "artifact_meta": { + "type": "array", + "items": { + "type": "integer" + } + }, + "artifact_type": { + "$ref": "#/definitions/nulls.String" + }, + "expiring_download_url": { + "type": "string" + }, + "file_size_bytes": { + "type": "integer" + }, + "is_public_page_enabled": { + "type": "boolean" + }, + "public_install_page_url": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "title": { + "$ref": "#/definitions/nulls.String" + } + } + }, + "v0.ArtifactShowResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.ArtifactResponseItemModel" + } + } + }, + "v0.ArtifactUpdateParams": { + "type": "object", + "required": [ + "is_public_page_enabled" + ], + "properties": { + "is_public_page_enabled": { + "type": "boolean" + } + } + }, + "v0.AvatarCandidateCreateParams": { + "type": "object", + "required": [ + "filename", + "filesize" + ], + "properties": { + "filename": { + "type": "string" + }, + "filesize": { + "type": "integer" + } + } + }, + "v0.AvatarCandidateCreateResponseItem": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "filesize": { + "type": "integer" + }, + "slug": { + "type": "string" + }, + "upload_url": { + "type": "string" + } + } + }, + "v0.AvatarPromoteParams": { + "type": "object", + "required": [ + "is_promoted" + ], + "properties": { + "is_promoted": { + "type": "boolean" + } + } + }, + "v0.AvatarPromoteResponseItemModel": { + "type": "object", + "properties": { + "is_candidate": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + } + } + }, + "v0.AvatarPromoteResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.AvatarPromoteResponseItemModel" + } + } + }, + "v0.BranchListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v0.BuildAbortParams": { + "type": "object", + "required": [ + "abort_reason", + "abort_with_success", + "skip_notifications" + ], + "properties": { + "abort_reason": { + "type": "string" + }, + "abort_with_success": { + "type": "boolean" + }, + "skip_notifications": { + "type": "boolean" + } + } + }, + "v0.BuildAbortResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "string" + } + } + }, + "v0.BuildCertificateListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildCertificateResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.BuildCertificateResponseItemModel": { + "type": "object", + "properties": { + "certificate_password": { + "type": "string" + }, + "download_url": { + "type": "string" + }, + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + }, + "upload_url": { + "type": "string" + } + } + }, + "v0.BuildCertificateResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.BuildCertificateResponseItemModel" + } + } + }, + "v0.BuildCertificateUpdateParams": { + "type": "object", + "properties": { + "certificate_password": { + "type": "string" + }, + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + } + } + }, + "v0.BuildCertificateUploadParams": { + "type": "object", + "required": [ + "upload_file_name", + "upload_file_size" + ], + "properties": { + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + } + } + }, + "v0.BuildListAllResponseItemModel": { + "type": "object", + "properties": { + "abort_reason": { + "$ref": "#/definitions/nulls.String" + }, + "branch": { + "$ref": "#/definitions/nulls.String" + }, + "build_number": { + "type": "integer" + }, + "commit_hash": { + "$ref": "#/definitions/nulls.String" + }, + "commit_message": { + "$ref": "#/definitions/nulls.String" + }, + "commit_view_url": { + "$ref": "#/definitions/nulls.String" + }, + "environment_prepare_finished_at": { + "type": "string" + }, + "finished_at": { + "type": "string" + }, + "is_on_hold": { + "type": "boolean" + }, + "machine_type_id": { + "$ref": "#/definitions/nulls.String" + }, + "original_build_params": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pull_request_id": { + "type": "integer" + }, + "pull_request_target_branch": { + "$ref": "#/definitions/nulls.String" + }, + "pull_request_view_url": { + "$ref": "#/definitions/nulls.String" + }, + "repository": { + "$ref": "#/definitions/v0.AppResponseItemModel" + }, + "slug": { + "type": "string" + }, + "stack_identifier": { + "$ref": "#/definitions/nulls.String" + }, + "started_on_worker_at": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "status_text": { + "type": "string" + }, + "tag": { + "$ref": "#/definitions/nulls.String" + }, + "triggered_at": { + "type": "string" + }, + "triggered_by": { + "$ref": "#/definitions/nulls.String" + }, + "triggered_workflow": { + "type": "string" + } + } + }, + "v0.BuildListAllResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildListAllResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.BuildListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.BuildLogChunkItemResponseModel": { + "type": "object", + "properties": { + "chunk": { + "type": "string" + }, + "position": { + "type": "integer" + } + } + }, + "v0.BuildLogInfoResponseModel": { + "type": "object", + "properties": { + "expiring_raw_log_url": { + "type": "string" + }, + "generated_log_chunks_num": { + "type": "integer" + }, + "is_archived": { + "type": "boolean" + }, + "log_chunks": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildLogChunkItemResponseModel" + } + }, + "timestamp": { + "$ref": "#/definitions/nulls.String" + } + } + }, + "v0.BuildParamsEnvironment": { + "type": "object", + "properties": { + "is_expand": { + "type": "boolean" + }, + "mapped_to": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v0.BuildRequestListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildRequestResponseItemModel" + } + } + } + }, + "v0.BuildRequestResponseItemModel": { + "type": "object", + "properties": { + "build_params": { + "type": "array", + "items": { + "type": "integer" + } + }, + "created_at": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "slug": { + "type": "string" + } + } + }, + "v0.BuildRequestUpdateParams": { + "type": "object", + "required": [ + "is_approved" + ], + "properties": { + "is_approved": { + "type": "boolean" + } + } + }, + "v0.BuildRequestUpdateResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.BuildRequestResponseItemModel" + } + } + }, + "v0.BuildResponseItemModel": { + "type": "object", + "properties": { + "abort_reason": { + "$ref": "#/definitions/nulls.String" + }, + "branch": { + "$ref": "#/definitions/nulls.String" + }, + "build_number": { + "type": "integer" + }, + "commit_hash": { + "$ref": "#/definitions/nulls.String" + }, + "commit_message": { + "$ref": "#/definitions/nulls.String" + }, + "commit_view_url": { + "$ref": "#/definitions/nulls.String" + }, + "environment_prepare_finished_at": { + "type": "string" + }, + "finished_at": { + "type": "string" + }, + "is_on_hold": { + "type": "boolean" + }, + "machine_type_id": { + "$ref": "#/definitions/nulls.String" + }, + "original_build_params": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pull_request_id": { + "type": "integer" + }, + "pull_request_target_branch": { + "$ref": "#/definitions/nulls.String" + }, + "pull_request_view_url": { + "$ref": "#/definitions/nulls.String" + }, + "slug": { + "type": "string" + }, + "stack_identifier": { + "$ref": "#/definitions/nulls.String" + }, + "started_on_worker_at": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "status_text": { + "type": "string" + }, + "tag": { + "$ref": "#/definitions/nulls.String" + }, + "triggered_at": { + "type": "string" + }, + "triggered_by": { + "$ref": "#/definitions/nulls.String" + }, + "triggered_workflow": { + "type": "string" + } + } + }, + "v0.BuildShowResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.BuildResponseItemModel" + } + } + }, + "v0.BuildTriggerParams": { + "type": "object", + "properties": { + "build_params": { + "description": "The public part of the SSH key you would like to use", + "$ref": "#/definitions/v0.BuildTriggerParamsBuildParams" + }, + "hook_info": { + "$ref": "#/definitions/v0.BuildTriggerParamsHookInfo" + } + } + }, + "v0.BuildTriggerParamsBuildParams": { + "type": "object", + "properties": { + "branch": { + "type": "string" + }, + "branch_dest": { + "type": "string" + }, + "branch_dest_repo_owner": { + "type": "string" + }, + "branch_repo_owner": { + "type": "string" + }, + "build_request_slug": { + "type": "string" + }, + "commit_hash": { + "type": "string" + }, + "commit_message": { + "type": "string" + }, + "commit_paths": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.CommitPaths" + } + }, + "diff_url": { + "type": "string" + }, + "environments": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildParamsEnvironment" + } + }, + "pull_request_author": { + "type": "string" + }, + "pull_request_head_branch": { + "type": "string" + }, + "pull_request_id": { + "type": "object" + }, + "pull_request_merge_branch": { + "type": "string" + }, + "pull_request_repository_url": { + "type": "string" + }, + "skip_git_status_report": { + "type": "boolean" + }, + "tag": { + "type": "string" + }, + "workflow_id": { + "type": "string" + } + } + }, + "v0.BuildTriggerParamsHookInfo": { + "type": "object", + "properties": { + "type": { + "description": "Should be \"bitrise\"", + "type": "string", + "example": "bitrise" + } + } + }, + "v0.BuildTriggerRespModel": { + "type": "object", + "properties": { + "build_number": { + "type": "integer" + }, + "build_slug": { + "type": "string" + }, + "build_url": { + "type": "string" + }, + "message": { + "type": "string" + }, + "service": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string" + }, + "triggered_workflow": { + "type": "string" + } + } + }, + "v0.BuildWorkflowListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v0.CommitPaths": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + } + }, + "modified": { + "type": "array", + "items": { + "type": "string" + } + }, + "removed": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v0.FindAvatarCandidateResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.FindAvatarCandidateResponseItem" + } + } + } + }, + "v0.FindAvatarCandidateResponseItem": { + "type": "object", + "properties": { + "download_url": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "slug": { + "type": "string" + } + } + }, + "v0.OrganizationDataModel": { + "type": "object", + "properties": { + "avatar_icon_url": { + "$ref": "#/definitions/nulls.String" + }, + "concurrency_count": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "owners": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.OrganizationOwner" + } + }, + "slug": { + "type": "string" + } + } + }, + "v0.OrganizationListRespModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.OrganizationDataModel" + } + } + } + }, + "v0.OrganizationOwner": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "v0.OrganizationRespModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.OrganizationDataModel" + } + } + }, + "v0.OwnerAccountResponseModel": { + "type": "object", + "properties": { + "account_type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + } + } + }, + "v0.OwnerAddOnResponseItemModel": { + "type": "object", + "properties": { + "apps": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AddOnAppResponseItemModel" + } + }, + "documentation_url": { + "type": "string" + }, + "has_ui": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_beta": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "v0.OwnerAddOnsListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.OwnerAddOnResponseItemModel" + } + } + } + }, + "v0.PagingResponseModel": { + "type": "object", + "properties": { + "next": { + "description": "Next is the \"anchor\" for pagination. This value should be passed to the same endpoint\nto get the next page. Empty/not included if there's no \"next\" page.\nStop paging when there's no \"Next\" item in the response!", + "type": "string" + }, + "page_item_limit": { + "description": "PageItemLimit - per-page item count. A given page might include\nless items if there's not enough items. This value is the \"max item count per page\".", + "type": "integer" + }, + "total_item_count": { + "description": "TotalItemCount - total item count, through \"all pages\"", + "type": "integer" + } + } + }, + "v0.PlanDataModel": { + "type": "object", + "properties": { + "container_count": { + "type": "integer" + }, + "expires_at": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "price": { + "$ref": "#/definitions/nulls.Int64" + } + } + }, + "v0.ProjectFileStorageDocumentUpdateParams": { + "type": "object", + "properties": { + "exposed_meta_datastore": { + "type": "array", + "items": { + "type": "integer" + } + }, + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + }, + "user_env_key": { + "type": "string" + } + } + }, + "v0.ProjectFileStorageListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.ProjectFileStorageResponseItemModel": { + "type": "object", + "properties": { + "download_url": { + "type": "string" + }, + "exposed_meta_datastore": { + "type": "array", + "items": { + "type": "integer" + } + }, + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + }, + "upload_url": { + "type": "string" + }, + "user_env_key": { + "type": "string" + } + } + }, + "v0.ProjectFileStorageResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseItemModel" + } + } + }, + "v0.ProjectFileStorageUploadParams": { + "type": "object", + "required": [ + "upload_file_name", + "upload_file_size", + "user_env_key" + ], + "properties": { + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + }, + "user_env_key": { + "type": "string" + } + } + }, + "v0.ProvProfileDocumentUpdateParams": { + "type": "object", + "properties": { + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + } + } + }, + "v0.ProvisionProfileListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.ProvisionProfileResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.ProvisionProfileResponseItemModel": { + "type": "object", + "properties": { + "download_url": { + "type": "string" + }, + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + }, + "upload_url": { + "type": "string" + } + } + }, + "v0.ProvisionProfileResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.ProvisionProfileResponseItemModel" + } + } + }, + "v0.ProvisionProfileUploadParams": { + "type": "object", + "required": [ + "upload_file_name", + "upload_file_size" + ], + "properties": { + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + } + } + }, + "v0.ProxyErrorRespModel": { + "type": "object", + "properties": { + "error_msg": { + "type": "string" + } + } + }, + "v0.SSHKeyRespModel": { + "type": "object", + "properties": { + "status": { + "type": "string" + } + } + }, + "v0.SSHKeyUploadParams": { + "type": "object", + "required": [ + "auth_ssh_private_key", + "auth_ssh_public_key" + ], + "properties": { + "auth_ssh_private_key": { + "description": "The private part of the SSH key you would like to use", + "type": "string" + }, + "auth_ssh_public_key": { + "description": "The public part of the SSH key you would like to use", + "type": "string" + }, + "is_register_key_into_provider_service": { + "description": "If it's set to true, the provided SSH key will be registered at the provider of the application", + "type": "boolean" + } + } + }, + "v0.TestDeviceListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.TestDeviceResponseItemModel" + } + } + } + }, + "v0.TestDeviceResponseItemModel": { + "type": "object", + "properties": { + "device_id": { + "type": "string" + }, + "device_type": { + "type": "string" + }, + "owner": { + "type": "string" + } + } + }, + "v0.UserPlanDataModel": { + "type": "object", + "properties": { + "current_plan": { + "$ref": "#/definitions/v0.PlanDataModel" + }, + "pending_plan": { + "$ref": "#/definitions/v0.PlanDataModel" + }, + "trial_expires_at": { + "type": "string" + } + } + }, + "v0.UserPlanRespModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.UserPlanDataModel" + } + } + }, + "v0.UserProfileDataModel": { + "type": "object", + "properties": { + "avatar_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "data_id": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "has_used_organization_trial": { + "type": "boolean" + }, + "payment_processor": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "unconfirmed_email": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "v0.UserProfileRespModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.UserProfileDataModel" + } + } + }, + "v0.WebhookDeliveryItemResponseModel": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "request_headers": { + "type": "string" + }, + "request_payload": { + "type": "string" + }, + "request_url": { + "type": "string" + }, + "response_body": { + "$ref": "#/definitions/nulls.String" + }, + "response_headers": { + "$ref": "#/definitions/nulls.String" + }, + "response_http_status": { + "$ref": "#/definitions/nulls.Int64" + }, + "response_seconds": { + "$ref": "#/definitions/nulls.Int64" + }, + "slug": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "v0.WebhookDeliveryItemShowResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.WebhookDeliveryItemResponseModel" + } + } + }, + "v0.WebhookRespModel": { + "type": "object", + "properties": { + "status": { + "type": "string" + } + } + } + }, + "securityDefinitions": { + "AddonAuthToken": { + "type": "apiKey", + "name": "Bitrise-Addon-Auth-Token", + "in": "header" + }, + "PersonalAccessToken": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + } +} \ No newline at end of file diff --git a/swagger_patched.json b/swagger_patched.json new file mode 100644 index 0000000..8eb137d --- /dev/null +++ b/swagger_patched.json @@ -0,0 +1,6692 @@ +{ + "schemes": [ + "https" + ], + "swagger": "2.0", + "info": { + "description": "Official REST API for Bitrise.io", + "title": "Bitrise API", + "contact": { + "name": "Bitrise Support", + "url": "https://www.bitrise.io/contact", + "email": "letsconnect@bitrise.io" + }, + "license": { + "name": "MIT" + }, + "version": "0.1" + }, + "host": "api.bitrise.io", + "basePath": "/v0.1", + "paths": { + "/addons": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the available Bitrise addons", + "produces": [ + "application/json" + ], + "tags": [ + "addons" + ], + "summary": "Get list of available Bitrise addons", + "operationId": "addons-list", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AddonsListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/addons/{addon-id}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Show details of a specific Bitrise addon", + "produces": [ + "application/json" + ], + "tags": [ + "addons" + ], + "summary": "Get a specific Bitrise addon", + "operationId": "addons-show", + "parameters": [ + { + "type": "string", + "description": "Addon ID", + "name": "addon-id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AddonsShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the apps available for the authenticated account, including those that are owned by other users or Organizations.", + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Get list of the apps", + "operationId": "app-list", + "parameters": [ + { + "enum": [ + "last_build_at", + "created_at" + ], + "type": "string", + "description": "Order of the applications: sort them based on when they were created or the time of their last build", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "Slug of the first app in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/register": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Add a new app to Bitrise. This is the first step of the app registration process. To successfully set it up, you need to provide the required app parameters: your git provider, the repository URL, the slug of the repository as it appears at the provider, and the slug of the owner of the repository. Read more about the app creation process in our [detailed guide](https://devcenter.bitrise.io/api/adding-and-managing-apps/#adding-a-new-app).", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Add a new app", + "operationId": "app-create", + "parameters": [ + { + "description": "App parameters", + "name": "app", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppUploadParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Get the details of a specific app by providing the app slug. You can get the app slug by calling the [/apps](https://api-docs.bitrise.io/#/application/app-list) endpoint or by opening the app on bitrise.io and copying the slug from the URL.", + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Get a specific app", + "operationId": "app-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/addons": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the provisioned addons for the authorized apps", + "produces": [ + "application/json" + ], + "tags": [ + "addons" + ], + "summary": "Get list of the addons for apps", + "operationId": "addon-list-by-app", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppAddOnsListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/android-keystore-files": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the android keystore files that have been uploaded to a specific app.", + "produces": [ + "application/json" + ], + "tags": [ + "android-keystore-file" + ], + "summary": "Get a list of the android keystore files", + "operationId": "android-keystore-file-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first android keystore file in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of build certificates per page is 50.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Add a new Android keystore file to an app", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "android-keystore-file" + ], + "summary": "Create an Android keystore file", + "operationId": "android-keystore-file-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Android keystore file parameters", + "name": "android-keystore-file", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AndroidKeystoreFileUploadParams" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/avatar-candidates": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Add new avatar candidates to a specific app", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "avatar-candidate" + ], + "summary": "Create avatar candidates", + "operationId": "avatar-candidate-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Avatar candidate parameters", + "name": "avatar-candidate", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AvatarCandidateCreateParams" + } + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AvatarCandidateCreateResponseItem" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/avatar-candidates/{avatar-slug}": { + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Promotes an avatar candidate for an app", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "avatar-candidate" + ], + "summary": "Promote an avatar candidate", + "operationId": "avatar-candidate-promote", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Avatar candidate slug", + "name": "avatar-slug", + "in": "path", + "required": true + }, + { + "description": "Avatar promote parameters", + "name": "avatar-promote-params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AvatarPromoteParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AvatarPromoteResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/bitrise.yml": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Get the full `bitrise.yml` configuration of an application, by providing the app slug. It returns the current `bitrise.yml` that is stored on bitrise.io in full, including the trigger map, the different workflows and the Steps.", + "produces": [ + "text/plain" + ], + "tags": [ + "application" + ], + "summary": "Get bitrise.yml of a specific app", + "operationId": "app-config-datastore-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{the bitrise.yml in yml format}", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Upload a new bitrise.yml for your application.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Upload a new bitrise.yml for your application.", + "operationId": "app-config-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "App config parameters", + "name": "app-config", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppConfigRequestParam" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppConfigRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/v0.ProxyErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/branches": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Lists only those branches of a specified Bitrise app that have existing builds.", + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "List the branches with existing builds of an app's repository", + "operationId": "branch-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BranchListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-certificates": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the build certificates that have been uploaded to a specific app. Read more in our [Listing the uploaded iOS code signing files of an app](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#listing-the-uploaded-ios-code-signing-files-of-an-app) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Get a list of the build certificates", + "operationId": "build-certificate-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first build certificate in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of build certificates per page is 50.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Create a temporary pre-signed upload URL for the build certificate and upload the file to AWS with a simple `curl` request. To complete the uploading process and view your files on the Code Signing tab of your app, continue with the [POST /apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded](https://api-docs.bitrise.io/#/build-certificate/build-certificate-confirm) endpoint. Read more in our [Creating and uploading an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#creating--uploading-an-ios-code-signing-file) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Create a build certificate", + "operationId": "build-certificate-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Build certificate parameters such as file name and its file size", + "name": "build-certificate", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BuildCertificateUploadParams" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-certificates/{build-certificate-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Retrieve data of a specific build certificate. You can fetch the build certificate slug for this endpoint if you first call the [GET /apps/{app-slug}/build-certificates](https://api-docs.bitrise.io/#/build-certificate/build-certificate-list) endpoint to list all available build certificates of an app. Read more in our [Getting a specific iOS code signing file's data](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#getting-a-specific-ios-code-signing-files-data) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Get a specific build certificate", + "operationId": "build-certificate-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build certificate slug", + "name": "build-certificate-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Delete an app's build certificate. You can fetch the build certificate slug for this endpoint if you first call the [GET /apps/{app-slug}/build-certificates](https://api-docs.bitrise.io/#/build-certificate/build-certificate-list) endpoint to list all available build certificates of an app. Read more in our [Deleting an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#deleting-an-ios-code-signing-file) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Delete a build certificate", + "operationId": "build-certificate-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build certificate slug", + "name": "build-certificate-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update an uploaded build certificate's attributes. You can fetch the build certificate slug for this endpoint if you first call the [GET /apps/{app-slug}/build-certificates](https://api-docs.bitrise.io/#/build-certificate/build-certificate-list) endpoint. Read more in our [Updating an uploaded iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Update a build certificate", + "operationId": "build-certificate-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build certificate slug", + "name": "build-certificate-slug", + "in": "path", + "required": true + }, + { + "description": "Build certificate parameters", + "name": "build-certificate", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BuildCertificateUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "This is the last step of uploading a build certificate to Bitrise. Confirm the build certificate upload and view the file on the Code Signing tab of a specific app. Read more in our [Confirming the iOS code signing file upload](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "build-certificate" + ], + "summary": "Confirm a build certificate upload", + "operationId": "build-certificate-confirm", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build certificate slug", + "name": "build-certificate-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildCertificateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-requests": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List the existing open build requests of a specified Bitrise app", + "produces": [ + "application/json" + ], + "tags": [ + "build-request" + ], + "summary": "List the open build requests for an app", + "operationId": "build-request-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildRequestListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-requests/{build-request-slug}": { + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update a specific build request of a specific app", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "build-request" + ], + "summary": "Update a build request", + "operationId": "build-request-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build request slug", + "name": "build-request-slug", + "in": "path", + "required": true + }, + { + "description": "Build request parameters", + "name": "build-request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BuildRequestUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildRequestUpdateResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/build-workflows": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List the workflows that were triggered at any time for a given Bitrise app. Note that it might list workflows that are currently not defined in the app's `bitrise.yml` configuration - and conversely, workflows that were never triggered will not be listed even if they are defined in the `bitrise.yml` file.", + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "List the workflows of an app", + "operationId": "build-workflow-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildWorkflowListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the builds of a specified Bitrise app. Set parameters to filter builds: for example, you can search for builds run with a given workflow or all builds that were triggered by Pull Requests. It returns all the relevant data of the build.", + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "List all builds of an app", + "operationId": "build-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "enum": [ + "running_first", + "created_at" + ], + "type": "string", + "description": "Order of builds: sort them based on when they were created or the time when they were triggered", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "The branch which was built", + "name": "branch", + "in": "query" + }, + { + "type": "string", + "description": "The name of the workflow used for the build", + "name": "workflow", + "in": "query" + }, + { + "type": "string", + "description": "The commit message of the build", + "name": "commit_message", + "in": "query" + }, + { + "type": "string", + "description": "The event that triggered the build (push, pull-request, tag)", + "name": "trigger_event_type", + "in": "query" + }, + { + "type": "integer", + "description": "The id of the pull request that triggered the build", + "name": "pull_request_id", + "in": "query" + }, + { + "type": "integer", + "description": "The build number", + "name": "build_number", + "in": "query" + }, + { + "type": "integer", + "description": "List builds run after a given date (Unix Timestamp)", + "name": "after", + "in": "query" + }, + { + "type": "integer", + "description": "List builds run before a given date (Unix Timestamp)", + "name": "before", + "in": "query" + }, + { + "maximum": 4, + "type": "integer", + "description": "The status of the build: not finished (0), successful (1), failed (2), aborted with failure (3), aborted with success (4)", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "Slug of the first build in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Trigger a new build. Specify an app slug and at least one parameter out of three: a git tag or git commit hash, a branch, or a workflow ID. You can also set specific parameters for Pull Request builds and define additional environment variables for your build. [Check out our detailed guide](https://devcenter.bitrise.io/api/build-trigger/).", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "Trigger a new build", + "operationId": "build-trigger", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Build trigger parameters", + "name": "build_params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BuildTriggerParams" + } + } + ], + "responses": { + "201": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildTriggerRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Get the specified build of a given Bitrise app. You need to provide both an app slug and a build slug. You can get the build slug either by calling the [/builds](https://api-docs.bitrise.io/#/builds/build-list) endpoint or by clicking on the build on bitrise.io and copying the slug from the URL. The endpoint returns all the relevant data of the build.", + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "Get a build of a given app", + "operationId": "build-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}/abort": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Abort a specific build. Set an abort reason with the `abort_reason` parameter. Use the `abort_with_success` parameter to abort a build but still count it as a successful one.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "Abort a specific build", + "operationId": "build-abort", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + }, + { + "description": "Build abort parameters", + "name": "build-abort-params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.BuildAbortParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildAbortResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}/artifacts": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all build artifacts that have been generated for an app's build. You can use the created build artifact slugs from the response output to retrieve data of a specific build artifact with the [GET/apps/](https://api-docs.bitrise.io/#/build-artifact/artifact-show) endpoint or update a build artifact with the [PATCH/apps](https://api-docs.bitrise.io/#/build-artifact/artifact-update) endpoint.", + "produces": [ + "application/json" + ], + "tags": [ + "build-artifact" + ], + "summary": "Get a list of all build artifacts", + "operationId": "artifact-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first build artifact in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of build artifacts per page is 50.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ArtifactListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Retrieve data of a specific build artifact. The response output contains a time-limited download url (expires in 10 minutes) and a public install page URL. You can view the build artifact with both URLs, but the public install page url will not work unless you [enable it](https://devcenter.bitrise.io/tutorials/deploy/bitrise-app-deployment/#enabling-public-page-for-the-app).", + "produces": [ + "application/json" + ], + "tags": [ + "build-artifact" + ], + "summary": "Get a specific build artifact", + "operationId": "artifact-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Artifact slug", + "name": "artifact-slug", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Setting this will result in a redirect to the artifact download location", + "name": "download", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ArtifactShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Delete a build artifact of an app's build. The required parameters are app slug, build slug and artifact slug. You can fetch the build artifact slug if you first list all build artifacts of an app with the [/apps/](https://api-docs.bitrise.io/#/build-artifact/artifact-list) endpoint.", + "produces": [ + "application/json" + ], + "tags": [ + "build-artifact" + ], + "summary": "Delete a build artifact", + "operationId": "artifact-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Artifact slug", + "name": "artifact-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ArtifactDeleteResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update the `is_public_page_enabled` attribute of your app's build. The required parameters are app slug, build slug and artifact slug. You can fetch the build artifact slug if you first list all build artifacts of an app with the [GET /apps/](https://api-docs.bitrise.io/#/build-artifact/artifact-list) endpoint.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "build-artifact" + ], + "summary": "Update a build artifact", + "operationId": "artifact-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Artifact slug", + "name": "artifact-slug", + "in": "path", + "required": true + }, + { + "description": "Artifact parameters", + "name": "artifact-params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.ArtifactUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ArtifactShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}/bitrise.yml": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Get the bitrise.yml file of one of the builds of a given app. This will return the `bitrise.yml` configuration with which the build ran. You can compare it to [the current bitrise.yml configuration](https://api-docs.bitrise.io/#/application/app-config-datastore-show) of the app.", + "produces": [ + "text/plain" + ], + "tags": [ + "builds" + ], + "summary": "Get the bitrise.yml of a build", + "operationId": "build-bitrise-yml-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{the bitrise.yml in yml format}", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/builds/{build-slug}/log": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Get the build log of a specified build of a Bitrise app. You can get the build slug either by calling the [/builds](https://api-docs.bitrise.io/#/builds/build-list) endpoint or by clicking on the build on bitrise.io and copying the slug from the URL.", + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "Get the build log of a build", + "operationId": "build-log", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Build slug", + "name": "build-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildLogInfoResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/finish": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Save the application after registering it on Bitrise and registering an SSH key (and, optionally, adding a webhook). With this endpoint you can define the initial configuration, define application-level environment variables, determine the project type, and set an Organization to be the owner of the app. Read more about the app registration process in our [detailed guide](https://devcenter.bitrise.io/api/adding-and-managing-apps/#adding-a-new-app).", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Save the application at the end of the app registration process", + "operationId": "app-finish", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "App finish parameters", + "name": "app", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppFinishParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppFinishRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/generic-project-files": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the generic project files that have been uploaded to a specific app. Read more in our [Listing the uploaded files of an app](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#listing-the-uploaded-files-of-an-app) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Get a list of the generic project files", + "operationId": "generic-project-file-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first generic project file in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of build certificates per page is 50.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Create a temporary pre-signed upload URL (expires in 10 minutes) for the generic project file and upload it to AWS with a simple `curl` request. To complete the uploading process and view your files on the Code Signing tab of your app, continue with the [POST /apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-confirm) endpoint. Read more in our [Creating and uploading files to Generic File Storage](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#creating-and-uploading-files-to-generic-file-storage) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Create a generic project file", + "operationId": "generic-project-files-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Generic project file parameters", + "name": "generic-project-file", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageUploadParams" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/generic-project-files/{generic-project-file-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Retrieve data of a specific generic project file to check its attributes and optionally modify them with the [PATCH /apps/](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-update) endpoint. Read more in our [Retrieving a specific file's data](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#retrieving-a-specific-files-data) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Get a specific generic project file", + "operationId": "generic-project-file-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Generic project file slug", + "name": "generic-project-file-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Delete an app's generic project file. You can fetch an app's generic project file slug if you first list all the uploaded files with the [GET /apps/{app-slug}/generic-project-files](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-list) endpoint. Read more in our [Deleting a file](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#deleting-a-file) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Delete a generic project file", + "operationId": "generic-project-file-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Generic project file slug", + "name": "generic-project-file-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update a generic project file's attributes. You can fetch an app's generic project file slug if you first list all the uploaded files with the [GET /apps/{app-slug}/generic-project-files](https://api-docs.bitrise.io/#/generic-project-file/generic-project-file-list) endpoint. Read more in our [Updating an uploaded file](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#updating-an-uploaded-file) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Update a generic project file", + "operationId": "generic-project-file-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Generic project file slug", + "name": "generic-project-file-slug", + "in": "path", + "required": true + }, + { + "description": "Generic project file parameters", + "name": "generic-project-file", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageDocumentUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "This is the last step of uploading a generic project file to Bitrise. Confirm the generic project file upload and view the file on the Code Signing tab of a specific app. Read more in our [Confirming the upload](https://devcenter.bitrise.io/api/managing-files-in-generic-file-storage/#confirming-the-file-upload) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "generic-project-file" + ], + "summary": "Confirm a generic project file upload", + "operationId": "generic-project-file-confirm", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Generic project file slug", + "name": "generic-project-file-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/outgoing-webhooks": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the outgoing webhooks registered for a specified Bitrise app. This returns all the relevant data of the webhook, including the slug of the webhook and its URL.", + "produces": [ + "application/json" + ], + "tags": [ + "outgoing-webhook" + ], + "summary": "List the outgoing webhooks of an app", + "operationId": "outgoing-webhook-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first webhook in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppWebhookListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "Create an outgoing webhook for a specified Bitrise app: this can be used to send build events to a specified URL with custom headers. Currently, only build events can trigger outgoing webhooks.", + "produces": [ + "application/json" + ], + "tags": [ + "outgoing-webhook" + ], + "summary": "Create an outgoing webhook for an app", + "operationId": "outgoing-webhook-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "App webhook creation params", + "name": "app-webhook-create-params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppWebhookCreateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppWebhookCreatedResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}": { + "put": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update an existing outgoing webhook (URL, events, secrets and headers) for a specified Bitrise app. Even if you do not want to change one of the parameters, you still have to provide that parameter as well: simply use its existing value.", + "produces": [ + "application/json" + ], + "tags": [ + "outgoing-webhook" + ], + "summary": "Update an outgoing webhook of an app", + "operationId": "outgoing-webhook-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App webhook slug", + "name": "app-webhook-slug", + "in": "path", + "required": true + }, + { + "description": "App webhook update params", + "name": "app-webhook-update-params", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.AppWebhookUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppWebhookResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Delete an existing outgoing webhook for a specified Bitrise app.", + "produces": [ + "application/json" + ], + "tags": [ + "outgoing-webhook" + ], + "summary": "Delete an outgoing webhook of an app", + "operationId": "outgoing-webhook-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App webhook slug", + "name": "app-webhook-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppWebhookDeletedResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the delivery items of an outgoing webhook of a Bitrise application", + "produces": [ + "application/json" + ], + "tags": [ + "webhook-delivery-item" + ], + "summary": "List the webhook delivery items of an app", + "operationId": "webhook-delivery-item-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App webhook slug", + "name": "app-webhook-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first delivery item in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.WebhookDeliveryItemShowResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Get the specified delivery item of an outgoing webhook of a Bitrise application", + "produces": [ + "application/json" + ], + "tags": [ + "webhook-delivery-item" + ], + "summary": "Get a specific delivery item of a webhook", + "operationId": "webhook-delivery-item-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App webhook slug", + "name": "app-webhook-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Webhook delivery item slug", + "name": "webhook-delivery-item-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.WebhookDeliveryItemResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}/redeliver": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Re-deliver the delivery item of a specified webhook of a Bitrise application", + "produces": [ + "application/json" + ], + "tags": [ + "webhook-delivery-item" + ], + "summary": "Re-deliver the webhook delivery items of an app", + "operationId": "webhook-delivery-item-redeliver", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App webhook slug", + "name": "app-webhook-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Webhook delivery item slug", + "name": "webhook-delivery-item-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/provisioning-profiles": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List all the provisioning profiles that have been uploaded to a specific app. Read more in our [Listing the uploaded iOS code signing files of an app](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#listing-the-uploaded-ios-code-signing-files-of-an-app) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Get a list of the provisioning profiles", + "operationId": "provisioning-profile-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Slug of the first provisioning profile in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Create a temporary pre-signed upload URL (expires in 10 minutes) for the provisioning profile and upload it to AWS with a simple `curl` request. To complete the upload process, continue with the [POST /apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-confirm) endpoint. Read more in our [Creating and uploading an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#creating--uploading-an-ios-code-signing-file) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Create a provisioning profile", + "operationId": "provisioning-profile-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "Provisioning profile parameters such as file name and file size", + "name": "provisioning-profile", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileUploadParams" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Retrieve data of a specific provisioning profile. You can fetch the provisioning profile's slug if you call the [GET /apps/{app-slug}/provisioning-profiles](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-list) endpoint. Read more in our [Getting a specific iOS code signing file's data](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#getting-a-specific-ios-code-signing-files-data) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Get a specific provisioning profile", + "operationId": "provisioning-profile-show", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Provisioning profile slug", + "name": "provisioning-profile-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "delete": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Delete an app's provisioning profile. You can fetch the provisioning profile's slug if you call the [GET /apps/{app-slug}/provisioning-profiles](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-list) endpoint. Read more in our [Deleting an iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#deleting-an-ios-code-signing-file) guide.", + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Delete a provisioning profile", + "operationId": "provisioning-profile-delete", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Provisioning profile slug", + "name": "provisioning-profile-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + }, + "patch": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Update an uploaded provisioning profile's attributes. You can fetch the provisioning profile's slug if you call the [GET /apps/{app-slug}/provisioning-profiles](https://api-docs.bitrise.io/#/provisioning-profile/provisioning-profile-list) endpoint. Read more in our [Updating an uploaded iOS code signing file](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Update a provisioning profile", + "operationId": "provisioning-profile-update", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Provisioning profile slug", + "name": "provisioning-profile-slug", + "in": "path", + "required": true + }, + { + "description": "Provisioning profile parameters", + "name": "provisioning-profile", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.ProvProfileDocumentUpdateParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "This is the last step of the upload process. Confirm the provisioning profile upload and view the file on the Code Signing tab of a specific app. Read more in our [Confirming the iOS code signing file upload](https://devcenter.bitrise.io/api/managing-ios-code-signing-files/#confirming-the-ios-code-signing-file-upload) guide.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "provisioning-profile" + ], + "summary": "Confirm a provisioning profile upload", + "operationId": "provisioning-profile-confirm", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Provisioning profile slug", + "name": "provisioning-profile-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ProvisionProfileResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/register-ssh-key": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Add an SSH-key to a specific app. After creating an app, you need to register the SSH key so that Bitrise will be able to access and clone your repository during the build process. This requires the app slug of your newly created app.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Add an SSH-key to a specific app", + "operationId": "ssh-key-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + }, + { + "description": "SSH key parameters", + "name": "ssh-key", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0.SSHKeyUploadParams" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.SSHKeyRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/register-webhook": { + "post": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "[Register an incoming webhook](https://devcenter.bitrise.io/api/incoming-and-outgoing-webhooks/#incoming-webhooks) for a specific application. You can do this during the app registration process or at any other time in an app's life. When calling this endpoint, a webhook is registered at your git provider: this is necessary to automatically trigger builds on Bitrise.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "app-setup" + ], + "summary": "Register an incoming webhook for a specific application", + "operationId": "app-webhook-create", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.WebhookRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/apps/{app-slug}/test-devices": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + }, + { + "AddonAuthToken": [] + } + ], + "description": "List registered test devices of all members of a specified Bitrise app", + "produces": [ + "application/json" + ], + "tags": [ + "test-devices" + ], + "summary": "List the test devices for an app", + "operationId": "test-device-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.TestDeviceListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/builds": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the Bitrise builds that can be accessed with the authenticated account. Filter builds based on their owner, using the owner slug, or the status of the build.", + "produces": [ + "application/json" + ], + "tags": [ + "builds" + ], + "summary": "List all builds", + "operationId": "build-list-all", + "parameters": [ + { + "type": "string", + "description": "The slug of the owner of the app or apps", + "name": "owner_slug", + "in": "query" + }, + { + "type": "boolean", + "description": "Indicates whether the build has started yet (true: the build hasn't started)", + "name": "is_on_hold", + "in": "query" + }, + { + "maximum": 4, + "type": "integer", + "description": "The status of the build: not finished (0), successful (1), failed (2), aborted with failure (3), aborted with success (4)", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "Slug of the first build in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.BuildListAllResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/me": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Shows the authenticated users profile data", + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get your profile data", + "operationId": "user-profile", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.UserProfileRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/me/activities": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the Bitrise activity events", + "produces": [ + "application/json" + ], + "tags": [ + "activity" + ], + "summary": "Get list of Bitrise activity events", + "operationId": "activity-list", + "parameters": [ + { + "type": "string", + "description": "Slug of the first activity event in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.ActivityEventListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/me/plan": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Get the subscription of the user: the current plan, any pending plans, and the duration of a trial period if applicable", + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "The subscription plan of the user", + "operationId": "user-plan", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.UserPlanRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/organizations": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all Bitrise organizations that the user is part of", + "produces": [ + "application/json" + ], + "tags": [ + "organizations" + ], + "summary": "List the organizations that the user is part of", + "operationId": "org-list", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.OrganizationListRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/organizations/{org-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Get a specified Bitrise organization that the user is part of.", + "produces": [ + "application/json" + ], + "tags": [ + "organizations" + ], + "summary": "Get a specified organization.", + "operationId": "org-show", + "parameters": [ + { + "type": "string", + "description": "The organization slug", + "name": "org-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.OrganizationRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/organizations/{org-slug}/apps": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the available apps owned by a given organization. [Find the organization URL](https://devcenter.bitrise.io/team-management/organizations/org-url/) of the organisations you are part of; be aware that the endpoint will not return any apps if the authenticated account is not a member of the given organisation.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Get list of the apps for an organization", + "operationId": "app-list-by-organization", + "parameters": [ + { + "type": "string", + "description": "Organization slug", + "name": "org-slug", + "in": "path", + "required": true + }, + { + "enum": [ + "last_build_at", + "created_at" + ], + "type": "string", + "description": "Order of applications: sort them based on when they were created or the time of their last build", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "Slug of the first app in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/organizations/{organization-slug}/addons": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the provisioned addons for organization", + "produces": [ + "application/json" + ], + "tags": [ + "addons" + ], + "summary": "Get list of the addons for organization", + "operationId": "addon-list-by-organization", + "parameters": [ + { + "type": "string", + "description": "Organization slug", + "name": "organization-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.OwnerAddOnsListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/users/{user-slug}": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "Show information about a specific user", + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a specific user", + "operationId": "user-show", + "parameters": [ + { + "type": "string", + "description": "User slug", + "name": "user-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.UserProfileRespModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/users/{user-slug}/addons": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the provisioned addons for the authenticated user", + "produces": [ + "application/json" + ], + "tags": [ + "addons" + ], + "summary": "Get list of the addons for user", + "operationId": "addon-list-by-user", + "parameters": [ + { + "type": "string", + "description": "User slug", + "name": "user-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.OwnerAddOnsListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/users/{user-slug}/apple-api-credentials": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List Apple API credentials for a specific Bitrise user", + "produces": [ + "application/json" + ], + "tags": [ + "apple-api-credentials" + ], + "summary": "List Apple API credentials for a specific user", + "operationId": "apple-api-credential-list", + "parameters": [ + { + "type": "string", + "description": "User slug", + "name": "user-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppleAPICredentialsListResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/users/{user-slug}/apps": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all the available apps for the given user. It needs the user slug that you can get from the [GET /me](https://api-docs.bitrise.io/#/user/user-profile) endpoint.", + "produces": [ + "application/json" + ], + "tags": [ + "application" + ], + "summary": "Get list of the apps for a user", + "operationId": "app-list-by-user", + "parameters": [ + { + "type": "string", + "description": "User slug", + "name": "user-slug", + "in": "path", + "required": true + }, + { + "enum": [ + "last_build_at", + "created_at" + ], + "type": "string", + "description": "Order of applications", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "Slug of the first app in the response", + "name": "next", + "in": "query" + }, + { + "maximum": 50, + "type": "integer", + "description": "Max number of elements per page (default: 50)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.AppListResponseModel" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + }, + "/v0.1/apps/{app-slug}/avatar-candidates": { + "get": { + "security": [ + { + "PersonalAccessToken": [] + } + ], + "description": "List all available avatar candidates for an application", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "avatar-candidate" + ], + "summary": "Get list of the avatar candidates", + "operationId": "avatar-candidate-list", + "parameters": [ + { + "type": "string", + "description": "App slug", + "name": "app-slug", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v0.FindAvatarCandidateResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/service.StandardErrorRespModel" + } + } + } + } + } + }, + "definitions": { + "addons.Addon": { + "type": "object", + "properties": { + "banner_image": { + "type": "string" + }, + "card_header_colors": { + "type": "array", + "items": { + "type": "string" + } + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "developer_links": { + "type": "array", + "items": { + "$ref": "#/definitions/addons.DeveloperLink" + } + }, + "documentation_url": { + "type": "string" + }, + "has_ui": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_beta": { + "type": "boolean" + }, + "plans": { + "type": "array", + "items": { + "$ref": "#/definitions/addons.Plan" + } + }, + "platforms": { + "type": "array", + "items": { + "type": "string" + } + }, + "preview_images": { + "type": "array", + "items": { + "type": "string" + } + }, + "setup_guide": { + "$ref": "#/definitions/addons.SetupGuide" + }, + "subtitle": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "addons.DeveloperLink": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "addons.Feature": { + "type": "object", + "properties": { + "available": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "quantity": { + "type": "string" + } + } + }, + "addons.Plan": { + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "$ref": "#/definitions/addons.Feature" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "price": { + "type": "integer" + } + } + }, + "addons.SetupGuide": { + "type": "object", + "properties": { + "instructions": { + "type": "array", + "items": { + "$ref": "#/definitions/addons.SetupInstruction" + } + }, + "notification": { + "type": "string" + } + } + }, + "addons.SetupInstruction": { + "type": "object", + "properties": { + "card_content": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "nulls.Int64": { + "type": "object" + }, + "nulls.String": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "valid": { + "description": "Valid is true if String is not NULL", + "type": "boolean" + } + } + }, + "service.StandardErrorRespModel": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "v0.ActivityEventListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.ActivityEventResponseItemModel" + } + }, + "paging": { + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.ActivityEventResponseItemModel": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "description": { + "$ref": "#/definitions/nulls.String" + }, + "event_icon": { + "$ref": "#/definitions/nulls.String" + }, + "event_stype": { + "$ref": "#/definitions/nulls.String" + }, + "repository_avatar_icon_url": { + "type": "string" + }, + "repository_title": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "target_path_string": { + "$ref": "#/definitions/nulls.String" + }, + "title": { + "$ref": "#/definitions/nulls.String" + } + } + }, + "v0.AddOnAppResponseItemModel": { + "type": "object", + "properties": { + "icon": { + "$ref": "#/definitions/nulls.String" + }, + "plan": { + "$ref": "#/definitions/addons.Plan" + }, + "plan_started_at": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "v0.AddonsListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/addons.Addon" + } + } + } + }, + "v0.AddonsShowResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/addons.Addon" + } + } + }, + "v0.AndroidKeystoreFileUploadParams": { + "type": "object", + "required": [ + "alias", + "password", + "private_key_password", + "upload_file_name", + "upload_file_size" + ], + "properties": { + "alias": { + "type": "string" + }, + "password": { + "type": "string" + }, + "private_key_password": { + "type": "string" + }, + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + } + } + }, + "v0.AppAddOnResponseItemModel": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "has_ui": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_beta": { + "type": "boolean" + }, + "plan": { + "$ref": "#/definitions/addons.Plan" + }, + "setup_guide": { + "$ref": "#/definitions/addons.SetupGuide" + }, + "summary": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "v0.AppAddOnsListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AppAddOnResponseItemModel" + } + } + } + }, + "v0.AppConfigRequestParam": { + "type": "object", + "required": [ + "app_config_datastore_yaml" + ], + "properties": { + "app_config_datastore_yaml": { + "type": "string" + } + } + }, + "v0.AppConfigRespModel": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "v0.AppFinishParams": { + "type": "object", + "required": [ + "project_type", + "stack_id" + ], + "properties": { + "config": { + "description": "Which config to use `default-android-config`, `default-cordova-config`, `default-fastlane-config`, `default-ionic-config`, `default-ios-config`,`default-macos-config`, `default-react-native-config`, `default-xamarin-config`, `other-config` (default if parameter is not speficied)", + "type": "string" + }, + "envs": { + "description": "Environment variables for the application workflows, e.g. {\"env1\":\"val1\",\"env2\":\"val2\"}", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "mode": { + "description": "config specification mode, has to be specified with `manual` value", + "type": "string" + }, + "organization_slug": { + "description": "The slug of the organization, who will be the owner of the application, if it's not specified, then the authenticated user will be the owner", + "type": "string" + }, + "project_type": { + "description": "The type of your project (`android`, `ios`, `cordova`, `other`, `xamarin`, `macos`, `ionic`, `react-native`, `fastlane`, null)", + "type": "string" + }, + "stack_id": { + "description": "The id of the stack the application will be built (these can be found in the [system report](https://github.com/bitrise-io/bitrise.io/tree/master/system_reports) file names)", + "type": "string" + } + } + }, + "v0.AppFinishRespModel": { + "type": "object", + "properties": { + "branch_name": { + "type": "string" + }, + "build_trigger_token": { + "type": "string" + }, + "is_webhook_auto_reg_supported": { + "type": "boolean" + }, + "status": { + "type": "string" + } + } + }, + "v0.AppListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AppResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.AppRespModel": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "status": { + "type": "string" + } + } + }, + "v0.AppResponseItemModel": { + "type": "object", + "properties": { + "avatar_url": { + "$ref": "#/definitions/nulls.String" + }, + "is_disabled": { + "type": "boolean" + }, + "is_public": { + "type": "boolean" + }, + "owner": { + "$ref": "#/definitions/v0.OwnerAccountResponseModel" + }, + "project_type": { + "$ref": "#/definitions/nulls.String" + }, + "provider": { + "$ref": "#/definitions/nulls.String" + }, + "repo_owner": { + "$ref": "#/definitions/nulls.String" + }, + "repo_slug": { + "$ref": "#/definitions/nulls.String" + }, + "repo_url": { + "$ref": "#/definitions/nulls.String" + }, + "slug": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, + "v0.AppShowResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.AppResponseItemModel" + } + } + }, + "v0.AppUploadParams": { + "type": "object", + "required": [ + "git_owner", + "git_repo_slug", + "is_public", + "provider", + "repo_url", + "type" + ], + "properties": { + "git_owner": { + "description": "The slug of the owner of the repository at the git provider", + "type": "string" + }, + "git_repo_slug": { + "description": "The slug of the repository at the git provider", + "type": "string" + }, + "is_public": { + "description": "If `true` then the repository visibility setting will be public, in case of `false` it will be private", + "type": "boolean" + }, + "provider": { + "description": "The git provider you are using, it can be `github`, `bitbucket`, `gitlab`, `gitlab-self-hosted` or `custom`", + "type": "string" + }, + "repo_url": { + "description": "The URL of your repository", + "type": "string" + }, + "type": { + "description": "It has to be provided by legacy reasons and has to have the `git` value", + "type": "string" + }, + "organization_slug": { + "description": "Property added by SouthPark as this is missing within open-api spec. This can be removed/ should be here on (re-)download when bitrise has fixed it", + "type": "string" + } + } + }, + "v0.AppWebhookCreateParams": { + "type": "object", + "required": [ + "events", + "secret", + "url" + ], + "properties": { + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": { + "type": "array", + "items": { + "type": "integer" + } + }, + "secret": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "v0.AppWebhookCreatedResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.AppWebhookResponseItemModel" + } + } + }, + "v0.AppWebhookDeletedResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.AppWebhookResponseItemModel" + } + } + }, + "v0.AppWebhookListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AppWebhookResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.AppWebhookResponseItemModel": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": { + "type": "array", + "items": { + "type": "integer" + } + }, + "registered_by_addon": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "v0.AppWebhookResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.AppWebhookResponseItemModel" + } + } + }, + "v0.AppWebhookUpdateParams": { + "type": "object", + "required": [ + "events", + "url" + ], + "properties": { + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": { + "type": "array", + "items": { + "type": "integer" + } + }, + "url": { + "type": "string" + } + } + }, + "v0.AppleAPICredentialResponseItem": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "issuer_id": { + "type": "string" + }, + "key_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "v0.AppleAPICredentialsListResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AppleAPICredentialResponseItem" + } + } + } + }, + "v0.ArtifactDeleteResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.ArtifactResponseItemModel" + } + } + }, + "v0.ArtifactListElementResponseModel": { + "type": "object", + "properties": { + "artifact_meta": { + "type": "array", + "items": { + "type": "integer" + } + }, + "artifact_type": { + "$ref": "#/definitions/nulls.String" + }, + "file_size_bytes": { + "type": "integer" + }, + "is_public_page_enabled": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "title": { + "$ref": "#/definitions/nulls.String" + } + } + }, + "v0.ArtifactListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.ArtifactListElementResponseModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.ArtifactResponseItemModel": { + "type": "object", + "properties": { + "artifact_meta": { + "type": "array", + "items": { + "type": "integer" + } + }, + "artifact_type": { + "$ref": "#/definitions/nulls.String" + }, + "expiring_download_url": { + "type": "string" + }, + "file_size_bytes": { + "type": "integer" + }, + "is_public_page_enabled": { + "type": "boolean" + }, + "public_install_page_url": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "title": { + "$ref": "#/definitions/nulls.String" + } + } + }, + "v0.ArtifactShowResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.ArtifactResponseItemModel" + } + } + }, + "v0.ArtifactUpdateParams": { + "type": "object", + "required": [ + "is_public_page_enabled" + ], + "properties": { + "is_public_page_enabled": { + "type": "boolean" + } + } + }, + "v0.AvatarCandidateCreateParams": { + "type": "object", + "required": [ + "filename", + "filesize" + ], + "properties": { + "filename": { + "type": "string" + }, + "filesize": { + "type": "integer" + } + } + }, + "v0.AvatarCandidateCreateResponseItem": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "filesize": { + "type": "integer" + }, + "slug": { + "type": "string" + }, + "upload_url": { + "type": "string" + } + } + }, + "v0.AvatarPromoteParams": { + "type": "object", + "required": [ + "is_promoted" + ], + "properties": { + "is_promoted": { + "type": "boolean" + } + } + }, + "v0.AvatarPromoteResponseItemModel": { + "type": "object", + "properties": { + "is_candidate": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + } + } + }, + "v0.AvatarPromoteResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.AvatarPromoteResponseItemModel" + } + } + }, + "v0.BranchListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v0.BuildAbortParams": { + "type": "object", + "required": [ + "abort_reason", + "abort_with_success", + "skip_notifications" + ], + "properties": { + "abort_reason": { + "type": "string" + }, + "abort_with_success": { + "type": "boolean" + }, + "skip_notifications": { + "type": "boolean" + } + } + }, + "v0.BuildAbortResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "string" + } + } + }, + "v0.BuildCertificateListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildCertificateResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.BuildCertificateResponseItemModel": { + "type": "object", + "properties": { + "certificate_password": { + "type": "string" + }, + "download_url": { + "type": "string" + }, + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + }, + "upload_url": { + "type": "string" + } + } + }, + "v0.BuildCertificateResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.BuildCertificateResponseItemModel" + } + } + }, + "v0.BuildCertificateUpdateParams": { + "type": "object", + "properties": { + "certificate_password": { + "type": "string" + }, + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + } + } + }, + "v0.BuildCertificateUploadParams": { + "type": "object", + "required": [ + "upload_file_name", + "upload_file_size" + ], + "properties": { + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + } + } + }, + "v0.BuildListAllResponseItemModel": { + "type": "object", + "properties": { + "abort_reason": { + "$ref": "#/definitions/nulls.String" + }, + "branch": { + "$ref": "#/definitions/nulls.String" + }, + "build_number": { + "type": "integer" + }, + "commit_hash": { + "$ref": "#/definitions/nulls.String" + }, + "commit_message": { + "$ref": "#/definitions/nulls.String" + }, + "commit_view_url": { + "$ref": "#/definitions/nulls.String" + }, + "environment_prepare_finished_at": { + "type": "string" + }, + "finished_at": { + "type": "string" + }, + "is_on_hold": { + "type": "boolean" + }, + "machine_type_id": { + "$ref": "#/definitions/nulls.String" + }, + "original_build_params": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pull_request_id": { + "type": "integer" + }, + "pull_request_target_branch": { + "$ref": "#/definitions/nulls.String" + }, + "pull_request_view_url": { + "$ref": "#/definitions/nulls.String" + }, + "repository": { + "$ref": "#/definitions/v0.AppResponseItemModel" + }, + "slug": { + "type": "string" + }, + "stack_identifier": { + "$ref": "#/definitions/nulls.String" + }, + "started_on_worker_at": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "status_text": { + "type": "string" + }, + "tag": { + "$ref": "#/definitions/nulls.String" + }, + "triggered_at": { + "type": "string" + }, + "triggered_by": { + "$ref": "#/definitions/nulls.String" + }, + "triggered_workflow": { + "type": "string" + } + } + }, + "v0.BuildListAllResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildListAllResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.BuildListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.BuildLogChunkItemResponseModel": { + "type": "object", + "properties": { + "chunk": { + "type": "string" + }, + "position": { + "type": "integer" + } + } + }, + "v0.BuildLogInfoResponseModel": { + "type": "object", + "properties": { + "expiring_raw_log_url": { + "type": "string" + }, + "generated_log_chunks_num": { + "type": "integer" + }, + "is_archived": { + "type": "boolean" + }, + "log_chunks": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildLogChunkItemResponseModel" + } + }, + "timestamp": { + "$ref": "#/definitions/nulls.String" + } + } + }, + "v0.BuildParamsEnvironment": { + "type": "object", + "properties": { + "is_expand": { + "type": "boolean" + }, + "mapped_to": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v0.BuildRequestListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildRequestResponseItemModel" + } + } + } + }, + "v0.BuildRequestResponseItemModel": { + "type": "object", + "properties": { + "build_params": { + "type": "array", + "items": { + "type": "integer" + } + }, + "created_at": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "slug": { + "type": "string" + } + } + }, + "v0.BuildRequestUpdateParams": { + "type": "object", + "required": [ + "is_approved" + ], + "properties": { + "is_approved": { + "type": "boolean" + } + } + }, + "v0.BuildRequestUpdateResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.BuildRequestResponseItemModel" + } + } + }, + "v0.BuildResponseItemModel": { + "type": "object", + "properties": { + "abort_reason": { + "$ref": "#/definitions/nulls.String" + }, + "branch": { + "$ref": "#/definitions/nulls.String" + }, + "build_number": { + "type": "integer" + }, + "commit_hash": { + "$ref": "#/definitions/nulls.String" + }, + "commit_message": { + "$ref": "#/definitions/nulls.String" + }, + "commit_view_url": { + "$ref": "#/definitions/nulls.String" + }, + "environment_prepare_finished_at": { + "type": "string" + }, + "finished_at": { + "type": "string" + }, + "is_on_hold": { + "type": "boolean" + }, + "machine_type_id": { + "$ref": "#/definitions/nulls.String" + }, + "original_build_params": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pull_request_id": { + "type": "integer" + }, + "pull_request_target_branch": { + "$ref": "#/definitions/nulls.String" + }, + "pull_request_view_url": { + "$ref": "#/definitions/nulls.String" + }, + "slug": { + "type": "string" + }, + "stack_identifier": { + "$ref": "#/definitions/nulls.String" + }, + "started_on_worker_at": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "status_text": { + "type": "string" + }, + "tag": { + "$ref": "#/definitions/nulls.String" + }, + "triggered_at": { + "type": "string" + }, + "triggered_by": { + "$ref": "#/definitions/nulls.String" + }, + "triggered_workflow": { + "type": "string" + } + } + }, + "v0.BuildShowResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.BuildResponseItemModel" + } + } + }, + "v0.BuildTriggerParams": { + "type": "object", + "properties": { + "build_params": { + "description": "The public part of the SSH key you would like to use", + "$ref": "#/definitions/v0.BuildTriggerParamsBuildParams" + }, + "hook_info": { + "$ref": "#/definitions/v0.BuildTriggerParamsHookInfo" + } + } + }, + "v0.BuildTriggerParamsBuildParams": { + "type": "object", + "properties": { + "branch": { + "type": "string" + }, + "branch_dest": { + "type": "string" + }, + "branch_dest_repo_owner": { + "type": "string" + }, + "branch_repo_owner": { + "type": "string" + }, + "build_request_slug": { + "type": "string" + }, + "commit_hash": { + "type": "string" + }, + "commit_message": { + "type": "string" + }, + "commit_paths": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.CommitPaths" + } + }, + "diff_url": { + "type": "string" + }, + "environments": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.BuildParamsEnvironment" + } + }, + "pull_request_author": { + "type": "string" + }, + "pull_request_head_branch": { + "type": "string" + }, + "pull_request_id": { + "type": "object" + }, + "pull_request_merge_branch": { + "type": "string" + }, + "pull_request_repository_url": { + "type": "string" + }, + "skip_git_status_report": { + "type": "boolean" + }, + "tag": { + "type": "string" + }, + "workflow_id": { + "type": "string" + } + } + }, + "v0.BuildTriggerParamsHookInfo": { + "type": "object", + "properties": { + "type": { + "description": "Should be \"bitrise\"", + "type": "string", + "example": "bitrise" + } + } + }, + "v0.BuildTriggerRespModel": { + "type": "object", + "properties": { + "build_number": { + "type": "integer" + }, + "build_slug": { + "type": "string" + }, + "build_url": { + "type": "string" + }, + "message": { + "type": "string" + }, + "service": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string" + }, + "triggered_workflow": { + "type": "string" + } + } + }, + "v0.BuildWorkflowListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v0.CommitPaths": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + } + }, + "modified": { + "type": "array", + "items": { + "type": "string" + } + }, + "removed": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v0.FindAvatarCandidateResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.FindAvatarCandidateResponseItem" + } + } + } + }, + "v0.FindAvatarCandidateResponseItem": { + "type": "object", + "properties": { + "download_url": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "slug": { + "type": "string" + } + } + }, + "v0.OrganizationDataModel": { + "type": "object", + "properties": { + "avatar_icon_url": { + "$ref": "#/definitions/nulls.String" + }, + "concurrency_count": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "owners": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.OrganizationOwner" + } + }, + "slug": { + "type": "string" + } + } + }, + "v0.OrganizationListRespModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.OrganizationDataModel" + } + } + } + }, + "v0.OrganizationOwner": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "v0.OrganizationRespModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.OrganizationDataModel" + } + } + }, + "v0.OwnerAccountResponseModel": { + "type": "object", + "properties": { + "account_type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + } + } + }, + "v0.OwnerAddOnResponseItemModel": { + "type": "object", + "properties": { + "apps": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.AddOnAppResponseItemModel" + } + }, + "documentation_url": { + "type": "string" + }, + "has_ui": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_beta": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "v0.OwnerAddOnsListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.OwnerAddOnResponseItemModel" + } + } + } + }, + "v0.PagingResponseModel": { + "type": "object", + "properties": { + "next": { + "description": "Next is the \"anchor\" for pagination. This value should be passed to the same endpoint\nto get the next page. Empty/not included if there's no \"next\" page.\nStop paging when there's no \"Next\" item in the response!", + "type": "string" + }, + "page_item_limit": { + "description": "PageItemLimit - per-page item count. A given page might include\nless items if there's not enough items. This value is the \"max item count per page\".", + "type": "integer" + }, + "total_item_count": { + "description": "TotalItemCount - total item count, through \"all pages\"", + "type": "integer" + } + } + }, + "v0.PlanDataModel": { + "type": "object", + "properties": { + "container_count": { + "type": "integer" + }, + "expires_at": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "price": { + "$ref": "#/definitions/nulls.Int64" + } + } + }, + "v0.ProjectFileStorageDocumentUpdateParams": { + "type": "object", + "properties": { + "exposed_meta_datastore": { + "type": "array", + "items": { + "type": "integer" + } + }, + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + }, + "user_env_key": { + "type": "string" + } + } + }, + "v0.ProjectFileStorageListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.ProjectFileStorageResponseItemModel": { + "type": "object", + "properties": { + "download_url": { + "type": "string" + }, + "exposed_meta_datastore": { + "type": "array", + "items": { + "type": "integer" + } + }, + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + }, + "upload_url": { + "type": "string" + }, + "user_env_key": { + "type": "string" + } + } + }, + "v0.ProjectFileStorageResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.ProjectFileStorageResponseItemModel" + } + } + }, + "v0.ProjectFileStorageUploadParams": { + "type": "object", + "required": [ + "upload_file_name", + "upload_file_size", + "user_env_key" + ], + "properties": { + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + }, + "user_env_key": { + "type": "string" + } + } + }, + "v0.ProvProfileDocumentUpdateParams": { + "type": "object", + "properties": { + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + } + } + }, + "v0.ProvisionProfileListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.ProvisionProfileResponseItemModel" + } + }, + "paging": { + "description": "pagination", + "$ref": "#/definitions/v0.PagingResponseModel" + } + } + }, + "v0.ProvisionProfileResponseItemModel": { + "type": "object", + "properties": { + "download_url": { + "type": "string" + }, + "is_expose": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "processed": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + }, + "upload_url": { + "type": "string" + } + } + }, + "v0.ProvisionProfileResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.ProvisionProfileResponseItemModel" + } + } + }, + "v0.ProvisionProfileUploadParams": { + "type": "object", + "required": [ + "upload_file_name", + "upload_file_size" + ], + "properties": { + "upload_file_name": { + "type": "string" + }, + "upload_file_size": { + "type": "integer" + } + } + }, + "v0.ProxyErrorRespModel": { + "type": "object", + "properties": { + "error_msg": { + "type": "string" + } + } + }, + "v0.SSHKeyRespModel": { + "type": "object", + "properties": { + "status": { + "type": "string" + } + } + }, + "v0.SSHKeyUploadParams": { + "type": "object", + "required": [ + "auth_ssh_private_key", + "auth_ssh_public_key" + ], + "properties": { + "auth_ssh_private_key": { + "description": "The private part of the SSH key you would like to use", + "type": "string" + }, + "auth_ssh_public_key": { + "description": "The public part of the SSH key you would like to use", + "type": "string" + }, + "is_register_key_into_provider_service": { + "description": "If it's set to true, the provided SSH key will be registered at the provider of the application", + "type": "boolean" + } + } + }, + "v0.TestDeviceListResponseModel": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v0.TestDeviceResponseItemModel" + } + } + } + }, + "v0.TestDeviceResponseItemModel": { + "type": "object", + "properties": { + "device_id": { + "type": "string" + }, + "device_type": { + "type": "string" + }, + "owner": { + "type": "string" + } + } + }, + "v0.UserPlanDataModel": { + "type": "object", + "properties": { + "current_plan": { + "$ref": "#/definitions/v0.PlanDataModel" + }, + "pending_plan": { + "$ref": "#/definitions/v0.PlanDataModel" + }, + "trial_expires_at": { + "type": "string" + } + } + }, + "v0.UserPlanRespModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.UserPlanDataModel" + } + } + }, + "v0.UserProfileDataModel": { + "type": "object", + "properties": { + "avatar_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "data_id": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "has_used_organization_trial": { + "type": "boolean" + }, + "payment_processor": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "unconfirmed_email": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "v0.UserProfileRespModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.UserProfileDataModel" + } + } + }, + "v0.WebhookDeliveryItemResponseModel": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "request_headers": { + "type": "string" + }, + "request_payload": { + "type": "string" + }, + "request_url": { + "type": "string" + }, + "response_body": { + "$ref": "#/definitions/nulls.String" + }, + "response_headers": { + "$ref": "#/definitions/nulls.String" + }, + "response_http_status": { + "$ref": "#/definitions/nulls.Int64" + }, + "response_seconds": { + "$ref": "#/definitions/nulls.Int64" + }, + "slug": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "v0.WebhookDeliveryItemShowResponseModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v0.WebhookDeliveryItemResponseModel" + } + } + }, + "v0.WebhookRespModel": { + "type": "object", + "properties": { + "status": { + "type": "string" + } + } + } + }, + "securityDefinitions": { + "AddonAuthToken": { + "type": "apiKey", + "name": "Bitrise-Addon-Auth-Token", + "in": "header" + }, + "PersonalAccessToken": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + } +} \ No newline at end of file diff --git a/tools.go b/tools.go new file mode 100644 index 0000000..6d54938 --- /dev/null +++ b/tools.go @@ -0,0 +1,12 @@ +// +build tools + +package tools + +// See https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module +// for more details + +import ( + _ "github.com/go-swagger/go-swagger/cmd/swagger" + _ "github.com/kyoh86/richgo" + _ "github.com/myitcv/gobin" +)