# 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__ = ['BrowserApplicationArgs', 'BrowserApplication']

@pulumi.input_type
class BrowserApplicationArgs:
    def __init__(__self__, *,
                 account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 cookies_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 distributed_tracing_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 loader_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a BrowserApplication resource.
        :param pulumi.Input[_builtins.str] account_id: The account ID of the New Relic account you wish to create the browser application in. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` if not specified.
        :param pulumi.Input[_builtins.bool] cookies_enabled: Configures cookies. Defaults to `true`, if not specified.
        :param pulumi.Input[_builtins.bool] distributed_tracing_enabled: Configures distributed tracing in browser apps. Defaults to `true`, if not specified.
        :param pulumi.Input[_builtins.str] loader_type: Determines the browser loader configured. Valid values are `SPA`, `PRO`, and `LITE`. The default is `SPA`. Refer to the [browser agent loader documentation](https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent/#agent-types) for more information on valid loader types.
        :param pulumi.Input[_builtins.str] name: The name of the browser application.
        """
        if account_id is not None:
            pulumi.set(__self__, "account_id", account_id)
        if cookies_enabled is not None:
            pulumi.set(__self__, "cookies_enabled", cookies_enabled)
        if distributed_tracing_enabled is not None:
            pulumi.set(__self__, "distributed_tracing_enabled", distributed_tracing_enabled)
        if loader_type is not None:
            pulumi.set(__self__, "loader_type", loader_type)
        if name is not None:
            pulumi.set(__self__, "name", name)

    @_builtins.property
    @pulumi.getter(name="accountId")
    def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The account ID of the New Relic account you wish to create the browser application in. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` if not specified.
        """
        return pulumi.get(self, "account_id")

    @account_id.setter
    def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "account_id", value)

    @_builtins.property
    @pulumi.getter(name="cookiesEnabled")
    def cookies_enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Configures cookies. Defaults to `true`, if not specified.
        """
        return pulumi.get(self, "cookies_enabled")

    @cookies_enabled.setter
    def cookies_enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "cookies_enabled", value)

    @_builtins.property
    @pulumi.getter(name="distributedTracingEnabled")
    def distributed_tracing_enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Configures distributed tracing in browser apps. Defaults to `true`, if not specified.
        """
        return pulumi.get(self, "distributed_tracing_enabled")

    @distributed_tracing_enabled.setter
    def distributed_tracing_enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "distributed_tracing_enabled", value)

    @_builtins.property
    @pulumi.getter(name="loaderType")
    def loader_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Determines the browser loader configured. Valid values are `SPA`, `PRO`, and `LITE`. The default is `SPA`. Refer to the [browser agent loader documentation](https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent/#agent-types) for more information on valid loader types.
        """
        return pulumi.get(self, "loader_type")

    @loader_type.setter
    def loader_type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "loader_type", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the browser application.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)


@pulumi.input_type
class _BrowserApplicationState:
    def __init__(__self__, *,
                 account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 application_id: Optional[pulumi.Input[_builtins.str]] = None,
                 cookies_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 distributed_tracing_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 guid: Optional[pulumi.Input[_builtins.str]] = None,
                 js_config: Optional[pulumi.Input[_builtins.str]] = None,
                 loader_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering BrowserApplication resources.
        :param pulumi.Input[_builtins.str] account_id: The account ID of the New Relic account you wish to create the browser application in. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` if not specified.
        :param pulumi.Input[_builtins.str] application_id: The application ID of the browser application (not to be confused with GUID).
        :param pulumi.Input[_builtins.bool] cookies_enabled: Configures cookies. Defaults to `true`, if not specified.
        :param pulumi.Input[_builtins.bool] distributed_tracing_enabled: Configures distributed tracing in browser apps. Defaults to `true`, if not specified.
        :param pulumi.Input[_builtins.str] guid: The GUID of the browser application.
        :param pulumi.Input[_builtins.str] js_config: The JavaScript configuration of the browser application, encoded into a string.
        :param pulumi.Input[_builtins.str] loader_type: Determines the browser loader configured. Valid values are `SPA`, `PRO`, and `LITE`. The default is `SPA`. Refer to the [browser agent loader documentation](https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent/#agent-types) for more information on valid loader types.
        :param pulumi.Input[_builtins.str] name: The name of the browser application.
        """
        if account_id is not None:
            pulumi.set(__self__, "account_id", account_id)
        if application_id is not None:
            pulumi.set(__self__, "application_id", application_id)
        if cookies_enabled is not None:
            pulumi.set(__self__, "cookies_enabled", cookies_enabled)
        if distributed_tracing_enabled is not None:
            pulumi.set(__self__, "distributed_tracing_enabled", distributed_tracing_enabled)
        if guid is not None:
            pulumi.set(__self__, "guid", guid)
        if js_config is not None:
            pulumi.set(__self__, "js_config", js_config)
        if loader_type is not None:
            pulumi.set(__self__, "loader_type", loader_type)
        if name is not None:
            pulumi.set(__self__, "name", name)

    @_builtins.property
    @pulumi.getter(name="accountId")
    def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The account ID of the New Relic account you wish to create the browser application in. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` if not specified.
        """
        return pulumi.get(self, "account_id")

    @account_id.setter
    def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "account_id", value)

    @_builtins.property
    @pulumi.getter(name="applicationId")
    def application_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The application ID of the browser application (not to be confused with GUID).
        """
        return pulumi.get(self, "application_id")

    @application_id.setter
    def application_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "application_id", value)

    @_builtins.property
    @pulumi.getter(name="cookiesEnabled")
    def cookies_enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Configures cookies. Defaults to `true`, if not specified.
        """
        return pulumi.get(self, "cookies_enabled")

    @cookies_enabled.setter
    def cookies_enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "cookies_enabled", value)

    @_builtins.property
    @pulumi.getter(name="distributedTracingEnabled")
    def distributed_tracing_enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Configures distributed tracing in browser apps. Defaults to `true`, if not specified.
        """
        return pulumi.get(self, "distributed_tracing_enabled")

    @distributed_tracing_enabled.setter
    def distributed_tracing_enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "distributed_tracing_enabled", value)

    @_builtins.property
    @pulumi.getter
    def guid(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The GUID of the browser application.
        """
        return pulumi.get(self, "guid")

    @guid.setter
    def guid(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "guid", value)

    @_builtins.property
    @pulumi.getter(name="jsConfig")
    def js_config(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The JavaScript configuration of the browser application, encoded into a string.
        """
        return pulumi.get(self, "js_config")

    @js_config.setter
    def js_config(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "js_config", value)

    @_builtins.property
    @pulumi.getter(name="loaderType")
    def loader_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Determines the browser loader configured. Valid values are `SPA`, `PRO`, and `LITE`. The default is `SPA`. Refer to the [browser agent loader documentation](https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent/#agent-types) for more information on valid loader types.
        """
        return pulumi.get(self, "loader_type")

    @loader_type.setter
    def loader_type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "loader_type", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the browser application.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)


@pulumi.type_token("newrelic:index/browserApplication:BrowserApplication")
class BrowserApplication(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 cookies_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 distributed_tracing_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 loader_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        ## Import

        A browser application can be imported using its GUID, i.e.

        bash

        ```sh
        $ pulumi import newrelic:index/browserApplication:BrowserApplication foo <GUID>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] account_id: The account ID of the New Relic account you wish to create the browser application in. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` if not specified.
        :param pulumi.Input[_builtins.bool] cookies_enabled: Configures cookies. Defaults to `true`, if not specified.
        :param pulumi.Input[_builtins.bool] distributed_tracing_enabled: Configures distributed tracing in browser apps. Defaults to `true`, if not specified.
        :param pulumi.Input[_builtins.str] loader_type: Determines the browser loader configured. Valid values are `SPA`, `PRO`, and `LITE`. The default is `SPA`. Refer to the [browser agent loader documentation](https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent/#agent-types) for more information on valid loader types.
        :param pulumi.Input[_builtins.str] name: The name of the browser application.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[BrowserApplicationArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        ## Import

        A browser application can be imported using its GUID, i.e.

        bash

        ```sh
        $ pulumi import newrelic:index/browserApplication:BrowserApplication foo <GUID>
        ```

        :param str resource_name: The name of the resource.
        :param BrowserApplicationArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(BrowserApplicationArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 cookies_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 distributed_tracing_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 loader_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = BrowserApplicationArgs.__new__(BrowserApplicationArgs)

            __props__.__dict__["account_id"] = account_id
            __props__.__dict__["cookies_enabled"] = cookies_enabled
            __props__.__dict__["distributed_tracing_enabled"] = distributed_tracing_enabled
            __props__.__dict__["loader_type"] = loader_type
            __props__.__dict__["name"] = name
            __props__.__dict__["application_id"] = None
            __props__.__dict__["guid"] = None
            __props__.__dict__["js_config"] = None
        super(BrowserApplication, __self__).__init__(
            'newrelic:index/browserApplication:BrowserApplication',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            account_id: Optional[pulumi.Input[_builtins.str]] = None,
            application_id: Optional[pulumi.Input[_builtins.str]] = None,
            cookies_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
            distributed_tracing_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
            guid: Optional[pulumi.Input[_builtins.str]] = None,
            js_config: Optional[pulumi.Input[_builtins.str]] = None,
            loader_type: Optional[pulumi.Input[_builtins.str]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None) -> 'BrowserApplication':
        """
        Get an existing BrowserApplication resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] account_id: The account ID of the New Relic account you wish to create the browser application in. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` if not specified.
        :param pulumi.Input[_builtins.str] application_id: The application ID of the browser application (not to be confused with GUID).
        :param pulumi.Input[_builtins.bool] cookies_enabled: Configures cookies. Defaults to `true`, if not specified.
        :param pulumi.Input[_builtins.bool] distributed_tracing_enabled: Configures distributed tracing in browser apps. Defaults to `true`, if not specified.
        :param pulumi.Input[_builtins.str] guid: The GUID of the browser application.
        :param pulumi.Input[_builtins.str] js_config: The JavaScript configuration of the browser application, encoded into a string.
        :param pulumi.Input[_builtins.str] loader_type: Determines the browser loader configured. Valid values are `SPA`, `PRO`, and `LITE`. The default is `SPA`. Refer to the [browser agent loader documentation](https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent/#agent-types) for more information on valid loader types.
        :param pulumi.Input[_builtins.str] name: The name of the browser application.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _BrowserApplicationState.__new__(_BrowserApplicationState)

        __props__.__dict__["account_id"] = account_id
        __props__.__dict__["application_id"] = application_id
        __props__.__dict__["cookies_enabled"] = cookies_enabled
        __props__.__dict__["distributed_tracing_enabled"] = distributed_tracing_enabled
        __props__.__dict__["guid"] = guid
        __props__.__dict__["js_config"] = js_config
        __props__.__dict__["loader_type"] = loader_type
        __props__.__dict__["name"] = name
        return BrowserApplication(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="accountId")
    def account_id(self) -> pulumi.Output[_builtins.str]:
        """
        The account ID of the New Relic account you wish to create the browser application in. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` if not specified.
        """
        return pulumi.get(self, "account_id")

    @_builtins.property
    @pulumi.getter(name="applicationId")
    def application_id(self) -> pulumi.Output[_builtins.str]:
        """
        The application ID of the browser application (not to be confused with GUID).
        """
        return pulumi.get(self, "application_id")

    @_builtins.property
    @pulumi.getter(name="cookiesEnabled")
    def cookies_enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Configures cookies. Defaults to `true`, if not specified.
        """
        return pulumi.get(self, "cookies_enabled")

    @_builtins.property
    @pulumi.getter(name="distributedTracingEnabled")
    def distributed_tracing_enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Configures distributed tracing in browser apps. Defaults to `true`, if not specified.
        """
        return pulumi.get(self, "distributed_tracing_enabled")

    @_builtins.property
    @pulumi.getter
    def guid(self) -> pulumi.Output[_builtins.str]:
        """
        The GUID of the browser application.
        """
        return pulumi.get(self, "guid")

    @_builtins.property
    @pulumi.getter(name="jsConfig")
    def js_config(self) -> pulumi.Output[_builtins.str]:
        """
        The JavaScript configuration of the browser application, encoded into a string.
        """
        return pulumi.get(self, "js_config")

    @_builtins.property
    @pulumi.getter(name="loaderType")
    def loader_type(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        Determines the browser loader configured. Valid values are `SPA`, `PRO`, and `LITE`. The default is `SPA`. Refer to the [browser agent loader documentation](https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent/#agent-types) for more information on valid loader types.
        """
        return pulumi.get(self, "loader_type")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        The name of the browser application.
        """
        return pulumi.get(self, "name")

