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

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


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

    public static final GrantConstraintArgs Empty = new GrantConstraintArgs();

    /**
     * A list of key-value pairs that must match the encryption context in subsequent cryptographic operation requests. The grant allows the operation only when the encryption context in the request is the same as the encryption context specified in this constraint. Conflicts with `encryption_context_subset`.
     * 
     */
    @Import(name="encryptionContextEquals")
    private @Nullable Output<Map<String,String>> encryptionContextEquals;

    /**
     * @return A list of key-value pairs that must match the encryption context in subsequent cryptographic operation requests. The grant allows the operation only when the encryption context in the request is the same as the encryption context specified in this constraint. Conflicts with `encryption_context_subset`.
     * 
     */
    public Optional<Output<Map<String,String>>> encryptionContextEquals() {
        return Optional.ofNullable(this.encryptionContextEquals);
    }

    /**
     * A list of key-value pairs that must be included in the encryption context of subsequent cryptographic operation requests. The grant allows the cryptographic operation only when the encryption context in the request includes the key-value pairs specified in this constraint, although it can include additional key-value pairs. Conflicts with `encryption_context_equals`.
     * 
     */
    @Import(name="encryptionContextSubset")
    private @Nullable Output<Map<String,String>> encryptionContextSubset;

    /**
     * @return A list of key-value pairs that must be included in the encryption context of subsequent cryptographic operation requests. The grant allows the cryptographic operation only when the encryption context in the request includes the key-value pairs specified in this constraint, although it can include additional key-value pairs. Conflicts with `encryption_context_equals`.
     * 
     */
    public Optional<Output<Map<String,String>>> encryptionContextSubset() {
        return Optional.ofNullable(this.encryptionContextSubset);
    }

    private GrantConstraintArgs() {}

    private GrantConstraintArgs(GrantConstraintArgs $) {
        this.encryptionContextEquals = $.encryptionContextEquals;
        this.encryptionContextSubset = $.encryptionContextSubset;
    }

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

    public static final class Builder {
        private GrantConstraintArgs $;

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

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

        /**
         * @param encryptionContextEquals A list of key-value pairs that must match the encryption context in subsequent cryptographic operation requests. The grant allows the operation only when the encryption context in the request is the same as the encryption context specified in this constraint. Conflicts with `encryption_context_subset`.
         * 
         * @return builder
         * 
         */
        public Builder encryptionContextEquals(@Nullable Output<Map<String,String>> encryptionContextEquals) {
            $.encryptionContextEquals = encryptionContextEquals;
            return this;
        }

        /**
         * @param encryptionContextEquals A list of key-value pairs that must match the encryption context in subsequent cryptographic operation requests. The grant allows the operation only when the encryption context in the request is the same as the encryption context specified in this constraint. Conflicts with `encryption_context_subset`.
         * 
         * @return builder
         * 
         */
        public Builder encryptionContextEquals(Map<String,String> encryptionContextEquals) {
            return encryptionContextEquals(Output.of(encryptionContextEquals));
        }

        /**
         * @param encryptionContextSubset A list of key-value pairs that must be included in the encryption context of subsequent cryptographic operation requests. The grant allows the cryptographic operation only when the encryption context in the request includes the key-value pairs specified in this constraint, although it can include additional key-value pairs. Conflicts with `encryption_context_equals`.
         * 
         * @return builder
         * 
         */
        public Builder encryptionContextSubset(@Nullable Output<Map<String,String>> encryptionContextSubset) {
            $.encryptionContextSubset = encryptionContextSubset;
            return this;
        }

        /**
         * @param encryptionContextSubset A list of key-value pairs that must be included in the encryption context of subsequent cryptographic operation requests. The grant allows the cryptographic operation only when the encryption context in the request includes the key-value pairs specified in this constraint, although it can include additional key-value pairs. Conflicts with `encryption_context_equals`.
         * 
         * @return builder
         * 
         */
        public Builder encryptionContextSubset(Map<String,String> encryptionContextSubset) {
            return encryptionContextSubset(Output.of(encryptionContextSubset));
        }

        public GrantConstraintArgs build() {
            return $;
        }
    }

}
