# coding=utf-8
# *** WARNING: this file was generated by pulumigen. ***
# *** 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
from ._enums import *

__all__ = [
    'CidrBlockAndDescription',
    'ListRedisItemProperties',
    'MaintenanceProperties',
    'Owner',
    'Redis',
    'RedisDetailMaintenanceProperties',
    'RedisOptions',
]

@pulumi.output_type
class CidrBlockAndDescription(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "cidrBlock":
            suggest = "cidr_block"

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

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

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

    def __init__(__self__, *,
                 cidr_block: str,
                 description: str):
        """
        :param str description: User-provided description of the CIDR block
        """
        pulumi.set(__self__, "cidr_block", cidr_block)
        pulumi.set(__self__, "description", description)

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

    @property
    @pulumi.getter
    def description(self) -> str:
        """
        User-provided description of the CIDR block
        """
        return pulumi.get(self, "description")


@pulumi.output_type
class ListRedisItemProperties(dict):
    def __init__(__self__, *,
                 cursor: Optional[str] = None,
                 redis: Optional['outputs.Redis'] = None):
        """
        :param 'Redis' redis: A Redis instance
        """
        if cursor is not None:
            pulumi.set(__self__, "cursor", cursor)
        if redis is not None:
            pulumi.set(__self__, "redis", redis)

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

    @property
    @pulumi.getter
    def redis(self) -> Optional['outputs.Redis']:
        """
        A Redis instance
        """
        return pulumi.get(self, "redis")


@pulumi.output_type
class MaintenanceProperties(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "scheduledAt":
            suggest = "scheduled_at"
        elif key == "pendingMaintenanceBy":
            suggest = "pending_maintenance_by"

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

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

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

    def __init__(__self__, *,
                 id: str,
                 scheduled_at: str,
                 state: 'MaintenancePropertiesState',
                 type: str,
                 pending_maintenance_by: Optional[str] = None):
        """
        :param str pending_maintenance_by: If present, the maintenance run cannot be scheduled for later than this date-time.
        """
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "scheduled_at", scheduled_at)
        pulumi.set(__self__, "state", state)
        pulumi.set(__self__, "type", type)
        if pending_maintenance_by is not None:
            pulumi.set(__self__, "pending_maintenance_by", pending_maintenance_by)

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

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

    @property
    @pulumi.getter
    def state(self) -> 'MaintenancePropertiesState':
        return pulumi.get(self, "state")

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

    @property
    @pulumi.getter(name="pendingMaintenanceBy")
    def pending_maintenance_by(self) -> Optional[str]:
        """
        If present, the maintenance run cannot be scheduled for later than this date-time.
        """
        return pulumi.get(self, "pending_maintenance_by")


@pulumi.output_type
class Owner(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "twoFactorAuthEnabled":
            suggest = "two_factor_auth_enabled"

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

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

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

    def __init__(__self__, *,
                 email: str,
                 id: str,
                 name: str,
                 type: 'OwnerType',
                 two_factor_auth_enabled: Optional[bool] = None):
        """
        :param bool two_factor_auth_enabled: Whether two-factor authentication is enabled for the owner. Only present for user owners.
        """
        pulumi.set(__self__, "email", email)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "type", type)
        if two_factor_auth_enabled is not None:
            pulumi.set(__self__, "two_factor_auth_enabled", two_factor_auth_enabled)

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

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

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

    @property
    @pulumi.getter
    def type(self) -> 'OwnerType':
        return pulumi.get(self, "type")

    @property
    @pulumi.getter(name="twoFactorAuthEnabled")
    def two_factor_auth_enabled(self) -> Optional[bool]:
        """
        Whether two-factor authentication is enabled for the owner. Only present for user owners.
        """
        return pulumi.get(self, "two_factor_auth_enabled")


@pulumi.output_type
class Redis(dict):
    """
    A Redis instance
    """
    def __init__(__self__, *,
                 created_at: str,
                 dashboard_url: str,
                 id: str,
                 ip_allow_list: Sequence['outputs.CidrBlockAndDescription'],
                 name: str,
                 options: 'outputs.RedisOptions',
                 owner: 'outputs.Owner',
                 plan: 'RedisPlan',
                 region: Optional['RedisRegion'] = None,
                 status: 'RedisStatus',
                 updated_at: str,
                 version: str,
                 environment_id: Optional[str] = None):
        """
        A Redis instance
        :param str created_at: The creation time of the Redis instance
        :param str dashboard_url: The URL to view the Redis instance in the Render Dashboard
        :param str id: The ID of the Redis instance
        :param Sequence['CidrBlockAndDescription'] ip_allow_list: The IP allow list for the Redis instance
        :param str name: The name of the Redis instance
        :param 'RedisOptions' options: Options for a Redis instance
        :param 'RedisRegion' region: Defaults to "oregon"
        :param str updated_at: The last updated time of the Redis instance
        :param str version: The version of Redis
        :param str environment_id: The ID of the environment the Redis instance is associated with
        """
        pulumi.set(__self__, "created_at", created_at)
        pulumi.set(__self__, "dashboard_url", dashboard_url)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "ip_allow_list", ip_allow_list)
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "options", options)
        pulumi.set(__self__, "owner", owner)
        pulumi.set(__self__, "plan", plan)
        if region is None:
            region = 'oregon'
        pulumi.set(__self__, "region", region)
        pulumi.set(__self__, "status", status)
        pulumi.set(__self__, "updated_at", updated_at)
        pulumi.set(__self__, "version", version)
        if environment_id is not None:
            pulumi.set(__self__, "environment_id", environment_id)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> str:
        """
        The creation time of the Redis instance
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="dashboardUrl")
    def dashboard_url(self) -> str:
        """
        The URL to view the Redis instance in the Render Dashboard
        """
        return pulumi.get(self, "dashboard_url")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The ID of the Redis instance
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="ipAllowList")
    def ip_allow_list(self) -> Sequence['outputs.CidrBlockAndDescription']:
        """
        The IP allow list for the Redis instance
        """
        return pulumi.get(self, "ip_allow_list")

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        The name of the Redis instance
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def options(self) -> 'outputs.RedisOptions':
        """
        Options for a Redis instance
        """
        return pulumi.get(self, "options")

    @property
    @pulumi.getter
    def owner(self) -> 'outputs.Owner':
        return pulumi.get(self, "owner")

    @property
    @pulumi.getter
    def plan(self) -> 'RedisPlan':
        return pulumi.get(self, "plan")

    @property
    @pulumi.getter
    def region(self) -> 'RedisRegion':
        """
        Defaults to "oregon"
        """
        return pulumi.get(self, "region")

    @property
    @pulumi.getter
    def status(self) -> 'RedisStatus':
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> str:
        """
        The last updated time of the Redis instance
        """
        return pulumi.get(self, "updated_at")

    @property
    @pulumi.getter
    def version(self) -> str:
        """
        The version of Redis
        """
        return pulumi.get(self, "version")

    @property
    @pulumi.getter(name="environmentId")
    def environment_id(self) -> Optional[str]:
        """
        The ID of the environment the Redis instance is associated with
        """
        return pulumi.get(self, "environment_id")


@pulumi.output_type
class RedisDetailMaintenanceProperties(dict):
    def __init__(__self__, *,
                 id: str,
                 scheduled_at: str,
                 state: 'RedisDetailMaintenancePropertiesState',
                 type: str,
                 pending_maintenance_by: Optional[str] = None):
        """
        :param str pending_maintenance_by: If present, the maintenance run cannot be scheduled for later than this date-time.
        """
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "scheduled_at", scheduled_at)
        pulumi.set(__self__, "state", state)
        pulumi.set(__self__, "type", type)
        if pending_maintenance_by is not None:
            pulumi.set(__self__, "pending_maintenance_by", pending_maintenance_by)

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

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

    @property
    @pulumi.getter
    def state(self) -> 'RedisDetailMaintenancePropertiesState':
        return pulumi.get(self, "state")

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

    @property
    @pulumi.getter(name="pendingMaintenanceBy")
    def pending_maintenance_by(self) -> Optional[str]:
        """
        If present, the maintenance run cannot be scheduled for later than this date-time.
        """
        return pulumi.get(self, "pending_maintenance_by")


@pulumi.output_type
class RedisOptions(dict):
    """
    Options for a Redis instance
    """
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "maxmemoryPolicy":
            suggest = "maxmemory_policy"

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

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

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

    def __init__(__self__, *,
                 maxmemory_policy: Optional[str] = None):
        """
        Options for a Redis instance
        """
        if maxmemory_policy is not None:
            pulumi.set(__self__, "maxmemory_policy", maxmemory_policy)

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


