// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.dataform;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gcp.Utilities;
import com.pulumi.gcp.dataform.RepositoryReleaseConfigArgs;
import com.pulumi.gcp.dataform.inputs.RepositoryReleaseConfigState;
import com.pulumi.gcp.dataform.outputs.RepositoryReleaseConfigCodeCompilationConfig;
import com.pulumi.gcp.dataform.outputs.RepositoryReleaseConfigRecentScheduledReleaseRecord;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * ## Example Usage
 * ### Dataform Repository Release Config
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.sourcerepo.Repository;
 * import com.pulumi.gcp.sourcerepo.RepositoryArgs;
 * import com.pulumi.gcp.secretmanager.Secret;
 * import com.pulumi.gcp.secretmanager.SecretArgs;
 * import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
 * import com.pulumi.gcp.secretmanager.SecretVersion;
 * import com.pulumi.gcp.secretmanager.SecretVersionArgs;
 * import com.pulumi.gcp.dataform.Repository;
 * import com.pulumi.gcp.dataform.RepositoryArgs;
 * import com.pulumi.gcp.dataform.inputs.RepositoryGitRemoteSettingsArgs;
 * import com.pulumi.gcp.dataform.inputs.RepositoryWorkspaceCompilationOverridesArgs;
 * import com.pulumi.gcp.dataform.RepositoryReleaseConfig;
 * import com.pulumi.gcp.dataform.RepositoryReleaseConfigArgs;
 * import com.pulumi.gcp.dataform.inputs.RepositoryReleaseConfigCodeCompilationConfigArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var gitRepository = new Repository(&#34;gitRepository&#34;, RepositoryArgs.Empty, CustomResourceOptions.builder()
 *             .provider(google_beta)
 *             .build());
 * 
 *         var secret = new Secret(&#34;secret&#34;, SecretArgs.builder()        
 *             .secretId(&#34;secret&#34;)
 *             .replication(SecretReplicationArgs.builder()
 *                 .automatic(true)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var secretVersion = new SecretVersion(&#34;secretVersion&#34;, SecretVersionArgs.builder()        
 *             .secret(secret.id())
 *             .secretData(&#34;secret-data&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var repository = new Repository(&#34;repository&#34;, RepositoryArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .gitRemoteSettings(RepositoryGitRemoteSettingsArgs.builder()
 *                 .url(gitRepository.url())
 *                 .defaultBranch(&#34;main&#34;)
 *                 .authenticationTokenSecretVersion(secretVersion.id())
 *                 .build())
 *             .workspaceCompilationOverrides(RepositoryWorkspaceCompilationOverridesArgs.builder()
 *                 .defaultDatabase(&#34;database&#34;)
 *                 .schemaSuffix(&#34;_suffix&#34;)
 *                 .tablePrefix(&#34;prefix_&#34;)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var release = new RepositoryReleaseConfig(&#34;release&#34;, RepositoryReleaseConfigArgs.builder()        
 *             .project(repository.project())
 *             .region(repository.region())
 *             .repository(repository.name())
 *             .gitCommitish(&#34;main&#34;)
 *             .cronSchedule(&#34;0 7 * * *&#34;)
 *             .timeZone(&#34;America/New_York&#34;)
 *             .codeCompilationConfig(RepositoryReleaseConfigCodeCompilationConfigArgs.builder()
 *                 .defaultDatabase(&#34;gcp-example-project&#34;)
 *                 .defaultSchema(&#34;example-dataset&#34;)
 *                 .defaultLocation(&#34;us-central1&#34;)
 *                 .assertionSchema(&#34;example-assertion-dataset&#34;)
 *                 .databaseSuffix(&#34;&#34;)
 *                 .schemaSuffix(&#34;&#34;)
 *                 .tablePrefix(&#34;&#34;)
 *                 .vars(Map.of(&#34;var1&#34;, &#34;value&#34;))
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * RepositoryReleaseConfig can be imported using any of these accepted formats
 * 
 * ```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}}
 * ```
 * 
 */
@ResourceType(type="gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig")
public class RepositoryReleaseConfig extends com.pulumi.resources.CustomResource {
    /**
     * Optional. If set, fields of codeCompilationConfig override the default compilation settings that are specified in dataform.json.
     * Structure is documented below.
     * 
     */
    @Export(name="codeCompilationConfig", type=RepositoryReleaseConfigCodeCompilationConfig.class, parameters={})
    private Output</* @Nullable */ RepositoryReleaseConfigCodeCompilationConfig> codeCompilationConfig;

    /**
     * @return Optional. If set, fields of codeCompilationConfig override the default compilation settings that are specified in dataform.json.
     * Structure is documented below.
     * 
     */
    public Output<Optional<RepositoryReleaseConfigCodeCompilationConfig>> codeCompilationConfig() {
        return Codegen.optional(this.codeCompilationConfig);
    }
    /**
     * Optional. Optional schedule (in cron format) for automatic creation of compilation results.
     * 
     */
    @Export(name="cronSchedule", type=String.class, parameters={})
    private Output</* @Nullable */ String> cronSchedule;

    /**
     * @return Optional. Optional schedule (in cron format) for automatic creation of compilation results.
     * 
     */
    public Output<Optional<String>> cronSchedule() {
        return Codegen.optional(this.cronSchedule);
    }
    /**
     * Git commit/tag/branch name at which the repository should be compiled. Must exist in the remote repository.
     * 
     * ***
     * 
     */
    @Export(name="gitCommitish", type=String.class, parameters={})
    private Output<String> gitCommitish;

    /**
     * @return Git commit/tag/branch name at which the repository should be compiled. Must exist in the remote repository.
     * 
     * ***
     * 
     */
    public Output<String> gitCommitish() {
        return this.gitCommitish;
    }
    /**
     * The release&#39;s name.
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return The release&#39;s name.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Export(name="project", type=String.class, parameters={})
    private Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Output<String> project() {
        return this.project;
    }
    /**
     * Records of the 10 most recent scheduled release attempts, ordered in in descending order of releaseTime. Updated whenever automatic creation of a compilation result is triggered by cronSchedule.
     * Structure is documented below.
     * 
     */
    @Export(name="recentScheduledReleaseRecords", type=List.class, parameters={RepositoryReleaseConfigRecentScheduledReleaseRecord.class})
    private Output<List<RepositoryReleaseConfigRecentScheduledReleaseRecord>> recentScheduledReleaseRecords;

    /**
     * @return Records of the 10 most recent scheduled release attempts, ordered in in descending order of releaseTime. Updated whenever automatic creation of a compilation result is triggered by cronSchedule.
     * Structure is documented below.
     * 
     */
    public Output<List<RepositoryReleaseConfigRecentScheduledReleaseRecord>> recentScheduledReleaseRecords() {
        return this.recentScheduledReleaseRecords;
    }
    /**
     * A reference to the region
     * 
     */
    @Export(name="region", type=String.class, parameters={})
    private Output</* @Nullable */ String> region;

    /**
     * @return A reference to the region
     * 
     */
    public Output<Optional<String>> region() {
        return Codegen.optional(this.region);
    }
    /**
     * A reference to the Dataform repository
     * 
     */
    @Export(name="repository", type=String.class, parameters={})
    private Output</* @Nullable */ String> repository;

    /**
     * @return A reference to the Dataform repository
     * 
     */
    public Output<Optional<String>> repository() {
        return Codegen.optional(this.repository);
    }
    /**
     * Optional. Specifies the time zone to be used when interpreting cronSchedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left unspecified, the default is UTC.
     * 
     */
    @Export(name="timeZone", type=String.class, parameters={})
    private Output</* @Nullable */ String> timeZone;

    /**
     * @return Optional. Specifies the time zone to be used when interpreting cronSchedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left unspecified, the default is UTC.
     * 
     */
    public Output<Optional<String>> timeZone() {
        return Codegen.optional(this.timeZone);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public RepositoryReleaseConfig(String name) {
        this(name, RepositoryReleaseConfigArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public RepositoryReleaseConfig(String name, RepositoryReleaseConfigArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public RepositoryReleaseConfig(String name, RepositoryReleaseConfigArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig", name, args == null ? RepositoryReleaseConfigArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private RepositoryReleaseConfig(String name, Output<String> id, @Nullable RepositoryReleaseConfigState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host 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
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static RepositoryReleaseConfig get(String name, Output<String> id, @Nullable RepositoryReleaseConfigState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new RepositoryReleaseConfig(name, id, state, options);
    }
}
