# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities

__all__ = [
    'SecretV2CustomMetadata',
]

@pulumi.output_type
class SecretV2CustomMetadata(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "casRequired":
            suggest = "cas_required"
        elif key == "deleteVersionAfter":
            suggest = "delete_version_after"
        elif key == "maxVersions":
            suggest = "max_versions"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in SecretV2CustomMetadata. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        SecretV2CustomMetadata.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        SecretV2CustomMetadata.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 cas_required: Optional[_builtins.bool] = None,
                 data: Optional[Mapping[str, _builtins.str]] = None,
                 delete_version_after: Optional[_builtins.int] = None,
                 max_versions: Optional[_builtins.int] = None):
        """
        :param _builtins.bool cas_required: If true, all keys will require the cas parameter to be set on all write requests.
        :param Mapping[str, _builtins.str] data: **Deprecated. Please use new ephemeral resource `kv.SecretV2` to read back
               secret data from Vault**. A mapping whose keys are the top-level data keys returned from
               Vault and whose values are the corresponding values. This map can only represent string data,
               so any non-string values returned from Vault are serialized as JSON.
        :param _builtins.int delete_version_after: If set, specifies the length of time before a version is deleted.
        :param _builtins.int max_versions: The number of versions to keep per key.
        """
        if cas_required is not None:
            pulumi.set(__self__, "cas_required", cas_required)
        if data is not None:
            pulumi.set(__self__, "data", data)
        if delete_version_after is not None:
            pulumi.set(__self__, "delete_version_after", delete_version_after)
        if max_versions is not None:
            pulumi.set(__self__, "max_versions", max_versions)

    @_builtins.property
    @pulumi.getter(name="casRequired")
    def cas_required(self) -> Optional[_builtins.bool]:
        """
        If true, all keys will require the cas parameter to be set on all write requests.
        """
        return pulumi.get(self, "cas_required")

    @_builtins.property
    @pulumi.getter
    def data(self) -> Optional[Mapping[str, _builtins.str]]:
        """
        **Deprecated. Please use new ephemeral resource `kv.SecretV2` to read back
        secret data from Vault**. A mapping whose keys are the top-level data keys returned from
        Vault and whose values are the corresponding values. This map can only represent string data,
        so any non-string values returned from Vault are serialized as JSON.
        """
        return pulumi.get(self, "data")

    @_builtins.property
    @pulumi.getter(name="deleteVersionAfter")
    def delete_version_after(self) -> Optional[_builtins.int]:
        """
        If set, specifies the length of time before a version is deleted.
        """
        return pulumi.get(self, "delete_version_after")

    @_builtins.property
    @pulumi.getter(name="maxVersions")
    def max_versions(self) -> Optional[_builtins.int]:
        """
        The number of versions to keep per key.
        """
        return pulumi.get(self, "max_versions")


