"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Trigger = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Configuration for an automated build in response to source repository changes.
 *
 * To get more information about Trigger, see:
 *
 * * [API documentation](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.triggers)
 * * How-to Guides
 *     * [Automating builds using build triggers](https://cloud.google.com/cloud-build/docs/running-builds/automate-builds)
 *
 * > **Note:** You can retrieve the email of the Cloud Build Service Account used in jobs by using the `gcp.projects.ServiceIdentity` resource.
 *
 * ## Example Usage
 *
 * ### Cloudbuild Trigger Filename
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const filename_trigger = new gcp.cloudbuild.Trigger("filename-trigger", {
 *     location: "us-central1",
 *     triggerTemplate: {
 *         branchName: "main",
 *         repoName: "my-repo",
 *     },
 *     substitutions: {
 *         _FOO: "bar",
 *         _BAZ: "qux",
 *     },
 *     filename: "cloudbuild.yaml",
 * });
 * ```
 * ### Cloudbuild Trigger Build
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const build_trigger = new gcp.cloudbuild.Trigger("build-trigger", {
 *     name: "my-trigger",
 *     location: "global",
 *     triggerTemplate: {
 *         branchName: "main",
 *         repoName: "my-repo",
 *     },
 *     build: {
 *         steps: [
 *             {
 *                 name: "gcr.io/cloud-builders/gcloud",
 *                 args: [
 *                     "storage",
 *                     "cp",
 *                     "gs://mybucket/remotefile.zip",
 *                     "localfile.zip",
 *                 ],
 *                 timeout: "120s",
 *                 secretEnvs: ["MY_SECRET"],
 *             },
 *             {
 *                 name: "ubuntu",
 *                 script: "echo hello",
 *             },
 *         ],
 *         source: {
 *             storageSource: {
 *                 bucket: "mybucket",
 *                 object: "source_code.tar.gz",
 *             },
 *         },
 *         tags: [
 *             "build",
 *             "newFeature",
 *         ],
 *         substitutions: {
 *             _FOO: "bar",
 *             _BAZ: "qux",
 *         },
 *         queueTtl: "20s",
 *         logsBucket: "gs://mybucket/logs",
 *         secrets: [{
 *             kmsKeyName: "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
 *             secretEnv: {
 *                 PASSWORD: "ZW5jcnlwdGVkLXBhc3N3b3JkCg==",
 *             },
 *         }],
 *         availableSecrets: {
 *             secretManagers: [{
 *                 env: "MY_SECRET",
 *                 versionName: "projects/myProject/secrets/mySecret/versions/latest",
 *             }],
 *         },
 *         artifacts: {
 *             images: ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"],
 *             objects: {
 *                 location: "gs://bucket/path/to/somewhere/",
 *                 paths: ["path"],
 *             },
 *             npmPackages: [{
 *                 packagePath: "package.json",
 *                 repository: "https://us-west1-npm.pkg.dev/myProject/quickstart-nodejs-repo",
 *             }],
 *             pythonPackages: [{
 *                 paths: ["dist/*"],
 *                 repository: "https://us-west1-python.pkg.dev/myProject/quickstart-python-repo",
 *             }],
 *             mavenArtifacts: [{
 *                 repository: "https://us-west1-maven.pkg.dev/myProject/quickstart-java-repo",
 *                 path: "/workspace/my-app/target/my-app-1.0.SNAPSHOT.jar",
 *                 artifactId: "my-app",
 *                 groupId: "com.mycompany.app",
 *                 version: "1.0",
 *             }],
 *         },
 *         options: {
 *             sourceProvenanceHashes: ["MD5"],
 *             requestedVerifyOption: "VERIFIED",
 *             machineType: "N1_HIGHCPU_8",
 *             diskSizeGb: 100,
 *             substitutionOption: "ALLOW_LOOSE",
 *             dynamicSubstitutions: true,
 *             logStreamingOption: "STREAM_OFF",
 *             workerPool: "pool",
 *             logging: "LEGACY",
 *             envs: ["ekey = evalue"],
 *             secretEnvs: ["secretenv = svalue"],
 *             volumes: [{
 *                 name: "v1",
 *                 path: "v1",
 *             }],
 *         },
 *     },
 * });
 * ```
 * ### Cloudbuild Trigger Service Account
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const project = gcp.organizations.getProject({});
 * const cloudbuildServiceAccount = new gcp.serviceaccount.Account("cloudbuild_service_account", {accountId: "cloud-sa"});
 * const actAs = new gcp.projects.IAMMember("act_as", {
 *     project: project.then(project => project.projectId),
 *     role: "roles/iam.serviceAccountUser",
 *     member: pulumi.interpolate`serviceAccount:${cloudbuildServiceAccount.email}`,
 * });
 * const logsWriter = new gcp.projects.IAMMember("logs_writer", {
 *     project: project.then(project => project.projectId),
 *     role: "roles/logging.logWriter",
 *     member: pulumi.interpolate`serviceAccount:${cloudbuildServiceAccount.email}`,
 * });
 * const service_account_trigger = new gcp.cloudbuild.Trigger("service-account-trigger", {
 *     triggerTemplate: {
 *         branchName: "main",
 *         repoName: "my-repo",
 *     },
 *     serviceAccount: cloudbuildServiceAccount.id,
 *     filename: "cloudbuild.yaml",
 * }, {
 *     dependsOn: [
 *         actAs,
 *         logsWriter,
 *     ],
 * });
 * ```
 * ### Cloudbuild Trigger Include Build Logs
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const include_build_logs_trigger = new gcp.cloudbuild.Trigger("include-build-logs-trigger", {
 *     location: "us-central1",
 *     name: "include-build-logs-trigger",
 *     filename: "cloudbuild.yaml",
 *     github: {
 *         owner: "hashicorp",
 *         name: "terraform-provider-google-beta",
 *         push: {
 *             branch: "^main$",
 *         },
 *     },
 *     includeBuildLogs: "INCLUDE_BUILD_LOGS_WITH_STATUS",
 * });
 * ```
 * ### Cloudbuild Trigger Pubsub Config
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const mytopic = new gcp.pubsub.Topic("mytopic", {name: "my-topic"});
 * const pubsub_config_trigger = new gcp.cloudbuild.Trigger("pubsub-config-trigger", {
 *     location: "us-central1",
 *     name: "pubsub-trigger",
 *     description: "acceptance test example pubsub build trigger",
 *     pubsubConfig: {
 *         topic: mytopic.id,
 *     },
 *     sourceToBuild: {
 *         uri: "https://hashicorp/terraform-provider-google-beta",
 *         ref: "refs/heads/main",
 *         repoType: "GITHUB",
 *     },
 *     gitFileSource: {
 *         path: "cloudbuild.yaml",
 *         uri: "https://hashicorp/terraform-provider-google-beta",
 *         revision: "refs/heads/main",
 *         repoType: "GITHUB",
 *     },
 *     substitutions: {
 *         _ACTION: "$(body.message.data.action)",
 *     },
 *     filter: "_ACTION.matches('INSERT')",
 * });
 * ```
 * ### Cloudbuild Trigger Webhook Config
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const webhookTriggerSecretKey = new gcp.secretmanager.Secret("webhook_trigger_secret_key", {
 *     secretId: "webhook-trigger-secret-key",
 *     replication: {
 *         userManaged: {
 *             replicas: [{
 *                 location: "us-central1",
 *             }],
 *         },
 *     },
 * });
 * const webhookTriggerSecretKeyData = new gcp.secretmanager.SecretVersion("webhook_trigger_secret_key_data", {
 *     secret: webhookTriggerSecretKey.id,
 *     secretData: "secretkeygoeshere",
 * });
 * const project = gcp.organizations.getProject({});
 * const secretAccessor = project.then(project => gcp.organizations.getIAMPolicy({
 *     bindings: [{
 *         role: "roles/secretmanager.secretAccessor",
 *         members: [`serviceAccount:service-${project.number}@gcp-sa-cloudbuild.iam.gserviceaccount.com`],
 *     }],
 * }));
 * const policy = new gcp.secretmanager.SecretIamPolicy("policy", {
 *     project: webhookTriggerSecretKey.project,
 *     secretId: webhookTriggerSecretKey.secretId,
 *     policyData: secretAccessor.then(secretAccessor => secretAccessor.policyData),
 * });
 * const webhook_config_trigger = new gcp.cloudbuild.Trigger("webhook-config-trigger", {
 *     name: "webhook-trigger",
 *     description: "acceptance test example webhook build trigger",
 *     webhookConfig: {
 *         secret: webhookTriggerSecretKeyData.id,
 *     },
 *     sourceToBuild: {
 *         uri: "https://hashicorp/terraform-provider-google-beta",
 *         ref: "refs/heads/main",
 *         repoType: "GITHUB",
 *     },
 *     gitFileSource: {
 *         path: "cloudbuild.yaml",
 *         uri: "https://hashicorp/terraform-provider-google-beta",
 *         revision: "refs/heads/main",
 *         repoType: "GITHUB",
 *     },
 * });
 * ```
 * ### Cloudbuild Trigger Manual
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const manual_trigger = new gcp.cloudbuild.Trigger("manual-trigger", {
 *     name: "manual-trigger",
 *     sourceToBuild: {
 *         uri: "https://hashicorp/terraform-provider-google-beta",
 *         ref: "refs/heads/main",
 *         repoType: "GITHUB",
 *     },
 *     gitFileSource: {
 *         path: "cloudbuild.yaml",
 *         uri: "https://hashicorp/terraform-provider-google-beta",
 *         revision: "refs/heads/main",
 *         repoType: "GITHUB",
 *     },
 *     approvalConfig: {
 *         approvalRequired: true,
 *     },
 * });
 * ```
 * ### Cloudbuild Trigger Manual Github Enterprise
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const manual_ghe_trigger = new gcp.cloudbuild.Trigger("manual-ghe-trigger", {
 *     name: "my-trigger",
 *     sourceToBuild: {
 *         uri: "https://hashicorp/terraform-provider-google-beta",
 *         ref: "refs/heads/main",
 *         repoType: "GITHUB",
 *         githubEnterpriseConfig: "projects/myProject/locations/global/githubEnterpriseConfigs/configID",
 *     },
 *     gitFileSource: {
 *         path: "cloudbuild.yaml",
 *         uri: "https://hashicorp/terraform-provider-google-beta",
 *         revision: "refs/heads/main",
 *         repoType: "GITHUB",
 *         githubEnterpriseConfig: "projects/myProject/locations/global/githubEnterpriseConfigs/configID",
 *     },
 * });
 * ```
 * ### Cloudbuild Trigger Manual Bitbucket Server
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const manual_bitbucket_trigger = new gcp.cloudbuild.Trigger("manual-bitbucket-trigger", {
 *     name: "terraform-manual-bbs-trigger",
 *     sourceToBuild: {
 *         uri: "https://bbs.com/scm/stag/test-repo.git",
 *         ref: "refs/heads/main",
 *         repoType: "BITBUCKET_SERVER",
 *         bitbucketServerConfig: "projects/myProject/locations/global/bitbucketServerConfigs/configID",
 *     },
 *     gitFileSource: {
 *         path: "cloudbuild.yaml",
 *         uri: "https://bbs.com/scm/stag/test-repo.git",
 *         revision: "refs/heads/main",
 *         repoType: "BITBUCKET_SERVER",
 *         bitbucketServerConfig: "projects/myProject/locations/global/bitbucketServerConfigs/configID",
 *     },
 * });
 * ```
 * ### Cloudbuild Trigger Repo
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const my_connection = new gcp.cloudbuildv2.Connection("my-connection", {
 *     location: "us-central1",
 *     name: "my-connection",
 *     githubConfig: {
 *         appInstallationId: 123123,
 *         authorizerCredential: {
 *             oauthTokenSecretVersion: "projects/my-project/secrets/github-pat-secret/versions/latest",
 *         },
 *     },
 * });
 * const my_repository = new gcp.cloudbuildv2.Repository("my-repository", {
 *     name: "my-repo",
 *     parentConnection: my_connection.id,
 *     remoteUri: "https://github.com/myuser/my-repo.git",
 * });
 * const repo_trigger = new gcp.cloudbuild.Trigger("repo-trigger", {
 *     location: "us-central1",
 *     repositoryEventConfig: {
 *         repository: my_repository.id,
 *         push: {
 *             branch: "feature-.*",
 *         },
 *     },
 *     filename: "cloudbuild.yaml",
 * });
 * ```
 * ### Cloudbuild Trigger Bitbucket Server Push
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const bbs_push_trigger = new gcp.cloudbuild.Trigger("bbs-push-trigger", {
 *     name: "bbs-push-trigger",
 *     location: "us-central1",
 *     bitbucketServerTriggerConfig: {
 *         repoSlug: "bbs-push-trigger",
 *         projectKey: "STAG",
 *         bitbucketServerConfigResource: "projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig",
 *         push: {
 *             tag: "^0.1.*",
 *             invertRegex: true,
 *         },
 *     },
 *     filename: "cloudbuild.yaml",
 * });
 * ```
 * ### Cloudbuild Trigger Bitbucket Server Pull Request
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const bbs_pull_request_trigger = new gcp.cloudbuild.Trigger("bbs-pull-request-trigger", {
 *     name: "ghe-trigger",
 *     location: "us-central1",
 *     bitbucketServerTriggerConfig: {
 *         repoSlug: "terraform-provider-google",
 *         projectKey: "STAG",
 *         bitbucketServerConfigResource: "projects/123456789/locations/us-central1/bitbucketServerConfigs/myBitbucketConfig",
 *         pullRequest: {
 *             branch: "^master$",
 *             invertRegex: false,
 *             commentControl: "COMMENTS_ENABLED",
 *         },
 *     },
 *     filename: "cloudbuild.yaml",
 * });
 * ```
 * ### Cloudbuild Trigger Github Enterprise
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const ghe_trigger = new gcp.cloudbuild.Trigger("ghe-trigger", {
 *     name: "ghe-trigger",
 *     location: "us-central1",
 *     github: {
 *         owner: "hashicorp",
 *         name: "terraform-provider-google",
 *         push: {
 *             branch: "^main$",
 *         },
 *         enterpriseConfigResourceName: "projects/123456789/locations/us-central1/githubEnterpriseConfigs/configID",
 *     },
 *     filename: "cloudbuild.yaml",
 * });
 * ```
 * ### Cloudbuild Trigger Allow Failure
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const allow_failure_trigger = new gcp.cloudbuild.Trigger("allow-failure-trigger", {
 *     name: "my-trigger",
 *     location: "global",
 *     triggerTemplate: {
 *         branchName: "main",
 *         repoName: "my-repo",
 *     },
 *     build: {
 *         steps: [{
 *             name: "ubuntu",
 *             args: [
 *                 "-c",
 *                 "exit 1",
 *             ],
 *             allowFailure: true,
 *         }],
 *         source: {
 *             storageSource: {
 *                 bucket: "mybucket",
 *                 object: "source_code.tar.gz",
 *             },
 *         },
 *         tags: [
 *             "build",
 *             "newFeature",
 *         ],
 *         substitutions: {
 *             _FOO: "bar",
 *             _BAZ: "qux",
 *         },
 *         queueTtl: "20s",
 *         logsBucket: "gs://mybucket/logs",
 *         secrets: [{
 *             kmsKeyName: "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
 *             secretEnv: {
 *                 PASSWORD: "ZW5jcnlwdGVkLXBhc3N3b3JkCg==",
 *             },
 *         }],
 *         availableSecrets: {
 *             secretManagers: [{
 *                 env: "MY_SECRET",
 *                 versionName: "projects/myProject/secrets/mySecret/versions/latest",
 *             }],
 *         },
 *         artifacts: {
 *             images: ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"],
 *             objects: {
 *                 location: "gs://bucket/path/to/somewhere/",
 *                 paths: ["path"],
 *             },
 *         },
 *         options: {
 *             sourceProvenanceHashes: ["MD5"],
 *             requestedVerifyOption: "VERIFIED",
 *             machineType: "N1_HIGHCPU_8",
 *             diskSizeGb: 100,
 *             substitutionOption: "ALLOW_LOOSE",
 *             dynamicSubstitutions: true,
 *             logStreamingOption: "STREAM_OFF",
 *             workerPool: "pool",
 *             logging: "LEGACY",
 *             envs: ["ekey = evalue"],
 *             secretEnvs: ["secretenv = svalue"],
 *             volumes: [{
 *                 name: "v1",
 *                 path: "v1",
 *             }],
 *         },
 *     },
 * });
 * ```
 * ### Cloudbuild Trigger Allow Exit Codes
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const allow_exit_codes_trigger = new gcp.cloudbuild.Trigger("allow-exit-codes-trigger", {
 *     name: "my-trigger",
 *     location: "global",
 *     triggerTemplate: {
 *         branchName: "main",
 *         repoName: "my-repo",
 *     },
 *     build: {
 *         steps: [{
 *             name: "ubuntu",
 *             args: [
 *                 "-c",
 *                 "exit 1",
 *             ],
 *             allowExitCodes: [
 *                 1,
 *                 3,
 *             ],
 *         }],
 *         source: {
 *             storageSource: {
 *                 bucket: "mybucket",
 *                 object: "source_code.tar.gz",
 *             },
 *         },
 *         tags: [
 *             "build",
 *             "newFeature",
 *         ],
 *         substitutions: {
 *             _FOO: "bar",
 *             _BAZ: "qux",
 *         },
 *         queueTtl: "20s",
 *         logsBucket: "gs://mybucket/logs",
 *         secrets: [{
 *             kmsKeyName: "projects/myProject/locations/global/keyRings/keyring-name/cryptoKeys/key-name",
 *             secretEnv: {
 *                 PASSWORD: "ZW5jcnlwdGVkLXBhc3N3b3JkCg==",
 *             },
 *         }],
 *         availableSecrets: {
 *             secretManagers: [{
 *                 env: "MY_SECRET",
 *                 versionName: "projects/myProject/secrets/mySecret/versions/latest",
 *             }],
 *         },
 *         artifacts: {
 *             images: ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"],
 *             objects: {
 *                 location: "gs://bucket/path/to/somewhere/",
 *                 paths: ["path"],
 *             },
 *         },
 *         options: {
 *             sourceProvenanceHashes: ["MD5"],
 *             requestedVerifyOption: "VERIFIED",
 *             machineType: "N1_HIGHCPU_8",
 *             diskSizeGb: 100,
 *             substitutionOption: "ALLOW_LOOSE",
 *             dynamicSubstitutions: true,
 *             logStreamingOption: "STREAM_OFF",
 *             workerPool: "pool",
 *             logging: "LEGACY",
 *             envs: ["ekey = evalue"],
 *             secretEnvs: ["secretenv = svalue"],
 *             volumes: [{
 *                 name: "v1",
 *                 path: "v1",
 *             }],
 *         },
 *     },
 * });
 * ```
 * ### Cloudbuild Trigger Pubsub With Repo
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const my_connection = new gcp.cloudbuildv2.Connection("my-connection", {
 *     location: "us-central1",
 *     name: "my-connection",
 *     githubConfig: {
 *         appInstallationId: 123123,
 *         authorizerCredential: {
 *             oauthTokenSecretVersion: "projects/my-project/secrets/github-pat-secret/versions/latest",
 *         },
 *     },
 * });
 * const my_repository = new gcp.cloudbuildv2.Repository("my-repository", {
 *     name: "my-repo",
 *     parentConnection: my_connection.id,
 *     remoteUri: "https://github.com/myuser/my-repo.git",
 * });
 * const mytopic = new gcp.pubsub.Topic("mytopic", {name: "my-topic"});
 * const pubsub_with_repo_trigger = new gcp.cloudbuild.Trigger("pubsub-with-repo-trigger", {
 *     name: "pubsub-with-repo-trigger",
 *     location: "us-central1",
 *     pubsubConfig: {
 *         topic: mytopic.id,
 *     },
 *     sourceToBuild: {
 *         repository: my_repository.id,
 *         ref: "refs/heads/main",
 *         repoType: "GITHUB",
 *     },
 *     gitFileSource: {
 *         path: "cloudbuild.yaml",
 *         repository: my_repository.id,
 *         revision: "refs/heads/main",
 *         repoType: "GITHUB",
 *     },
 * });
 * ```
 * ### Cloudbuild Trigger Developer Connect Pull
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const developer_connect_trigger_pull = new gcp.cloudbuild.Trigger("developer-connect-trigger-pull", {
 *     location: "us-central1",
 *     developerConnectEventConfig: {
 *         gitRepositoryLink: "projects/cryptic-tower-286020/locations/us-central1/connections/prod-bbs-push/gitRepositoryLinks/cbprob-prod-us-central1-push1",
 *         pullRequest: {
 *             branch: "^master$",
 *             invertRegex: false,
 *             commentControl: "COMMENTS_ENABLED",
 *         },
 *     },
 *     filename: "cloudbuild.yaml",
 * });
 * ```
 * ### Cloudbuild Trigger Developer Connect Push
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const developer_connect_trigger_push = new gcp.cloudbuild.Trigger("developer-connect-trigger-push", {
 *     location: "us-central1",
 *     developerConnectEventConfig: {
 *         gitRepositoryLink: "projects/cryptic-tower-286020/locations/us-central1/connections/prod-bbs-push/gitRepositoryLinks/cbprob-prod-us-central1-push1",
 *         push: {
 *             tag: "^0.1.*",
 *             invertRegex: true,
 *         },
 *     },
 *     filename: "cloudbuild.yaml",
 * });
 * ```
 * ### Cloudbuild Trigger Developer Connect Push Branch
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const dc_trigger_regular_push_branch = new gcp.cloudbuild.Trigger("dc-trigger-regular-push-branch", {
 *     location: "us-central1",
 *     developerConnectEventConfig: {
 *         gitRepositoryLink: "projects/cryptic-tower-286020/locations/us-central1/connections/prod-bbs-push/gitRepositoryLinks/cbprob-prod-us-central1-push1",
 *         push: {
 *             branch: "main",
 *         },
 *     },
 *     filename: "cloudbuild.yaml",
 * });
 * ```
 *
 * ## Import
 *
 * Trigger can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/triggers/{{trigger_id}}`
 *
 * * `projects/{{project}}/triggers/{{trigger_id}}`
 *
 * * `{{project}}/{{trigger_id}}`
 *
 * * `{{trigger_id}}`
 *
 * When using the `pulumi import` command, Trigger can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:cloudbuild/trigger:Trigger default projects/{{project}}/locations/{{location}}/triggers/{{trigger_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:cloudbuild/trigger:Trigger default projects/{{project}}/triggers/{{trigger_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:cloudbuild/trigger:Trigger default {{project}}/{{trigger_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:cloudbuild/trigger:Trigger default {{trigger_id}}
 * ```
 */
class Trigger extends pulumi.CustomResource {
    /**
     * Get an existing Trigger resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new Trigger(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Trigger.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === Trigger.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["approvalConfig"] = state?.approvalConfig;
            resourceInputs["bitbucketServerTriggerConfig"] = state?.bitbucketServerTriggerConfig;
            resourceInputs["build"] = state?.build;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["developerConnectEventConfig"] = state?.developerConnectEventConfig;
            resourceInputs["disabled"] = state?.disabled;
            resourceInputs["filename"] = state?.filename;
            resourceInputs["filter"] = state?.filter;
            resourceInputs["gitFileSource"] = state?.gitFileSource;
            resourceInputs["github"] = state?.github;
            resourceInputs["ignoredFiles"] = state?.ignoredFiles;
            resourceInputs["includeBuildLogs"] = state?.includeBuildLogs;
            resourceInputs["includedFiles"] = state?.includedFiles;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pubsubConfig"] = state?.pubsubConfig;
            resourceInputs["repositoryEventConfig"] = state?.repositoryEventConfig;
            resourceInputs["serviceAccount"] = state?.serviceAccount;
            resourceInputs["sourceToBuild"] = state?.sourceToBuild;
            resourceInputs["substitutions"] = state?.substitutions;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["triggerId"] = state?.triggerId;
            resourceInputs["triggerTemplate"] = state?.triggerTemplate;
            resourceInputs["webhookConfig"] = state?.webhookConfig;
        }
        else {
            const args = argsOrState;
            resourceInputs["approvalConfig"] = args?.approvalConfig;
            resourceInputs["bitbucketServerTriggerConfig"] = args?.bitbucketServerTriggerConfig;
            resourceInputs["build"] = args?.build;
            resourceInputs["description"] = args?.description;
            resourceInputs["developerConnectEventConfig"] = args?.developerConnectEventConfig;
            resourceInputs["disabled"] = args?.disabled;
            resourceInputs["filename"] = args?.filename;
            resourceInputs["filter"] = args?.filter;
            resourceInputs["gitFileSource"] = args?.gitFileSource;
            resourceInputs["github"] = args?.github;
            resourceInputs["ignoredFiles"] = args?.ignoredFiles;
            resourceInputs["includeBuildLogs"] = args?.includeBuildLogs;
            resourceInputs["includedFiles"] = args?.includedFiles;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["pubsubConfig"] = args?.pubsubConfig;
            resourceInputs["repositoryEventConfig"] = args?.repositoryEventConfig;
            resourceInputs["serviceAccount"] = args?.serviceAccount;
            resourceInputs["sourceToBuild"] = args?.sourceToBuild;
            resourceInputs["substitutions"] = args?.substitutions;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["triggerTemplate"] = args?.triggerTemplate;
            resourceInputs["webhookConfig"] = args?.webhookConfig;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["triggerId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Trigger.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Trigger = Trigger;
/** @internal */
Trigger.__pulumiType = 'gcp:cloudbuild/trigger:Trigger';
//# sourceMappingURL=trigger.js.map