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

import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class GetProjectCmekSettingsPlainArgs extends com.pulumi.resources.InvokeArgs {

    public static final GetProjectCmekSettingsPlainArgs Empty = new GetProjectCmekSettingsPlainArgs();

    /**
     * The resource name for the configured Cloud KMS key.
     * KMS key name format:
     * `&#39;projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]&#39;`
     * To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.
     * The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.
     * See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.
     * 
     */
    @Import(name="kmsKeyName")
    private @Nullable String kmsKeyName;

    /**
     * @return The resource name for the configured Cloud KMS key.
     * KMS key name format:
     * `&#39;projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]&#39;`
     * To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.
     * The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.
     * See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.
     * 
     */
    public Optional<String> kmsKeyName() {
        return Optional.ofNullable(this.kmsKeyName);
    }

    /**
     * The ID of the project.
     * 
     */
    @Import(name="project", required=true)
    private String project;

    /**
     * @return The ID of the project.
     * 
     */
    public String project() {
        return this.project;
    }

    private GetProjectCmekSettingsPlainArgs() {}

    private GetProjectCmekSettingsPlainArgs(GetProjectCmekSettingsPlainArgs $) {
        this.kmsKeyName = $.kmsKeyName;
        this.project = $.project;
    }

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

    public static final class Builder {
        private GetProjectCmekSettingsPlainArgs $;

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

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

        /**
         * @param kmsKeyName The resource name for the configured Cloud KMS key.
         * KMS key name format:
         * `&#39;projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]&#39;`
         * To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.
         * The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.
         * See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.
         * 
         * @return builder
         * 
         */
        public Builder kmsKeyName(@Nullable String kmsKeyName) {
            $.kmsKeyName = kmsKeyName;
            return this;
        }

        /**
         * @param project The ID of the project.
         * 
         * @return builder
         * 
         */
        public Builder project(String project) {
            $.project = project;
            return this;
        }

        public GetProjectCmekSettingsPlainArgs build() {
            $.project = Objects.requireNonNull($.project, "expected parameter 'project' to be non-null");
            return $;
        }
    }

}
