# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import utilities, tables

class GetProfileResult:
    """
    A collection of values returned by getProfile.
    """
    def __init__(__self__, authorized_keys=None, email=None, email_notifications=None, id=None, ip_whitelist_enabled=None, lish_auth_method=None, referrals=None, restricted=None, timezone=None, two_factor_auth=None, username=None):
        if authorized_keys and not isinstance(authorized_keys, list):
            raise TypeError("Expected argument 'authorized_keys' to be a list")
        __self__.authorized_keys = authorized_keys
        if email and not isinstance(email, str):
            raise TypeError("Expected argument 'email' to be a str")
        __self__.email = email
        if email_notifications and not isinstance(email_notifications, bool):
            raise TypeError("Expected argument 'email_notifications' to be a bool")
        __self__.email_notifications = email_notifications
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        id is the provider-assigned unique ID for this managed resource.
        """
        if ip_whitelist_enabled and not isinstance(ip_whitelist_enabled, bool):
            raise TypeError("Expected argument 'ip_whitelist_enabled' to be a bool")
        __self__.ip_whitelist_enabled = ip_whitelist_enabled
        if lish_auth_method and not isinstance(lish_auth_method, str):
            raise TypeError("Expected argument 'lish_auth_method' to be a str")
        __self__.lish_auth_method = lish_auth_method
        if referrals and not isinstance(referrals, dict):
            raise TypeError("Expected argument 'referrals' to be a dict")
        __self__.referrals = referrals
        if restricted and not isinstance(restricted, bool):
            raise TypeError("Expected argument 'restricted' to be a bool")
        __self__.restricted = restricted
        if timezone and not isinstance(timezone, str):
            raise TypeError("Expected argument 'timezone' to be a str")
        __self__.timezone = timezone
        if two_factor_auth and not isinstance(two_factor_auth, bool):
            raise TypeError("Expected argument 'two_factor_auth' to be a bool")
        __self__.two_factor_auth = two_factor_auth
        if username and not isinstance(username, str):
            raise TypeError("Expected argument 'username' to be a str")
        __self__.username = username
class AwaitableGetProfileResult(GetProfileResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetProfileResult(
            authorized_keys=self.authorized_keys,
            email=self.email,
            email_notifications=self.email_notifications,
            id=self.id,
            ip_whitelist_enabled=self.ip_whitelist_enabled,
            lish_auth_method=self.lish_auth_method,
            referrals=self.referrals,
            restricted=self.restricted,
            timezone=self.timezone,
            two_factor_auth=self.two_factor_auth,
            username=self.username)

def get_profile(opts=None):
    """
    Provides information about a Linode profile.


    ## Attributes

    The Linode Profile resource exports the following attributes:

    * `email` - The profile email address. This address will be used for communication with Linode as necessary.

    * `timezone` - The profile's preferred timezone. This is not used by the API, and is for the benefit of clients only. All times the API returns are in UTC.

    * `email_notifications` - If true, email notifications will be sent about account activity. If false, when false business-critical communications may still be sent through email.

    * `username` - The username for logging in to Linode services.

    * `ip_whitelist_enabled` - If true, logins for the user will only be allowed from whitelisted IPs. This setting is currently deprecated, and cannot be enabled.

    * `lish_auth_method` - The methods of authentication allowed when connecting via Lish. 'keys_only' is the most secure with the intent to use Lish, and 'disabled' is recommended for users that will not use Lish at all.

    * `authorized_keys` - The list of SSH Keys authorized to use Lish for this user. This value is ignored if lish_auth_method is 'disabled'.

    * `two_factor_auth` - If true, logins from untrusted computers will require Two Factor Authentication.

    * `restricted` - If true, the user has restrictions on what can be accessed on the Account.

    * `referrals` - Credit Card information associated with this Account.

    * `referrals.0.total` - The number of users who have signed up with the referral code.

    * `referrals.0.credit` - The amount of account credit in US Dollars issued to the account through the referral program.

    * `referrals.0.completed` - The number of completed signups with the referral code.

    * `referrals.0.pending` - The number of pending signups for the referral code. To receive credit the signups must be completed.

    * `referrals.0.code` - The Profile referral code.  If new accounts use this when signing up for Linode, referring account will receive credit.

    * `referrals.0.url` - The referral URL.

    > This content is derived from https://github.com/terraform-providers/terraform-provider-linode/blob/master/website/docs/d/profile.html.md.
    """
    __args__ = dict()


    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('linode:index/getProfile:getProfile', __args__, opts=opts).value

    return AwaitableGetProfileResult(
        authorized_keys=__ret__.get('authorizedKeys'),
        email=__ret__.get('email'),
        email_notifications=__ret__.get('emailNotifications'),
        id=__ret__.get('id'),
        ip_whitelist_enabled=__ret__.get('ipWhitelistEnabled'),
        lish_auth_method=__ret__.get('lishAuthMethod'),
        referrals=__ret__.get('referrals'),
        restricted=__ret__.get('restricted'),
        timezone=__ret__.get('timezone'),
        two_factor_auth=__ret__.get('twoFactorAuth'),
        username=__ret__.get('username'))
