# 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__ = [
    'GetMailboxResult',
    'AwaitableGetMailboxResult',
    'get_mailbox',
    'get_mailbox_output',
]

@pulumi.output_type
class GetMailboxResult:
    """
    A collection of values returned by getMailbox.
    """
    def __init__(__self__, domain=None, id=None, mailbox_id=None):
        if domain and not isinstance(domain, str):
            raise TypeError("Expected argument 'domain' to be a str")
        pulumi.set(__self__, "domain", domain)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if mailbox_id and not isinstance(mailbox_id, str):
            raise TypeError("Expected argument 'mailbox_id' to be a str")
        pulumi.set(__self__, "mailbox_id", mailbox_id)

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

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="mailboxId")
    def mailbox_id(self) -> _builtins.str:
        """
        Mailbox ID
        """
        return pulumi.get(self, "mailbox_id")


class AwaitableGetMailboxResult(GetMailboxResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetMailboxResult(
            domain=self.domain,
            id=self.id,
            mailbox_id=self.mailbox_id)


def get_mailbox(domain: Optional[_builtins.str] = None,
                mailbox_id: Optional[_builtins.str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetMailboxResult:
    """
    Use this data source to access information about an existing resource.

    :param _builtins.str domain: Domain name
    :param _builtins.str mailbox_id: Mailbox ID
    """
    __args__ = dict()
    __args__['domain'] = domain
    __args__['mailboxId'] = mailbox_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('gandi:email/getMailbox:getMailbox', __args__, opts=opts, typ=GetMailboxResult).value

    return AwaitableGetMailboxResult(
        domain=pulumi.get(__ret__, 'domain'),
        id=pulumi.get(__ret__, 'id'),
        mailbox_id=pulumi.get(__ret__, 'mailbox_id'))
def get_mailbox_output(domain: Optional[pulumi.Input[_builtins.str]] = None,
                       mailbox_id: Optional[pulumi.Input[_builtins.str]] = None,
                       opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetMailboxResult]:
    """
    Use this data source to access information about an existing resource.

    :param _builtins.str domain: Domain name
    :param _builtins.str mailbox_id: Mailbox ID
    """
    __args__ = dict()
    __args__['domain'] = domain
    __args__['mailboxId'] = mailbox_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('gandi:email/getMailbox:getMailbox', __args__, opts=opts, typ=GetMailboxResult)
    return __ret__.apply(lambda __response__: GetMailboxResult(
        domain=pulumi.get(__response__, 'domain'),
        id=pulumi.get(__response__, 'id'),
        mailbox_id=pulumi.get(__response__, 'mailbox_id')))
