// *** 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.logging;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.logging.inputs.FolderBucketConfigCmekSettingsArgs;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class FolderBucketConfigArgs extends com.pulumi.resources.ResourceArgs {

    public static final FolderBucketConfigArgs Empty = new FolderBucketConfigArgs();

    /**
     * The name of the logging bucket. Logging automatically creates two log buckets: `_Required` and `_Default`.
     * 
     */
    @Import(name="bucketId", required=true)
    private Output<String> bucketId;

    /**
     * @return The name of the logging bucket. Logging automatically creates two log buckets: `_Required` and `_Default`.
     * 
     */
    public Output<String> bucketId() {
        return this.bucketId;
    }

    /**
     * The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK
     * key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by
     * updating the log bucket. Changing the KMS key is allowed.
     * 
     */
    @Import(name="cmekSettings")
    private @Nullable Output<FolderBucketConfigCmekSettingsArgs> cmekSettings;

    /**
     * @return The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK
     * key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by
     * updating the log bucket. Changing the KMS key is allowed.
     * 
     */
    public Optional<Output<FolderBucketConfigCmekSettingsArgs>> cmekSettings() {
        return Optional.ofNullable(this.cmekSettings);
    }

    /**
     * Describes this bucket.
     * 
     */
    @Import(name="description")
    private @Nullable Output<String> description;

    /**
     * @return Describes this bucket.
     * 
     */
    public Optional<Output<String>> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The parent resource that contains the logging bucket.
     * 
     */
    @Import(name="folder", required=true)
    private Output<String> folder;

    /**
     * @return The parent resource that contains the logging bucket.
     * 
     */
    public Output<String> folder() {
        return this.folder;
    }

    /**
     * The location of the bucket.
     * 
     */
    @Import(name="location", required=true)
    private Output<String> location;

    /**
     * @return The location of the bucket.
     * 
     */
    public Output<String> location() {
        return this.location;
    }

    /**
     * Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. Bucket retention can not be increased on buckets outside of projects.
     * 
     */
    @Import(name="retentionDays")
    private @Nullable Output<Integer> retentionDays;

    /**
     * @return Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. Bucket retention can not be increased on buckets outside of projects.
     * 
     */
    public Optional<Output<Integer>> retentionDays() {
        return Optional.ofNullable(this.retentionDays);
    }

    private FolderBucketConfigArgs() {}

    private FolderBucketConfigArgs(FolderBucketConfigArgs $) {
        this.bucketId = $.bucketId;
        this.cmekSettings = $.cmekSettings;
        this.description = $.description;
        this.folder = $.folder;
        this.location = $.location;
        this.retentionDays = $.retentionDays;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(FolderBucketConfigArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private FolderBucketConfigArgs $;

        public Builder() {
            $ = new FolderBucketConfigArgs();
        }

        public Builder(FolderBucketConfigArgs defaults) {
            $ = new FolderBucketConfigArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param bucketId The name of the logging bucket. Logging automatically creates two log buckets: `_Required` and `_Default`.
         * 
         * @return builder
         * 
         */
        public Builder bucketId(Output<String> bucketId) {
            $.bucketId = bucketId;
            return this;
        }

        /**
         * @param bucketId The name of the logging bucket. Logging automatically creates two log buckets: `_Required` and `_Default`.
         * 
         * @return builder
         * 
         */
        public Builder bucketId(String bucketId) {
            return bucketId(Output.of(bucketId));
        }

        /**
         * @param cmekSettings The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK
         * key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by
         * updating the log bucket. Changing the KMS key is allowed.
         * 
         * @return builder
         * 
         */
        public Builder cmekSettings(@Nullable Output<FolderBucketConfigCmekSettingsArgs> cmekSettings) {
            $.cmekSettings = cmekSettings;
            return this;
        }

        /**
         * @param cmekSettings The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK
         * key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by
         * updating the log bucket. Changing the KMS key is allowed.
         * 
         * @return builder
         * 
         */
        public Builder cmekSettings(FolderBucketConfigCmekSettingsArgs cmekSettings) {
            return cmekSettings(Output.of(cmekSettings));
        }

        /**
         * @param description Describes this bucket.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output<String> description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Describes this bucket.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param folder The parent resource that contains the logging bucket.
         * 
         * @return builder
         * 
         */
        public Builder folder(Output<String> folder) {
            $.folder = folder;
            return this;
        }

        /**
         * @param folder The parent resource that contains the logging bucket.
         * 
         * @return builder
         * 
         */
        public Builder folder(String folder) {
            return folder(Output.of(folder));
        }

        /**
         * @param location The location of the bucket.
         * 
         * @return builder
         * 
         */
        public Builder location(Output<String> location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The location of the bucket.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param retentionDays Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. Bucket retention can not be increased on buckets outside of projects.
         * 
         * @return builder
         * 
         */
        public Builder retentionDays(@Nullable Output<Integer> retentionDays) {
            $.retentionDays = retentionDays;
            return this;
        }

        /**
         * @param retentionDays Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. Bucket retention can not be increased on buckets outside of projects.
         * 
         * @return builder
         * 
         */
        public Builder retentionDays(Integer retentionDays) {
            return retentionDays(Output.of(retentionDays));
        }

        public FolderBucketConfigArgs build() {
            $.bucketId = Objects.requireNonNull($.bucketId, "expected parameter 'bucketId' to be non-null");
            $.folder = Objects.requireNonNull($.folder, "expected parameter 'folder' to be non-null");
            $.location = Objects.requireNonNull($.location, "expected parameter 'location' to be non-null");
            return $;
        }
    }

}
