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

import com.pulumi.azure.keyvault.inputs.KeyRotationPolicyArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final KeyArgs Empty = new KeyArgs();

    /**
     * Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `key_type` is `EC` or `EC-HSM`. The API will default to `P-256` if nothing is specified. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="curve")
    private @Nullable Output<String> curve;

    /**
     * @return Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `key_type` is `EC` or `EC-HSM`. The API will default to `P-256` if nothing is specified. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> curve() {
        return Optional.ofNullable(this.curve);
    }

    /**
     * Expiration UTC datetime (Y-m-d&#39;T&#39;H:M:S&#39;Z&#39;).
     * 
     */
    @Import(name="expirationDate")
    private @Nullable Output<String> expirationDate;

    /**
     * @return Expiration UTC datetime (Y-m-d&#39;T&#39;H:M:S&#39;Z&#39;).
     * 
     */
    public Optional<Output<String>> expirationDate() {
        return Optional.ofNullable(this.expirationDate);
    }

    /**
     * A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive.
     * 
     */
    @Import(name="keyOpts", required=true)
    private Output<List<String>> keyOpts;

    /**
     * @return A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive.
     * 
     */
    public Output<List<String>> keyOpts() {
        return this.keyOpts;
    }

    /**
     * Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `key_type` is `RSA` or `RSA-HSM`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="keySize")
    private @Nullable Output<Integer> keySize;

    /**
     * @return Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `key_type` is `RSA` or `RSA-HSM`. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<Integer>> keySize() {
        return Optional.ofNullable(this.keySize);
    }

    /**
     * Specifies the Key Type to use for this Key Vault Key. Possible values are `EC` (Elliptic Curve), `EC-HSM`, `RSA` and `RSA-HSM`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="keyType", required=true)
    private Output<String> keyType;

    /**
     * @return Specifies the Key Type to use for this Key Vault Key. Possible values are `EC` (Elliptic Curve), `EC-HSM`, `RSA` and `RSA-HSM`. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> keyType() {
        return this.keyType;
    }

    /**
     * The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="keyVaultId", required=true)
    private Output<String> keyVaultId;

    /**
     * @return The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> keyVaultId() {
        return this.keyVaultId;
    }

    /**
     * Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Key not usable before the provided UTC datetime (Y-m-d&#39;T&#39;H:M:S&#39;Z&#39;).
     * 
     */
    @Import(name="notBeforeDate")
    private @Nullable Output<String> notBeforeDate;

    /**
     * @return Key not usable before the provided UTC datetime (Y-m-d&#39;T&#39;H:M:S&#39;Z&#39;).
     * 
     */
    public Optional<Output<String>> notBeforeDate() {
        return Optional.ofNullable(this.notBeforeDate);
    }

    /**
     * A `rotation_policy` block as defined below.
     * 
     */
    @Import(name="rotationPolicy")
    private @Nullable Output<KeyRotationPolicyArgs> rotationPolicy;

    /**
     * @return A `rotation_policy` block as defined below.
     * 
     */
    public Optional<Output<KeyRotationPolicyArgs>> rotationPolicy() {
        return Optional.ofNullable(this.rotationPolicy);
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output<Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional<Output<Map<String,String>>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private KeyArgs() {}

    private KeyArgs(KeyArgs $) {
        this.curve = $.curve;
        this.expirationDate = $.expirationDate;
        this.keyOpts = $.keyOpts;
        this.keySize = $.keySize;
        this.keyType = $.keyType;
        this.keyVaultId = $.keyVaultId;
        this.name = $.name;
        this.notBeforeDate = $.notBeforeDate;
        this.rotationPolicy = $.rotationPolicy;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private KeyArgs $;

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

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

        /**
         * @param curve Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `key_type` is `EC` or `EC-HSM`. The API will default to `P-256` if nothing is specified. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder curve(@Nullable Output<String> curve) {
            $.curve = curve;
            return this;
        }

        /**
         * @param curve Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `key_type` is `EC` or `EC-HSM`. The API will default to `P-256` if nothing is specified. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder curve(String curve) {
            return curve(Output.of(curve));
        }

        /**
         * @param expirationDate Expiration UTC datetime (Y-m-d&#39;T&#39;H:M:S&#39;Z&#39;).
         * 
         * @return builder
         * 
         */
        public Builder expirationDate(@Nullable Output<String> expirationDate) {
            $.expirationDate = expirationDate;
            return this;
        }

        /**
         * @param expirationDate Expiration UTC datetime (Y-m-d&#39;T&#39;H:M:S&#39;Z&#39;).
         * 
         * @return builder
         * 
         */
        public Builder expirationDate(String expirationDate) {
            return expirationDate(Output.of(expirationDate));
        }

        /**
         * @param keyOpts A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive.
         * 
         * @return builder
         * 
         */
        public Builder keyOpts(Output<List<String>> keyOpts) {
            $.keyOpts = keyOpts;
            return this;
        }

        /**
         * @param keyOpts A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive.
         * 
         * @return builder
         * 
         */
        public Builder keyOpts(List<String> keyOpts) {
            return keyOpts(Output.of(keyOpts));
        }

        /**
         * @param keyOpts A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive.
         * 
         * @return builder
         * 
         */
        public Builder keyOpts(String... keyOpts) {
            return keyOpts(List.of(keyOpts));
        }

        /**
         * @param keySize Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `key_type` is `RSA` or `RSA-HSM`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keySize(@Nullable Output<Integer> keySize) {
            $.keySize = keySize;
            return this;
        }

        /**
         * @param keySize Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `key_type` is `RSA` or `RSA-HSM`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keySize(Integer keySize) {
            return keySize(Output.of(keySize));
        }

        /**
         * @param keyType Specifies the Key Type to use for this Key Vault Key. Possible values are `EC` (Elliptic Curve), `EC-HSM`, `RSA` and `RSA-HSM`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keyType(Output<String> keyType) {
            $.keyType = keyType;
            return this;
        }

        /**
         * @param keyType Specifies the Key Type to use for this Key Vault Key. Possible values are `EC` (Elliptic Curve), `EC-HSM`, `RSA` and `RSA-HSM`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keyType(String keyType) {
            return keyType(Output.of(keyType));
        }

        /**
         * @param keyVaultId The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultId(Output<String> keyVaultId) {
            $.keyVaultId = keyVaultId;
            return this;
        }

        /**
         * @param keyVaultId The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultId(String keyVaultId) {
            return keyVaultId(Output.of(keyVaultId));
        }

        /**
         * @param name Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param notBeforeDate Key not usable before the provided UTC datetime (Y-m-d&#39;T&#39;H:M:S&#39;Z&#39;).
         * 
         * @return builder
         * 
         */
        public Builder notBeforeDate(@Nullable Output<String> notBeforeDate) {
            $.notBeforeDate = notBeforeDate;
            return this;
        }

        /**
         * @param notBeforeDate Key not usable before the provided UTC datetime (Y-m-d&#39;T&#39;H:M:S&#39;Z&#39;).
         * 
         * @return builder
         * 
         */
        public Builder notBeforeDate(String notBeforeDate) {
            return notBeforeDate(Output.of(notBeforeDate));
        }

        /**
         * @param rotationPolicy A `rotation_policy` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder rotationPolicy(@Nullable Output<KeyRotationPolicyArgs> rotationPolicy) {
            $.rotationPolicy = rotationPolicy;
            return this;
        }

        /**
         * @param rotationPolicy A `rotation_policy` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder rotationPolicy(KeyRotationPolicyArgs rotationPolicy) {
            return rotationPolicy(Output.of(rotationPolicy));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output<Map<String,String>> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map<String,String> tags) {
            return tags(Output.of(tags));
        }

        public KeyArgs build() {
            $.keyOpts = Objects.requireNonNull($.keyOpts, "expected parameter 'keyOpts' to be non-null");
            $.keyType = Objects.requireNonNull($.keyType, "expected parameter 'keyType' to be non-null");
            $.keyVaultId = Objects.requireNonNull($.keyVaultId, "expected parameter 'keyVaultId' to be non-null");
            return $;
        }
    }

}
