from pydantic import BaseModel, Field
from typing import Optional
from datetime import datetime

from typing import Optional, List
from pydantic import BaseModel, Field
from datetime import datetime

class RfProfileDefault(BaseModel):
    id: Optional[int]
    name: Optional[str]
    airtimeFairness2G: Optional[bool] = False
    airtimeFairness5G: Optional[bool] = False
    assignments: Optional[str] = None
    associationRSSIThreshold2: Optional[int] = 0
    associationRSSIThreshold5A: Optional[int] = 0
    associationRSSIThreshold5H: Optional[int] = 0
    associationRSSIThreshold5L: Optional[int] = 0
    associationRSSIThreshold6: Optional[int] = 0
    backgroundScanning: Optional[bool] = True
    band2: Optional[bool] = True
    band5A: Optional[bool] = True
    band5H: Optional[bool] = True
    band5L: Optional[bool] = True
    band6: Optional[bool] = True
    bandSteering: Optional[bool] = False
    bandSteeringForce5g: Optional[bool] = False
    bandSteeringForce6g: Optional[bool] = False
    beaconInterval2: Optional[int] = 100
    beaconInterval5A: Optional[int] = 100
    beaconInterval5H: Optional[int] = 100
    beaconInterval5L: Optional[int] = 100
    beaconInterval6: Optional[int] = 100
    channelDRM5A: Optional[bool] = False
    channelDRM5H: Optional[bool] = False
    channelDRM5L: Optional[bool] = False
    channelDRM6: Optional[bool] = False
    channelList5A: Optional[str] = ""
    channelList5H: Optional[str] = ""
    channelList5L: Optional[str] = ""
    channelList6: Optional[str] = ""
    channelSetting2: Optional[str] = "AUTO"
    channelSetting5A: Optional[str] = "AUTO"
    channelSetting5H: Optional[str] = "AUTO"
    channelSetting5L: Optional[str] = "AUTO"
    channelSetting6: Optional[str] = "AUTO"
    channelWidth2: Optional[str] = "0"
    channelWidth5A: Optional[str] = "0"
    channelWidth5H: Optional[str] = "0"
    channelWidth5L: Optional[str] = "0"
    channelWidth6: Optional[str] = "0"
    clientAwareness2: Optional[bool] = True
    clientAwareness5A: Optional[bool] = True
    clientAwareness5H: Optional[bool] = True
    clientAwareness5L: Optional[bool] = True
    clientAwareness6: Optional[bool] = True
    countryCode: Optional[str] = "AU"
    csa2: Optional[bool] = True
    csa5A: Optional[bool] = True
    csa5H: Optional[bool] = True
    csa5L: Optional[bool] = True
    csa6: Optional[bool] = True
    csaCount2: Optional[int] = 4
    csaCount5A: Optional[int] = 4
    csaCount5H: Optional[int] = 4
    csaCount5L: Optional[int] = 4
    csaCount6: Optional[int] = 4
    defaultSetting: Optional[bool] = False
    description: Optional[str] = ""
    drmInterval: Optional[int] = 6
    drmStartTime: Optional[str] = "00:00"
    drmTimeControl: Optional[bool] = False
    dynamicLoadBalance: Optional[bool] = False
    excludeMacOUILists: Optional[str] = ""
    externalAntennasGain2: Optional[int] = 0
    externalAntennasGain5A: Optional[int] = 0
    externalAntennasGain5H: Optional[int] = 0
    externalAntennasGain5L: Optional[int] = 0
    externalAntennasGain6: Optional[int] = 0
    highEfficiency2: Optional[bool] = True
    highEfficiency5A: Optional[bool] = True
    highEfficiency5H: Optional[bool] = True
    highEfficiency5L: Optional[bool] = True
    highEfficiency6: Optional[bool] = True
    isAPLinked: Optional[bool] = False
    maxTXPower2: Optional[str] = ""
    maxTXPower5A: Optional[str] = ""
    maxTXPower5H: Optional[str] = ""
    maxTXPower5L: Optional[str] = ""
    maxTXPower6: Optional[str] = ""
    minTXPower2: Optional[str] = ""
    minTXPower5A: Optional[str] = ""
    minTXPower5H: Optional[str] = ""
    minTXPower5L: Optional[str] = ""
    minTXPower6: Optional[str] = ""
    muMimo2: Optional[bool] = True
    muMimo5A: Optional[bool] = True
    muMimo5H: Optional[bool] = True
    muMimo5L: Optional[bool] = True
    muMimo6: Optional[bool] = True
    powerSetting2: Optional[str] = "AUTO"
    powerSetting5A: Optional[str] = "AUTO"
    powerSetting5H: Optional[str] = "AUTO"
    powerSetting5L: Optional[str] = "AUTO"
    powerSetting6: Optional[str] = "AUTO"
    profileType: Optional[str] = "NORMAL"
    radioSetting: Optional[List[str]] = []
    roamingRSSIThreshold2: Optional[int] = 0
    roamingRSSIThreshold5A: Optional[int] = 0
    roamingRSSIThreshold5H: Optional[int] = 0
    roamingRSSIThreshold5L: Optional[int] = 0
    roamingRSSIThreshold6: Optional[int] = 0
    scanningChannel: Optional[str] = "workChannel"
    scanningDuration: Optional[int] = 50
    scanningInterval: Optional[int] = 20
    shortGuardInterval2: Optional[bool] = True
    shortGuardInterval5A: Optional[bool] = True
    shortGuardInterval5H: Optional[bool] = True
    shortGuardInterval5L: Optional[bool] = True
    shortGuardInterval6: Optional[bool] = True
    voiceAndVideoAwareness: Optional[bool] = True

class ProvisioningConfigDefault(BaseModel):
    id: Optional[int]
    name: Optional[str]
    siteId: Optional[str]
    advancedAnalyticsIotLocationServerProfileName: Optional[str] = "Default Advanced Analytics"
    advancedAnalyticsSwitch: Optional[bool] = True
    advertisingProtocolMode: Optional[str] = "iBeacon"
    advertisingSwitch: Optional[bool] = False
    apuiPassword: Optional[str] = "*"
    apuiSwitch: Optional[bool] = False
    bleLbsIotLocationServerProfileName: Optional[str] = None
    calledStationId: Optional[str] = None
    cirrusWifiRTLSSwitch: Optional[bool] = False
    dayLightSaveTime: Optional[bool] = False
    description: Optional[str] = None
    eddyStoneURL: Optional[str] = ""
    emissionFrequency: Optional[int] = 200
    eventConfigurationName: Optional[str] = None
    externalPortalCertificate: Optional[str] = None
    hostName: Optional[str] = None
    igmpSnooping: Optional[bool] = False
    iotRadioMode: Optional[str] = "Disable"
    ipv6L3ForwardingSwitch: Optional[bool] = False
    isAPUIPasswordChanged: Optional[bool] = False
    isClientBeTrackingPasswordChanged: Optional[bool] = False
    isSSHRootPasswordChanged: Optional[bool] = False
    isSSHSupportPasswordChanged: Optional[bool] = False
    isSnmpPasswordChanged: Optional[bool] = False
    isTrapPasswordChanged: Optional[bool] = False
    localLdapCertificate: Optional[str] = None
    localRadSecCertificate: Optional[str] = "RadSecCert"
    systemLogDataList: Optional[List[dict]] = [
        {"sysLogId": 226366, "syslogServerIp": "143.209.0.2", "sysLogServerPort": 514, "sysLogTlsSwitch": True, "sysLogCertification": "SyslogCert"}
    ]
    logLevelAPDebug: Optional[str] = "LOG_NOTICE"
    logLevelNetwork: Optional[str] = "LOG_NOTICE"
    logLevelSecurity: Optional[str] = "LOG_NOTICE"
    logLevelSystem: Optional[str] = "LOG_NOTICE"
    logLevelUser: Optional[str] = "LOG_NOTICE"
    logLevelWireless: Optional[str] = "LOG_NOTICE"
    logRemoteSwitch: Optional[bool] = True
    logUploadPeriod: Optional[int] = 1
    nameSpace: Optional[str] = ""
    ntpServerList: Optional[List[str]] = ["pool.ntp.org"]
    ouiAllowList: Optional[List[str]] = []
    password: Optional[str] = "*"
    pmdSwitch: Optional[bool] = False
    profileType: Optional[str] = "DEFAULT"
    redirectProxyServerPort: Optional[int] = 1024
    redirectServerHost: Optional[str] = "dev.portal.ovcirrus.com"
    redirectServerIP: Optional[str] = "172.16.90.109"
    redirectServerIPv6: Optional[str] = ""
    remotePath: Optional[str] = None
    rfProfileName: Optional[str] = "Default RF Profile"
    scanningInterval: Optional[int] = 100
    scanningSwitch: Optional[bool] = False
    serverIP: Optional[str] = None
    serverPort: Optional[int] = 0
    serverType: Optional[str] = "SFTP"
    snmpCommunity: Optional[str] = None
    snmpPassword: Optional[str] = "*"
    snmpStatus: Optional[bool] = False
    snmpUserName: Optional[str] = None
    snmpVersion: Optional[str] = None
    sshRootPassword: Optional[str] = "*"
    sshSupportPassword: Optional[str] = "*"
    sshSwitch: Optional[bool] = False
    syslogServerIp: Optional[str] = None
    syslogServerPort: Optional[int] = 0
    syslogSwitch: Optional[bool] = False
    tftpServer: Optional[str] = None
    timeZone: Optional[str] = "Asia/Singapore (GMT+08:00)"
    trapCommunity: Optional[str] = None
    trapPassword: Optional[str] = "*"
    trapServer: Optional[str] = None
    trapStatus: Optional[bool] = False
    trapUserName: Optional[str] = None
    trapVersion: Optional[str] = None
    txChannel: Optional[List[int]] = [1, 2, 4]
    txPower: Optional[int] = 4
    uploadToServerSwitch: Optional[bool] = False
    userName: Optional[str] = None
    virtualIPAddress: Optional[str] = "192.0.2.0"
    vlanId: Optional[str] = None
    vpnServers: Optional[List[str]] = []
    webServiceCertificate: Optional[str] = None
    wifiIotLocationServerProfileName: Optional[str] = None
    supplicant8021x: Optional[bool] = True
    certificate8021x: Optional[str] = "Cert8021X"

class Organization(BaseModel):
    createdAt: Optional[datetime] = None
    updatedAt: Optional[datetime] = None
    id: Optional[str] = None
    name: Optional[str] = ""
    is2FARequired: Optional[bool] = False
    imageUrl: Optional[str] = ""
    countryCode: Optional[str] = ""
    timezone: Optional[str] = ""
    auditHour: Optional[int] = 0
    idleTimeout: Optional[int] = 0
    rfProfileDefault: Optional[RfProfileDefault] = None
    provisioningConfigDefault: Optional[ProvisioningConfigDefault] = None
    msp: Optional[str] = None
    upamAuthRecords: Optional[int] = 0
    events: Optional[int] = 0
    alerts: Optional[int] = 0
    wifiRtls: Optional[int] = 0
    networkAnalytics: Optional[int] = 0
    clientSessions: Optional[int] = 0
    clientAnalytics: Optional[int] = 0
    auditLogs: Optional[int] = 0
    loginAttemps: Optional[int] = 0
    iotData: Optional[int] = 0
    backupPerDevice: Optional[int] = 0
    collectInfo: Optional[int] = 0
    configurationBackup: Optional[int] = 0
    qoe: Optional[int] = 0
    enforceStrongPassword: Optional[bool] = False
    enforceStrongPasswordNotifyType: Optional[str] = "SHOW_MESSAGE_AFTER_LOGIN"
