# 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__ = [
    'GetInvitationResult',
    'AwaitableGetInvitationResult',
    'get_invitation',
    'get_invitation_output',
]

@pulumi.output_type
class GetInvitationResult:
    """
    A collection of values returned by getInvitation.
    """
    def __init__(__self__, accepted_at=None, auth_type=None, creators=None, email=None, expires_at=None, id=None, status=None, users=None):
        if accepted_at and not isinstance(accepted_at, str):
            raise TypeError("Expected argument 'accepted_at' to be a str")
        pulumi.set(__self__, "accepted_at", accepted_at)
        if auth_type and not isinstance(auth_type, str):
            raise TypeError("Expected argument 'auth_type' to be a str")
        pulumi.set(__self__, "auth_type", auth_type)
        if creators and not isinstance(creators, list):
            raise TypeError("Expected argument 'creators' to be a list")
        pulumi.set(__self__, "creators", creators)
        if email and not isinstance(email, str):
            raise TypeError("Expected argument 'email' to be a str")
        pulumi.set(__self__, "email", email)
        if expires_at and not isinstance(expires_at, str):
            raise TypeError("Expected argument 'expires_at' to be a str")
        pulumi.set(__self__, "expires_at", expires_at)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if users and not isinstance(users, list):
            raise TypeError("Expected argument 'users' to be a list")
        pulumi.set(__self__, "users", users)

    @property
    @pulumi.getter(name="acceptedAt")
    def accepted_at(self) -> str:
        """
        (Optional String) The timestamp that the invitation was accepted.
        """
        return pulumi.get(self, "accepted_at")

    @property
    @pulumi.getter(name="authType")
    def auth_type(self) -> str:
        """
        (Optional String) Accepted values are: `AUTH_TYPE_LOCAL` and `AUTH_TYPE_SSO`. The user/invitee's authentication type. Note that only the [`OrganizationAdmin role`](https://docs.confluent.io/cloud/current/access-management/access-control/cloud-rbac.html#organizationadmin) can invite AUTH_TYPE_LOCAL users to SSO organizations. The user's auth_type is set as AUTH_TYPE_SSO by default if the organization has SSO enabled. Otherwise, the user's auth_type is AUTH_TYPE_LOCAL by default.
        """
        return pulumi.get(self, "auth_type")

    @property
    @pulumi.getter
    def creators(self) -> Sequence['outputs.GetInvitationCreatorResult']:
        """
        (Required Configuration Block) supports the following:
        """
        return pulumi.get(self, "creators")

    @property
    @pulumi.getter
    def email(self) -> str:
        """
        (Required String) The user/invitee's email address.
        """
        return pulumi.get(self, "email")

    @property
    @pulumi.getter(name="expiresAt")
    def expires_at(self) -> str:
        """
        (Optional String) The timestamp that the invitation will expire.
        """
        return pulumi.get(self, "expires_at")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        (Required String) The id of invitation creator.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def status(self) -> str:
        """
        (Optional String) The status of invitations. Accepted values are: `INVITE_STATUS_SENT`,`INVITE_STATUS_STAGED`,`INVITE_STATUS_ACCEPTED`,`INVITE_STATUS_EXPIRED`, and `INVITE_STATUS_DEACTIVATED`.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def users(self) -> Sequence['outputs.GetInvitationUserResult']:
        """
        (Required Configuration Block) supports the following:
        """
        return pulumi.get(self, "users")


class AwaitableGetInvitationResult(GetInvitationResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetInvitationResult(
            accepted_at=self.accepted_at,
            auth_type=self.auth_type,
            creators=self.creators,
            email=self.email,
            expires_at=self.expires_at,
            id=self.id,
            status=self.status,
            users=self.users)


def get_invitation(id: Optional[str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInvitationResult:
    """
    [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy)

    > **Note:** `Invitation` data source is available in **Preview** for early adopters. Preview features are introduced to gather customer feedback. This feature should be used only for evaluation and non-production testing purposes or to provide feedback to Confluent, particularly as it becomes more widely available in follow-on editions.\\
    **Preview** features are intended for evaluation use in development and testing environments only, and not for production use. The warranty, SLA, and Support Services provisions of your agreement with Confluent do not apply to Preview features. Preview features are considered to be a Proof of Concept as defined in the Confluent Cloud Terms of Service. Confluent may discontinue providing preview releases of the Preview features at any time in Confluent’s sole discretion.

    `Invitation` describes an Invitation data source.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_confluentcloud as confluentcloud

    main = confluentcloud.get_invitation(id="i-gxxn1")
    pulumi.export("invitation", main)
    ```


    :param str id: The ID of the Invitation, for example, `i-zyw30`.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('confluentcloud:index/getInvitation:getInvitation', __args__, opts=opts, typ=GetInvitationResult).value

    return AwaitableGetInvitationResult(
        accepted_at=__ret__.accepted_at,
        auth_type=__ret__.auth_type,
        creators=__ret__.creators,
        email=__ret__.email,
        expires_at=__ret__.expires_at,
        id=__ret__.id,
        status=__ret__.status,
        users=__ret__.users)


@_utilities.lift_output_func(get_invitation)
def get_invitation_output(id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetInvitationResult]:
    """
    [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy)

    > **Note:** `Invitation` data source is available in **Preview** for early adopters. Preview features are introduced to gather customer feedback. This feature should be used only for evaluation and non-production testing purposes or to provide feedback to Confluent, particularly as it becomes more widely available in follow-on editions.\\
    **Preview** features are intended for evaluation use in development and testing environments only, and not for production use. The warranty, SLA, and Support Services provisions of your agreement with Confluent do not apply to Preview features. Preview features are considered to be a Proof of Concept as defined in the Confluent Cloud Terms of Service. Confluent may discontinue providing preview releases of the Preview features at any time in Confluent’s sole discretion.

    `Invitation` describes an Invitation data source.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_confluentcloud as confluentcloud

    main = confluentcloud.get_invitation(id="i-gxxn1")
    pulumi.export("invitation", main)
    ```


    :param str id: The ID of the Invitation, for example, `i-zyw30`.
    """
    ...
