""" - Type Stubs

Auto-generated stub file for type checking and IDE support.

Endpoint: switch_controller/managed_switch
Category: cmdb
"""

from __future__ import annotations

from typing import (
    Any,
    ClassVar,
    Literal,
    TypedDict,
    overload,
)

from hfortix_fortios.models import (
    FortiObject,
    FortiObjectList,
)


# ================================================================
# TypedDict Payloads
# ================================================================

class ManagedSwitchRouteoffloadrouterItem:
    """Nested item for route-offload-router field - supports attribute access."""
    vlan_name: str
    router_ip: str


class ManagedSwitchVlanItem:
    """Nested item for vlan field - supports attribute access."""
    vlan_name: str
    assignment_priority: int


class ManagedSwitchPortsItem:
    """Nested item for ports field - supports attribute access."""
    port_name: str
    port_owner: str
    switch_id: str
    speed: Literal["10half", "10full", "100half", "100full", "1000full", "10000full", "auto", "1000auto", "1000full-fiber", "40000full", "auto-module", "100FX-half", "100FX-full", "100000full", "2500auto", "2500full", "25000full", "50000full", "10000cr", "10000sr", "100000sr4", "100000cr4", "40000sr4", "40000cr4", "40000auto", "25000cr", "25000sr", "50000cr", "50000sr", "5000auto", "sgmii-auto"]
    status: Literal["up", "down"]
    poe_status: Literal["enable", "disable"]
    ip_source_guard: Literal["disable", "enable"]
    ptp_status: Literal["disable", "enable"]
    ptp_policy: str
    aggregator_mode: Literal["bandwidth", "count"]
    flapguard: Literal["enable", "disable"]
    flap_rate: int
    flap_duration: int
    flap_timeout: int
    rpvst_port: Literal["disabled", "enabled"]
    poe_pre_standard_detection: Literal["enable", "disable"]
    port_number: int
    port_prefix_type: int
    fortilink_port: int
    poe_capable: int
    pd_capable: int
    stacking_port: int
    p2p_port: int
    mclag_icl_port: int
    authenticated_port: int
    restricted_auth_port: int
    encrypted_port: int
    fiber_port: int
    media_type: str
    poe_standard: str
    poe_max_power: str
    poe_mode_bt_cabable: int
    poe_port_mode: Literal["ieee802-3af", "ieee802-3at", "ieee802-3bt"]
    poe_port_priority: Literal["critical-priority", "high-priority", "low-priority", "medium-priority"]
    poe_port_power: Literal["normal", "perpetual", "perpetual-fast"]
    flags: int
    isl_local_trunk_name: str
    isl_peer_port_name: str
    isl_peer_device_name: str
    isl_peer_device_sn: str
    fgt_peer_port_name: str
    fgt_peer_device_name: str
    vlan: str
    allowed_vlans_all: Literal["enable", "disable"]
    allowed_vlans: str
    untagged_vlans: str
    type: Literal["physical", "trunk"]
    access_mode: Literal["dynamic", "nac", "static"]
    matched_dpp_policy: str
    matched_dpp_intf_tags: str
    acl_group: str
    fortiswitch_acls: str
    dhcp_snooping: Literal["untrusted", "trusted"]
    dhcp_snoop_option82_trust: Literal["enable", "disable"]
    dhcp_snoop_option82_override: str
    arp_inspection_trust: Literal["untrusted", "trusted"]
    igmp_snooping_flood_reports: Literal["enable", "disable"]
    mcast_snooping_flood_traffic: Literal["enable", "disable"]
    stp_state: Literal["enabled", "disabled"]
    stp_root_guard: Literal["enabled", "disabled"]
    stp_bpdu_guard: Literal["enabled", "disabled"]
    stp_bpdu_guard_timeout: int
    edge_port: Literal["enable", "disable"]
    discard_mode: Literal["none", "all-untagged", "all-tagged"]
    packet_sampler: Literal["enabled", "disabled"]
    packet_sample_rate: int
    sflow_counter_interval: int
    sample_direction: Literal["tx", "rx", "both"]
    fec_capable: int
    fec_state: Literal["disabled", "cl74", "cl91", "detect-by-module"]
    flow_control: Literal["disable", "tx", "rx", "both"]
    pause_meter: int
    pause_meter_resume: Literal["75%", "50%", "25%"]
    loop_guard: Literal["enabled", "disabled"]
    loop_guard_timeout: int
    port_policy: str
    qos_policy: str
    storm_control_policy: str
    port_security_policy: str
    export_to_pool: str
    interface_tags: str
    learning_limit: int
    sticky_mac: Literal["enable", "disable"]
    lldp_status: Literal["disable", "rx-only", "tx-only", "tx-rx"]
    lldp_profile: str
    export_to: str
    mac_addr: str
    allow_arp_monitor: Literal["disable", "enable"]
    qnq: str
    log_mac_event: Literal["disable", "enable"]
    port_selection_criteria: Literal["src-mac", "dst-mac", "src-dst-mac", "src-ip", "dst-ip", "src-dst-ip"]
    description: str
    lacp_speed: Literal["slow", "fast"]
    mode: Literal["static", "lacp-passive", "lacp-active"]
    bundle: Literal["enable", "disable"]
    member_withdrawal_behavior: Literal["forward", "block"]
    mclag: Literal["enable", "disable"]
    min_bundle: int
    max_bundle: int
    members: str
    fallback_port: str


class ManagedSwitchIpsourceguardItem:
    """Nested item for ip-source-guard field - supports attribute access."""
    port: str
    description: str
    binding_entry: str


class ManagedSwitchStpinstanceItem:
    """Nested item for stp-instance field - supports attribute access."""
    id: str
    priority: Literal["0", "4096", "8192", "12288", "16384", "20480", "24576", "28672", "32768", "36864", "40960", "45056", "49152", "53248", "57344", "61440"]


class ManagedSwitchSnmpcommunityItem:
    """Nested item for snmp-community field - supports attribute access."""
    id: int
    name: str
    status: Literal["disable", "enable"]
    hosts: str
    query_v1_status: Literal["disable", "enable"]
    query_v1_port: int
    query_v2c_status: Literal["disable", "enable"]
    query_v2c_port: int
    trap_v1_status: Literal["disable", "enable"]
    trap_v1_lport: int
    trap_v1_rport: int
    trap_v2c_status: Literal["disable", "enable"]
    trap_v2c_lport: int
    trap_v2c_rport: int
    events: Literal["cpu-high", "mem-low", "log-full", "intf-ip", "ent-conf-change", "l2mac"]


class ManagedSwitchSnmpuserItem:
    """Nested item for snmp-user field - supports attribute access."""
    name: str
    queries: Literal["disable", "enable"]
    query_port: int
    security_level: Literal["no-auth-no-priv", "auth-no-priv", "auth-priv"]
    auth_proto: Literal["md5", "sha1", "sha224", "sha256", "sha384", "sha512"]
    auth_pwd: str
    priv_proto: Literal["aes128", "aes192", "aes192c", "aes256", "aes256c", "des"]
    priv_pwd: str


class ManagedSwitchRemotelogItem:
    """Nested item for remote-log field - supports attribute access."""
    name: str
    status: Literal["enable", "disable"]
    server: str
    port: int
    severity: Literal["emergency", "alert", "critical", "error", "warning", "notification", "information", "debug"]
    csv: Literal["enable", "disable"]
    facility: Literal["kernel", "user", "mail", "daemon", "auth", "syslog", "lpr", "news", "uucp", "cron", "authpriv", "ftp", "ntp", "audit", "alert", "clock", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7"]


class ManagedSwitchMirrorItem:
    """Nested item for mirror field - supports attribute access."""
    name: str
    status: Literal["active", "inactive"]
    switching_packet: Literal["enable", "disable"]
    dst: str
    src_ingress: str
    src_egress: str


class ManagedSwitchStaticmacItem:
    """Nested item for static-mac field - supports attribute access."""
    id: int
    type: Literal["static", "sticky"]
    vlan: str
    mac: str
    interface: str
    description: str


class ManagedSwitchCustomcommandItem:
    """Nested item for custom-command field - supports attribute access."""
    command_entry: str
    command_name: str


class ManagedSwitchDhcpsnoopingstaticclientItem:
    """Nested item for dhcp-snooping-static-client field - supports attribute access."""
    name: str
    vlan: str
    ip: str
    mac: str
    port: str


class ManagedSwitchRoutervrfItem:
    """Nested item for router-vrf field - supports attribute access."""
    name: str
    switch_id: str
    vrfid: int


class ManagedSwitchSysteminterfaceItem:
    """Nested item for system-interface field - supports attribute access."""
    name: str
    switch_id: str
    mode: Literal["static", "dhcp"]
    ip: str
    status: Literal["disable", "enable"]
    allowaccess: Literal["ping", "https", "http", "ssh", "snmp", "telnet", "radius-acct"]
    vlan: str
    type: Literal["vlan", "physical"]
    interface: str
    vrf: str


class ManagedSwitchRouterstaticItem:
    """Nested item for router-static field - supports attribute access."""
    id: int
    switch_id: str
    blackhole: Literal["disable", "enable"]
    comment: str
    device: str
    distance: int
    dst: str
    dynamic_gateway: Literal["disable", "enable"]
    gateway: str
    status: Literal["disable", "enable"]
    vrf: str


class ManagedSwitchSystemdhcpserverItem:
    """Nested item for system-dhcp-server field - supports attribute access."""
    id: int
    switch_id: str
    status: Literal["disable", "enable"]
    lease_time: int
    dns_service: Literal["local", "default", "specify"]
    dns_server1: str
    dns_server2: str
    dns_server3: str
    ntp_service: Literal["local", "default", "specify"]
    ntp_server1: str
    ntp_server2: str
    ntp_server3: str
    default_gateway: str
    netmask: str
    interface: str
    ip_range: str
    options: str


class ManagedSwitchPayload(TypedDict, total=False):
    """Payload type for ManagedSwitch operations."""
    switch_id: str
    sn: str
    description: str
    switch_profile: str
    access_profile: str
    purdue_level: Literal["1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "5.5"]
    fsw_wan1_peer: str
    fsw_wan1_admin: Literal["discovered", "disable", "enable"]
    poe_pre_standard_detection: Literal["enable", "disable"]
    dhcp_server_access_list: Literal["global", "enable", "disable"]
    poe_detection_type: int
    max_poe_budget: int
    directly_connected: int
    version: int
    max_allowed_trunk_members: int
    pre_provisioned: int
    l3_discovered: int
    mgmt_mode: int
    tunnel_discovered: int
    tdr_supported: str
    dynamic_capability: str
    switch_device_tag: str
    switch_dhcp_opt43_key: str
    mclag_igmp_snooping_aware: Literal["enable", "disable"]
    dynamically_discovered: int
    ptp_status: Literal["disable", "enable"]
    ptp_profile: str
    radius_nas_ip_override: Literal["disable", "enable"]
    radius_nas_ip: str
    route_offload: Literal["disable", "enable"]
    route_offload_mclag: Literal["disable", "enable"]
    route_offload_router: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRouteoffloadrouterItem]
    vlan: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchVlanItem]
    type: Literal["virtual", "physical"]
    owner_vdom: str
    flow_identity: str
    staged_image_version: str
    delayed_restart_trigger: int
    firmware_provision: Literal["enable", "disable"]
    firmware_provision_version: str
    firmware_provision_latest: Literal["disable", "once"]
    ports: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchPortsItem]
    ip_source_guard: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchIpsourceguardItem]
    stp_settings: str
    stp_instance: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchStpinstanceItem]
    override_snmp_sysinfo: Literal["disable", "enable"]
    snmp_sysinfo: str
    override_snmp_trap_threshold: Literal["enable", "disable"]
    snmp_trap_threshold: str
    override_snmp_community: Literal["enable", "disable"]
    snmp_community: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSnmpcommunityItem]
    override_snmp_user: Literal["enable", "disable"]
    snmp_user: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSnmpuserItem]
    qos_drop_policy: Literal["taildrop", "random-early-detection"]
    qos_red_probability: int
    switch_log: str
    remote_log: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRemotelogItem]
    storm_control: str
    mirror: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchMirrorItem]
    static_mac: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchStaticmacItem]
    custom_command: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchCustomcommandItem]
    dhcp_snooping_static_client: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchDhcpsnoopingstaticclientItem]
    igmp_snooping: str
    x802_1X_settings: str
    router_vrf: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRoutervrfItem]
    system_interface: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSysteminterfaceItem]
    router_static: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRouterstaticItem]
    system_dhcp_server: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSystemdhcpserverItem]


# ================================================================
# Response Types (TypedDict for dict-style access)
# ================================================================

class ManagedSwitchResponse(TypedDict, total=False):
    """Response type for ManagedSwitch - use with .dict property for typed dict access."""
    switch_id: str
    sn: str
    description: str
    switch_profile: str
    access_profile: str
    purdue_level: Literal["1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "5.5"]
    fsw_wan1_peer: str
    fsw_wan1_admin: Literal["discovered", "disable", "enable"]
    poe_pre_standard_detection: Literal["enable", "disable"]
    dhcp_server_access_list: Literal["global", "enable", "disable"]
    poe_detection_type: int
    max_poe_budget: int
    directly_connected: int
    version: int
    max_allowed_trunk_members: int
    pre_provisioned: int
    l3_discovered: int
    mgmt_mode: int
    tunnel_discovered: int
    tdr_supported: str
    dynamic_capability: str
    switch_device_tag: str
    switch_dhcp_opt43_key: str
    mclag_igmp_snooping_aware: Literal["enable", "disable"]
    dynamically_discovered: int
    ptp_status: Literal["disable", "enable"]
    ptp_profile: str
    radius_nas_ip_override: Literal["disable", "enable"]
    radius_nas_ip: str
    route_offload: Literal["disable", "enable"]
    route_offload_mclag: Literal["disable", "enable"]
    route_offload_router: list[ManagedSwitchRouteoffloadrouterItem]
    vlan: list[ManagedSwitchVlanItem]
    type: Literal["virtual", "physical"]
    owner_vdom: str
    flow_identity: str
    staged_image_version: str
    delayed_restart_trigger: int
    firmware_provision: Literal["enable", "disable"]
    firmware_provision_version: str
    firmware_provision_latest: Literal["disable", "once"]
    ports: list[ManagedSwitchPortsItem]
    ip_source_guard: list[ManagedSwitchIpsourceguardItem]
    stp_settings: str
    stp_instance: list[ManagedSwitchStpinstanceItem]
    override_snmp_sysinfo: Literal["disable", "enable"]
    snmp_sysinfo: str
    override_snmp_trap_threshold: Literal["enable", "disable"]
    snmp_trap_threshold: str
    override_snmp_community: Literal["enable", "disable"]
    snmp_community: list[ManagedSwitchSnmpcommunityItem]
    override_snmp_user: Literal["enable", "disable"]
    snmp_user: list[ManagedSwitchSnmpuserItem]
    qos_drop_policy: Literal["taildrop", "random-early-detection"]
    qos_red_probability: int
    switch_log: str
    remote_log: list[ManagedSwitchRemotelogItem]
    storm_control: str
    mirror: list[ManagedSwitchMirrorItem]
    static_mac: list[ManagedSwitchStaticmacItem]
    custom_command: list[ManagedSwitchCustomcommandItem]
    dhcp_snooping_static_client: list[ManagedSwitchDhcpsnoopingstaticclientItem]
    igmp_snooping: str
    x802_1X_settings: str
    router_vrf: list[ManagedSwitchRoutervrfItem]
    system_interface: list[ManagedSwitchSysteminterfaceItem]
    router_static: list[ManagedSwitchRouterstaticItem]
    system_dhcp_server: list[ManagedSwitchSystemdhcpserverItem]


# ================================================================
# Response Types (Class for attribute access)
# ================================================================


class ManagedSwitchObject(FortiObject):
    """Typed FortiObject for ManagedSwitch with field access."""
    switch_id: str
    sn: str
    description: str
    switch_profile: str
    access_profile: str
    purdue_level: Literal["1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "5.5"]
    fsw_wan1_peer: str
    fsw_wan1_admin: Literal["discovered", "disable", "enable"]
    poe_pre_standard_detection: Literal["enable", "disable"]
    dhcp_server_access_list: Literal["global", "enable", "disable"]
    poe_detection_type: int
    max_poe_budget: int
    directly_connected: int
    max_allowed_trunk_members: int
    pre_provisioned: int
    l3_discovered: int
    mgmt_mode: int
    tunnel_discovered: int
    tdr_supported: str
    dynamic_capability: str
    switch_device_tag: str
    switch_dhcp_opt43_key: str
    mclag_igmp_snooping_aware: Literal["enable", "disable"]
    dynamically_discovered: int
    ptp_status: Literal["disable", "enable"]
    ptp_profile: str
    radius_nas_ip_override: Literal["disable", "enable"]
    radius_nas_ip: str
    route_offload: Literal["disable", "enable"]
    route_offload_mclag: Literal["disable", "enable"]
    route_offload_router: list[ManagedSwitchRouteoffloadrouterItem]
    vlan: list[ManagedSwitchVlanItem]
    type: Literal["virtual", "physical"]
    owner_vdom: str
    flow_identity: str
    staged_image_version: str
    delayed_restart_trigger: int
    firmware_provision: Literal["enable", "disable"]
    firmware_provision_version: str
    firmware_provision_latest: Literal["disable", "once"]
    ports: list[ManagedSwitchPortsItem]
    ip_source_guard: list[ManagedSwitchIpsourceguardItem]
    stp_settings: str
    stp_instance: list[ManagedSwitchStpinstanceItem]
    override_snmp_sysinfo: Literal["disable", "enable"]
    snmp_sysinfo: str
    override_snmp_trap_threshold: Literal["enable", "disable"]
    snmp_trap_threshold: str
    override_snmp_community: Literal["enable", "disable"]
    snmp_community: list[ManagedSwitchSnmpcommunityItem]
    override_snmp_user: Literal["enable", "disable"]
    snmp_user: list[ManagedSwitchSnmpuserItem]
    qos_drop_policy: Literal["taildrop", "random-early-detection"]
    qos_red_probability: int
    switch_log: str
    remote_log: list[ManagedSwitchRemotelogItem]
    storm_control: str
    mirror: list[ManagedSwitchMirrorItem]
    static_mac: list[ManagedSwitchStaticmacItem]
    custom_command: list[ManagedSwitchCustomcommandItem]
    dhcp_snooping_static_client: list[ManagedSwitchDhcpsnoopingstaticclientItem]
    igmp_snooping: str
    x802_1X_settings: str
    router_vrf: list[ManagedSwitchRoutervrfItem]
    system_interface: list[ManagedSwitchSysteminterfaceItem]
    router_static: list[ManagedSwitchRouterstaticItem]
    system_dhcp_server: list[ManagedSwitchSystemdhcpserverItem]


# ================================================================
# Main Endpoint Class
# ================================================================

class ManagedSwitch:
    """
    
    Endpoint: switch_controller/managed_switch
    Category: cmdb
    MKey: switch-id
    """
    
    # Class attributes for introspection
    endpoint: ClassVar[str] = ...
    path: ClassVar[str] = ...
    category: ClassVar[str] = ...
    mkey: ClassVar[str] = ...
    capabilities: ClassVar[dict[str, Any]] = ...
    
    def __init__(self, client: Any) -> None:
        """Initialize endpoint with HTTP client."""
        ...
    
    # ================================================================
    # GET Methods
    # ================================================================
    
    # CMDB with mkey - overloads for single vs list returns
    @overload
    def get(
        self,
        switch_id: str,
        *,
        filter: str | list[str] | None = ...,
        count: int | None = ...,
        start: int | None = ...,
        payload_dict: dict[str, Any] | None = ...,
        range: list[int] | None = ...,
        sort: str | None = ...,
        format: str | None = ...,
        action: str | None = ...,
        vdom: str | bool | None = ...,
        error_mode: Literal["raise", "return", "print"] | None = ...,
        error_format: Literal["detailed", "simple", "code_only"] | None = ...,
    ) -> ManagedSwitchObject: ...
    
    @overload
    def get(
        self,
        *,
        filter: str | list[str] | None = ...,
        count: int | None = ...,
        start: int | None = ...,
        payload_dict: dict[str, Any] | None = ...,
        range: list[int] | None = ...,
        sort: str | None = ...,
        format: str | None = ...,
        action: str | None = ...,
        vdom: str | bool | None = ...,
        error_mode: Literal["raise", "return", "print"] | None = ...,
        error_format: Literal["detailed", "simple", "code_only"] | None = ...,
    ) -> FortiObjectList[ManagedSwitchObject]: ...
    
    def get_schema(
        self,
        vdom: str | None = ...,
        format: str = ...,
    ) -> FortiObject: ...

    # ================================================================
    # POST Method
    # ================================================================
    
    def post(
        self,
        payload_dict: ManagedSwitchPayload | None = ...,
        switch_id: str | None = ...,
        sn: str | None = ...,
        description: str | None = ...,
        switch_profile: str | None = ...,
        access_profile: str | None = ...,
        purdue_level: Literal["1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "5.5"] | None = ...,
        fsw_wan1_peer: str | None = ...,
        fsw_wan1_admin: Literal["discovered", "disable", "enable"] | None = ...,
        poe_pre_standard_detection: Literal["enable", "disable"] | None = ...,
        dhcp_server_access_list: Literal["global", "enable", "disable"] | None = ...,
        poe_detection_type: int | None = ...,
        max_poe_budget: int | None = ...,
        directly_connected: int | None = ...,
        version: int | None = ...,
        max_allowed_trunk_members: int | None = ...,
        pre_provisioned: int | None = ...,
        l3_discovered: int | None = ...,
        mgmt_mode: int | None = ...,
        tunnel_discovered: int | None = ...,
        tdr_supported: str | None = ...,
        dynamic_capability: str | None = ...,
        switch_device_tag: str | None = ...,
        switch_dhcp_opt43_key: str | None = ...,
        mclag_igmp_snooping_aware: Literal["enable", "disable"] | None = ...,
        dynamically_discovered: int | None = ...,
        ptp_status: Literal["disable", "enable"] | None = ...,
        ptp_profile: str | None = ...,
        radius_nas_ip_override: Literal["disable", "enable"] | None = ...,
        radius_nas_ip: str | None = ...,
        route_offload: Literal["disable", "enable"] | None = ...,
        route_offload_mclag: Literal["disable", "enable"] | None = ...,
        route_offload_router: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRouteoffloadrouterItem] | None = ...,
        vlan: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchVlanItem] | None = ...,
        type: Literal["virtual", "physical"] | None = ...,
        owner_vdom: str | None = ...,
        flow_identity: str | None = ...,
        staged_image_version: str | None = ...,
        delayed_restart_trigger: int | None = ...,
        firmware_provision: Literal["enable", "disable"] | None = ...,
        firmware_provision_version: str | None = ...,
        firmware_provision_latest: Literal["disable", "once"] | None = ...,
        ports: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchPortsItem] | None = ...,
        ip_source_guard: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchIpsourceguardItem] | None = ...,
        stp_settings: str | None = ...,
        stp_instance: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchStpinstanceItem] | None = ...,
        override_snmp_sysinfo: Literal["disable", "enable"] | None = ...,
        snmp_sysinfo: str | None = ...,
        override_snmp_trap_threshold: Literal["enable", "disable"] | None = ...,
        snmp_trap_threshold: str | None = ...,
        override_snmp_community: Literal["enable", "disable"] | None = ...,
        snmp_community: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSnmpcommunityItem] | None = ...,
        override_snmp_user: Literal["enable", "disable"] | None = ...,
        snmp_user: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSnmpuserItem] | None = ...,
        qos_drop_policy: Literal["taildrop", "random-early-detection"] | None = ...,
        qos_red_probability: int | None = ...,
        switch_log: str | None = ...,
        remote_log: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRemotelogItem] | None = ...,
        storm_control: str | None = ...,
        mirror: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchMirrorItem] | None = ...,
        static_mac: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchStaticmacItem] | None = ...,
        custom_command: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchCustomcommandItem] | None = ...,
        dhcp_snooping_static_client: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchDhcpsnoopingstaticclientItem] | None = ...,
        igmp_snooping: str | None = ...,
        x802_1X_settings: str | None = ...,
        router_vrf: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRoutervrfItem] | None = ...,
        system_interface: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSysteminterfaceItem] | None = ...,
        router_static: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRouterstaticItem] | None = ...,
        system_dhcp_server: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSystemdhcpserverItem] | None = ...,
        vdom: str | bool | None = ...,
        error_mode: Literal["raise", "return", "print"] | None = ...,
        error_format: Literal["detailed", "simple", "code_only"] | None = ...,
    ) -> ManagedSwitchObject: ...

    # ================================================================
    # PUT Method
    # ================================================================
    
    def put(
        self,
        payload_dict: ManagedSwitchPayload | None = ...,
        switch_id: str | None = ...,
        sn: str | None = ...,
        description: str | None = ...,
        switch_profile: str | None = ...,
        access_profile: str | None = ...,
        purdue_level: Literal["1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "5.5"] | None = ...,
        fsw_wan1_peer: str | None = ...,
        fsw_wan1_admin: Literal["discovered", "disable", "enable"] | None = ...,
        poe_pre_standard_detection: Literal["enable", "disable"] | None = ...,
        dhcp_server_access_list: Literal["global", "enable", "disable"] | None = ...,
        poe_detection_type: int | None = ...,
        max_poe_budget: int | None = ...,
        directly_connected: int | None = ...,
        version: int | None = ...,
        max_allowed_trunk_members: int | None = ...,
        pre_provisioned: int | None = ...,
        l3_discovered: int | None = ...,
        mgmt_mode: int | None = ...,
        tunnel_discovered: int | None = ...,
        tdr_supported: str | None = ...,
        dynamic_capability: str | None = ...,
        switch_device_tag: str | None = ...,
        switch_dhcp_opt43_key: str | None = ...,
        mclag_igmp_snooping_aware: Literal["enable", "disable"] | None = ...,
        dynamically_discovered: int | None = ...,
        ptp_status: Literal["disable", "enable"] | None = ...,
        ptp_profile: str | None = ...,
        radius_nas_ip_override: Literal["disable", "enable"] | None = ...,
        radius_nas_ip: str | None = ...,
        route_offload: Literal["disable", "enable"] | None = ...,
        route_offload_mclag: Literal["disable", "enable"] | None = ...,
        route_offload_router: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRouteoffloadrouterItem] | None = ...,
        vlan: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchVlanItem] | None = ...,
        type: Literal["virtual", "physical"] | None = ...,
        owner_vdom: str | None = ...,
        flow_identity: str | None = ...,
        staged_image_version: str | None = ...,
        delayed_restart_trigger: int | None = ...,
        firmware_provision: Literal["enable", "disable"] | None = ...,
        firmware_provision_version: str | None = ...,
        firmware_provision_latest: Literal["disable", "once"] | None = ...,
        ports: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchPortsItem] | None = ...,
        ip_source_guard: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchIpsourceguardItem] | None = ...,
        stp_settings: str | None = ...,
        stp_instance: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchStpinstanceItem] | None = ...,
        override_snmp_sysinfo: Literal["disable", "enable"] | None = ...,
        snmp_sysinfo: str | None = ...,
        override_snmp_trap_threshold: Literal["enable", "disable"] | None = ...,
        snmp_trap_threshold: str | None = ...,
        override_snmp_community: Literal["enable", "disable"] | None = ...,
        snmp_community: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSnmpcommunityItem] | None = ...,
        override_snmp_user: Literal["enable", "disable"] | None = ...,
        snmp_user: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSnmpuserItem] | None = ...,
        qos_drop_policy: Literal["taildrop", "random-early-detection"] | None = ...,
        qos_red_probability: int | None = ...,
        switch_log: str | None = ...,
        remote_log: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRemotelogItem] | None = ...,
        storm_control: str | None = ...,
        mirror: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchMirrorItem] | None = ...,
        static_mac: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchStaticmacItem] | None = ...,
        custom_command: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchCustomcommandItem] | None = ...,
        dhcp_snooping_static_client: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchDhcpsnoopingstaticclientItem] | None = ...,
        igmp_snooping: str | None = ...,
        x802_1X_settings: str | None = ...,
        router_vrf: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRoutervrfItem] | None = ...,
        system_interface: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSysteminterfaceItem] | None = ...,
        router_static: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRouterstaticItem] | None = ...,
        system_dhcp_server: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSystemdhcpserverItem] | None = ...,
        vdom: str | bool | None = ...,
        error_mode: Literal["raise", "return", "print"] | None = ...,
        error_format: Literal["detailed", "simple", "code_only"] | None = ...,
    ) -> ManagedSwitchObject: ...

    # ================================================================
    # DELETE Method
    # ================================================================
    
    def delete(
        self,
        switch_id: str | None = ...,
        vdom: str | bool | None = ...,
        error_mode: Literal["raise", "return", "print"] | None = ...,
        error_format: Literal["detailed", "simple", "code_only"] | None = ...,
    ) -> FortiObject: ...

    # ================================================================
    # Utility Methods
    # ================================================================
    
    def exists(
        self,
        switch_id: str,
        vdom: str | bool | None = ...,
    ) -> bool: ...
    
    def set(
        self,
        payload_dict: ManagedSwitchPayload | None = ...,
        switch_id: str | None = ...,
        sn: str | None = ...,
        description: str | None = ...,
        switch_profile: str | None = ...,
        access_profile: str | None = ...,
        purdue_level: Literal["1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "5.5"] | None = ...,
        fsw_wan1_peer: str | None = ...,
        fsw_wan1_admin: Literal["discovered", "disable", "enable"] | None = ...,
        poe_pre_standard_detection: Literal["enable", "disable"] | None = ...,
        dhcp_server_access_list: Literal["global", "enable", "disable"] | None = ...,
        poe_detection_type: int | None = ...,
        max_poe_budget: int | None = ...,
        directly_connected: int | None = ...,
        version: int | None = ...,
        max_allowed_trunk_members: int | None = ...,
        pre_provisioned: int | None = ...,
        l3_discovered: int | None = ...,
        mgmt_mode: int | None = ...,
        tunnel_discovered: int | None = ...,
        tdr_supported: str | None = ...,
        dynamic_capability: str | None = ...,
        switch_device_tag: str | None = ...,
        switch_dhcp_opt43_key: str | None = ...,
        mclag_igmp_snooping_aware: Literal["enable", "disable"] | None = ...,
        dynamically_discovered: int | None = ...,
        ptp_status: Literal["disable", "enable"] | None = ...,
        ptp_profile: str | None = ...,
        radius_nas_ip_override: Literal["disable", "enable"] | None = ...,
        radius_nas_ip: str | None = ...,
        route_offload: Literal["disable", "enable"] | None = ...,
        route_offload_mclag: Literal["disable", "enable"] | None = ...,
        route_offload_router: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRouteoffloadrouterItem] | None = ...,
        vlan: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchVlanItem] | None = ...,
        type: Literal["virtual", "physical"] | None = ...,
        owner_vdom: str | None = ...,
        flow_identity: str | None = ...,
        staged_image_version: str | None = ...,
        delayed_restart_trigger: int | None = ...,
        firmware_provision: Literal["enable", "disable"] | None = ...,
        firmware_provision_version: str | None = ...,
        firmware_provision_latest: Literal["disable", "once"] | None = ...,
        ports: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchPortsItem] | None = ...,
        ip_source_guard: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchIpsourceguardItem] | None = ...,
        stp_settings: str | None = ...,
        stp_instance: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchStpinstanceItem] | None = ...,
        override_snmp_sysinfo: Literal["disable", "enable"] | None = ...,
        snmp_sysinfo: str | None = ...,
        override_snmp_trap_threshold: Literal["enable", "disable"] | None = ...,
        snmp_trap_threshold: str | None = ...,
        override_snmp_community: Literal["enable", "disable"] | None = ...,
        snmp_community: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSnmpcommunityItem] | None = ...,
        override_snmp_user: Literal["enable", "disable"] | None = ...,
        snmp_user: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSnmpuserItem] | None = ...,
        qos_drop_policy: Literal["taildrop", "random-early-detection"] | None = ...,
        qos_red_probability: int | None = ...,
        switch_log: str | None = ...,
        remote_log: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRemotelogItem] | None = ...,
        storm_control: str | None = ...,
        mirror: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchMirrorItem] | None = ...,
        static_mac: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchStaticmacItem] | None = ...,
        custom_command: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchCustomcommandItem] | None = ...,
        dhcp_snooping_static_client: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchDhcpsnoopingstaticclientItem] | None = ...,
        igmp_snooping: str | None = ...,
        x802_1X_settings: str | None = ...,
        router_vrf: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRoutervrfItem] | None = ...,
        system_interface: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSysteminterfaceItem] | None = ...,
        router_static: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchRouterstaticItem] | None = ...,
        system_dhcp_server: str | list[str] | list[dict[str, Any]] | list[ManagedSwitchSystemdhcpserverItem] | None = ...,
        vdom: str | bool | None = ...,
        error_mode: Literal["raise", "return", "print"] | None = ...,
        error_format: Literal["detailed", "simple", "code_only"] | None = ...,
    ) -> FortiObject: ...
    
    # Helper methods
    @staticmethod
    def help(field_name: str | None = ...) -> str: ...
    
    @staticmethod
    def fields(detailed: bool = ...) -> list[str] | list[dict[str, Any]]: ...
    
    @staticmethod
    def field_info(field_name: str) -> FortiObject: ...
    
    @staticmethod
    def validate_field(name: str, value: Any) -> bool: ...
    
    @staticmethod
    def required_fields() -> list[str]: ...
    
    @staticmethod
    def defaults() -> FortiObject: ...
    
    @staticmethod
    def schema() -> FortiObject: ...


__all__ = [
    "ManagedSwitch",
    "ManagedSwitchPayload",
    "ManagedSwitchResponse",
    "ManagedSwitchObject",
]