# 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__ = [
    'DevicePortOverride',
    'RadiusProfileAcctServer',
    'RadiusProfileAuthServer',
    'WlanSchedule',
]

@pulumi.output_type
class DevicePortOverride(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "aggregateNumPorts":
            suggest = "aggregate_num_ports"
        elif key == "opMode":
            suggest = "op_mode"
        elif key == "poeMode":
            suggest = "poe_mode"
        elif key == "portProfileId":
            suggest = "port_profile_id"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in DevicePortOverride. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        DevicePortOverride.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        DevicePortOverride.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 number: _builtins.int,
                 aggregate_num_ports: Optional[_builtins.int] = None,
                 name: Optional[_builtins.str] = None,
                 op_mode: Optional[_builtins.str] = None,
                 poe_mode: Optional[_builtins.str] = None,
                 port_profile_id: Optional[_builtins.str] = None):
        """
        :param _builtins.int number: The physical port number on the switch to configure.
        :param _builtins.int aggregate_num_ports: The number of ports to include in a link aggregation group (LAG). Valid range: 2-8 ports. Used when:
               * Creating switch-to-switch uplinks for increased bandwidth
               * Setting up high-availability connections
               * Connecting to servers requiring more bandwidth
               Note: All ports in the LAG must be sequential and have matching configurations.
        :param _builtins.str name: A friendly name for the port that will be displayed in the UniFi controller UI. Examples:
                 * 'Uplink to Core Switch'
                 * 'Conference Room AP'
                 * 'Server LACP Group 1'
                 * 'VoIP Phone Port'
        :param _builtins.str op_mode: The operating mode of the port. Valid values are:
                 * `switch` - Normal switching mode (default)
                   - Standard port operation for connecting devices
                   - Supports VLANs and all standard switching features
                 * `mirror` - Port mirroring for traffic analysis
                   - Copies traffic from other ports for monitoring
                   - Useful for network troubleshooting and security
                 * `aggregate` - Link aggregation/bonding mode
                   - Combines multiple ports for increased bandwidth
                   - Used for switch uplinks or high-bandwidth servers
        :param _builtins.str poe_mode: The Power over Ethernet (PoE) mode for the port. Valid values are:
               * `auto` - Automatically detect and power PoE devices (recommended)
                 - Provides power based on device negotiation
                 - Safest option for most PoE devices
               * `pasv24` - Passive 24V PoE
                 - For older UniFi devices requiring passive 24V
                 - Use with caution to avoid damage
               * `passthrough` - PoE passthrough mode
                 - For daisy-chaining PoE devices
                 - Available on select UniFi switches
               * `off` - Disable PoE on the port
                 - For non-PoE devices
                 - To prevent unwanted power delivery
        :param _builtins.str port_profile_id: The ID of a pre-configured port profile to apply to this port. Port profiles define settings like VLANs, PoE, and other port-specific configurations.
        """
        pulumi.set(__self__, "number", number)
        if aggregate_num_ports is not None:
            pulumi.set(__self__, "aggregate_num_ports", aggregate_num_ports)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if op_mode is not None:
            pulumi.set(__self__, "op_mode", op_mode)
        if poe_mode is not None:
            pulumi.set(__self__, "poe_mode", poe_mode)
        if port_profile_id is not None:
            pulumi.set(__self__, "port_profile_id", port_profile_id)

    @_builtins.property
    @pulumi.getter
    def number(self) -> _builtins.int:
        """
        The physical port number on the switch to configure.
        """
        return pulumi.get(self, "number")

    @_builtins.property
    @pulumi.getter(name="aggregateNumPorts")
    def aggregate_num_ports(self) -> Optional[_builtins.int]:
        """
        The number of ports to include in a link aggregation group (LAG). Valid range: 2-8 ports. Used when:
        * Creating switch-to-switch uplinks for increased bandwidth
        * Setting up high-availability connections
        * Connecting to servers requiring more bandwidth
        Note: All ports in the LAG must be sequential and have matching configurations.
        """
        return pulumi.get(self, "aggregate_num_ports")

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[_builtins.str]:
        """
        A friendly name for the port that will be displayed in the UniFi controller UI. Examples:
          * 'Uplink to Core Switch'
          * 'Conference Room AP'
          * 'Server LACP Group 1'
          * 'VoIP Phone Port'
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="opMode")
    def op_mode(self) -> Optional[_builtins.str]:
        """
        The operating mode of the port. Valid values are:
          * `switch` - Normal switching mode (default)
            - Standard port operation for connecting devices
            - Supports VLANs and all standard switching features
          * `mirror` - Port mirroring for traffic analysis
            - Copies traffic from other ports for monitoring
            - Useful for network troubleshooting and security
          * `aggregate` - Link aggregation/bonding mode
            - Combines multiple ports for increased bandwidth
            - Used for switch uplinks or high-bandwidth servers
        """
        return pulumi.get(self, "op_mode")

    @_builtins.property
    @pulumi.getter(name="poeMode")
    def poe_mode(self) -> Optional[_builtins.str]:
        """
        The Power over Ethernet (PoE) mode for the port. Valid values are:
        * `auto` - Automatically detect and power PoE devices (recommended)
          - Provides power based on device negotiation
          - Safest option for most PoE devices
        * `pasv24` - Passive 24V PoE
          - For older UniFi devices requiring passive 24V
          - Use with caution to avoid damage
        * `passthrough` - PoE passthrough mode
          - For daisy-chaining PoE devices
          - Available on select UniFi switches
        * `off` - Disable PoE on the port
          - For non-PoE devices
          - To prevent unwanted power delivery
        """
        return pulumi.get(self, "poe_mode")

    @_builtins.property
    @pulumi.getter(name="portProfileId")
    def port_profile_id(self) -> Optional[_builtins.str]:
        """
        The ID of a pre-configured port profile to apply to this port. Port profiles define settings like VLANs, PoE, and other port-specific configurations.
        """
        return pulumi.get(self, "port_profile_id")


@pulumi.output_type
class RadiusProfileAcctServer(dict):
    def __init__(__self__, *,
                 ip: _builtins.str,
                 xsecret: _builtins.str,
                 port: Optional[_builtins.int] = None):
        """
        :param _builtins.str ip: The IPv4 address of the RADIUS accounting server (e.g., '192.168.1.100'). Must be reachable from your UniFi network.
        :param _builtins.str xsecret: The shared secret key used to secure communication between the UniFi controller and the RADIUS server. This must match the secret configured on your RADIUS server.
        :param _builtins.int port: The UDP port number where the RADIUS accounting service is listening. The standard port is 1813, but this can be changed if needed to match your server configuration.
        """
        pulumi.set(__self__, "ip", ip)
        pulumi.set(__self__, "xsecret", xsecret)
        if port is not None:
            pulumi.set(__self__, "port", port)

    @_builtins.property
    @pulumi.getter
    def ip(self) -> _builtins.str:
        """
        The IPv4 address of the RADIUS accounting server (e.g., '192.168.1.100'). Must be reachable from your UniFi network.
        """
        return pulumi.get(self, "ip")

    @_builtins.property
    @pulumi.getter
    def xsecret(self) -> _builtins.str:
        """
        The shared secret key used to secure communication between the UniFi controller and the RADIUS server. This must match the secret configured on your RADIUS server.
        """
        return pulumi.get(self, "xsecret")

    @_builtins.property
    @pulumi.getter
    def port(self) -> Optional[_builtins.int]:
        """
        The UDP port number where the RADIUS accounting service is listening. The standard port is 1813, but this can be changed if needed to match your server configuration.
        """
        return pulumi.get(self, "port")


@pulumi.output_type
class RadiusProfileAuthServer(dict):
    def __init__(__self__, *,
                 ip: _builtins.str,
                 xsecret: _builtins.str,
                 port: Optional[_builtins.int] = None):
        """
        :param _builtins.str ip: The IPv4 address of the RADIUS authentication server (e.g., '192.168.1.100'). Must be reachable from your UniFi network.
        :param _builtins.str xsecret: The shared secret key used to secure communication between the UniFi controller and the RADIUS server. This must match the secret configured on your RADIUS server.
        :param _builtins.int port: The UDP port number where the RADIUS authentication service is listening. The standard port is 1812, but this can be changed if needed to match your server configuration.
        """
        pulumi.set(__self__, "ip", ip)
        pulumi.set(__self__, "xsecret", xsecret)
        if port is not None:
            pulumi.set(__self__, "port", port)

    @_builtins.property
    @pulumi.getter
    def ip(self) -> _builtins.str:
        """
        The IPv4 address of the RADIUS authentication server (e.g., '192.168.1.100'). Must be reachable from your UniFi network.
        """
        return pulumi.get(self, "ip")

    @_builtins.property
    @pulumi.getter
    def xsecret(self) -> _builtins.str:
        """
        The shared secret key used to secure communication between the UniFi controller and the RADIUS server. This must match the secret configured on your RADIUS server.
        """
        return pulumi.get(self, "xsecret")

    @_builtins.property
    @pulumi.getter
    def port(self) -> Optional[_builtins.int]:
        """
        The UDP port number where the RADIUS authentication service is listening. The standard port is 1812, but this can be changed if needed to match your server configuration.
        """
        return pulumi.get(self, "port")


@pulumi.output_type
class WlanSchedule(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "dayOfWeek":
            suggest = "day_of_week"
        elif key == "startHour":
            suggest = "start_hour"
        elif key == "startMinute":
            suggest = "start_minute"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in WlanSchedule. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        WlanSchedule.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        WlanSchedule.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 day_of_week: _builtins.str,
                 duration: _builtins.int,
                 start_hour: _builtins.int,
                 name: Optional[_builtins.str] = None,
                 start_minute: Optional[_builtins.int] = None):
        """
        :param _builtins.str day_of_week: Day of week. Valid values: `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`.
        :param _builtins.int duration: Duration in minutes that the network should remain active.
        :param _builtins.int start_hour: Start hour in 24-hour format (0-23).
        :param _builtins.str name: Friendly name for this schedule block (e.g., 'Business Hours', 'Weekend Access').
        :param _builtins.int start_minute: Start minute (0-59).
        """
        pulumi.set(__self__, "day_of_week", day_of_week)
        pulumi.set(__self__, "duration", duration)
        pulumi.set(__self__, "start_hour", start_hour)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if start_minute is not None:
            pulumi.set(__self__, "start_minute", start_minute)

    @_builtins.property
    @pulumi.getter(name="dayOfWeek")
    def day_of_week(self) -> _builtins.str:
        """
        Day of week. Valid values: `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`.
        """
        return pulumi.get(self, "day_of_week")

    @_builtins.property
    @pulumi.getter
    def duration(self) -> _builtins.int:
        """
        Duration in minutes that the network should remain active.
        """
        return pulumi.get(self, "duration")

    @_builtins.property
    @pulumi.getter(name="startHour")
    def start_hour(self) -> _builtins.int:
        """
        Start hour in 24-hour format (0-23).
        """
        return pulumi.get(self, "start_hour")

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[_builtins.str]:
        """
        Friendly name for this schedule block (e.g., 'Business Hours', 'Weekend Access').
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="startMinute")
    def start_minute(self) -> Optional[_builtins.int]:
        """
        Start minute (0-59).
        """
        return pulumi.get(self, "start_minute")


