# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'SecretIamBindingCondition',
    'SecretIamMemberCondition',
    'SecretReplication',
    'SecretReplicationUserManaged',
    'SecretReplicationUserManagedReplica',
    'SecretReplicationUserManagedReplicaCustomerManagedEncryption',
    'SecretRotation',
    'SecretTopic',
    'GetSecretReplicationResult',
    'GetSecretReplicationUserManagedResult',
    'GetSecretReplicationUserManagedReplicaResult',
    'GetSecretReplicationUserManagedReplicaCustomerManagedEncryptionResult',
    'GetSecretRotationResult',
    'GetSecretTopicResult',
]

@pulumi.output_type
class SecretIamBindingCondition(dict):
    def __init__(__self__, *,
                 expression: str,
                 title: str,
                 description: Optional[str] = None):
        pulumi.set(__self__, "expression", expression)
        pulumi.set(__self__, "title", title)
        if description is not None:
            pulumi.set(__self__, "description", description)

    @property
    @pulumi.getter
    def expression(self) -> str:
        return pulumi.get(self, "expression")

    @property
    @pulumi.getter
    def title(self) -> str:
        return pulumi.get(self, "title")

    @property
    @pulumi.getter
    def description(self) -> Optional[str]:
        return pulumi.get(self, "description")


@pulumi.output_type
class SecretIamMemberCondition(dict):
    def __init__(__self__, *,
                 expression: str,
                 title: str,
                 description: Optional[str] = None):
        pulumi.set(__self__, "expression", expression)
        pulumi.set(__self__, "title", title)
        if description is not None:
            pulumi.set(__self__, "description", description)

    @property
    @pulumi.getter
    def expression(self) -> str:
        return pulumi.get(self, "expression")

    @property
    @pulumi.getter
    def title(self) -> str:
        return pulumi.get(self, "title")

    @property
    @pulumi.getter
    def description(self) -> Optional[str]:
        return pulumi.get(self, "description")


@pulumi.output_type
class SecretReplication(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "userManaged":
            suggest = "user_managed"

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

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

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

    def __init__(__self__, *,
                 automatic: Optional[bool] = None,
                 user_managed: Optional['outputs.SecretReplicationUserManaged'] = None):
        """
        :param bool automatic: The Secret will automatically be replicated without any restrictions.
        :param 'SecretReplicationUserManagedArgs' user_managed: The Secret will automatically be replicated without any restrictions.
               Structure is documented below.
        """
        if automatic is not None:
            pulumi.set(__self__, "automatic", automatic)
        if user_managed is not None:
            pulumi.set(__self__, "user_managed", user_managed)

    @property
    @pulumi.getter
    def automatic(self) -> Optional[bool]:
        """
        The Secret will automatically be replicated without any restrictions.
        """
        return pulumi.get(self, "automatic")

    @property
    @pulumi.getter(name="userManaged")
    def user_managed(self) -> Optional['outputs.SecretReplicationUserManaged']:
        """
        The Secret will automatically be replicated without any restrictions.
        Structure is documented below.
        """
        return pulumi.get(self, "user_managed")


@pulumi.output_type
class SecretReplicationUserManaged(dict):
    def __init__(__self__, *,
                 replicas: Sequence['outputs.SecretReplicationUserManagedReplica']):
        """
        :param Sequence['SecretReplicationUserManagedReplicaArgs'] replicas: The list of Replicas for this Secret. Cannot be empty.
               Structure is documented below.
        """
        pulumi.set(__self__, "replicas", replicas)

    @property
    @pulumi.getter
    def replicas(self) -> Sequence['outputs.SecretReplicationUserManagedReplica']:
        """
        The list of Replicas for this Secret. Cannot be empty.
        Structure is documented below.
        """
        return pulumi.get(self, "replicas")


@pulumi.output_type
class SecretReplicationUserManagedReplica(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "customerManagedEncryption":
            suggest = "customer_managed_encryption"

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

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

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

    def __init__(__self__, *,
                 location: str,
                 customer_managed_encryption: Optional['outputs.SecretReplicationUserManagedReplicaCustomerManagedEncryption'] = None):
        """
        :param str location: The canonical IDs of the location to replicate data. For example: "us-east1".
        :param 'SecretReplicationUserManagedReplicaCustomerManagedEncryptionArgs' customer_managed_encryption: Customer Managed Encryption for the secret.
               Structure is documented below.
        """
        pulumi.set(__self__, "location", location)
        if customer_managed_encryption is not None:
            pulumi.set(__self__, "customer_managed_encryption", customer_managed_encryption)

    @property
    @pulumi.getter
    def location(self) -> str:
        """
        The canonical IDs of the location to replicate data. For example: "us-east1".
        """
        return pulumi.get(self, "location")

    @property
    @pulumi.getter(name="customerManagedEncryption")
    def customer_managed_encryption(self) -> Optional['outputs.SecretReplicationUserManagedReplicaCustomerManagedEncryption']:
        """
        Customer Managed Encryption for the secret.
        Structure is documented below.
        """
        return pulumi.get(self, "customer_managed_encryption")


@pulumi.output_type
class SecretReplicationUserManagedReplicaCustomerManagedEncryption(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "kmsKeyName":
            suggest = "kms_key_name"

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

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

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

    def __init__(__self__, *,
                 kms_key_name: str):
        """
        :param str kms_key_name: Describes the Cloud KMS encryption key that will be used to protect destination secret.
        """
        pulumi.set(__self__, "kms_key_name", kms_key_name)

    @property
    @pulumi.getter(name="kmsKeyName")
    def kms_key_name(self) -> str:
        """
        Describes the Cloud KMS encryption key that will be used to protect destination secret.
        """
        return pulumi.get(self, "kms_key_name")


@pulumi.output_type
class SecretRotation(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "nextRotationTime":
            suggest = "next_rotation_time"
        elif key == "rotationPeriod":
            suggest = "rotation_period"

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

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

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

    def __init__(__self__, *,
                 next_rotation_time: Optional[str] = None,
                 rotation_period: Optional[str] = None):
        """
        :param str next_rotation_time: Timestamp in UTC at which the Secret is scheduled to rotate.
               A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
        :param str rotation_period: The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).
               If rotationPeriod is set, `next_rotation_time` must be set. `next_rotation_time` will be advanced by this period when the service automatically sends rotation notifications.
        """
        if next_rotation_time is not None:
            pulumi.set(__self__, "next_rotation_time", next_rotation_time)
        if rotation_period is not None:
            pulumi.set(__self__, "rotation_period", rotation_period)

    @property
    @pulumi.getter(name="nextRotationTime")
    def next_rotation_time(self) -> Optional[str]:
        """
        Timestamp in UTC at which the Secret is scheduled to rotate.
        A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
        """
        return pulumi.get(self, "next_rotation_time")

    @property
    @pulumi.getter(name="rotationPeriod")
    def rotation_period(self) -> Optional[str]:
        """
        The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).
        If rotationPeriod is set, `next_rotation_time` must be set. `next_rotation_time` will be advanced by this period when the service automatically sends rotation notifications.
        """
        return pulumi.get(self, "rotation_period")


@pulumi.output_type
class SecretTopic(dict):
    def __init__(__self__, *,
                 name: str):
        """
        :param str name: The resource name of the Pub/Sub topic that will be published to, in the following format: projects/*/topics/*.
               For publication to succeed, the Secret Manager Service Agent service account must have pubsub.publisher permissions on the topic.
        """
        pulumi.set(__self__, "name", name)

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        The resource name of the Pub/Sub topic that will be published to, in the following format: projects/*/topics/*.
        For publication to succeed, the Secret Manager Service Agent service account must have pubsub.publisher permissions on the topic.
        """
        return pulumi.get(self, "name")


@pulumi.output_type
class GetSecretReplicationResult(dict):
    def __init__(__self__, *,
                 automatic: bool,
                 user_manageds: Sequence['outputs.GetSecretReplicationUserManagedResult']):
        pulumi.set(__self__, "automatic", automatic)
        pulumi.set(__self__, "user_manageds", user_manageds)

    @property
    @pulumi.getter
    def automatic(self) -> bool:
        return pulumi.get(self, "automatic")

    @property
    @pulumi.getter(name="userManageds")
    def user_manageds(self) -> Sequence['outputs.GetSecretReplicationUserManagedResult']:
        return pulumi.get(self, "user_manageds")


@pulumi.output_type
class GetSecretReplicationUserManagedResult(dict):
    def __init__(__self__, *,
                 replicas: Sequence['outputs.GetSecretReplicationUserManagedReplicaResult']):
        pulumi.set(__self__, "replicas", replicas)

    @property
    @pulumi.getter
    def replicas(self) -> Sequence['outputs.GetSecretReplicationUserManagedReplicaResult']:
        return pulumi.get(self, "replicas")


@pulumi.output_type
class GetSecretReplicationUserManagedReplicaResult(dict):
    def __init__(__self__, *,
                 customer_managed_encryptions: Sequence['outputs.GetSecretReplicationUserManagedReplicaCustomerManagedEncryptionResult'],
                 location: str):
        pulumi.set(__self__, "customer_managed_encryptions", customer_managed_encryptions)
        pulumi.set(__self__, "location", location)

    @property
    @pulumi.getter(name="customerManagedEncryptions")
    def customer_managed_encryptions(self) -> Sequence['outputs.GetSecretReplicationUserManagedReplicaCustomerManagedEncryptionResult']:
        return pulumi.get(self, "customer_managed_encryptions")

    @property
    @pulumi.getter
    def location(self) -> str:
        return pulumi.get(self, "location")


@pulumi.output_type
class GetSecretReplicationUserManagedReplicaCustomerManagedEncryptionResult(dict):
    def __init__(__self__, *,
                 kms_key_name: str):
        pulumi.set(__self__, "kms_key_name", kms_key_name)

    @property
    @pulumi.getter(name="kmsKeyName")
    def kms_key_name(self) -> str:
        return pulumi.get(self, "kms_key_name")


@pulumi.output_type
class GetSecretRotationResult(dict):
    def __init__(__self__, *,
                 next_rotation_time: str,
                 rotation_period: str):
        pulumi.set(__self__, "next_rotation_time", next_rotation_time)
        pulumi.set(__self__, "rotation_period", rotation_period)

    @property
    @pulumi.getter(name="nextRotationTime")
    def next_rotation_time(self) -> str:
        return pulumi.get(self, "next_rotation_time")

    @property
    @pulumi.getter(name="rotationPeriod")
    def rotation_period(self) -> str:
        return pulumi.get(self, "rotation_period")


@pulumi.output_type
class GetSecretTopicResult(dict):
    def __init__(__self__, *,
                 name: str):
        pulumi.set(__self__, "name", name)

    @property
    @pulumi.getter
    def name(self) -> str:
        return pulumi.get(self, "name")


