# 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__ = ['NtpArgs', 'Ntp']

@pulumi.input_type
class NtpArgs:
    def __init__(__self__, *,
                 mode: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server1: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server2: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server3: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server4: Optional[pulumi.Input[_builtins.str]] = None,
                 site: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a Ntp resource.
        :param pulumi.Input[_builtins.str] mode: NTP server configuration mode. Valid values are:
        :param pulumi.Input[_builtins.str] ntp_server1: Primary NTP server hostname or IP address. Must be a valid hostname (e.g., `pool.ntp.org`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server2: Secondary NTP server hostname or IP address. Must be a valid hostname (e.g., `time.google.com`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server3: Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server4: Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        if mode is not None:
            pulumi.set(__self__, "mode", mode)
        if ntp_server1 is not None:
            pulumi.set(__self__, "ntp_server1", ntp_server1)
        if ntp_server2 is not None:
            pulumi.set(__self__, "ntp_server2", ntp_server2)
        if ntp_server3 is not None:
            pulumi.set(__self__, "ntp_server3", ntp_server3)
        if ntp_server4 is not None:
            pulumi.set(__self__, "ntp_server4", ntp_server4)
        if site is not None:
            pulumi.set(__self__, "site", site)

    @_builtins.property
    @pulumi.getter
    def mode(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        NTP server configuration mode. Valid values are:
        """
        return pulumi.get(self, "mode")

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

    @_builtins.property
    @pulumi.getter(name="ntpServer1")
    def ntp_server1(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Primary NTP server hostname or IP address. Must be a valid hostname (e.g., `pool.ntp.org`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server1")

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

    @_builtins.property
    @pulumi.getter(name="ntpServer2")
    def ntp_server2(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Secondary NTP server hostname or IP address. Must be a valid hostname (e.g., `time.google.com`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server2")

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

    @_builtins.property
    @pulumi.getter(name="ntpServer3")
    def ntp_server3(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server3")

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

    @_builtins.property
    @pulumi.getter(name="ntpServer4")
    def ntp_server4(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server4")

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

    @_builtins.property
    @pulumi.getter
    def site(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        return pulumi.get(self, "site")

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


@pulumi.input_type
class _NtpState:
    def __init__(__self__, *,
                 mode: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server1: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server2: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server3: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server4: Optional[pulumi.Input[_builtins.str]] = None,
                 site: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering Ntp resources.
        :param pulumi.Input[_builtins.str] mode: NTP server configuration mode. Valid values are:
        :param pulumi.Input[_builtins.str] ntp_server1: Primary NTP server hostname or IP address. Must be a valid hostname (e.g., `pool.ntp.org`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server2: Secondary NTP server hostname or IP address. Must be a valid hostname (e.g., `time.google.com`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server3: Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server4: Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        if mode is not None:
            pulumi.set(__self__, "mode", mode)
        if ntp_server1 is not None:
            pulumi.set(__self__, "ntp_server1", ntp_server1)
        if ntp_server2 is not None:
            pulumi.set(__self__, "ntp_server2", ntp_server2)
        if ntp_server3 is not None:
            pulumi.set(__self__, "ntp_server3", ntp_server3)
        if ntp_server4 is not None:
            pulumi.set(__self__, "ntp_server4", ntp_server4)
        if site is not None:
            pulumi.set(__self__, "site", site)

    @_builtins.property
    @pulumi.getter
    def mode(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        NTP server configuration mode. Valid values are:
        """
        return pulumi.get(self, "mode")

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

    @_builtins.property
    @pulumi.getter(name="ntpServer1")
    def ntp_server1(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Primary NTP server hostname or IP address. Must be a valid hostname (e.g., `pool.ntp.org`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server1")

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

    @_builtins.property
    @pulumi.getter(name="ntpServer2")
    def ntp_server2(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Secondary NTP server hostname or IP address. Must be a valid hostname (e.g., `time.google.com`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server2")

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

    @_builtins.property
    @pulumi.getter(name="ntpServer3")
    def ntp_server3(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server3")

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

    @_builtins.property
    @pulumi.getter(name="ntpServer4")
    def ntp_server4(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server4")

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

    @_builtins.property
    @pulumi.getter
    def site(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        return pulumi.get(self, "site")

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


@pulumi.type_token("unifi:setting/ntp:Ntp")
class Ntp(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 mode: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server1: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server2: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server3: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server4: Optional[pulumi.Input[_builtins.str]] = None,
                 site: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        The `setting.Ntp` resource allows you to configure Network Time Protocol (NTP) server settings for your UniFi network.

        NTP servers provide time synchronization for your network devices. This resource supports both automatic and manual NTP configuration modes.

        ## Example Usage

        ```python
        import pulumi
        import pulumiverse_unifi as unifi

        example = unifi.setting.Ntp("example",
            mode="manual",
            ntp_server1="time.cloudflare.com",
            ntp_server2="pool.ntp.org",
            ntp_server3="time.google.com",
            ntp_server4="0.pool.ntp.org")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] mode: NTP server configuration mode. Valid values are:
        :param pulumi.Input[_builtins.str] ntp_server1: Primary NTP server hostname or IP address. Must be a valid hostname (e.g., `pool.ntp.org`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server2: Secondary NTP server hostname or IP address. Must be a valid hostname (e.g., `time.google.com`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server3: Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server4: Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[NtpArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        The `setting.Ntp` resource allows you to configure Network Time Protocol (NTP) server settings for your UniFi network.

        NTP servers provide time synchronization for your network devices. This resource supports both automatic and manual NTP configuration modes.

        ## Example Usage

        ```python
        import pulumi
        import pulumiverse_unifi as unifi

        example = unifi.setting.Ntp("example",
            mode="manual",
            ntp_server1="time.cloudflare.com",
            ntp_server2="pool.ntp.org",
            ntp_server3="time.google.com",
            ntp_server4="0.pool.ntp.org")
        ```

        :param str resource_name: The name of the resource.
        :param NtpArgs 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(NtpArgs, 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,
                 mode: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server1: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server2: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server3: Optional[pulumi.Input[_builtins.str]] = None,
                 ntp_server4: Optional[pulumi.Input[_builtins.str]] = None,
                 site: 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__ = NtpArgs.__new__(NtpArgs)

            __props__.__dict__["mode"] = mode
            __props__.__dict__["ntp_server1"] = ntp_server1
            __props__.__dict__["ntp_server2"] = ntp_server2
            __props__.__dict__["ntp_server3"] = ntp_server3
            __props__.__dict__["ntp_server4"] = ntp_server4
            __props__.__dict__["site"] = site
        super(Ntp, __self__).__init__(
            'unifi:setting/ntp:Ntp',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            mode: Optional[pulumi.Input[_builtins.str]] = None,
            ntp_server1: Optional[pulumi.Input[_builtins.str]] = None,
            ntp_server2: Optional[pulumi.Input[_builtins.str]] = None,
            ntp_server3: Optional[pulumi.Input[_builtins.str]] = None,
            ntp_server4: Optional[pulumi.Input[_builtins.str]] = None,
            site: Optional[pulumi.Input[_builtins.str]] = None) -> 'Ntp':
        """
        Get an existing Ntp 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] mode: NTP server configuration mode. Valid values are:
        :param pulumi.Input[_builtins.str] ntp_server1: Primary NTP server hostname or IP address. Must be a valid hostname (e.g., `pool.ntp.org`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server2: Secondary NTP server hostname or IP address. Must be a valid hostname (e.g., `time.google.com`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server3: Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] ntp_server4: Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _NtpState.__new__(_NtpState)

        __props__.__dict__["mode"] = mode
        __props__.__dict__["ntp_server1"] = ntp_server1
        __props__.__dict__["ntp_server2"] = ntp_server2
        __props__.__dict__["ntp_server3"] = ntp_server3
        __props__.__dict__["ntp_server4"] = ntp_server4
        __props__.__dict__["site"] = site
        return Ntp(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter
    def mode(self) -> pulumi.Output[_builtins.str]:
        """
        NTP server configuration mode. Valid values are:
        """
        return pulumi.get(self, "mode")

    @_builtins.property
    @pulumi.getter(name="ntpServer1")
    def ntp_server1(self) -> pulumi.Output[_builtins.str]:
        """
        Primary NTP server hostname or IP address. Must be a valid hostname (e.g., `pool.ntp.org`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server1")

    @_builtins.property
    @pulumi.getter(name="ntpServer2")
    def ntp_server2(self) -> pulumi.Output[_builtins.str]:
        """
        Secondary NTP server hostname or IP address. Must be a valid hostname (e.g., `time.google.com`) or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server2")

    @_builtins.property
    @pulumi.getter(name="ntpServer3")
    def ntp_server3(self) -> pulumi.Output[_builtins.str]:
        """
        Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server3")

    @_builtins.property
    @pulumi.getter(name="ntpServer4")
    def ntp_server4(self) -> pulumi.Output[_builtins.str]:
        """
        Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when `mode` is set to `manual`.
        """
        return pulumi.get(self, "ntp_server4")

    @_builtins.property
    @pulumi.getter
    def site(self) -> pulumi.Output[_builtins.str]:
        """
        The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        return pulumi.get(self, "site")

