# 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
from . import outputs
from ._inputs import *

__all__ = ['DeviceArgs', 'Device']

@pulumi.input_type
class DeviceArgs:
    def __init__(__self__, *,
                 allow_adoption: Optional[pulumi.Input[_builtins.bool]] = None,
                 forget_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
                 mac: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 port_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['DevicePortOverrideArgs']]]] = None,
                 site: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a Device resource.
        :param pulumi.Input[_builtins.bool] allow_adoption: Whether to automatically adopt the device when creating this resource. When true:
               * The controller will attempt to adopt the device
               * Device must be in a pending adoption state
               * Device must be accessible on the network
               Set to false if you want to manage adoption manually.
        :param pulumi.Input[_builtins.bool] forget_on_destroy: Whether to forget (un-adopt) the device when this resource is destroyed. When true:
               * The device will be removed from the controller
               * The device will need to be readopted to be managed again
               * Device configuration will be reset
               Set to false to keep the device adopted when removing from Terraform management.
        :param pulumi.Input[_builtins.str] mac: The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
        :param pulumi.Input[_builtins.str] name: A friendly name for the device that will be displayed in the UniFi controller UI. Examples:
               * 'Office-AP-1' for an access point
               * 'Core-Switch-01' for a switch
               * 'Main-Gateway' for a gateway
               Choose descriptive names that indicate location and purpose.
        :param pulumi.Input[Sequence[pulumi.Input['DevicePortOverrideArgs']]] port_overrides: A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:
                 * Port names and labels for easy identification
                 * Port profiles for VLAN and security settings
                 * Operating modes for special functions
               
               Common use cases include:
                 * Setting up trunk ports for inter-switch connections
                 * Configuring PoE settings for powered devices
                 * Creating mirrored ports for network monitoring
                 * Setting up link aggregation between switches or servers
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where the device is located. If not specified, the default site will be used.
        """
        if allow_adoption is not None:
            pulumi.set(__self__, "allow_adoption", allow_adoption)
        if forget_on_destroy is not None:
            pulumi.set(__self__, "forget_on_destroy", forget_on_destroy)
        if mac is not None:
            pulumi.set(__self__, "mac", mac)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if port_overrides is not None:
            pulumi.set(__self__, "port_overrides", port_overrides)
        if site is not None:
            pulumi.set(__self__, "site", site)

    @_builtins.property
    @pulumi.getter(name="allowAdoption")
    def allow_adoption(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether to automatically adopt the device when creating this resource. When true:
        * The controller will attempt to adopt the device
        * Device must be in a pending adoption state
        * Device must be accessible on the network
        Set to false if you want to manage adoption manually.
        """
        return pulumi.get(self, "allow_adoption")

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

    @_builtins.property
    @pulumi.getter(name="forgetOnDestroy")
    def forget_on_destroy(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether to forget (un-adopt) the device when this resource is destroyed. When true:
        * The device will be removed from the controller
        * The device will need to be readopted to be managed again
        * Device configuration will be reset
        Set to false to keep the device adopted when removing from Terraform management.
        """
        return pulumi.get(self, "forget_on_destroy")

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

    @_builtins.property
    @pulumi.getter
    def mac(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
        """
        return pulumi.get(self, "mac")

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

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        A friendly name for the device that will be displayed in the UniFi controller UI. Examples:
        * 'Office-AP-1' for an access point
        * 'Core-Switch-01' for a switch
        * 'Main-Gateway' for a gateway
        Choose descriptive names that indicate location and purpose.
        """
        return pulumi.get(self, "name")

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

    @_builtins.property
    @pulumi.getter(name="portOverrides")
    def port_overrides(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DevicePortOverrideArgs']]]]:
        """
        A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:
          * Port names and labels for easy identification
          * Port profiles for VLAN and security settings
          * Operating modes for special functions

        Common use cases include:
          * Setting up trunk ports for inter-switch connections
          * Configuring PoE settings for powered devices
          * Creating mirrored ports for network monitoring
          * Setting up link aggregation between switches or servers
        """
        return pulumi.get(self, "port_overrides")

    @port_overrides.setter
    def port_overrides(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DevicePortOverrideArgs']]]]):
        pulumi.set(self, "port_overrides", value)

    @_builtins.property
    @pulumi.getter
    def site(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the UniFi site where the device is located. 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 _DeviceState:
    def __init__(__self__, *,
                 allow_adoption: Optional[pulumi.Input[_builtins.bool]] = None,
                 disabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 forget_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
                 mac: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 port_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['DevicePortOverrideArgs']]]] = None,
                 site: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering Device resources.
        :param pulumi.Input[_builtins.bool] allow_adoption: Whether to automatically adopt the device when creating this resource. When true:
               * The controller will attempt to adopt the device
               * Device must be in a pending adoption state
               * Device must be accessible on the network
               Set to false if you want to manage adoption manually.
        :param pulumi.Input[_builtins.bool] disabled: Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
        :param pulumi.Input[_builtins.bool] forget_on_destroy: Whether to forget (un-adopt) the device when this resource is destroyed. When true:
               * The device will be removed from the controller
               * The device will need to be readopted to be managed again
               * Device configuration will be reset
               Set to false to keep the device adopted when removing from Terraform management.
        :param pulumi.Input[_builtins.str] mac: The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
        :param pulumi.Input[_builtins.str] name: A friendly name for the device that will be displayed in the UniFi controller UI. Examples:
               * 'Office-AP-1' for an access point
               * 'Core-Switch-01' for a switch
               * 'Main-Gateway' for a gateway
               Choose descriptive names that indicate location and purpose.
        :param pulumi.Input[Sequence[pulumi.Input['DevicePortOverrideArgs']]] port_overrides: A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:
                 * Port names and labels for easy identification
                 * Port profiles for VLAN and security settings
                 * Operating modes for special functions
               
               Common use cases include:
                 * Setting up trunk ports for inter-switch connections
                 * Configuring PoE settings for powered devices
                 * Creating mirrored ports for network monitoring
                 * Setting up link aggregation between switches or servers
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where the device is located. If not specified, the default site will be used.
        """
        if allow_adoption is not None:
            pulumi.set(__self__, "allow_adoption", allow_adoption)
        if disabled is not None:
            pulumi.set(__self__, "disabled", disabled)
        if forget_on_destroy is not None:
            pulumi.set(__self__, "forget_on_destroy", forget_on_destroy)
        if mac is not None:
            pulumi.set(__self__, "mac", mac)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if port_overrides is not None:
            pulumi.set(__self__, "port_overrides", port_overrides)
        if site is not None:
            pulumi.set(__self__, "site", site)

    @_builtins.property
    @pulumi.getter(name="allowAdoption")
    def allow_adoption(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether to automatically adopt the device when creating this resource. When true:
        * The controller will attempt to adopt the device
        * Device must be in a pending adoption state
        * Device must be accessible on the network
        Set to false if you want to manage adoption manually.
        """
        return pulumi.get(self, "allow_adoption")

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

    @_builtins.property
    @pulumi.getter
    def disabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
        """
        return pulumi.get(self, "disabled")

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

    @_builtins.property
    @pulumi.getter(name="forgetOnDestroy")
    def forget_on_destroy(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether to forget (un-adopt) the device when this resource is destroyed. When true:
        * The device will be removed from the controller
        * The device will need to be readopted to be managed again
        * Device configuration will be reset
        Set to false to keep the device adopted when removing from Terraform management.
        """
        return pulumi.get(self, "forget_on_destroy")

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

    @_builtins.property
    @pulumi.getter
    def mac(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
        """
        return pulumi.get(self, "mac")

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

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        A friendly name for the device that will be displayed in the UniFi controller UI. Examples:
        * 'Office-AP-1' for an access point
        * 'Core-Switch-01' for a switch
        * 'Main-Gateway' for a gateway
        Choose descriptive names that indicate location and purpose.
        """
        return pulumi.get(self, "name")

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

    @_builtins.property
    @pulumi.getter(name="portOverrides")
    def port_overrides(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DevicePortOverrideArgs']]]]:
        """
        A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:
          * Port names and labels for easy identification
          * Port profiles for VLAN and security settings
          * Operating modes for special functions

        Common use cases include:
          * Setting up trunk ports for inter-switch connections
          * Configuring PoE settings for powered devices
          * Creating mirrored ports for network monitoring
          * Setting up link aggregation between switches or servers
        """
        return pulumi.get(self, "port_overrides")

    @port_overrides.setter
    def port_overrides(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DevicePortOverrideArgs']]]]):
        pulumi.set(self, "port_overrides", value)

    @_builtins.property
    @pulumi.getter
    def site(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the UniFi site where the device is located. 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:index/device:Device")
class Device(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 allow_adoption: Optional[pulumi.Input[_builtins.bool]] = None,
                 forget_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
                 mac: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 port_overrides: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DevicePortOverrideArgs', 'DevicePortOverrideArgsDict']]]]] = None,
                 site: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        The `Device` resource manages UniFi network devices such as access points, switches, gateways, etc.

        Devices must first be adopted by the UniFi controller before they can be managed through Terraform. This resource cannot create new devices, but instead allows you to manage existing devices that have already been adopted. The recommended approach is to adopt devices through the UniFi controller UI first, then import them into Terraform using the device's MAC address.

        This resource supports managing device names, port configurations, and other device-specific settings.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_unifi as unifi
        import pulumiverse_unifi as unifi

        disabled = unifi.port.get_profile(name="Disabled")
        poe = unifi.port.Profile("poe",
            name="poe",
            forward="customize",
            native_networkconf_id=native_network_id,
            tagged_networkconf_ids=[some_vlan_network_id],
            poe_mode="auto")
        us24_poe = unifi.Device("us_24_poe",
            mac="01:23:45:67:89:AB",
            name="Switch with POE",
            port_overrides=[
                {
                    "number": 1,
                    "name": "port w/ poe",
                    "port_profile_id": poe.id,
                },
                {
                    "number": 2,
                    "name": "disabled",
                    "port_profile_id": disabled.id,
                },
                {
                    "number": 11,
                    "op_mode": "aggregate",
                    "aggregate_num_ports": 2,
                },
            ])
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.bool] allow_adoption: Whether to automatically adopt the device when creating this resource. When true:
               * The controller will attempt to adopt the device
               * Device must be in a pending adoption state
               * Device must be accessible on the network
               Set to false if you want to manage adoption manually.
        :param pulumi.Input[_builtins.bool] forget_on_destroy: Whether to forget (un-adopt) the device when this resource is destroyed. When true:
               * The device will be removed from the controller
               * The device will need to be readopted to be managed again
               * Device configuration will be reset
               Set to false to keep the device adopted when removing from Terraform management.
        :param pulumi.Input[_builtins.str] mac: The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
        :param pulumi.Input[_builtins.str] name: A friendly name for the device that will be displayed in the UniFi controller UI. Examples:
               * 'Office-AP-1' for an access point
               * 'Core-Switch-01' for a switch
               * 'Main-Gateway' for a gateway
               Choose descriptive names that indicate location and purpose.
        :param pulumi.Input[Sequence[pulumi.Input[Union['DevicePortOverrideArgs', 'DevicePortOverrideArgsDict']]]] port_overrides: A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:
                 * Port names and labels for easy identification
                 * Port profiles for VLAN and security settings
                 * Operating modes for special functions
               
               Common use cases include:
                 * Setting up trunk ports for inter-switch connections
                 * Configuring PoE settings for powered devices
                 * Creating mirrored ports for network monitoring
                 * Setting up link aggregation between switches or servers
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where the device is located. If not specified, the default site will be used.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[DeviceArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        The `Device` resource manages UniFi network devices such as access points, switches, gateways, etc.

        Devices must first be adopted by the UniFi controller before they can be managed through Terraform. This resource cannot create new devices, but instead allows you to manage existing devices that have already been adopted. The recommended approach is to adopt devices through the UniFi controller UI first, then import them into Terraform using the device's MAC address.

        This resource supports managing device names, port configurations, and other device-specific settings.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_unifi as unifi
        import pulumiverse_unifi as unifi

        disabled = unifi.port.get_profile(name="Disabled")
        poe = unifi.port.Profile("poe",
            name="poe",
            forward="customize",
            native_networkconf_id=native_network_id,
            tagged_networkconf_ids=[some_vlan_network_id],
            poe_mode="auto")
        us24_poe = unifi.Device("us_24_poe",
            mac="01:23:45:67:89:AB",
            name="Switch with POE",
            port_overrides=[
                {
                    "number": 1,
                    "name": "port w/ poe",
                    "port_profile_id": poe.id,
                },
                {
                    "number": 2,
                    "name": "disabled",
                    "port_profile_id": disabled.id,
                },
                {
                    "number": 11,
                    "op_mode": "aggregate",
                    "aggregate_num_ports": 2,
                },
            ])
        ```

        :param str resource_name: The name of the resource.
        :param DeviceArgs 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(DeviceArgs, 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,
                 allow_adoption: Optional[pulumi.Input[_builtins.bool]] = None,
                 forget_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
                 mac: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 port_overrides: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DevicePortOverrideArgs', 'DevicePortOverrideArgsDict']]]]] = 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__ = DeviceArgs.__new__(DeviceArgs)

            __props__.__dict__["allow_adoption"] = allow_adoption
            __props__.__dict__["forget_on_destroy"] = forget_on_destroy
            __props__.__dict__["mac"] = mac
            __props__.__dict__["name"] = name
            __props__.__dict__["port_overrides"] = port_overrides
            __props__.__dict__["site"] = site
            __props__.__dict__["disabled"] = None
        super(Device, __self__).__init__(
            'unifi:index/device:Device',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            allow_adoption: Optional[pulumi.Input[_builtins.bool]] = None,
            disabled: Optional[pulumi.Input[_builtins.bool]] = None,
            forget_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
            mac: Optional[pulumi.Input[_builtins.str]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            port_overrides: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DevicePortOverrideArgs', 'DevicePortOverrideArgsDict']]]]] = None,
            site: Optional[pulumi.Input[_builtins.str]] = None) -> 'Device':
        """
        Get an existing Device 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.bool] allow_adoption: Whether to automatically adopt the device when creating this resource. When true:
               * The controller will attempt to adopt the device
               * Device must be in a pending adoption state
               * Device must be accessible on the network
               Set to false if you want to manage adoption manually.
        :param pulumi.Input[_builtins.bool] disabled: Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
        :param pulumi.Input[_builtins.bool] forget_on_destroy: Whether to forget (un-adopt) the device when this resource is destroyed. When true:
               * The device will be removed from the controller
               * The device will need to be readopted to be managed again
               * Device configuration will be reset
               Set to false to keep the device adopted when removing from Terraform management.
        :param pulumi.Input[_builtins.str] mac: The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
        :param pulumi.Input[_builtins.str] name: A friendly name for the device that will be displayed in the UniFi controller UI. Examples:
               * 'Office-AP-1' for an access point
               * 'Core-Switch-01' for a switch
               * 'Main-Gateway' for a gateway
               Choose descriptive names that indicate location and purpose.
        :param pulumi.Input[Sequence[pulumi.Input[Union['DevicePortOverrideArgs', 'DevicePortOverrideArgsDict']]]] port_overrides: A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:
                 * Port names and labels for easy identification
                 * Port profiles for VLAN and security settings
                 * Operating modes for special functions
               
               Common use cases include:
                 * Setting up trunk ports for inter-switch connections
                 * Configuring PoE settings for powered devices
                 * Creating mirrored ports for network monitoring
                 * Setting up link aggregation between switches or servers
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where the device is located. If not specified, the default site will be used.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _DeviceState.__new__(_DeviceState)

        __props__.__dict__["allow_adoption"] = allow_adoption
        __props__.__dict__["disabled"] = disabled
        __props__.__dict__["forget_on_destroy"] = forget_on_destroy
        __props__.__dict__["mac"] = mac
        __props__.__dict__["name"] = name
        __props__.__dict__["port_overrides"] = port_overrides
        __props__.__dict__["site"] = site
        return Device(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="allowAdoption")
    def allow_adoption(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Whether to automatically adopt the device when creating this resource. When true:
        * The controller will attempt to adopt the device
        * Device must be in a pending adoption state
        * Device must be accessible on the network
        Set to false if you want to manage adoption manually.
        """
        return pulumi.get(self, "allow_adoption")

    @_builtins.property
    @pulumi.getter
    def disabled(self) -> pulumi.Output[_builtins.bool]:
        """
        Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
        """
        return pulumi.get(self, "disabled")

    @_builtins.property
    @pulumi.getter(name="forgetOnDestroy")
    def forget_on_destroy(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Whether to forget (un-adopt) the device when this resource is destroyed. When true:
        * The device will be removed from the controller
        * The device will need to be readopted to be managed again
        * Device configuration will be reset
        Set to false to keep the device adopted when removing from Terraform management.
        """
        return pulumi.get(self, "forget_on_destroy")

    @_builtins.property
    @pulumi.getter
    def mac(self) -> pulumi.Output[_builtins.str]:
        """
        The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
        """
        return pulumi.get(self, "mac")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        A friendly name for the device that will be displayed in the UniFi controller UI. Examples:
        * 'Office-AP-1' for an access point
        * 'Core-Switch-01' for a switch
        * 'Main-Gateway' for a gateway
        Choose descriptive names that indicate location and purpose.
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="portOverrides")
    def port_overrides(self) -> pulumi.Output[Optional[Sequence['outputs.DevicePortOverride']]]:
        """
        A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:
          * Port names and labels for easy identification
          * Port profiles for VLAN and security settings
          * Operating modes for special functions

        Common use cases include:
          * Setting up trunk ports for inter-switch connections
          * Configuring PoE settings for powered devices
          * Creating mirrored ports for network monitoring
          * Setting up link aggregation between switches or servers
        """
        return pulumi.get(self, "port_overrides")

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

