# 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

__all__ = ['ProviderArgs', 'Provider']

@pulumi.input_type
class ProviderArgs:
    def __init__(__self__, *,
                 application_name_suffix: Optional[pulumi.Input[str]] = None,
                 database: Optional[pulumi.Input[str]] = None,
                 host: Optional[pulumi.Input[str]] = None,
                 password: Optional[pulumi.Input[str]] = None,
                 port: Optional[pulumi.Input[int]] = None,
                 sslmode: Optional[pulumi.Input[str]] = None,
                 user: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a Provider resource.
        :param pulumi.Input[str] application_name_suffix: A suffix to include in the `application_name` session parameter when connecting to Materialize.
        :param pulumi.Input[str] database: The Materialize database. Can also come from the `MZ_DATABASE` environment variable. Defaults to `materialize`.
        :param pulumi.Input[str] host: Materialize host. Can also come from the `MZ_HOST` environment variable.
        :param pulumi.Input[str] password: Materialize host. Can also come from the `MZ_PASSWORD` environment variable.
        :param pulumi.Input[int] port: The Materialize port number to connect to at the server host. Can also come from the `MZ_PORT` environment variable.
               Defaults to 6875.
        :param pulumi.Input[str] sslmode: For testing purposes, the SSL mode to use.
        :param pulumi.Input[str] user: Materialize user. Can also come from the `MZ_USER` environment variable.
        """
        if application_name_suffix is not None:
            pulumi.set(__self__, "application_name_suffix", application_name_suffix)
        if database is not None:
            pulumi.set(__self__, "database", database)
        if host is not None:
            pulumi.set(__self__, "host", host)
        if password is not None:
            pulumi.set(__self__, "password", password)
        if port is not None:
            pulumi.set(__self__, "port", port)
        if sslmode is not None:
            pulumi.set(__self__, "sslmode", sslmode)
        if user is not None:
            pulumi.set(__self__, "user", user)

    @property
    @pulumi.getter(name="applicationNameSuffix")
    def application_name_suffix(self) -> Optional[pulumi.Input[str]]:
        """
        A suffix to include in the `application_name` session parameter when connecting to Materialize.
        """
        return pulumi.get(self, "application_name_suffix")

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

    @property
    @pulumi.getter
    def database(self) -> Optional[pulumi.Input[str]]:
        """
        The Materialize database. Can also come from the `MZ_DATABASE` environment variable. Defaults to `materialize`.
        """
        return pulumi.get(self, "database")

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

    @property
    @pulumi.getter
    def host(self) -> Optional[pulumi.Input[str]]:
        """
        Materialize host. Can also come from the `MZ_HOST` environment variable.
        """
        return pulumi.get(self, "host")

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

    @property
    @pulumi.getter
    def password(self) -> Optional[pulumi.Input[str]]:
        """
        Materialize host. Can also come from the `MZ_PASSWORD` environment variable.
        """
        return pulumi.get(self, "password")

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

    @property
    @pulumi.getter
    def port(self) -> Optional[pulumi.Input[int]]:
        """
        The Materialize port number to connect to at the server host. Can also come from the `MZ_PORT` environment variable.
        Defaults to 6875.
        """
        return pulumi.get(self, "port")

    @port.setter
    def port(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "port", value)

    @property
    @pulumi.getter
    def sslmode(self) -> Optional[pulumi.Input[str]]:
        """
        For testing purposes, the SSL mode to use.
        """
        return pulumi.get(self, "sslmode")

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

    @property
    @pulumi.getter
    def user(self) -> Optional[pulumi.Input[str]]:
        """
        Materialize user. Can also come from the `MZ_USER` environment variable.
        """
        return pulumi.get(self, "user")

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


class Provider(pulumi.ProviderResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 application_name_suffix: Optional[pulumi.Input[str]] = None,
                 database: Optional[pulumi.Input[str]] = None,
                 host: Optional[pulumi.Input[str]] = None,
                 password: Optional[pulumi.Input[str]] = None,
                 port: Optional[pulumi.Input[int]] = None,
                 sslmode: Optional[pulumi.Input[str]] = None,
                 user: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        The provider type for the materialize package. By default, resources use package-wide configuration
        settings, however an explicit `Provider` instance may be created and passed during resource
        construction to achieve fine-grained programmatic control over provider settings. See the
        [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] application_name_suffix: A suffix to include in the `application_name` session parameter when connecting to Materialize.
        :param pulumi.Input[str] database: The Materialize database. Can also come from the `MZ_DATABASE` environment variable. Defaults to `materialize`.
        :param pulumi.Input[str] host: Materialize host. Can also come from the `MZ_HOST` environment variable.
        :param pulumi.Input[str] password: Materialize host. Can also come from the `MZ_PASSWORD` environment variable.
        :param pulumi.Input[int] port: The Materialize port number to connect to at the server host. Can also come from the `MZ_PORT` environment variable.
               Defaults to 6875.
        :param pulumi.Input[str] sslmode: For testing purposes, the SSL mode to use.
        :param pulumi.Input[str] user: Materialize user. Can also come from the `MZ_USER` environment variable.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[ProviderArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        The provider type for the materialize package. By default, resources use package-wide configuration
        settings, however an explicit `Provider` instance may be created and passed during resource
        construction to achieve fine-grained programmatic control over provider settings. See the
        [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.

        :param str resource_name: The name of the resource.
        :param ProviderArgs 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(ProviderArgs, 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,
                 application_name_suffix: Optional[pulumi.Input[str]] = None,
                 database: Optional[pulumi.Input[str]] = None,
                 host: Optional[pulumi.Input[str]] = None,
                 password: Optional[pulumi.Input[str]] = None,
                 port: Optional[pulumi.Input[int]] = None,
                 sslmode: Optional[pulumi.Input[str]] = None,
                 user: Optional[pulumi.Input[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__ = ProviderArgs.__new__(ProviderArgs)

            __props__.__dict__["application_name_suffix"] = application_name_suffix
            __props__.__dict__["database"] = database
            __props__.__dict__["host"] = host
            __props__.__dict__["password"] = None if password is None else pulumi.Output.secret(password)
            __props__.__dict__["port"] = pulumi.Output.from_input(port).apply(pulumi.runtime.to_json) if port is not None else None
            __props__.__dict__["sslmode"] = sslmode
            __props__.__dict__["user"] = user
        secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["password"])
        opts = pulumi.ResourceOptions.merge(opts, secret_opts)
        super(Provider, __self__).__init__(
            'materialize',
            resource_name,
            __props__,
            opts)

    @property
    @pulumi.getter(name="applicationNameSuffix")
    def application_name_suffix(self) -> pulumi.Output[Optional[str]]:
        """
        A suffix to include in the `application_name` session parameter when connecting to Materialize.
        """
        return pulumi.get(self, "application_name_suffix")

    @property
    @pulumi.getter
    def database(self) -> pulumi.Output[Optional[str]]:
        """
        The Materialize database. Can also come from the `MZ_DATABASE` environment variable. Defaults to `materialize`.
        """
        return pulumi.get(self, "database")

    @property
    @pulumi.getter
    def host(self) -> pulumi.Output[Optional[str]]:
        """
        Materialize host. Can also come from the `MZ_HOST` environment variable.
        """
        return pulumi.get(self, "host")

    @property
    @pulumi.getter
    def password(self) -> pulumi.Output[Optional[str]]:
        """
        Materialize host. Can also come from the `MZ_PASSWORD` environment variable.
        """
        return pulumi.get(self, "password")

    @property
    @pulumi.getter
    def sslmode(self) -> pulumi.Output[Optional[str]]:
        """
        For testing purposes, the SSL mode to use.
        """
        return pulumi.get(self, "sslmode")

    @property
    @pulumi.getter
    def user(self) -> pulumi.Output[Optional[str]]:
        """
        Materialize user. Can also come from the `MZ_USER` environment variable.
        """
        return pulumi.get(self, "user")

