"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.RepositoryReleaseConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A resource represents a Dataform release configuration
 *
 * To get more information about RepositoryReleaseConfig, see:
 *
 * * [API documentation](https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories.releaseConfigs)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dataform/docs/release-configurations)
 *
 * ## Example Usage
 *
 * ### Dataform Repository Release Config
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const gitRepository = new gcp.sourcerepo.Repository("git_repository", {name: "my/repository"});
 * const secret = new gcp.secretmanager.Secret("secret", {
 *     secretId: "my_secret",
 *     replication: {
 *         auto: {},
 *     },
 * });
 * const secretVersion = new gcp.secretmanager.SecretVersion("secret_version", {
 *     secret: secret.id,
 *     secretData: "secret-data",
 * });
 * const repository = new gcp.dataform.Repository("repository", {
 *     name: "dataform_repository",
 *     region: "us-central1",
 *     gitRemoteSettings: {
 *         url: gitRepository.url,
 *         defaultBranch: "main",
 *         authenticationTokenSecretVersion: secretVersion.id,
 *     },
 *     workspaceCompilationOverrides: {
 *         defaultDatabase: "database",
 *         schemaSuffix: "_suffix",
 *         tablePrefix: "prefix_",
 *     },
 * });
 * const release = new gcp.dataform.RepositoryReleaseConfig("release", {
 *     project: repository.project,
 *     region: repository.region,
 *     repository: repository.name,
 *     name: "my_release",
 *     gitCommitish: "main",
 *     cronSchedule: "0 7 * * *",
 *     timeZone: "America/New_York",
 *     codeCompilationConfig: {
 *         defaultDatabase: "gcp-example-project",
 *         defaultSchema: "example-dataset",
 *         defaultLocation: "us-central1",
 *         assertionSchema: "example-assertion-dataset",
 *         databaseSuffix: "",
 *         schemaSuffix: "",
 *         tablePrefix: "",
 *         vars: {
 *             var1: "value",
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * RepositoryReleaseConfig can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{region}}/repositories/{{repository}}/releaseConfigs/{{name}}`
 *
 * * `{{project}}/{{region}}/{{repository}}/{{name}}`
 *
 * * `{{region}}/{{repository}}/{{name}}`
 *
 * * `{{repository}}/{{name}}`
 *
 * When using the `pulumi import` command, RepositoryReleaseConfig can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig default projects/{{project}}/locations/{{region}}/repositories/{{repository}}/releaseConfigs/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig default {{project}}/{{region}}/{{repository}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig default {{region}}/{{repository}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig default {{repository}}/{{name}}
 * ```
 */
class RepositoryReleaseConfig extends pulumi.CustomResource {
    /**
     * Get an existing RepositoryReleaseConfig 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 RepositoryReleaseConfig(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of RepositoryReleaseConfig.  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'] === RepositoryReleaseConfig.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["codeCompilationConfig"] = state?.codeCompilationConfig;
            resourceInputs["cronSchedule"] = state?.cronSchedule;
            resourceInputs["gitCommitish"] = state?.gitCommitish;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["recentScheduledReleaseRecords"] = state?.recentScheduledReleaseRecords;
            resourceInputs["region"] = state?.region;
            resourceInputs["repository"] = state?.repository;
            resourceInputs["timeZone"] = state?.timeZone;
        }
        else {
            const args = argsOrState;
            if (args?.gitCommitish === undefined && !opts.urn) {
                throw new Error("Missing required property 'gitCommitish'");
            }
            resourceInputs["codeCompilationConfig"] = args?.codeCompilationConfig;
            resourceInputs["cronSchedule"] = args?.cronSchedule;
            resourceInputs["gitCommitish"] = args?.gitCommitish;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["region"] = args?.region;
            resourceInputs["repository"] = args?.repository;
            resourceInputs["timeZone"] = args?.timeZone;
            resourceInputs["recentScheduledReleaseRecords"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(RepositoryReleaseConfig.__pulumiType, name, resourceInputs, opts);
    }
}
exports.RepositoryReleaseConfig = RepositoryReleaseConfig;
/** @internal */
RepositoryReleaseConfig.__pulumiType = 'gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig';
//# sourceMappingURL=repositoryReleaseConfig.js.map